basic.h 文件参考

Basic definitions. 更多...

#include <stdint.h>
#include <memory>
#include <stdexcept>
#include <cfloat>
#include <map>
#include <string>
#include <cstring>

浏览源代码.

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

命名空间

namespace  ccgl
 Common Cross-platform Geographic Library (CCGL)
 

宏定义

#define _DEBUG
 NDEBUG or _DEBUG mean not build on DEBUG mode.
 
#define NOEXCEPT   throw()
 A compatible reference to noexcept or throw() if not supported by the compiler.
 
#define OVERRIDE
 A compatible reference to override or blank if not supported by the compiler.
 
#define NODATA_VALUE   (-9999.)
 Global utility definitions 更多...
 
#define MISSINGFLOAT   (-1 * FLT_MAX)
 Missing float value
 
#define MAXIMUMFLOAT   FLT_MAX
 Maximum float value
 
#define PATH_MAX   1024
 Maximum length of full file path
 
#define UTIL_ZERO   1.0e-6
 A approximation of Zero
 
#define PI   3.14159265358979323846
 A approximation of PI
 
#define MINI_SLOPE   0.0001
 Minimum slope(radian) value
 
#define POSTFIX   "d"
 A reference to the postfix of executable file for DEBUG mode
 
#define CVT_INT(param)   static_cast<int>((param))
 A reference to the postfix of executable file for RELWITHDEBINFO mode 更多...
 
#define CVT_SIZET(param)   static_cast<size_t>((param))
 Convert to size_t size_t
 
#define CVT_FLT(param)   static_cast<float>((param))
 Convert to float float
 
#define CVT_DBL(param)   static_cast<double>((param))
 Convert to double double
 
#define CVT_TIMET(param)   static_cast<time_t>((param))
 Convert to time_t time_t
 
#define CVT_CHAR(param)   static_cast<char>((param))
 Convert to char char
 
#define CVT_STR(param)   static_cast<string>((param))
 Convert to string string
 
#define CVT_VINT(param)   static_cast<vint>((param))
 Convert to 8-byte (64-bit) signed integer vint
 
#define CVT_VSINT(param)   static_cast<vsint>((param))
 Convert to 8-byte (64-bit) signed integer vsint
 
#define CVT_VUINT(param)   static_cast<vuint>((param))
 Convert to 8-byte (64-bit) unsigned integer vuint
 
#define CVT_VUINT64(param)   static_cast<vuint64_t>((param))
 Convert to 8-byte (64-bit) unsigned integer vuint64_t
 

类型定义

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

函数

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

详细描述

Basic definitions.

Part of the Common Cross-platform Geographic Library (CCGL)

备注
  • 1. 2018-05-02 - lj - Initially implementation.
  • 2. 2018-06-21 - lj - Test on Intel C++ compiler.
  • 3. 2018-08-21 - lj - Doxygen comment style check.
作者
Liangjun Zhu, zlj(at)lreis.ac.cn
版本
1.1

宏定义说明

◆ CVT_INT

#define CVT_INT (   param)    static_cast<int>((param))

A reference to the postfix of executable file for RELWITHDEBINFO mode

A reference to the postfix of executable file for MINSIZEREL mode

A reference to the postfix of executable file for RELEASE mode Use static_cast<T>(a) instead (T)a or T(a) to convert datetypes

Convert to integer int

◆ NODATA_VALUE

#define NODATA_VALUE   (-9999.)

Global utility definitions

Default NoData value for raster data etc.