MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
Base.h
Go to the documentation of this file.
00001 /* //////////////////////////////////////////////////////////////////////////
00002 //                                                                         //
00003 // This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western      //
00004 // Avenue, Suite 200, Seattle, WA 98104.  Unauthorized use or distribution //
00005 // prohibited.  Access to and use of this code is permitted only under     //
00006 // license from LizardTech, Inc.  Portions of the code are protected by    //
00007 // US and foreign patents and other filings. All Rights Reserved.          //
00008 //                                                                         //
00010 /* PUBLIC */
00011 
00012 #ifndef __LIDAR_BASE_H__
00013 #define __LIDAR_BASE_H__
00014 
00015 /* this should be a vaild C header file */
00016 
00017 #include <stddef.h>
00018 
00019 /* Notes on data types */
00020 
00021 /* use size_t and ptrdiff_t when dealing memory sizes and offsets */
00022 /* use IO::offset_type when dealing with file sizes and offsets */
00023 
00024 /* use the following types when reading and writing persistent data */
00025 
00027 typedef signed char     lt_int8;
00029 typedef unsigned char   lt_uint8;
00031 typedef signed short    lt_int16;
00033 typedef unsigned short  lt_uint16;
00035 typedef signed int      lt_int32;
00037 typedef unsigned int    lt_uint32;
00038 
00039 #if defined(_MSC_VER)
00040 
00041    typedef signed __int64     lt_int64;
00043    typedef unsigned __int64   lt_uint64;
00044 #else
00045 
00046    typedef long long int              lt_int64;
00048    typedef unsigned long long int     lt_uint64;
00049 #endif
00050 
00051 #ifdef __cplusplus
00052 
00053 /* namespace macros */
00054 #define LT_BEGIN_LIDAR_NAMESPACE namespace LizardTech {
00055 #define LT_END_LIDAR_NAMESPACE }
00056 #define LT_USE_LIDAR_NAMESPACE using namespace LizardTech;
00057 
00058 LT_BEGIN_LIDAR_NAMESPACE
00059 
00060 void *XALLOC(size_t size);
00061 void *XREALLOC(void *ptr, size_t size);
00062 void XDEALLOC(void *ptr);
00063 
00064 /* Macro for disabling copy construtor and assignment opterator */
00065 
00066 #define DISABLE_COPY(classname) \
00067    private: \
00068       classname(const classname &); \
00069       classname &operator=(const classname &)
00070 
00071 #define SIMPLE_OBJECT(classname) \
00072    DISABLE_COPY(classname)
00073 
00074 LT_END_LIDAR_NAMESPACE
00075 
00076 #endif /* __cplusplus */
00077 
00078 #ifdef __cplusplus
00079 #define LT_BEGIN_C_NAMESPACE extern "C" {
00080 #define LT_END_C_NAMESPACE };
00081 #else
00082 #define LT_BEGIN_C_NAMESPACE
00083 #define LT_END_C_NAMESPACE
00084 #endif
00085 
00086 #endif /* __LIDAR_BASE_H__ */