Utils/VrUtils/Inc/IVrUtils.h
杰仔 9bcdc61c5a 初始提交:Utils 工具库模块
包含以下子模块:
- VrCommon: 核心接口和数据结构
- VrUtils: 工具类库(JSON、log4cpp、tinyxml2、INI、MD5、CRC)
- CloudUtils: 点云工具
- DataUtils: 数据处理工具(CloudMathClac、CoordinateTransform)
- CloudView: 点云查看工具

功能说明:
- 提供项目通用的基础工具类和实用功能
- 支持 Windows (MSVC/MinGW) 和 Linux (ARM/x86_64) 平台
- 使用 Qt qmake 构建系统
- 所有模块编译为静态库
2026-02-18 16:00:16 +08:00

64 lines
1.8 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __IVRUILTS__H__
#define __IVRUILTS__H__
#include "VrDateUtils.h"
#include "VrFileUtils.h"
#include "VrTimeUtils.h"
#include "VrCodeFormatUtils.h"
#include "VrMD5Utils.h"
#include "VrStringUtils.h"
#include "VrNumUtils.h"
#include "VrLog.h"
#include "VrShellUtils.h"
#include "VrNetUtils.h"
#include "VrDebugTime.h"
#include "VrNTPUtils.h"
#include "../crc/checksum.h"
#include "../ini/SimpleIni.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
// getopt只在Windows平台下包含其他平台使用系统自带的getopt
#ifdef _WIN32
#include "getopt.h"
#pragma comment(lib, "VrUtils.lib")
#pragma comment(lib, "Shell32.lib") // VrLog 需要 SHGetFolderPathA
#endif // _WIN32
#define YEAR ((((__DATE__[7] - '0') * 10 + (__DATE__[8] - '0')) * 10 \
+ (__DATE__ [9] - '0')) * 10 + (__DATE__ [10] - '0'))
#define MONTH (__DATE__ [2] == 'n' ? (__DATE__ [1] == 'a' ? 1 : 6) \
: __DATE__ [2] == 'b' ? 2 \
: __DATE__ [2] == 'r' ? (__DATE__ [0] == 'M' ? 3 : 4) \
: __DATE__ [2] == 'y' ? 5 \
: __DATE__ [2] == 'l' ? 7 \
: __DATE__ [2] == 'g' ? 8 \
: __DATE__ [2] == 'p' ? 9 \
: __DATE__ [2] == 't' ? 10 \
: __DATE__ [2] == 'v' ? 11 : 12)
#define DAY ((__DATE__ [4] == ' ' ? 0 : __DATE__ [4] - '0') * 10 \
+ (__DATE__[5] - '0'))
#define HOUR ((__TIME__[0] - '0') * 10 + (__TIME__[1] - '0'))
#define MINUTE ((__TIME__[3] - '0') * 10 + (__TIME__[4] - '0'))
#define SECOND ((__TIME__[6] - '0') * 10 + (__TIME__[7] - '0'))
#define BUILD_TIME (std::to_string(YEAR) + \
(MONTH < 10 ? "0" : "") + std::to_string(MONTH) + \
(DAY < 10 ? "0" : "") + std::to_string(DAY) + \
(HOUR < 10 ? "0" : "") + std::to_string(HOUR) + \
(MINUTE < 10 ? "0" : "") + std::to_string(MINUTE) + \
(SECOND < 10 ? "0" : "") + std::to_string(SECOND))
#endif