CFx SDK Documentation 2024 SP0
|
#include "OdPlatformSettings.h"
#include "OdGUID.h"
#include <stdio.h>
#include <limits.h>
#include <math.h>
#include <cstdlib>
#include <cmath>
#include <wchar.h>
#include <time.h>
Go to the source code of this file.
Classes | |
struct | OdTagRECT |
struct | tagRGBQUAD |
struct | tagBITMAPINFOHEADER |
struct | tagCIEXYZ |
struct | tagICEXYZTRIPLE |
struct | tagBITMAPV4HEADER |
struct | tagBITMAPINFO |
struct | tagBITMAPFILEHEADER |
Macros | |
#define | odmin(X, Y) ((X) < (Y) ? (X) : (Y)) |
#define | odmax(X, Y) ((X) > (Y) ? (X) : (Y)) |
#define | GETSS(s, n) fgets(s, n, stdin) |
#define | MAX_PATH PATH_MAX |
#define | OdWprintf wprintf |
#define | OdPrintf printf |
#define | Odisnan(x) std::isnan(x) |
#define | Odfinite(x) (finite(x) != 0) |
#define | Od_abs std::abs |
#define | Od_atof atof |
#define | Od_labs std::labs |
#define | Od_llabs std::llabs |
#define | Od_srand srand |
#define | Od_rand rand |
#define | Od_wcstombs wcstombs |
#define | Od_wcscpy wcscpy |
#define | Od_wcscmp wcscmp |
#define | Od_wcscat wcscat |
#define | Od_wcschr wcschr |
#define | Od_wcslen wcslen |
#define | Od_wcsncpy wcsncpy |
#define | Od_round std::round |
#define | odStrChr(str, ch) strchr(str, ch) |
#define | odWStrChr(str, ch) Od_wcschr(str, ch) |
#define | odStrLen(str) wcslen(str) |
#define | odStrLenA(str) strlen(str) |
#define | odStrCmp(str, str2) wcscmp(str, str2) |
#define | odStrCmpA(str, str2) strcmp(str, str2) |
#define | FSEEK fseeko64 |
#define | FTELL ftello64 |
#define | FOPEN fopen64 |
#define | OFFSETTYPE(offset) offset |
#define | odStrICmp Od_stricmpW |
#define | odStrICmpA(str, str2) stricmp(str, str2) |
#define | odStrnICmp Od_stricmpW |
#define | odStrnICmpA(str, str2, n) strnicmp(str, str2, n) |
#define | odStrUpr(str) Od_struprW(str) |
#define | odStrUprA(str) strupr(str) |
#define | odStrLwr(str) Od_strlwrW(str) |
#define | odStrLwrA(str) strlwr(str) |
#define | odStrRev(str) Od_strrevW(str) |
#define | odStrRevA(str) strrev(str) |
#define | odStrToInt(str) Od_strtoint(str) |
#define | odStrToUInt(str) Od_strtouint(str) |
#define | Od_isspace(ch) isspace(ch) |
#define | Od_iswspace(ch) iswspace(ch) |
#define | Od_isdigit(ch) isdigit(ch) |
#define | Od_iswdigit(ch) iswdigit(ch) |
#define | odSScanf swscanf |
#define | odSprintf swprintf |
#define | odSprintfA snprintf |
#define | odStrToF Od_wtof |
#define | OD_TYPENAME |
#define | OD_TYPENAME2 |
#define | OD_TYPENAME3 |
#define | OD_BSEARCH ::bsearch |
#define | TD_USING(a) using a |
#define | OD_LINKEDARRAY_SCOPE |
#define | odStrStr ::wcsstr |
#define | OD_MAKEWORD(a, b) ((OdUInt16)(((OdUInt8)(a)) | ((OdUInt16)((OdUInt8)(b))) << 8)) |
#define | OD_MAKELONG(a, b) ((OdInt32)(((OdUInt16)(a)) | ((OdUInt32)((OdUInt16)(b))) << 16)) |
#define | OD_LOWORD(l) ((OdUInt16)(l)) |
#define | OD_HIWORD(l) ((OdUInt16)(((OdUInt32)(l) >> 16) & 0xFFFF)) |
#define | OD_LOBYTE(w) ((OdUInt8)(w)) |
#define | OD_HIBYTE(w) ((OdUInt8)(((OdUInt16)(w) >> 8) & 0xFF)) |
#define | odSwap2BytesNumber(n) |
#define | odSwap4BytesNumber(n) |
#define | odSwap8Bytes(bytes) |
#define | odSwap4Bytes(bytes) |
#define | OD_INT8_FROM_BUFFPTR(pBuffPtr) *(pBuffPtr++) |
#define | OD_BYTES_FROM_BUFFPTR(pBuffPtr, ResBuff, nCount) (pBuffPtr+=nCount, ::memcpy(ResBuff, pBuffPtr-nCount, nCount)) |
#define | OD_INT8_TO_BUFFPTR(pBuffPtr, val) (++pBuffPtr, pBuffPtr[-1] = OdUInt8(val)) |
#define | OD_BYTES_TO_BUFFPTR(pBuffPtr, FromBuff, nCount) (pBuffPtr+=nCount, ::memcpy(pBuffPtr-nCount, FromBuff, nCount)) |
#define | OD_INT16_FROM_BUFFPTR(pBuffPtr) (pBuffPtr += 2, *((OdInt16*)(pBuffPtr - 2))) |
#define | OD_INT32_FROM_BUFFPTR(pBuffPtr) (pBuffPtr += 4, *((OdInt32*)(pBuffPtr - 4))) |
#define | OD_INT64_FROM_BUFFPTR(pBuffPtr) (pBuffPtr += 8, *((OdInt64*)(pBuffPtr - 8))) |
#define | OD_DOUBLE_FROM_BUFFPTR(pBuffPtr) getValidDouble(&pBuffPtr) |
#define | OD_INT16_TO_BUFFPTR(pBuffPtr, val) (pBuffPtr+=2, *((OdInt16*)(pBuffPtr-2)) = OdInt16(val)) |
#define | OD_INT32_TO_BUFFPTR(pBuffPtr, val) (pBuffPtr+=4, *((OdInt32*)(pBuffPtr-4)) = OdInt32(val)) |
#define | OD_INT64_TO_BUFFPTR(pBuffPtr, val) (pBuffPtr+=8, *((OdInt64*)(pBuffPtr-8)) = OdInt64(val)) |
#define | OD_DOUBLE_TO_BUFFPTR(pBuffPtr, val) (pBuffPtr+=8, *((double*)(pBuffPtr-8)) = double(val)) |
#define | ODCOLORREF OdUInt32 |
#define | ODRGB(r, g, b) ((ODCOLORREF)(((OdUInt8)(r)|((OdUInt16)((OdUInt8)(g))<<8))|(((OdUInt32)(OdUInt8)(b))<<16))) |
#define | ODRGBA(r, g, b, a) (((ODCOLORREF)ODRGB(r,g,b))|(((OdUInt32)(OdUInt8)(a))<<24)) |
#define | ODGETRED(rgb) ((OdUInt8)(rgb)) |
#define | ODGETGREEN(rgb) ((OdUInt8)(((OdUInt16)(rgb)) >> 8)) |
#define | ODGETBLUE(rgb) ((OdUInt8)((rgb)>>16)) |
#define | ODGETALPHA(rgba) ((OdUInt8)((rgba)>>24)) |
#define | RGBQUAD_DEFINED |
#define | BITMAPINFOHEADER_DEFINED |
#define | BITMAPINFO_DEFINED |
#define | BITMAPFILEHEADER_DEFINED |
#define | CLSID OdGUID |
#define | ODTOCMCOLOR(colorref) OdCmEntityColor( ODGETRED(colorref), ODGETGREEN(colorref), ODGETBLUE(colorref) ) |
#define | ODTOCOLORREF(cmColor) ODRGB( cmColor.red(), cmColor.green(), cmColor.blue() ) |
Typedefs | |
typedef struct OdTagRECT | ODRECT |
typedef struct tagRGBQUAD | RGBQUAD |
typedef struct tagRGBQUAD * | LPRGBQUAD |
typedef struct tagBITMAPINFOHEADER | BITMAPINFOHEADER |
typedef struct tagBITMAPINFOHEADER * | PBITMAPINFOHEADER |
typedef OdInt32 | FXPT2DOT30 |
typedef struct tagCIEXYZ | CIEXYZ |
typedef struct tagICEXYZTRIPLE | CIEXYZTRIPLE |
typedef struct tagBITMAPV4HEADER | BITMAPV4HEADER |
typedef struct tagBITMAPV4HEADER * | PBITMAPV4HEADER |
typedef struct tagBITMAPINFO | BITMAPINFO |
typedef struct tagBITMAPINFO * | PBITMAPINFO |
typedef struct tagBITMAPFILEHEADER | BITMAPFILEHEADER |
typedef struct tagBITMAPFILEHEADER * | PBITMAPFILEHEADER |
Functions | |
int | Od_stricmpW (const OdChar *str, const OdChar *str2) |
int | Od_stricmpW (const OdChar *str, const OdChar *str2, size_t n) |
OdChar * | Od_struprW (OdChar *str) |
OdChar * | Od_strlwrW (OdChar *str) |
OdChar * | Od_strrevW (OdChar *str) |
long | Od_strtoint (const OdChar *str) |
long | Od_strtouint (const OdChar *str) |
double | Od_wtof (const wchar_t *str) |
void | odSwapBytes (OdUInt8 &xX, OdUInt8 &yY) |
void | odSwapWords (OdUInt16 &xX, OdUInt16 &yY) |
void | odSwapInt64 (void *pBytes) |
bool | isValidNonZeroIEEEDouble (const OdUInt8 *buf) |
void | fixDouble (double *pD) |
OdUInt64 | OD_INT64_FROM_BUFFPTR (const OdUInt8 *pBuffPtr) |
double | getValidDouble (OdUInt8 **ppBuff) |
FIRSTDLL_EXPORT size_t | od_strftime (char *s, size_t maxsize, const char *format, const struct tm *t) |
FIRSTDLL_EXPORT void * | Od_memcpy_s (void *dest, size_t destSize, const void *src, size_t count) |
FIRSTDLL_EXPORT void * | Od_memcpy_s (void *dest, const void *src, size_t count) |
FIRSTDLL_EXPORT void * | Od_memmove_s (void *dest, size_t destSize, const void *src, size_t count) |
FIRSTDLL_EXPORT void * | Od_memmove_s (void *dest, const void *src, size_t count) |
FIRSTDLL_EXPORT void * | Od_memcpy (void *dest, const void *src, size_t count) |
FIRSTDLL_EXPORT void * | Od_memmove (void *dest, const void *src, size_t count) |
#define BITMAPFILEHEADER_DEFINED |
Definition at line 1061 of file OdPlatform.h.
#define BITMAPINFO_DEFINED |
Definition at line 1051 of file OdPlatform.h.
#define BITMAPINFOHEADER_DEFINED |
Definition at line 977 of file OdPlatform.h.
#define CLSID OdGUID |
Definition at line 1090 of file OdPlatform.h.
#define FOPEN fopen64 |
Definition at line 313 of file OdPlatform.h.
#define FSEEK fseeko64 |
Definition at line 311 of file OdPlatform.h.
#define FTELL ftello64 |
Definition at line 312 of file OdPlatform.h.
#define GETSS | ( | s, | |
n | |||
) | fgets(s, n, stdin) |
Definition at line 69 of file OdPlatform.h.
#define MAX_PATH PATH_MAX |
Definition at line 72 of file OdPlatform.h.
#define Od_abs std::abs |
Definition at line 141 of file OdPlatform.h.
#define Od_atof atof |
Definition at line 144 of file OdPlatform.h.
#define OD_BSEARCH ::bsearch |
Definition at line 643 of file OdPlatform.h.
#define OD_BYTES_FROM_BUFFPTR | ( | pBuffPtr, | |
ResBuff, | |||
nCount | |||
) | (pBuffPtr+=nCount, ::memcpy(ResBuff, pBuffPtr-nCount, nCount)) |
Definition at line 796 of file OdPlatform.h.
#define OD_BYTES_TO_BUFFPTR | ( | pBuffPtr, | |
FromBuff, | |||
nCount | |||
) | (pBuffPtr+=nCount, ::memcpy(pBuffPtr-nCount, FromBuff, nCount)) |
Definition at line 799 of file OdPlatform.h.
#define OD_DOUBLE_FROM_BUFFPTR | ( | pBuffPtr | ) | getValidDouble(&pBuffPtr) |
Definition at line 858 of file OdPlatform.h.
#define OD_DOUBLE_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (pBuffPtr+=8, *((double*)(pBuffPtr-8)) = double(val)) |
Definition at line 865 of file OdPlatform.h.
Definition at line 668 of file OdPlatform.h.
Definition at line 666 of file OdPlatform.h.
#define OD_INT16_FROM_BUFFPTR | ( | pBuffPtr | ) | (pBuffPtr += 2, *((OdInt16*)(pBuffPtr - 2))) |
Definition at line 854 of file OdPlatform.h.
#define OD_INT16_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (pBuffPtr+=2, *((OdInt16*)(pBuffPtr-2)) = OdInt16(val)) |
Definition at line 861 of file OdPlatform.h.
#define OD_INT32_FROM_BUFFPTR | ( | pBuffPtr | ) | (pBuffPtr += 4, *((OdInt32*)(pBuffPtr - 4))) |
Definition at line 855 of file OdPlatform.h.
#define OD_INT32_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (pBuffPtr+=4, *((OdInt32*)(pBuffPtr-4)) = OdInt32(val)) |
Definition at line 862 of file OdPlatform.h.
#define OD_INT64_FROM_BUFFPTR | ( | pBuffPtr | ) | (pBuffPtr += 8, *((OdInt64*)(pBuffPtr - 8))) |
Definition at line 856 of file OdPlatform.h.
#define OD_INT64_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (pBuffPtr+=8, *((OdInt64*)(pBuffPtr-8)) = OdInt64(val)) |
Definition at line 863 of file OdPlatform.h.
#define OD_INT8_FROM_BUFFPTR | ( | pBuffPtr | ) | *(pBuffPtr++) |
Definition at line 776 of file OdPlatform.h.
#define OD_INT8_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (++pBuffPtr, pBuffPtr[-1] = OdUInt8(val)) |
Definition at line 798 of file OdPlatform.h.
#define Od_isdigit | ( | ch | ) | isdigit(ch) |
Definition at line 521 of file OdPlatform.h.
#define Od_isspace | ( | ch | ) | isspace(ch) |
Definition at line 509 of file OdPlatform.h.
#define Od_iswdigit | ( | ch | ) | iswdigit(ch) |
Definition at line 528 of file OdPlatform.h.
#define Od_iswspace | ( | ch | ) | iswspace(ch) |
Definition at line 516 of file OdPlatform.h.
#define Od_labs std::labs |
Definition at line 145 of file OdPlatform.h.
#define OD_LINKEDARRAY_SCOPE |
Definition at line 651 of file OdPlatform.h.
#define Od_llabs std::llabs |
Definition at line 146 of file OdPlatform.h.
Definition at line 667 of file OdPlatform.h.
#define OD_LOWORD | ( | l | ) | ((OdUInt16)(l)) |
Definition at line 665 of file OdPlatform.h.
Definition at line 664 of file OdPlatform.h.
Definition at line 663 of file OdPlatform.h.
#define Od_rand rand |
Definition at line 148 of file OdPlatform.h.
#define Od_round std::round |
Definition at line 170 of file OdPlatform.h.
#define Od_srand srand |
Definition at line 147 of file OdPlatform.h.
#define OD_TYPENAME |
Definition at line 631 of file OdPlatform.h.
#define OD_TYPENAME2 |
Definition at line 635 of file OdPlatform.h.
#define OD_TYPENAME3 |
Definition at line 639 of file OdPlatform.h.
#define Od_wcscat wcscat |
Definition at line 152 of file OdPlatform.h.
#define Od_wcschr wcschr |
Definition at line 153 of file OdPlatform.h.
#define Od_wcscmp wcscmp |
Definition at line 151 of file OdPlatform.h.
#define Od_wcscpy wcscpy |
Definition at line 150 of file OdPlatform.h.
#define Od_wcslen wcslen |
Definition at line 154 of file OdPlatform.h.
#define Od_wcsncpy wcsncpy |
Definition at line 155 of file OdPlatform.h.
#define Od_wcstombs wcstombs |
Definition at line 149 of file OdPlatform.h.
#define ODCOLORREF OdUInt32 |
Definition at line 933 of file OdPlatform.h.
Definition at line 89 of file OdPlatform.h.
#define ODGETALPHA | ( | rgba | ) | ((OdUInt8)((rgba)>>24)) |
Definition at line 940 of file OdPlatform.h.
#define ODGETBLUE | ( | rgb | ) | ((OdUInt8)((rgb)>>16)) |
Definition at line 939 of file OdPlatform.h.
Definition at line 938 of file OdPlatform.h.
#define ODGETRED | ( | rgb | ) | ((OdUInt8)(rgb)) |
Definition at line 937 of file OdPlatform.h.
Definition at line 88 of file OdPlatform.h.
#define OdPrintf printf |
Definition at line 76 of file OdPlatform.h.
#define ODRGB | ( | r, | |
g, | |||
b | |||
) | ((ODCOLORREF)(((OdUInt8)(r)|((OdUInt16)((OdUInt8)(g))<<8))|(((OdUInt32)(OdUInt8)(b))<<16))) |
Definition at line 934 of file OdPlatform.h.
#define ODRGBA | ( | r, | |
g, | |||
b, | |||
a | |||
) | (((ODCOLORREF)ODRGB(r,g,b))|(((OdUInt32)(OdUInt8)(a))<<24)) |
Definition at line 935 of file OdPlatform.h.
#define odSprintf swprintf |
Definition at line 603 of file OdPlatform.h.
#define odSprintfA snprintf |
Definition at line 611 of file OdPlatform.h.
#define odSScanf swscanf |
Definition at line 577 of file OdPlatform.h.
#define odStrChr | ( | str, | |
ch | |||
) | strchr(str, ch) |
Definition at line 174 of file OdPlatform.h.
#define odStrCmp | ( | str, | |
str2 | |||
) | wcscmp(str, str2) |
Definition at line 280 of file OdPlatform.h.
#define odStrCmpA | ( | str, | |
str2 | |||
) | strcmp(str, str2) |
Definition at line 284 of file OdPlatform.h.
#define odStrICmp Od_stricmpW |
Definition at line 409 of file OdPlatform.h.
#define odStrICmpA | ( | str, | |
str2 | |||
) | stricmp(str, str2) |
Definition at line 416 of file OdPlatform.h.
#define odStrLen | ( | str | ) | wcslen(str) |
Definition at line 272 of file OdPlatform.h.
#define odStrLenA | ( | str | ) | strlen(str) |
Definition at line 276 of file OdPlatform.h.
#define odStrLwr | ( | str | ) | Od_strlwrW(str) |
Definition at line 470 of file OdPlatform.h.
#define odStrLwrA | ( | str | ) | strlwr(str) |
Definition at line 477 of file OdPlatform.h.
#define odStrnICmp Od_stricmpW |
Definition at line 431 of file OdPlatform.h.
#define odStrnICmpA | ( | str, | |
str2, | |||
n | |||
) | strnicmp(str, str2, n) |
Definition at line 438 of file OdPlatform.h.
#define odStrRev | ( | str | ) | Od_strrevW(str) |
Definition at line 487 of file OdPlatform.h.
#define odStrRevA | ( | str | ) | strrev(str) |
Definition at line 494 of file OdPlatform.h.
#define odStrStr ::wcsstr |
Definition at line 659 of file OdPlatform.h.
#define odStrToF Od_wtof |
Definition at line 625 of file OdPlatform.h.
#define odStrToInt | ( | str | ) | Od_strtoint(str) |
Definition at line 500 of file OdPlatform.h.
#define odStrToUInt | ( | str | ) | Od_strtouint(str) |
Definition at line 505 of file OdPlatform.h.
#define odStrUpr | ( | str | ) | Od_struprW(str) |
Definition at line 451 of file OdPlatform.h.
#define odStrUprA | ( | str | ) | strupr(str) |
Definition at line 458 of file OdPlatform.h.
#define odSwap2BytesNumber | ( | n | ) |
Definition at line 729 of file OdPlatform.h.
#define odSwap4Bytes | ( | bytes | ) |
Definition at line 732 of file OdPlatform.h.
#define odSwap4BytesNumber | ( | n | ) |
Definition at line 730 of file OdPlatform.h.
#define odSwap8Bytes | ( | bytes | ) |
Definition at line 731 of file OdPlatform.h.
#define ODTOCMCOLOR | ( | colorref | ) | OdCmEntityColor( ODGETRED(colorref), ODGETGREEN(colorref), ODGETBLUE(colorref) ) |
Definition at line 1094 of file OdPlatform.h.
#define ODTOCOLORREF | ( | cmColor | ) | ODRGB( cmColor.red(), cmColor.green(), cmColor.blue() ) |
Definition at line 1095 of file OdPlatform.h.
#define OdWprintf wprintf |
Definition at line 75 of file OdPlatform.h.
#define odWStrChr | ( | str, | |
ch | |||
) | Od_wcschr(str, ch) |
Definition at line 178 of file OdPlatform.h.
Definition at line 314 of file OdPlatform.h.
#define RGBQUAD_DEFINED |
Definition at line 953 of file OdPlatform.h.
#define TD_USING | ( | a | ) | using a |
Definition at line 647 of file OdPlatform.h.
typedef struct tagBITMAPFILEHEADER BITMAPFILEHEADER |
<group !!RECORDS_TD_APIRef>
typedef struct tagBITMAPINFO BITMAPINFO |
typedef struct tagBITMAPINFOHEADER BITMAPINFOHEADER |
<group !!RECORDS_TD_APIRef>
typedef struct tagBITMAPV4HEADER BITMAPV4HEADER |
typedef struct tagICEXYZTRIPLE CIEXYZTRIPLE |
typedef OdInt32 FXPT2DOT30 |
Definition at line 1002 of file OdPlatform.h.
typedef struct tagRGBQUAD * LPRGBQUAD |
typedef struct tagBITMAPFILEHEADER * PBITMAPFILEHEADER |
typedef struct tagBITMAPINFO * PBITMAPINFO |
typedef struct tagBITMAPINFOHEADER * PBITMAPINFOHEADER |
typedef struct tagBITMAPV4HEADER * PBITMAPV4HEADER |
typedef struct tagRGBQUAD RGBQUAD |
<group !!RECORDS_TD_APIRef>
|
inline |
Definition at line 764 of file OdPlatform.h.
|
inline |
Definition at line 847 of file OdPlatform.h.
|
inline |
Checks if 8 bytes buffer represents a valid non-zero IEEE double value. (In this format doubles are stored in .dwg files.)
Definition at line 748 of file OdPlatform.h.
Definition at line 778 of file OdPlatform.h.
|
inline |
Definition at line 1155 of file OdPlatform.h.
FIRSTDLL_EXPORT void * Od_memcpy_s | ( | void * | dest, |
const void * | src, | ||
size_t | count | ||
) |
FIRSTDLL_EXPORT void * Od_memcpy_s | ( | void * | dest, |
size_t | destSize, | ||
const void * | src, | ||
size_t | count | ||
) |
|
inline |
Definition at line 1156 of file OdPlatform.h.
FIRSTDLL_EXPORT void * Od_memmove_s | ( | void * | dest, |
const void * | src, | ||
size_t | count | ||
) |
FIRSTDLL_EXPORT void * Od_memmove_s | ( | void * | dest, |
size_t | destSize, | ||
const void * | src, | ||
size_t | count | ||
) |
FIRSTDLL_EXPORT size_t od_strftime | ( | char * | s, |
size_t | maxsize, | ||
const char * | format, | ||
const struct tm * | t | ||
) |
Definition at line 407 of file OdPlatform.h.
Definition at line 429 of file OdPlatform.h.
Definition at line 468 of file OdPlatform.h.
Definition at line 485 of file OdPlatform.h.
|
inline |
Definition at line 499 of file OdPlatform.h.
|
inline |
Definition at line 504 of file OdPlatform.h.
Definition at line 449 of file OdPlatform.h.
|
inline |
Definition at line 620 of file OdPlatform.h.
Definition at line 670 of file OdPlatform.h.
Definition at line 734 of file OdPlatform.h.
Definition at line 671 of file OdPlatform.h.