ccgl Namespace Reference

Common Cross-platform Geographic Library (CCGL) More...

Namespaces

namespace  db_mongoc
 Simple wrappers of the API of MongoDB C driver mongo-c-driver, see MongoDB C Driver for more information.
 
namespace  utils_array
 Array related functions include vector and pointer array.
 
namespace  utils_filesystem
 File Input and output related functions.
 
namespace  utils_math
 Basic mathematics related functions.
 
namespace  utils_string
 String related functions.
 
namespace  utils_time
 Time related functions.
 

Classes

class  Interface
 Base type of all interfaces. More...
 
class  ModelException
 Print the exception message. More...
 
class  NotCopyable
 Base class for classes that cannot be copied. More...
 
class  Object
 Base of all classes. More...
 

Typedefs

typedef vint64_t pos_t
 Signed integer representing position.
 
typedef std::map< string, string > STRING_MAP
 Map of string key and string value.
 
typedef std::map< string, double > STRDBL_MAP
 Map of string key and double value.
 

Functions

bool IsIpAddress (const char *ip)
 Check if the IP address is valid. More...
 
void Log (const string &msg, const string &logpath="debugInfo.log")
 Writes an entry to the log file. More...
 
int GetAvailableThreadNum ()
 Detect the available threads number. More...
 
void SetDefaultOpenMPThread ()
 Set the default omp thread number if necessary.
 
void SetOpenMPThread (int n)
 Set the omp thread number by given thread number. More...
 
void StatusMessage (const char *msg)
 Print status messages for Debug. More...
 
void StatusMessage (const string &msg)
 Print status messages for Debug. More...
 
void SleepMs (const int millisecs)
 Sleep milliseconds. More...
 

Detailed Description

Common Cross-platform Geographic Library (CCGL)

Function Documentation

◆ GetAvailableThreadNum()

◆ IsIpAddress()

bool ccgl::IsIpAddress ( const char *  ip)

Check if the IP address is valid.

Parameters
[in]ipchar* IP address.

◆ Log()

void ccgl::Log ( const string &  msg,
const string &  logpath = "debugInfo.log" 
)

Writes an entry to the log file.

Normally only used for debug

Parameters
[in]msgstring log message
[in]logpathstring Optional

◆ SetOpenMPThread()

void ccgl::SetOpenMPThread ( int  n)

Set the omp thread number by given thread number.

Parameters
[in]nThread number greater than 1.

◆ SleepMs()

void ccgl::SleepMs ( const int  millisecs)

Sleep milliseconds.

Parameters
[in]millisecsSleep timespan.

◆ StatusMessage() [1/2]

void ccgl::StatusMessage ( const char *  msg)

Print status messages for Debug.

Parameters
[in]msgchar* Message

◆ StatusMessage() [2/2]

void ccgl::StatusMessage ( const string &  msg)

Print status messages for Debug.

Parameters
[in]msgchar* Message