ccgl 命名空间参考

Common Cross-platform Geographic Library (CCGL) 更多...

命名空间

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
 

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

类型定义

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
 

函数

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

详细描述

Common Cross-platform Geographic Library (CCGL)

函数说明

◆ GetAvailableThreadNum()

◆ IsIpAddress()

bool ccgl::IsIpAddress ( const char *  ip)

Check if the IP address is valid.

参数
[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

参数
[in]msgstring log message
[in]logpathstring Optional

◆ SetOpenMPThread()

void ccgl::SetOpenMPThread ( int  n)

Set the omp thread number by given thread number

参数
[in]nThread number greater than 1.

◆ SleepMs()

void ccgl::SleepMs ( const int  millisecs)

Sleep milliseconds

参数
[in]millisecsSleep timespan.

◆ StatusMessage() [1/2]

void ccgl::StatusMessage ( const char *  msg)

Print status messages for Debug

参数
[in]msgchar* Message

◆ StatusMessage() [2/2]

void ccgl::StatusMessage ( const string &  msg)

Print status messages for Debug

参数
[in]msgchar* Message