MrSID Decode SDK for LiDAR Reference Manual
1.1.2.4045
Main Page
Classes
Files
File List
File Members
Base.h
Go to the documentation of this file.
1
/* //////////////////////////////////////////////////////////////////////////
2
// //
3
// This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western //
4
// Avenue, Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
5
// prohibited. Access to and use of this code is permitted only under //
6
// license from LizardTech, Inc. Portions of the code are protected by //
7
// US and foreign patents and other filings. All Rights Reserved. //
8
// //
10
/* PUBLIC */
11
12
#ifndef __LIDAR_BASE_H__
13
#define __LIDAR_BASE_H__
14
15
/* this should be a vaild C header file */
16
17
#include <stddef.h>
18
19
/* Notes on data types */
20
21
/* use size_t and ptrdiff_t when dealing memory sizes and offsets */
22
/* use IO::offset_type when dealing with file sizes and offsets */
23
24
/* use the following types when reading and writing persistent data */
25
27
typedef
signed
char
lt_int8
;
29
typedef
unsigned
char
lt_uint8
;
31
typedef
signed
short
lt_int16
;
33
typedef
unsigned
short
lt_uint16
;
35
typedef
signed
int
lt_int32
;
37
typedef
unsigned
int
lt_uint32
;
38
39
#if defined(_MSC_VER)
40
41
typedef
signed
__int64
lt_int64
;
43
typedef
unsigned
__int64
lt_uint64
;
44
#else
45
46
typedef
long
long
int
lt_int64
;
48
typedef
unsigned
long
long
int
lt_uint64
;
49
#endif
50
51
#ifdef __cplusplus
52
53
/* namespace macros */
54
#define LT_BEGIN_LIDAR_NAMESPACE namespace LizardTech {
55
#define LT_END_LIDAR_NAMESPACE }
56
#define LT_USE_LIDAR_NAMESPACE using namespace LizardTech;
57
58
LT_BEGIN_LIDAR_NAMESPACE
59
60
void
*XALLOC(
size_t
size);
61
void
*XREALLOC(
void
*ptr,
size_t
size);
62
void
XDEALLOC(
void
*ptr);
63
64
/* Macro for disabling copy construtor and assignment opterator */
65
66
#define DISABLE_COPY(classname) \
67
private: \
68
classname(const classname &); \
69
classname &operator=(const classname &)
70
71
#define OVERRIDE_NEW \
72
public: \
73
static void *operator new(size_t size) { return XALLOC(size); } \
74
static void operator delete(void *ptr) { XDEALLOC(ptr); }
75
76
#define SIMPLE_OBJECT(classname) \
77
OVERRIDE_NEW \
78
DISABLE_COPY(classname)
79
80
LT_END_LIDAR_NAMESPACE
81
82
#endif
/* __cplusplus */
83
84
#ifdef __cplusplus
85
#define LT_BEGIN_C_NAMESPACE extern "C" {
86
#define LT_END_C_NAMESPACE };
87
#else
88
#define LT_BEGIN_C_NAMESPACE
89
#define LT_END_C_NAMESPACE
90
#endif
91
92
#endif
/* __LIDAR_BASE_H__ */
lt_uint8
unsigned char lt_uint8
unsigned 8-bit integer
Definition:
Base.h:29
lt_uint32
unsigned int lt_uint32
unsigned 32-bit integer
Definition:
Base.h:37
lt_int8
signed char lt_int8
signed 8-bit integer
Definition:
Base.h:27
lt_int32
signed int lt_int32
signed 32-bit integer
Definition:
Base.h:35
lt_uint64
unsigned long long int lt_uint64
unsigned 64-bit integer
Definition:
Base.h:48
lt_uint16
unsigned short lt_uint16
unsigned 16-bit integer
Definition:
Base.h:33
lt_int16
signed short lt_int16
signed 16-bit integer
Definition:
Base.h:31
lt_int64
long long int lt_int64
signed 64-bit integer
Definition:
Base.h:46
LizardTech