CFx SDK Documentation
2023 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) gets(s) |
#define | MAX_PATH PATH_MAX |
#define | OdWprintf wprintf |
#define | OdPrintf printf |
#define | Odisnan isnan |
#define | Odfinite finite |
#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_wcscpy wcscpy |
#define | Od_wcslen wcslen |
#define | Od_wcsncpy wcsncpy |
#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) |
size_t | od_strftime (char *s, size_t maxsize, const char *format, const struct tm *t) |
#define BITMAPFILEHEADER_DEFINED |
Definition at line 1011 of file OdPlatform.h.
#define BITMAPINFO_DEFINED |
Definition at line 1001 of file OdPlatform.h.
#define BITMAPINFOHEADER_DEFINED |
Definition at line 927 of file OdPlatform.h.
#define CLSID OdGUID |
Definition at line 1040 of file OdPlatform.h.
#define FOPEN fopen64 |
Definition at line 273 of file OdPlatform.h.
#define FSEEK fseeko64 |
Definition at line 271 of file OdPlatform.h.
#define FTELL ftello64 |
Definition at line 272 of file OdPlatform.h.
#define GETSS | ( | s, | |
n | |||
) | gets(s) |
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 130 of file OdPlatform.h.
#define Od_atof atof |
Definition at line 133 of file OdPlatform.h.
#define OD_BSEARCH ::bsearch |
Definition at line 593 of file OdPlatform.h.
#define OD_BYTES_FROM_BUFFPTR | ( | pBuffPtr, | |
ResBuff, | |||
nCount | |||
) | (pBuffPtr+=nCount, ::memcpy(ResBuff, pBuffPtr-nCount, nCount)) |
Definition at line 746 of file OdPlatform.h.
#define OD_BYTES_TO_BUFFPTR | ( | pBuffPtr, | |
FromBuff, | |||
nCount | |||
) | (pBuffPtr+=nCount, ::memcpy(pBuffPtr-nCount, FromBuff, nCount)) |
Definition at line 749 of file OdPlatform.h.
#define OD_DOUBLE_FROM_BUFFPTR | ( | pBuffPtr | ) | getValidDouble(&pBuffPtr) |
Definition at line 808 of file OdPlatform.h.
#define OD_DOUBLE_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (pBuffPtr+=8, *((double*)(pBuffPtr-8)) = double(val)) |
Definition at line 815 of file OdPlatform.h.
Definition at line 618 of file OdPlatform.h.
Definition at line 616 of file OdPlatform.h.
#define OD_INT16_FROM_BUFFPTR | ( | pBuffPtr | ) | (pBuffPtr += 2, *((OdInt16*)(pBuffPtr - 2))) |
Definition at line 804 of file OdPlatform.h.
#define OD_INT16_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (pBuffPtr+=2, *((OdInt16*)(pBuffPtr-2)) = OdInt16(val)) |
Definition at line 811 of file OdPlatform.h.
#define OD_INT32_FROM_BUFFPTR | ( | pBuffPtr | ) | (pBuffPtr += 4, *((OdInt32*)(pBuffPtr - 4))) |
Definition at line 805 of file OdPlatform.h.
#define OD_INT32_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (pBuffPtr+=4, *((OdInt32*)(pBuffPtr-4)) = OdInt32(val)) |
Definition at line 812 of file OdPlatform.h.
#define OD_INT64_FROM_BUFFPTR | ( | pBuffPtr | ) | (pBuffPtr += 8, *((OdInt64*)(pBuffPtr - 8))) |
Definition at line 806 of file OdPlatform.h.
#define OD_INT64_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (pBuffPtr+=8, *((OdInt64*)(pBuffPtr-8)) = OdInt64(val)) |
Definition at line 813 of file OdPlatform.h.
#define OD_INT8_FROM_BUFFPTR | ( | pBuffPtr | ) | *(pBuffPtr++) |
Definition at line 726 of file OdPlatform.h.
#define OD_INT8_TO_BUFFPTR | ( | pBuffPtr, | |
val | |||
) | (++pBuffPtr, pBuffPtr[-1] = OdUInt8(val)) |
Definition at line 748 of file OdPlatform.h.
#define Od_isdigit | ( | ch | ) | isdigit(ch) |
Definition at line 481 of file OdPlatform.h.
#define Od_isspace | ( | ch | ) | isspace(ch) |
Definition at line 469 of file OdPlatform.h.
#define Od_iswdigit | ( | ch | ) | iswdigit(ch) |
Definition at line 488 of file OdPlatform.h.
#define Od_iswspace | ( | ch | ) | iswspace(ch) |
Definition at line 476 of file OdPlatform.h.
#define Od_labs std::labs |
Definition at line 134 of file OdPlatform.h.
#define OD_LINKEDARRAY_SCOPE |
Definition at line 601 of file OdPlatform.h.
#define Od_llabs std::llabs |
Definition at line 135 of file OdPlatform.h.
Definition at line 617 of file OdPlatform.h.
#define OD_LOWORD | ( | l | ) | ((OdUInt16)(l)) |
Definition at line 615 of file OdPlatform.h.
Definition at line 614 of file OdPlatform.h.
Definition at line 613 of file OdPlatform.h.
#define Od_rand rand |
Definition at line 137 of file OdPlatform.h.
#define Od_srand srand |
Definition at line 136 of file OdPlatform.h.
#define OD_TYPENAME |
Definition at line 581 of file OdPlatform.h.
#define OD_TYPENAME2 |
Definition at line 585 of file OdPlatform.h.
#define OD_TYPENAME3 |
Definition at line 589 of file OdPlatform.h.
#define Od_wcscat wcscat |
Definition at line 141 of file OdPlatform.h.
#define Od_wcschr wcschr |
Definition at line 142 of file OdPlatform.h.
#define Od_wcscmp wcscmp |
Definition at line 140 of file OdPlatform.h.
#define Od_wcscpy wcscpy |
Definition at line 143 of file OdPlatform.h.
#define Od_wcscpy wcscpy |
Definition at line 143 of file OdPlatform.h.
#define Od_wcslen wcslen |
Definition at line 144 of file OdPlatform.h.
#define Od_wcsncpy wcsncpy |
Definition at line 145 of file OdPlatform.h.
#define Od_wcstombs wcstombs |
Definition at line 138 of file OdPlatform.h.
#define ODCOLORREF OdUInt32 |
Definition at line 883 of file OdPlatform.h.
#define Odfinite finite |
Definition at line 85 of file OdPlatform.h.
#define ODGETALPHA | ( | rgba | ) | ((OdUInt8)((rgba)>>24)) |
Definition at line 890 of file OdPlatform.h.
#define ODGETBLUE | ( | rgb | ) | ((OdUInt8)((rgb)>>16)) |
Definition at line 889 of file OdPlatform.h.
Definition at line 888 of file OdPlatform.h.
#define ODGETRED | ( | rgb | ) | ((OdUInt8)(rgb)) |
Definition at line 887 of file OdPlatform.h.
#define Odisnan isnan |
Definition at line 84 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 884 of file OdPlatform.h.
#define ODRGBA | ( | r, | |
g, | |||
b, | |||
a | |||
) | (((ODCOLORREF)ODRGB(r,g,b))|(((OdUInt32)(OdUInt8)(a))<<24)) |
Definition at line 885 of file OdPlatform.h.
#define odSprintf swprintf |
Definition at line 553 of file OdPlatform.h.
#define odSprintfA snprintf |
Definition at line 561 of file OdPlatform.h.
#define odSScanf swscanf |
Definition at line 527 of file OdPlatform.h.
#define odStrChr | ( | str, | |
ch | |||
) | strchr(str, ch) |
Definition at line 149 of file OdPlatform.h.
#define odStrCmp | ( | str, | |
str2 | |||
) | wcscmp(str, str2) |
Definition at line 248 of file OdPlatform.h.
#define odStrCmpA | ( | str, | |
str2 | |||
) | strcmp(str, str2) |
Definition at line 252 of file OdPlatform.h.
#define odStrICmp Od_stricmpW |
Definition at line 369 of file OdPlatform.h.
#define odStrICmpA | ( | str, | |
str2 | |||
) | stricmp(str, str2) |
Definition at line 376 of file OdPlatform.h.
#define odStrLen | ( | str | ) | wcslen(str) |
Definition at line 240 of file OdPlatform.h.
#define odStrLenA | ( | str | ) | strlen(str) |
Definition at line 244 of file OdPlatform.h.
#define odStrLwr | ( | str | ) | Od_strlwrW(str) |
Definition at line 430 of file OdPlatform.h.
#define odStrLwrA | ( | str | ) | strlwr(str) |
Definition at line 437 of file OdPlatform.h.
#define odStrnICmp Od_stricmpW |
Definition at line 391 of file OdPlatform.h.
#define odStrnICmpA | ( | str, | |
str2, | |||
n | |||
) | strnicmp(str, str2, n) |
Definition at line 398 of file OdPlatform.h.
#define odStrRev | ( | str | ) | Od_strrevW(str) |
Definition at line 447 of file OdPlatform.h.
#define odStrRevA | ( | str | ) | strrev(str) |
Definition at line 454 of file OdPlatform.h.
#define odStrStr ::wcsstr |
Definition at line 609 of file OdPlatform.h.
#define odStrToF Od_wtof |
Definition at line 575 of file OdPlatform.h.
#define odStrToInt | ( | str | ) | Od_strtoint(str) |
Definition at line 460 of file OdPlatform.h.
#define odStrToUInt | ( | str | ) | Od_strtouint(str) |
Definition at line 465 of file OdPlatform.h.
#define odStrUpr | ( | str | ) | Od_struprW(str) |
Definition at line 411 of file OdPlatform.h.
#define odStrUprA | ( | str | ) | strupr(str) |
Definition at line 418 of file OdPlatform.h.
#define odSwap2BytesNumber | ( | n | ) |
Definition at line 679 of file OdPlatform.h.
#define odSwap4Bytes | ( | bytes | ) |
Definition at line 682 of file OdPlatform.h.
#define odSwap4BytesNumber | ( | n | ) |
Definition at line 680 of file OdPlatform.h.
#define odSwap8Bytes | ( | bytes | ) |
Definition at line 681 of file OdPlatform.h.
#define ODTOCMCOLOR | ( | colorref | ) | OdCmEntityColor( ODGETRED(colorref), ODGETGREEN(colorref), ODGETBLUE(colorref) ) |
Definition at line 1044 of file OdPlatform.h.
#define ODTOCOLORREF | ( | cmColor | ) | ODRGB( cmColor.red(), cmColor.green(), cmColor.blue() ) |
Definition at line 1045 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 153 of file OdPlatform.h.
Definition at line 274 of file OdPlatform.h.
#define RGBQUAD_DEFINED |
Definition at line 903 of file OdPlatform.h.
#define TD_USING | ( | a | ) | using a |
Definition at line 597 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 952 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 714 of file OdPlatform.h.
|
inline |
Definition at line 797 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 698 of file OdPlatform.h.
Definition at line 728 of file OdPlatform.h.
size_t od_strftime | ( | char * | s, |
size_t | maxsize, | ||
const char * | format, | ||
const struct tm * | t | ||
) |
Definition at line 367 of file OdPlatform.h.
Definition at line 389 of file OdPlatform.h.
Definition at line 428 of file OdPlatform.h.
Definition at line 445 of file OdPlatform.h.
|
inline |
Definition at line 459 of file OdPlatform.h.
|
inline |
Definition at line 464 of file OdPlatform.h.
Definition at line 409 of file OdPlatform.h.
|
inline |
Definition at line 570 of file OdPlatform.h.
Definition at line 620 of file OdPlatform.h.
Definition at line 684 of file OdPlatform.h.
Definition at line 621 of file OdPlatform.h.