Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray Namespace Reference

< The main namespace for all Core functions. More...

Namespaces

 InterlockedN
 

Classes

class  cAppConsole
 
class  cAppImpl
 
class  cAppArgs
 
class  cAppState
 
class  cAppStateMain
 
class  cAppStateModuleLoad
 
class  cAppExitCatcher
 
class  cArchive
 
class  CArray
 
class  cArrayTyped
 
class  cArrayFacade
 
class  cArrayPtr
 
class  cArrayVal
 
class  cArrayStruct
 
class  cArrayIUnk
 
class  cArrayNew
 
class  cArrayRef
 
class  cArraySorted
 
class  cArraySortVal
 
class  cArraySortStructName
 
class  cArraySortStructValue
 
class  cArraySortStructHash
 
class  cArraySortFacade
 
class  cArraySortFacadeValue
 
class  cArraySortPtrValue
 
class  cArraySortFacadeHash
 
class  cArraySortPtrHash
 
class  cArraySortPtrName
 
class  cArraySortRef
 
class  cArraySortHash
 
class  cArraySortValue
 
class  cArraySortName
 
class  cArraySortString
 
class  cArrayString
 
class  cAtomDef
 
class  cAtomRef
 
class  cAtomManager
 
struct  cBits
 
class  cBitmask
 
class  cCodeProfileFunc
 
class  cDebugSourceLine
 
struct  cDebugAssert
 
class  cExceptionHolder
 
class  cException
 
class  cExceptionHResult
 
class  cExceptionAssert
 
class  cExceptionBase
 
class  CFile
 
class  cFile
 
struct  IFileCopier
 
class  cFileCopier
 
class  cFileDevice
 
class  cFileFindEntry
 
class  cFileFind
 
class  cFileDir
 
class  cFilePath
 
class  cFileStatus
 
class  cFileText
 
class  cStreamTextReader
 
class  cFloat32
 
class  cFloat64
 
class  cFloatDeco
 
class  cHandlePtr
 
class  cHashIterator
 
class  cHashTableT
 
class  cHashTableStruct
 
class  cHashTableRef
 
struct  cHeap
 
struct  cHeapAlign
 
class  cHeapBlock
 
interface  IHeapObject
 
class  cHeapObject
 
class  cHookJump
 
class  cHookSwapLock
 
class  cHookSwapChain
 
interface  IIniBaseSetter
 
interface  IIniBaseGetter
 
interface  IIniBaseEnumerator
 
class  cIniFile
 
class  cIniKeyValue
 
class  cIniMap
 
interface  IIniObjectDef
 
interface  IIniObjectWriteN
 
class  cIniObject
 
class  cIniWriter
 
struct  cIniReader
 
class  cIniSectionData
 
class  cIniSection
 
class  cIniSectionEntry
 
struct  __synch_xchg_INT32
 
class  cInterlockedVal
 
class  cInterlockedInc
 
class  cIUnkAggBase
 
class  cIUnkAgg
 
class  cIUnkTraceOpaque
 
class  cIUnkPtr
 
class  cListNodeBase
 
class  cListBase
 
class  cListNodeT
 
class  cListT
 
class  cListNodeRef
 
class  cLockableBase
 
class  cLockerT
 
class  cLogAppendConsole
 
class  cLogAppendTextArray
 
class  cLogEventParams
 
class  cLogThrottle
 
interface  ILogProcessor
 
class  cLogProcessor
 
class  cLogAppender
 
class  cLogAppendDebug
 
class  cLogAppendCache
 
class  cLogEvent
 
struct  cLogLevel
 
class  cLogSubject
 
class  cLogNexus
 
class  cLogMgr
 
struct  cMem
 
class  cMemSignature
 
class  cMemStatic
 
class  cMemBlock
 
struct  cMemT
 
class  cMemPage
 
class  cMemPageMgr
 
struct  cMime
 
class  cNewPtr
 
class  cNewPtr2
 
class  cNonCopyable
 
class  cObjectSignature
 
class  CObject
 
class  cObjectFactory
 
class  cObjectService
 
class  cOSHandle
 
class  cOSHandleSet
 
class  cOSModImpl
 
class  cOSModule
 
class  cOSModuleFunc
 
class  cOSProcess
 
class  cRangeT
 
class  cPairT
 
class  cPairX
 
class  cPair
 
class  cPairSortBase
 
class  cPairSortVal
 
class  cPairSortStr
 
class  cPtrFacade
 
class  cPtrTrace
 
class  cPtrTraceMgr
 
class  cQueueBase
 
class  cStackStatic
 
class  cQueueStatic
 
class  cQueueRead
 
class  cQueueRW
 
class  cQueueDyn
 
class  cQueueBytes
 
class  cQueueChunked
 
interface  IRandomNoise
 
class  cRandomBase
 
class  cRandomPerf
 
class  cRandomOS
 
class  cRandomBlock
 
class  cRandomDef
 
class  cRefBase
 
class  cRefPtr
 
interface  IResourceLoader
 
class  cResourceBase
 
class  cSingletonStatic
 
class  cSingletonRegister
 
class  cSingleton
 
class  cSingletonSmart
 
class  cSingletonPtr
 
class  cStreamStat
 
class  cStreamStats
 
class  cStreamBase
 
class  cStreamOutput
 
class  cStreamInput
 
class  cStream
 
class  cStreamTransaction
 
class  cStreamNull
 
class  cStreamProgressT
 
class  cStreamProgressF
 
class  cStreamProgressChunk
 
struct  IStreamProgressCallback
 
class  cStreamQueue
 
class  cStreamStatic
 
class  cStreamStringA
 
class  cStreamStackInp
 
class  cStreamStackOut
 
class  cStreamStackPackets
 
class  CStringData
 
class  CStringT
 
class  cStringT
 
class  cSystemHelper
 
class  cSystemInfo
 OS build type name. OS target known at compile time. Actually run environment may vary of course. More...
 
class  cTempPool
 
class  cTextPos
 
class  cTextReader
 
class  cThreadLockArrayPtr
 
class  cThreadLockArraySmart
 
class  cThreadLockArrayName
 
class  cThreadLockArrayHash
 
class  cThreadLockArrayValue
 
class  cThreadArraySortString
 
interface  IThreadLocal
 
class  cThreadLocalSys
 
class  cThreadLocalSysT
 
class  cThreadLocalSysNew
 
class  cThreadId
 
class  cThreadState
 
class  cThreadLockBase
 
class  cThreadLockFast
 
class  cThreadLockMutex
 
class  cThreadLockStub
 
class  cThreadLockableRef
 
class  cThreadLockRef
 
class  cThreadLockRWS
 
class  cThreadLockRW
 
class  cThreadGuardRead
 
class  cThreadLockableRW
 
class  CSmartReadPtr
 
class  CSmartWritePtr
 
class  cTimeDouble
 
class  cTimeFile
 
class  cTimeSpanFile
 
class  CTime
 
class  cTimeSpan
 
class  cTimeInt
 < similar to the MFC CTime and cTimeSpan, not as accurate or large ranged as COleDateTime More...
 
class  cTimeSys
 
class  cTimePerf
 
struct  CTimeUnit
 
class  cTimeUnits
 
struct  cTimeParserUnit
 
class  cTimeParser
 
class  cTimeVal
 
struct  cTimeZone
 
class  cTimeZoneMgr
 
class  cTriState
 
class  cTypeInfo
 
union  cUnion16
 
union  cUnion32
 
union  cUnion64
 
struct  cTypeLimit
 
struct  cTypeFloat
 
class  cUInt64
 
struct  cUnitTestCur
 
class  cUnitTest
 
class  cUnitTestRegister
 
class  cUnitTestRegisterT
 
class  cUnitTestAppState
 
class  cUnitTests
 
struct  cValT
 
struct  cValArray
 
class  HResultCode
 
class  HResult
 
struct  StrA
 
class  StrBuilder
 
class  StrBuilderAlloc
 
struct  StrChar
 
class  cStrConst
 
class  StrFormatBase
 
class  StrFormat
 
struct  StrNum
 
struct  StrT
 
struct  StrX
 
struct  StrU
 

Typedefs

typedef const FILECHAR_t *const * APP_ARGS_t
 the args passed to main() nullptr terminated array. More...
 
typedef cArraySortString< char > cArraySortStringA
 
typedef cArraySortString< wchar_t > cArraySortStringW
 
typedef cArrayString< char > cArrayStringA
 
typedef cArrayString< wchar_t > cArrayStringW
 
typedef HASHCODE32_t ATOMCODE_t
 Encode a atom as a 32 bit hashcode instead of using its name/pointer. StrT::GetHashCode32() More...
 
typedef cRefPtr< cAtomDefcAtomDefPtr
 
typedef unsigned short BIT_SIZE_t
 number of bits in some intrinsic type. <= 256 ? More...
 
typedef unsigned int BIT_ENUM_t
 Enumerate number of bits or address a single bit in some array of bits. More...
 
typedef const cDebugSourceLinesrc
 
typedef cStringT< LOGCHAR_tcStringL
 Log string. More...
 
typedef UINT32 OF_FLAGS_t
 Mask of file open flags OF_FLAGS_TYPE_. More...
 
typedef cExceptionHResult CFileException
 
typedef cStringT< FILECHAR_tcStringF
 A file name. checks USE_UNICODE_FN. related to cFilePath. More...
 
typedef WORD FILECHR_MASK_t
 Mask of enum FILECHR_TYPE_. More...
 
typedef UINT64 FILE_SIZE_t
 similar to STREAM_POS_t size_t More...
 
typedef UINT32 FILEATTR_MASK_t
 
typedef int FILEDESC_t
 Posix file descriptor id for std C. used for separate _fileno in FILE*. More...
 
typedef int IPROPIDX_t
 enumerate known properties for some interface/object/class. similar to SCRIPTPROPID_t More...
 
typedef char IniChar_t
 char format even on UNICODE system! Screw M$, INI files should ALWAYS have UTF8 contents More...
 
typedef cStringT< IniChar_tcStringI
 A .INI file string. More...
 
typedef cRefPtr< cIniSectionEntrycIniSectionEntryPtr
 
typedef INT32 INTER32_t
 Interlock intrinsic type as INT32. More...
 
typedef __DECL_IMPORT cIUnkPtr cIUnkBasePtr
 
typedef UINT32 LOG_ATTR_MASK_t
 
typedef cRefPtr< cLogEventcLogEventPtr
 
typedef char LOGCHAR_t
 always just use UTF8 for logs, don't bother with UNICODE. More...
 
typedef cRefPtr< cMemPagecMemPagePtr
 
typedef LONG_PTR STREAM_OFFSET_t
 Might be 64 or 32 bit. TODO SET USE_FILE_POS64. More...
 
typedef LONG_PTR STREAM_SEEKRET_t
 return from Seek() More...
 
typedef ULONG_PTR STREAM_POS_t
 NOT same as FILE_SIZE_t in 32 bit. Why not ? More...
 
typedef cOSModuleFunc< FARPROC > cOSModuleFuncGeneric
 
typedef __DECL_IMPORT cRefPtr cRefBasePtr
 
typedef WORD RESOURCEID_t
 A resource in .RC attached to a file/module. like MAKEINTRESOURCE(). https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-makeintresourcea. More...
 
typedef cStreamProgressT< STREAM_POS_tcStreamProgress
 
typedef cRefPtr< CStringDataCStringDataPtr
 Pointer to hold a ref to the string data so i can thread lock it. More...
 
typedef cStringT< wchar_t > cStringW
 
typedef cStringT< char > cStringA
 
typedef cStringT< GChar_tcString
 
typedef cString CString
 
typedef THREAD_EXITCODE_t(_stdcall * THREAD_FUNC_t) (void *)
 
typedef cLockerT< cThreadLockFastcThreadGuardFast
 
typedef cLockerT< cThreadLockMutexcThreadGuardMutex
 
typedef cThreadLockMutex cThreadLockCrit
 
typedef cThreadLockStub cThreadLockCount
 
typedef cLockerT< cThreadLockCountcThreadGuard
 
typedef cThreadLockRef< cThreadLockableRefcThreadLockRefX
 
typedef cLockerT< cThreadLockRWcThreadGuardWrite
 
typedef UINT64 FILETIME_t
 replace FILETIME for 64 bit math. Absolute 64-bit 100-nanosecond since January 1, 1601 GMT More...
 
typedef int TIMESECD_t
 signed delta seconds. like TIMESEC_t. redefined in TimeUnits.h. More...
 
typedef float TIMESECF_t
 delta float seconds. More...
 
typedef UINT32 TIMESYS_t
 TIMESYS_t = The normal system tick timer. milli-seconds since start of system/app ? More...
 
typedef INT32 TIMESYSD_t
 Time delta. signed milli-Seconds Span. cTimeSys::k_DMAX, cTimeSys::k_INF = MAILSLOT_WAIT_FOREVER. More...
 
typedef UINT64 TIMEPERF_t
 The system very high precision performance timer. cTimeSpec. More...
 
typedef time_t TIMESEC_t
 absolute seconds since January 1, 1970. (GMT?)(signed) NOTE: Changing to __time64_t just adds more range with same values. (>2038) More...
 
typedef short TIMEUNIT_t
 Arbitrary time unit. (e.g. number of minutes or seconds). Allow negative for null ? Max 16 bits. More...
 
typedef std::type_info TYPEINFO_t
 
typedef int COMPARE_t
 result of compare. 0=same, 1=a>b, -1=a<b More...
 
typedef char FILECHAR_t
 a UTF8 char in a file name. like TCHAR More...
 
typedef UINT_PTR HASHCODE_t
 could hold a pointer converted to a number? maybe 64 or 32 bit ? same as size_t. More...
 
typedef UINT32 HASHCODE32_t
 always 32 bits. More...
 
typedef LONG LSTATUS
 AKA error_status_t. FACILITY_WIN32 codes returned from RegCreateKeyEx() etc. Maybe NOT GetLastError() since it CAN sometimes return HRESULT. More...
 
typedef int ITERATE_t
 like size_t but signed More...
 
typedef size_t COUNT_t
 like size_t but a count of things that might NOT be bytes. ASSUME unsigned. _countof(x) More...
 
typedef WORD RADIX_t
 Base for convert of numbers to strings. e.g. 10 base vs 16 base hex numbers. More...
 
typedef char ATOMCHAR_t
 the char form (UNICODE or not) for an atom. (for symbolic names) More...
 
typedef char GChar_t
 My version of TCHAR, _TCHAR. More...
 
typedef int StrLen_t
 the length of a string in chars (bytes for UTF8, wchar_t for UNICODE). or offset in characters. NOT always valid for (p1-p2) for 32vs64 bit code. More...
 
typedef UINT32 STR_BLOCKS_t
 bit mask of STR_BLOCK_TYPE More...
 
typedef UINT32 STRP_MASK_t
 bit mask of STRP_TYPE_ More...
 
typedef void(__cdecl * JMP_t) (int)
 

Enumerations

enum  AppStd_TYPE { AppStd_stdin = 0 , AppStd_stdout = 1 , AppStd_stderr = 2 , AppStd_QTY }
 
enum  AppCon_TYPE {
  AppCon_UNKNOWN = -1 , AppCon_NONE = 0 , AppCon_Proc = 1 , AppCon_Attach = 2 ,
  AppCon_Create = 3
}
 
enum  APPSTATE_TYPE_ {
  APPSTATE_Init , APPSTATE_RunInit , APPSTATE_Run , APPSTATE_RunExit ,
  APPSTATE_Exit , APPSTATE_QTY
}
 
enum  BITOP_TYPE { BITOP_TOGGLE = -1 , BITOP_CLR = 0 , BITOP_SET = 1 }
 
enum  OF_FLAGS_TYPE_ {
  OF_OPEN_MASK = 0x00FFFFFF , OF_CACHE_SEQ = 0x08000000 , OF_BINARY = 0x10000000 , OF_TEXT = 0x20000000 ,
  OF_NONCRIT = 0x40000000
}
 
enum  FILESYS_TYPE {
  FILESYS_DEFAULT = 0 , FILESYS_FAT , FILESYS_FAT32 , FILESYS_NTFS ,
  FILESYS_NFS , FILESYS_QTY
}
 
enum  FILECHR_TYPE_ {
  FILECHR_Invalid = 0 , FILECHR_Device = 0x01 , FILECHR_Dirs = 0x02 , FILECHR_Name = 0x04 ,
  FILECHR_Name2 = 0x08 , FILECHR_Name3 = 0x10 , FILECHR_Ext = 0x20 , FILECHR_XPath = 0x3E ,
  FILECHR_All = 0x3F , FILECHR_Wildcard = 0x40
}
 
enum  FILEATTR_TYPE_ {
  FILEATTR_None , FILEATTR_ReadOnly = 0x0001 , FILEATTR_Hidden = 0x0002 , FILEATTR_System = 0x0004 ,
  FILEATTR_NormalMask = 0x000F , FILEATTR_Directory = 0x0010 , FILEATTR_Archive = 0x0020 , FILEATTR_Volume = 0x0040 ,
  FILEATTR_Normal = 0x0080 , FILEATTR_Temporary = 0x0100 , FILEATTR_Link = 0x0400 , FILEATTR_Compress = 0x0800
}
 
enum  LOG_ATTR_TYPE_ {
  LOG_ATTR_0 = 0 , LOG_ATTR_INIT = 0x00100000 , LOG_ATTR_SCRIPT = 0x00200000 , LOG_ATTR_NET = 0x00400000 ,
  LOG_ATTR_ODD = 0x01000000 , LOG_ATTR_DEBUG = 0x02000000 , LOG_ATTR_PRINT = 0x04000000 , LOG_ATTR_PRINTBACK = 0x08000000 ,
  LOG_ATTR_TEMP = 0x10000000 , LOG_ATTR_INTERNAL = 0x20000000 , LOG_ATTR_NOCRLF = 0x40000000 , LOG_ATTR_FILTERED = 0x80000000 ,
  LOG_ATTR_CUST_MASK = 0x000FFFFF , LOG_ATTR_BASE_MASK = 0xFFF00000 , LOG_ATTR_ALL_MASK = 0xFFFFFFFF
}
 
enum  LOGLEV_TYPE { LOGLEV_QTY }
 
enum  MIME_TYPE { MIME_QTY }
 
enum  SEEK_ORIGIN_TYPE { SEEK_Set = 0 , SEEK_Cur = 1 , SEEK_End = 2 , SEEK_MASK = 0x0007 }
 
enum  APP_EXITCODE_TYPE {
  APP_EXITCODE_ERRNO = -1 , APP_EXITCODE_OK = EXIT_SUCCESS , APP_EXITCODE_FAIL = EXIT_FAILURE , APP_EXITCODE_ABORT = 3 ,
  APP_EXITCODE_UNK = SHRT_MAX
}
 
enum  TZ_TYPE {
  TZ_UTC = 0 , TZ_GMT = 0 , TZ_AST = (4 * 60) , TZ_EDT = (4 * 60) ,
  TZ_EST = (5 * 60) , TZ_CST = (6 * 60) , TZ_MST = (7 * 60) , TZ_PST = (8 * 60) ,
  TZ_MAX = (24 * 60) , TZ_LOCAL = 0x7FFF
}
 
enum  TIME_FORMAT_TYPE {
  TIME_FORMAT_DEFAULT = 0 , TIME_FORMAT_DB , TIME_FORMAT_TZ , TIME_FORMAT_AMERICAN ,
  TIME_FORMAT_HTTP , TIME_FORMAT_SMTP , TIME_FORMAT_ISO , TIME_FORMAT_ISO_TZ ,
  TIME_FORMAT_ASN , TIME_FORMAT_QTY
}
 
enum  TIMEDOW_TYPE {
  TIMEDOW_Sun = 0 , TIMEDOW_Mon , TIMEDOW_Tue , TIMEDOW_Wed ,
  TIMEDOW_Thu , TIMEDOW_Fri , TIMEDOW_Sat , TIMEDOW_QTY
}
 
enum  TIMEMONTH_TYPE {
  TIMEMONTH_Jan = 0 , TIMEMONTH_Feb , TIMEMONTH_Mar , TIMEMONTH_Apr ,
  TIMEMONTH_May , TIMEMONTH_Jun , TIMEMONTH_Jul , TIMEMONTH_Aug ,
  TIMEMONTH_Sep , TIMEMONTH_Oct , TIMEMONTH_Nov , TIMEMONTH_Dec = 11 ,
  TIMEMONTH_QTY = 12
}
 
enum  TIMEUNIT_TYPE {
  TIMEUNIT_UNUSED = -1 , TIMEUNIT_Year = 0 , TIMEUNIT_Month , TIMEUNIT_Day ,
  TIMEUNIT_Hour , TIMEUNIT_Minute , TIMEUNIT_Second , TIMEUNIT_Millisecond ,
  TIMEUNIT_Microsecond , TIMEUNIT_TZ , TIMEUNIT_QTY , TIMEUNIT_DOW ,
  TIMEUNIT_Ignore , TIMEUNIT_Numeric , TIMEUNIT_QTY2
}
 
enum  TZ_DSTRULE_TYPE { TZ_DSTRULE_NONE = 0 , TZ_DSTRULE_AMERICAN }
 
enum  CTYPE_FLAG_TYPE_ {
  CTYPE_FLAG_Numeric = 0x01 , CTYPE_FLAG_NumSigned = 0x02 , CTYPE_FLAG_Float = 0x04 , CTYPE_FLAG_Time = 0x08 ,
  CTYPE_FLAG_Array = 0x10 , CTYPE_FLAG_Alloc = 0x20 , CTYPE_FLAG_StringA = 0x40 , CTYPE_FLAG_StringW = 0x80 ,
  CTYPE_FLAG_UNUSED = 0xFF
}
 
enum  UNITTEST_LEVEL_TYPE {
  UNITTEST_LEVEL_None = 0 , UNITTEST_LEVEL_Crit , UNITTEST_LEVEL_Core , UNITTEST_LEVEL_Lib ,
  UNITTEST_LEVEL_Common , UNITTEST_LEVEL_Slow , UNITTEST_LEVEL_All , UNITTEST_LEVEL_Off
}
 
enum  COMPARE_TYPE { COMPARE_Less = -1 , COMPARE_Equal = 0 , COMPARE_Greater = 1 }
 
enum  FILEOP_TYPE { FILEOP_MOVE = 0x0001 , FILEOP_COPY = 0x0002 , FILEOP_DELETE = 0x0003 , FILEOP_RENAME = 0x0004 }
 
enum  FACILITY_TYPE { FACILITY_POSIX = 5 , FACILITY_MMSYS = 0x100 , FACILITY_D3D = 0x876 }
 
enum  HRESULT_WIN32_TYPE_
 
enum  HRESULT_OTHER_TYPE_
 
enum  CODEPAGE_t { CP_ACP = 0 , CP_OEMCP = 1 , CP_UTF8 = 65001 }
 
enum  ASCII_TYPE { ASCII_NONE = -1 }
 
enum  STR_BLOCK_TYPE {
  STR_BLOCK_NONE = -1 , STR_BLOCK_QUOTE = 0 , STR_BLOCK_CURLY , STR_BLOCK_SQUARE ,
  STR_BLOCK_PAREN , STR_BLOCK_QTY
}
 < quotes/brackets and parenthesis must be matched. More...
 
enum  STRP_TYPE_ {
  STRP_0 , STRP_START_WHITE = 0x01 , STRP_SPACE_SEP = 0x02 , STRP_END_WHITE = 0x04 ,
  STRP_CHECK_BLOCKS = 0x08 , STRP_DEF = 0x0F , STRP_MERGE_CRNL = 0x10 , STRP_EMPTY_SKIP = 0x20 ,
  STRP_EMPTY_STOP = 0x40 , STRP_ALL = 0x7F
}
 
enum  STRFORMATTEST_TYPE {
  STRFORMATTEST_0 , STRFORMATTEST_null , STRFORMATTEST_s1 , STRFORMATTEST_s2 ,
  STRFORMATTEST_sA , STRFORMATTEST_i0 , STRFORMATTEST_i1 , STRFORMATTEST_i2 ,
  STRFORMATTEST_i5 , STRFORMATTEST_im2 , STRFORMATTEST_in , STRFORMATTEST_x1 ,
  STRFORMATTEST_xlg , STRFORMATTEST_c1 , STRFORMATTEST_c2 , STRFORMATTEST_f0 ,
  STRFORMATTEST_fp1 , STRFORMATTEST_f2 , STRFORMATTEST_f3 , STRFORMATTEST_f100 ,
  STRFORMATTEST_fn , STRFORMATTEST_fnz , STRFORMATTEST_flg , STRFORMATTEST_fmax ,
  STRFORMATTEST_QTY
}
 

Functions

template<class TYPE >
void __cdecl ConstructElements (TYPE *pElements, ITERATE_t nCount)
 
template<class TYPE >
void __cdecl DestructElements (TYPE *pElements, ITERATE_t nCount)
 
template<class TYPE >
void __cdecl CopyElements (TYPE *pDest, const TYPE *pSrc, ITERATE_t nCount)
 
template<>
void __cdecl CopyElements< BYTE > (BYTE *pDest, const BYTE *pSrc, ITERATE_t nCount)
 
typedef bool (CALLBACK AssertCallback_t)(const char *pszExp
 
INT32 __cdecl InterlockedCompareExchange (INT32 volatile *pDest, INT32 nValNew, INT32 nValComp) noexcept
 
bool InterlockedSetIfEqual (_Inout_ INT32 volatile *pDest, INT32 nValNew, INT32 nValComp) noexcept
 
INT32 __cdecl InterlockedIncrement (INT32 volatile *pDest) noexcept
 
INT32 __cdecl InterlockedDecrement (INT32 volatile *pDest) noexcept
 
INT32 __cdecl InterlockedExchange (INT32 volatile *pDest, INT32 Value) noexcept
 
INT32 __cdecl InterlockedExchangeAdd (INT32 volatile *pDest, INT32 Value) noexcept
 
INT64 __cdecl _InterlockedCompareExchange64 (_Inout_ INT64 volatile *pDest, IN INT64 nValNew, IN INT64 nValComp) noexcept
 
bool _InterlockedSetIfEqual64 (_Inout_ INT64 volatile *pDest, INT64 nValNew, INT64 nValComp) noexcept
 
INT64 __cdecl _InterlockedIncrement64 (_Inout_ INT64 volatile *pDest) noexcept
 
INT64 __cdecl _InterlockedDecrement64 (_Inout_ INT64 volatile *pDest) noexcept
 
INT64 __cdecl _InterlockedExchange64 (_Inout_ INT64 volatile *pDest, IN INT64 Value) noexcept
 
INT64 __cdecl _InterlockedExchangeAdd64 (_Inout_ INT64 volatile *pDest, IN INT64 Value) noexcept
 
typedef __DECL_ALIGN (4) cInterlockedVal< INT32 > cInterlockedInt32
 
typedef __DECL_ALIGN (8) cInterlockedVal< INT64 > cInterlockedInt64
 
cStringA operator+ (const char *pStr1, const cStringA &s2)
 
cStringW operator+ (const wchar_t *pStr1, const cStringW &s2)
 
template<typename _TYPE_CH >
void operator>> (cArchive &ar, cStringT< _TYPE_CH > &pOb)
 
template<typename _TYPE_CH >
void operator<< (cArchive &ar, const cStringT< _TYPE_CH > &pOb)
 
bool operator< (const cTimeDouble &dt1, const cTimeDouble &dt2)
 
bool operator<= (const cTimeDouble &dt1, const cTimeDouble &dt2)
 
bool operator> (const cTimeDouble &dt1, const cTimeDouble &dt2)
 
bool operator>= (const cTimeDouble &dt1, const cTimeDouble &dt2)
 
bool operator== (const cTimeDouble &dt1, const cTimeDouble &dt2)
 
bool operator!= (const cTimeDouble &dt1, const cTimeDouble &dt2)
 
cUInt64 operator+ (const cUInt64 &roUI64_1, const cUInt64 &roUI64_2)
 
cUInt64 operator| (const cUInt64 &roUI64_1, const cUInt64 &roUI64_2)
 
cUInt64 operator& (const cUInt64 &roUI64_1, const cUInt64 &roUI64_2)
 
cUInt64 operator^ (const cUInt64 &roUI64_1, const cUInt64 &roUI64_2)
 
cUInt64 operator<< (const cUInt64 &n, BIT_ENUM_t uiBits)
 
cUInt64 operator>> (const cUInt64 &n, BIT_ENUM_t uiBits)
 
class WINHEAPN(Handle) class WINHEAPN (V)
 
template<class _TYPE >
struct WINHEAPN (T)
 
template<class _TYPE_TO , class _TYPE_FROM >
bool is_valid_cast (_TYPE_FROM *p)
 
template<class _TYPE_TO , class _TYPE_FROM >
_TYPE_TO * check_cast (_TYPE_FROM *p)
 
template<typename TYPE >
__DECL_IMPORT const TYPE *__stdcall StrArg (const char *pszStr)
 
template<typename TYPE >
__DECL_IMPORT const TYPE *__stdcall StrArg (const wchar_t *pszStr)
 
template<typename TYPE >
const TYPEStrArg (const BYTE *pszStr)
 
template<typename TYPE >
__DECL_IMPORT const TYPE *__stdcall StrArg (TYPE ch, StrLen_t nRepeat=1)
 
template<typename TYPE >
__DECL_IMPORT const TYPE *__stdcall StrArg (INT32 iVal)
 
template<typename TYPE >
__DECL_IMPORT const TYPE *__stdcall StrArg (UINT32 uVal, RADIX_t uRadix=10)
 
template<typename TYPE >
__DECL_IMPORT const TYPE *__stdcall StrArg (INT64 iVal)
 
template<typename TYPE >
__DECL_IMPORT const TYPE *__stdcall StrArg (UINT64 uVal, RADIX_t uRadix=10)
 
template<typename TYPE >
__DECL_IMPORT const TYPE *__stdcall StrArg (double dVal)
 
template<>
const char *__stdcall StrArg< char > (const char *pszStr) noexcept
 
template<>
const wchar_t *__stdcall StrArg< wchar_t > (const wchar_t *pszStr) noexcept
 
template<>
const BYTE *__stdcall StrArg< BYTE > (const BYTE *pszStr) noexcept
 
template<>
const BYTE *__stdcall StrArg< BYTE > (const char *pszStr) noexcept
 
 IMPLEMENT_DYNAMIC (cException, cExceptionBase)
 
template<>
GRAYCORE_LINK const wchar_t *GRAYCALL StrArg< wchar_t > (const char *pszStrInp)
 
template<>
GRAYCORE_LINK const char *GRAYCALL StrArg< char > (const wchar_t *pwStrInp)
 
template<typename TYPE >
GRAYCORE_LINK const TYPE *GRAYCALL StrArg (TYPE ch, StrLen_t nRepeat)
 
template<typename TYPE >
GRAYCORE_LINK const TYPE *GRAYCALL StrArg (INT32 iVal)
 
template<typename TYPE >
GRAYCORE_LINK const TYPE *GRAYCALL StrArg (UINT32 uVal, RADIX_t uRadix)
 
template<typename TYPE >
GRAYCORE_LINK const TYPE *GRAYCALL StrArg (double dVal)
 
 TEST_CLASS (cAppConsoleTests)
 
 TEST_CLASS (cAppStateTests)
 
 TEST_CLASS (cArchiveTests)
 
 TEST_CLASS (cArraySortTests)
 
 TEST_CLASS (cArraySortStringTests)
 
 TEST_CLASS (cAtomTests)
 
 TEST_CLASS (cBitsTests)
 
void TestFunction ()
 
 TEST_CLASS (cCodeProfilerTests)
 
__DECL_EXPORT void __stdcall UnitTest_Write (cStreamOutput &testfile1)
 
__DECL_EXPORT void __stdcall UnitTest_Read (cStreamInput &stmIn, bool bString)
 
 TEST_CLASS (cFileTests)
 
void __stdcall UnitTest_CopyTo (IFileCopier *pDst)
 
void __stdcall UnitTest_CopyFrom (IFileCopier *pSrc)
 
 TEST_CLASS (cFileCopierTests)
 
 TEST_CLASS (cFileDirTests)
 
 TEST_CLASS (cFilePathTests)
 
 TEST_CLASS (cFileTextTests)
 
 TEST_CLASS (cFileTextReaderTests)
 
virtual ~ cFileTextReaderTests () noexcept(false)
 
 TEST_METHOD (RunTest)
 
virtual void RunUnitTest () override
 
 TEST_CLASS (cFloatTests)
 
 TEST_CLASS (cFloatDecoTests)
 
 TEST_CLASS (cHashTableTests)
 
 TEST_CLASS (cHeapTests)
 
INT_PTR __stdcall cUnitTest_HookJump1 ()
 
INT_PTR __stdcall cUnitTest_HookJump2 ()
 
 TEST_CLASS (cHookJumpTests)
 
 TEST_CLASS (cIniFileTests)
 
HRESULT UnitTest_Section (const cIniSection *pSection)
 
virtual ~ cIniFileTests () noexcept(false)
 
 TEST_CLASS (cIniObjectTests)
 
virtual ~ cIniObjectTests () noexcept(false)
 
 TEST_CLASS (cIniSectionTests)
 
 TEST_CLASS (cInterlockedValTests)
 
 TEST_CLASS (cListTests)
 
 TEST_CLASS (cLogMgrTests)
 
template<class TYPE >
void UnitTestMem (const TYPE nValH)
 
 TEST_CLASS (cMemTests)
 
 TEST_CLASS (cOSHandleTests)
 
 TEST_CLASS (cOSModuleTests)
 
 TEST_CLASS (cOSProcessTests)
 
 TEST_CLASS (cPtrTraceTests)
 
 TEST_CLASS (cQueueTests)
 
 TEST_CLASS (cRandomTests)
 
 TEST_CLASS (cSingletonTests)
 
__DECL_EXPORT void __stdcall UnitTest_StreamIntegrity (cStreamOutput &stmOut, cStreamInput &stmIn, size_t nSizeTotal)
 
 TEST_CLASS (cStreamTests)
 
template<typename _TYPE_CH >
void __stdcall UnitTestStrT ()
 
 TEST_CLASS (cStringTests)
 
 TEST_CLASS (cSystemInfoTests)
 
 TEST_CLASS (cThreadLockTests)
 
 TEST_CLASS (cThreadLockRWTests)
 
 TEST_CLASS (cTimeDoubleTests)
 
 TEST_CLASS (cTimeFileTests)
 
 TEST_CLASS (cTimeIntTests)
 
 TEST_CLASS (cTimeSysTests)
 
 TEST_CLASS (cTimeUnitsTests)
 
 TEST_CLASS (cTimeZoneTests)
 
 TEST_CLASS (cTypeInfoTests)
 
template<typename TYPE >
void TestFloatTypes ()
 
void TestInt ()
 
void TestRef ()
 
void TestClass1 ()
 
virtual ~ cTypeInfoTests () noexcept(false)
 
 TEST_CLASS (cUInt64Tests)
 
bool CALLBACK UnitTestsMs_AssertCallback (const char *pszExp, const cDebugSourceLine &src)
 
 TEST_MODULE_INITIALIZE (Initialize)
 
 TEST_MODULE_CLEANUP (Cleanup)
 
 TEST_CLASS (GrayCoreTests)
 
 TEST_CLASS (HResultTests)
 
 TEST_CLASS (StrATests)
 
template<typename TYPE >
bool __stdcall StrArg_UnitTestT ()
 
 TEST_CLASS (StrArgTests)
 
 TEST_CLASS (StrCharTests)
 
template<typename TYPE >
StrLen_t UnitTestFormat1 (typename StrFormat< TYPE >::STRFORMAT_t pFormat, TYPE *pszOut, StrLen_t nLenOut, const TYPE *pszFormat, int eArgs)
 
template<typename TYPE >
void __stdcall UnitTestFormatX (typename StrFormat< TYPE >::STRFORMAT_t pFormat, TYPE *pszOut, StrLen_t nLenOut)
 
template<typename TYPE >
void __stdcall UnitTestFormat (typename StrFormat< TYPE >::STRFORMAT_t pFormat)
 
 TEST_CLASS (StrFormatTests)
 
 TEST_CLASS (StrNumTests)
 
 TEST_CLASS (StrTTests)
 
 TEST_CLASS (StrUTests)
 
 DECLARE_INTERFACE (IRandomNoise)
 

Variables

template<typename TYPE = void>
class __DECL_IMPORT __DECL_ALIGN(4) cInterlockedPtr typedef cInterlockedPtr cInterlockedPtrV
 
cOSModImpl g_Module (GRAY_NAMES "Core")
 
class __DECL_IMPORT cException
 
class __DECL_IMPORT cFileStatus
 
template class __DECL_IMPORT CArray< cFileFindEntry, const cFileFindEntry & >
 
template class __DECL_IMPORT cArrayTyped< cFileFindEntry, const cFileFindEntry & >
 
template class __DECL_IMPORT cArrayStruct< cFileFindEntry >
 
template class __DECL_IMPORT cInterlockedPtr< >
 
template class __DECL_IMPORT cInterlockedVal< long >
 
template class __DECL_IMPORT cInterlockedVal< ULONG >
 
template class __DECL_IMPORT cIUnkPtr< IUnknown >
 
template class __DECL_IMPORT cOSModuleFunc< FARPROC >
 
constexpr PROCESSID_t PROCESSID_BAD = 0
 Invalid process id. More...
 
template class __DECL_IMPORT cQueueRead< BYTE >
 
template class __DECL_IMPORT cQueueRW< BYTE >
 
__DECL_IMPORT cRandomDef g_Rand
 the global random number generator. NOT thread safe. but does that matter? More...
 
template class __DECL_IMPORT cRefPtr< cRefBase >
 
class __DECL_IMPORT cStreamInput
 
class __DECL_IMPORT cStreamOutput
 
class __DECL_IMPORT cArchive
 
const HASHCODE_t k_HASHCODE_CLEAR = 0
 not a valid index. More...
 
__DECL_IMPORT va_list k_va_list_empty
 
const ITERATE_t k_ITERATE_BAD = -1
 
const StrLen_t k_StrLen_UNK = -1
 use the default/current length of the string argument. More...
 
template class GRAYCORE_LINK CStringT< char >
 
template class GRAYCORE_LINK CStringT< wchar_t >
 
template class GRAYCORE_LINK cStringT< char >
 
template class GRAYCORE_LINK cStringT< wchar_t >
 
template class GRAYCORE_LINK StrFormat< char >
 
template class GRAYCORE_LINK StrFormat< wchar_t >
 
public cUnitTest
 

Detailed Description

< The main namespace for all Core functions.

force a template function to instantiate for TYPE of char and wchar_t. Explicit instantiation

Todo:
http://stackoverflow.com/questions/1158374/portable-compare-and-swap-atomic-operations-c-c-library

The main namespace for all Core functions. The main/default namespace for Gray library

Typedef Documentation

◆ APP_ARGS_t

typedef const FILECHAR_t* const* Gray::APP_ARGS_t

the args passed to main() nullptr terminated array.

◆ ATOMCHAR_t

typedef char Gray::ATOMCHAR_t

the char form (UNICODE or not) for an atom. (for symbolic names)

◆ ATOMCODE_t

Encode a atom as a 32 bit hashcode instead of using its name/pointer. StrT::GetHashCode32()

◆ BIT_ENUM_t

typedef unsigned int Gray::BIT_ENUM_t

Enumerate number of bits or address a single bit in some array of bits.

◆ BIT_SIZE_t

typedef unsigned short Gray::BIT_SIZE_t

number of bits in some intrinsic type. <= 256 ?

◆ cArraySortStringA

◆ cArraySortStringW

◆ cArrayStringA

◆ cArrayStringW

◆ cAtomDefPtr

◆ CFileException

◆ cIniSectionEntryPtr

◆ cIUnkBasePtr

typedef __DECL_IMPORT cIUnkPtr Gray::cIUnkBasePtr

◆ cLogEventPtr

◆ cMemPagePtr

◆ COMPARE_t

typedef int Gray::COMPARE_t

result of compare. 0=same, 1=a>b, -1=a<b

◆ cOSModuleFuncGeneric

◆ COUNT_t

typedef size_t Gray::COUNT_t

like size_t but a count of things that might NOT be bytes. ASSUME unsigned. _countof(x)

◆ cRefBasePtr

typedef __DECL_IMPORT cRefPtr Gray::cRefBasePtr

◆ cStreamProgress

◆ cString

◆ CString

◆ cStringA

typedef cStringT< char > Gray::cStringA

◆ CStringDataPtr

Pointer to hold a ref to the string data so i can thread lock it.

◆ cStringF

A file name. checks USE_UNICODE_FN. related to cFilePath.

◆ cStringI

A .INI file string.

◆ cStringL

Log string.

◆ cStringW

typedef cStringT< wchar_t > Gray::cStringW

◆ cThreadGuard

◆ cThreadGuardFast

◆ cThreadGuardMutex

◆ cThreadGuardWrite

◆ cThreadLockCount

◆ cThreadLockCrit

◆ cThreadLockRefX

◆ FILE_SIZE_t

typedef UINT64 Gray::FILE_SIZE_t

similar to STREAM_POS_t size_t

◆ FILEATTR_MASK_t

typedef UINT32 Gray::FILEATTR_MASK_t

◆ FILECHAR_t

typedef char Gray::FILECHAR_t

a UTF8 char in a file name. like TCHAR

◆ FILECHR_MASK_t

typedef WORD Gray::FILECHR_MASK_t

Mask of enum FILECHR_TYPE_.

◆ FILEDESC_t

typedef int Gray::FILEDESC_t

Posix file descriptor id for std C. used for separate _fileno in FILE*.

◆ FILETIME_t

typedef UINT64 Gray::FILETIME_t

replace FILETIME for 64 bit math. Absolute 64-bit 100-nanosecond since January 1, 1601 GMT

◆ GChar_t

typedef char Gray::GChar_t

My version of TCHAR, _TCHAR.

◆ HASHCODE32_t

typedef UINT32 Gray::HASHCODE32_t

always 32 bits.

◆ HASHCODE_t

typedef UINT_PTR Gray::HASHCODE_t

could hold a pointer converted to a number? maybe 64 or 32 bit ? same as size_t.

◆ IniChar_t

typedef char Gray::IniChar_t

char format even on UNICODE system! Screw M$, INI files should ALWAYS have UTF8 contents

◆ INTER32_t

typedef INT32 Gray::INTER32_t

Interlock intrinsic type as INT32.

◆ IPROPIDX_t

typedef int Gray::IPROPIDX_t

enumerate known properties for some interface/object/class. similar to SCRIPTPROPID_t

◆ ITERATE_t

typedef int Gray::ITERATE_t

like size_t but signed

◆ JMP_t

typedef void(__cdecl * Gray::JMP_t) (int)

◆ LOG_ATTR_MASK_t

typedef UINT32 Gray::LOG_ATTR_MASK_t

◆ LOGCHAR_t

typedef char Gray::LOGCHAR_t

always just use UTF8 for logs, don't bother with UNICODE.

◆ LSTATUS

typedef LONG Gray::LSTATUS

AKA error_status_t. FACILITY_WIN32 codes returned from RegCreateKeyEx() etc. Maybe NOT GetLastError() since it CAN sometimes return HRESULT.

◆ OF_FLAGS_t

typedef UINT32 Gray::OF_FLAGS_t

Mask of file open flags OF_FLAGS_TYPE_.

◆ RADIX_t

typedef WORD Gray::RADIX_t

Base for convert of numbers to strings. e.g. 10 base vs 16 base hex numbers.

◆ RESOURCEID_t

typedef WORD Gray::RESOURCEID_t

A resource in .RC attached to a file/module. like MAKEINTRESOURCE(). https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-makeintresourcea.

a resource id as 16 valid bits only. enum space is type specific. e.g. RT_STRING, RT_ICON, etc

◆ src

typedef const cDebugSourceLine& Gray::src

◆ STR_BLOCKS_t

typedef UINT32 Gray::STR_BLOCKS_t

bit mask of STR_BLOCK_TYPE

◆ STREAM_OFFSET_t

typedef LONG_PTR Gray::STREAM_OFFSET_t

Might be 64 or 32 bit. TODO SET USE_FILE_POS64.

◆ STREAM_POS_t

typedef ULONG_PTR Gray::STREAM_POS_t

NOT same as FILE_SIZE_t in 32 bit. Why not ?

◆ STREAM_SEEKRET_t

typedef LONG_PTR Gray::STREAM_SEEKRET_t

return from Seek()

◆ StrLen_t

typedef int Gray::StrLen_t

the length of a string in chars (bytes for UTF8, wchar_t for UNICODE). or offset in characters. NOT always valid for (p1-p2) for 32vs64 bit code.

◆ STRP_MASK_t

typedef UINT32 Gray::STRP_MASK_t

bit mask of STRP_TYPE_

◆ THREAD_FUNC_t

typedef THREAD_EXITCODE_t(_stdcall* Gray::THREAD_FUNC_t) (void *)

◆ TIMEPERF_t

typedef UINT64 Gray::TIMEPERF_t

The system very high precision performance timer. cTimeSpec.

◆ TIMESEC_t

typedef time_t Gray::TIMESEC_t

absolute seconds since January 1, 1970. (GMT?)(signed) NOTE: Changing to __time64_t just adds more range with same values. (>2038)

◆ TIMESECD_t

typedef int Gray::TIMESECD_t

signed delta seconds. like TIMESEC_t. redefined in TimeUnits.h.

signed delta seconds from some epoch.

◆ TIMESECF_t

typedef float Gray::TIMESECF_t

delta float seconds.

◆ TIMESYS_t

typedef UINT32 Gray::TIMESYS_t

TIMESYS_t = The normal system tick timer. milli-seconds since start of system/app ?

The absolute system milli-Second tick. (NOT the same as a time range!)

◆ TIMESYSD_t

typedef INT32 Gray::TIMESYSD_t

Time delta. signed milli-Seconds Span. cTimeSys::k_DMAX, cTimeSys::k_INF = MAILSLOT_WAIT_FOREVER.

◆ TIMEUNIT_t

typedef short Gray::TIMEUNIT_t

Arbitrary time unit. (e.g. number of minutes or seconds). Allow negative for null ? Max 16 bits.

◆ TYPEINFO_t

typedef std::type_info Gray::TYPEINFO_t

Enumeration Type Documentation

◆ APP_EXITCODE_TYPE

http://en.wikipedia.org/wiki/Exit_status = 'errorlevel' return from POSIX process.

Enumerator
APP_EXITCODE_ERRNO 

See Posix 'errno' for why this process never started.

APP_EXITCODE_OK 

0=EXIT_SUCCESS (stdlib.h). App closed.

APP_EXITCODE_FAIL 

1=EXIT_FAILURE = generic error. App closed.

APP_EXITCODE_ABORT 

3=Default error returned if "abort()" used (arbitrary?) App closed.

APP_EXITCODE_UNK 

handle not valid ?

◆ AppCon_TYPE

What type of console is connected?

Enumerator
AppCon_UNKNOWN 
AppCon_NONE 
AppCon_Proc 

Process was build as _CONSOLE mode. stdin,stdout already setup.

AppCon_Attach 

Attached to parent console. must call FreeConsole()

AppCon_Create 

Created my own console. must call FreeConsole()

◆ APPSTATE_TYPE_

What state is the app in at the moment?

Enumerator
APPSTATE_Init 

static class init time. constructors called for static stuff. maybe set for single thread loading DLL dynamically.

APPSTATE_RunInit 

not static init but still init. In main() but not main loop yet. InitInstance()

APPSTATE_Run 

we are in main() main loop. Run() and OnTickApp()

APPSTATE_RunExit 

classes are being cleaned up. destructors called. Trying to exit. ExitInstance().

APPSTATE_Exit 

static classes are being cleaned up. destructors called.

APPSTATE_QTY 

◆ AppStd_TYPE

Standard streams/handles. True for both linux and _WIN32. (though linux implementation is hidden)

Enumerator
AppStd_stdin 

stdin (&__iob_func()[0]) -> GetStdHandle(STD_INPUT_HANDLE) = STDIN_FILENO

AppStd_stdout 

stdout (&__iob_func()[1]) -> GetStdHandle(STD_OUTPUT_HANDLE) = STDOUT_FILENO

AppStd_stderr 

stderr (&__iob_func()[2]) -> GetStdHandle(STD_ERROR_HANDLE) = STDERR_FILENO

AppStd_QTY 

◆ ASCII_TYPE

Make names for all the ASCII values. control chars.

Enumerator
ASCII_NONE 

◆ BITOP_TYPE

Take action on a bit. Hold a tristate bool. similar to VB TriState ?

Enumerator
BITOP_TOGGLE 

XOR bit operation to flip bits. Also used for unknown bit state.

BITOP_CLR 

AND/NOT bit operation to clear bits.

BITOP_SET 

OR bit operation to set bits.

◆ CODEPAGE_t

Enumerator
CP_ACP 

default to ANSI code page. All the _WIN32 A suffix functions.

CP_OEMCP 

default to OEM code page

CP_UTF8 

UTF-8 translation.

◆ COMPARE_TYPE

General return type from a compare. Similar to _WIN#2 VARCMP_GT

Enumerator
COMPARE_Less 

VARCMP_LT.

COMPARE_Equal 

VARCMP_EQ.

COMPARE_Greater 

VARCMP_GT.

◆ CTYPE_FLAG_TYPE_

Bitmask to describe a native data type. used for type metadata. Fit in BYTE.

Enumerator
CTYPE_FLAG_Numeric 

A numeric value of some sort. (maybe time, float or int)

CTYPE_FLAG_NumSigned 

a signed numeric value. float or int.

CTYPE_FLAG_Float 

Floating point. double or float.

CTYPE_FLAG_Time 

Number represents a time. number of time units from some epoch.

CTYPE_FLAG_Array 

An array of stuff.

CTYPE_FLAG_Alloc 

Contains pointer to allocated memory. variable length? Blob?

CTYPE_FLAG_StringA 

UTF8 format string.

CTYPE_FLAG_StringW 

UNICODE format string.

CTYPE_FLAG_UNUSED 

This type is just a placeholder. don't use it.

◆ FACILITY_TYPE

What general group of HRESULT error codes is this? 11 bit HRESULT facility code.

Enumerator
FACILITY_POSIX 

Facility for POSIX _errno in a _WIN32 style code.

FACILITY_MMSYS 

Facility for _WIN32 MMSYSTEM MMRESULT error codes. MMSYSERR_BASE.

FACILITY_D3D 

max = 2048 = 0x800 = 11 bits ?

Facility for D3D errors. Same as _FACD3D in 'd3d9.h' . e.g. D3DERR_DEVICELOST

◆ FILEATTR_TYPE_

FAT, FAT32 and NTFS file attribute flags. translated to approximate linux NFS

Enumerator
FILEATTR_None 
FILEATTR_ReadOnly 

FILE_ATTRIBUTE_READONLY. linux permissions for user ?

FILEATTR_Hidden 

FILE_ATTRIBUTE_HIDDEN. linux starts with .

FILEATTR_System 

FILE_ATTRIBUTE_SYSTEM.

FILEATTR_NormalMask 

(FILEATTR_ReadOnly|FILEATTR_Hidden|FILEATTR_System)

FILEATTR_Directory 

FILE_ATTRIBUTE_DIRECTORY.

FILEATTR_Archive 

FILE_ATTRIBUTE_ARCHIVE = this has been changed. (needs to be archived) not yet backed up.

FILEATTR_Volume 

FILE_ATTRIBUTE_DEVICE = some sort of device. not a file or dir. e.g. COM1.

FILEATTR_Normal 

FILE_ATTRIBUTE_NORMAL = just a file.

FILEATTR_Temporary 

FILE_ATTRIBUTE_TEMPORARY.

FILEATTR_Link 

FILE_ATTRIBUTE_REPARSE_POINT = a link. This file doesn't really exist locally but is listed in the directory anyhow.

FILEATTR_Compress 

FILE_ATTRIBUTE_COMPRESSED. this is a file that will act like a ATTR_directory. (sort of)

◆ FILECHR_TYPE_

What chars are valid for a file name. Group chars into categories and sections for use in a file name. http://en.wikipedia.org/wiki/Filename

Enumerator
FILECHR_Invalid 

not a valid char.

FILECHR_Device 

Volume: designators (drive letters) or device ? "a:" or "com1:".

FILECHR_Dirs 

FILECHAR_IsDirSep, the directory path to the file. may have relatives "..".

FILECHR_Name 

Char is valid as part of a FILESYS_TYPE file name.

FILECHR_Name2 

Char is part of name but not in base set. "spaces, <, >, |, \, and sometimes :, (, ), &, ;, #, as well as wildcards such as ? and *" requires quotes or escaping.

FILECHR_Name3 

Char is part of name but is foreign char. UNICODE.

FILECHR_Ext 

File type extension. '.' for ".txt".

FILECHR_XPath 

mask for path but NOT Volume/drive. good for FTP

FILECHR_All 

mask for any (including Volume/drive). but not wildcard.

FILECHR_Wildcard 

"?*" = allow wildcards in the name.

◆ FILEOP_TYPE

Operations on files. for use with FILEOP_FLAGS ? Same as WIN32 "shellapi.h" FO_MOVE, FO_COPY, FO_DELETE, FO_RENAME for cFileDirDlg SHFileOperation

Enumerator
FILEOP_MOVE 
FILEOP_COPY 
FILEOP_DELETE 
FILEOP_RENAME 

◆ FILESYS_TYPE

The file system type dictates what characters are allowed in names and if the names are case sensitive. Similar to cZipFileEntry1::SYSTEM_TYPE

Enumerator
FILESYS_DEFAULT 

Modern OS's. >= FILESYS_FAT32.

FILESYS_FAT 

Old DOS 8.3 names. Most restrictive of chars allowed.

FILESYS_FAT32 

Allow spaces and ~1 equivalent names. long names.

FILESYS_NTFS 

Allow long names, spaces and ~1 equivalent names + extra Attributes.

FILESYS_NFS 

Linux names are case sensitive. typical for FTP or HTTP mounted files.

FILESYS_QTY 

◆ HRESULT_OTHER_TYPE_

Other Common (non FACILITY_WIN32) HRESULT codes like E_FAIL

◆ HRESULT_WIN32_TYPE_

codes for FACILITY_WIN32. (AKA LSTATUS/error_status_t) NO_ERROR = ERROR_SUCCESS = 0

◆ LOG_ATTR_TYPE_

Log event attributes. special controls for odd logged events. bitmask so event can have multi attributes

Enumerator
LOG_ATTR_0 
LOG_ATTR_INIT 

startup/exit stuff. category.

Adding new attributes (low values) here can be used to add more categories. but use cLogSubject for that for much more flexibility.

LOG_ATTR_SCRIPT 

from some sort of scripted code exec. category.

LOG_ATTR_NET 

from network activity. category. (watch out that this is not also sent on the network as it might cause feedback)

LOG_ATTR_ODD 

This is odd/unusual behavior for client. category. Probably not a code problem but a user/security/integrity problem.

LOG_ATTR_DEBUG 

Unclassified debug stuff. category.

LOG_ATTR_PRINT 

The equiv of a printf() to console.

LOG_ATTR_PRINTBACK 

Back up over the last LOG_ATTR_PRINT. append to the last.

LOG_ATTR_TEMP 

Real time status (don't bother to log permanently)

LOG_ATTR_INTERNAL 

Do not echo this message as it may relate to my own logging internals (i.e.feedback loop)

LOG_ATTR_NOCRLF 

Don't add a FILE_EOL (CR NL) to the end of this string. this is a partial message.

LOG_ATTR_FILTERED 

Filter already checked so don't check it again.

LOG_ATTR_CUST_MASK 
LOG_ATTR_BASE_MASK 
LOG_ATTR_ALL_MASK 

◆ LOGLEV_TYPE

log level = criticalness/importance level of a logged event. higher = more severe/important. Similar to _WIN32 DPFLTR_ERROR_LEVEL = DEBUGLVL_ERROR or .NET System.Diagnostics.EventLogEntryType

Enumerator
LOGLEV_QTY 

8= Filter everything. i want to see nothing.

◆ MIME_TYPE

Enumerate of recognized MIME types. Linux version of file types. This is similar to the _WIN32 file extension. Registry "Content Type". same as HTTP "Content-Type"

Enumerator
MIME_QTY 

◆ OF_FLAGS_TYPE_

File open mode flags.

Enumerator
OF_OPEN_MASK 

High flags not supported by POSIX open().

flags used by open().

OF_CACHE_SEQ 

O_DIRECT for linux ??

OF_BINARY 

for using FILE* in non text mode. (Default)

OF_TEXT 

UTF8 or plain ASCII text file. (set by use of char Read/WriteString functions)

OF_NONCRIT 

Not a real failure if it doesn't exist.

◆ SEEK_ORIGIN_TYPE

SEEK_SET defined for both linux and _WIN32 same as enum tagSTREAM_SEEK Seek Origin Type flag. SEEK_SET,SEEK_CUR,SEEK_END or FILE_BEGIN,FILE_CURRENT,FILE_END

Enumerator
SEEK_Set 

SEEK_SET = FILE_BEGIN = STREAM_SEEK_SET = 0 = relative to the start of the file.

SEEK_Cur 

SEEK_CUR = FILE_CURRENT = STREAM_SEEK_CUR = 1 = relative to the current position.

SEEK_End 

SEEK_END = FILE_END = STREAM_SEEK_END = 2 = relative to the end of the file.

SEEK_MASK 

| _BITMASK(SEEK_Set) allow extra bits above SEEK_ORIGIN_TYPE ?

◆ STR_BLOCK_TYPE

< quotes/brackets and parenthesis must be matched.

string block types. see k_szBlockStart[] and k_szBlockEnd[] ignore single quotes (may be unmatched apostrophe), commas ?

Enumerator
STR_BLOCK_NONE 
STR_BLOCK_QUOTE 

"X" double quotes

STR_BLOCK_CURLY 

{X} curly braces

STR_BLOCK_SQUARE 

[X] brackets

STR_BLOCK_PAREN 

(X) parenthesis

STR_BLOCK_QTY 

◆ STRFORMATTEST_TYPE

Enumerator
STRFORMATTEST_0 
STRFORMATTEST_null 
STRFORMATTEST_s1 
STRFORMATTEST_s2 
STRFORMATTEST_sA 
STRFORMATTEST_i0 
STRFORMATTEST_i1 
STRFORMATTEST_i2 
STRFORMATTEST_i5 
STRFORMATTEST_im2 
STRFORMATTEST_in 
STRFORMATTEST_x1 
STRFORMATTEST_xlg 
STRFORMATTEST_c1 
STRFORMATTEST_c2 
STRFORMATTEST_f0 
STRFORMATTEST_fp1 
STRFORMATTEST_f2 
STRFORMATTEST_f3 
STRFORMATTEST_f100 
STRFORMATTEST_fn 
STRFORMATTEST_fnz 
STRFORMATTEST_flg 
STRFORMATTEST_fmax 
STRFORMATTEST_QTY 

◆ STRP_TYPE_

string token/separator parsing options.

Enumerator
STRP_0 
STRP_START_WHITE 

remove start whitespace from each token

STRP_SPACE_SEP 

allow space separator only if non space not already used.

STRP_END_WHITE 

trim end whitespace off token.

STRP_CHECK_BLOCKS 

check for special nested block sequences. "{[("

STRP_DEF 

default parsing for a line with , separators.

STRP_MERGE_CRNL 

merge "\r\n" (may also be separators.) (newline = linefeed)

STRP_EMPTY_SKIP 

merge/skip empty tokens

STRP_EMPTY_STOP 

Stop when we hit an empty token.

STRP_ALL 

all parsing options on.

◆ TIME_FORMAT_TYPE

Predefined/common time string formats we must be able to parse/supply. Uses similar format tags to strftime() . JavaScript/JSON normal format = ISO8601 = https://en.wikipedia.org/wiki/ISO_8601 e.g. "2012-04-23T18:25:43.511Z"

Enumerator
TIME_FORMAT_DEFAULT 

Default Sortable/linear/readable format. "2008/07/09 13:47:10".

TIME_FORMAT_DB 

Database default but with no TZ. "%04d-%02d-%02d %02d:%02d:%02d".

TIME_FORMAT_TZ 

Sortable Universal/GMT time = "2008-04-10 13:30:00Z".

TIME_FORMAT_AMERICAN 

Typical American style of "07/19/2008 13:47:10".

TIME_FORMAT_HTTP 

HTTP RFC1123 format "Tue, 03 Oct 2000 22:44:56 GMT".

TIME_FORMAT_SMTP 

SMTP wants this format. "7 Aug 2001 10:12:12 GMT".

TIME_FORMAT_ISO 

ISO8601 with no TZ but including the 'T' "2015/01/02T14:03:03".

TIME_FORMAT_ISO_TZ 

ISO8601 plus TZ. "2015/01/02T14:03:03EST" or "2015-11-28T10:16:42+00:00".

TIME_FORMAT_ASN 

No punctuation. e.g. "20150102140303Z".

TIME_FORMAT_QTY 

toJSON method: "2012-04-23T18:25:43.511Z" is sortable. "01/06/2016, 11:45 AM (-03:00)" // from MSSQL samples? SQL Database normal format. https://www.mssqltips.com/sqlservertip/1145/date-and-time-conversions-using-sql-server/ "06-JAN-16 05.45.00.000000000 PM" = Oracle default.

◆ TIMEDOW_TYPE

DAys of the week. 0 based.

Enumerator
TIMEDOW_Sun 

0 based as in SYSTEMTIME.wDayOfWeek, and struct tm.tm_wday

TIMEDOW_Mon 
TIMEDOW_Tue 
TIMEDOW_Wed 
TIMEDOW_Thu 
TIMEDOW_Fri 
TIMEDOW_Sat 
TIMEDOW_QTY 

7

◆ TIMEMONTH_TYPE

Months of the year. 0 based.

Enumerator
TIMEMONTH_Jan 

tm.tm_mon, NOT SYSTEMTIME (which is 1 based)

TIMEMONTH_Feb 
TIMEMONTH_Mar 
TIMEMONTH_Apr 
TIMEMONTH_May 
TIMEMONTH_Jun 
TIMEMONTH_Jul 
TIMEMONTH_Aug 
TIMEMONTH_Sep 
TIMEMONTH_Oct 
TIMEMONTH_Nov 
TIMEMONTH_Dec 
TIMEMONTH_QTY 

◆ TIMEUNIT_TYPE

Enumerate TIMEUNIT_t (16 bit max) elements of cTimeUnits and cTimeParser

Enumerator
TIMEUNIT_UNUSED 

Marks end.

TIMEUNIT_Year 

e.g. 2008. (1<=x<=3000)

TIMEUNIT_Month 

base 1, NOT Base 0 like = TIMEMONTH_Jan. (1<=x<=12)

TIMEUNIT_Day 

day of month. base 1. (1<=x<=31)

TIMEUNIT_Hour 

hour of day. 24 hour scale. base 0. (0<=x<=23)

TIMEUNIT_Minute 

base 0. (0<=x<=59)

TIMEUNIT_Second 

base 0. (0<=x<=59)

TIMEUNIT_Millisecond 

1/1000 = thousandth of a second. (0<=x<=999)

TIMEUNIT_Microsecond 

millionth of a second. (0<=x<=999)

TIMEUNIT_TZ 

TZ + DST.

TIMEUNIT_QTY 

END of cTimeUnits.

TIMEUNIT_DOW 

Ignore this for units storage. its redundant.

TIMEUNIT_Ignore 

Just ignore this duplicate. We have already dealt with it.

TIMEUNIT_Numeric 

A numeric value of unknown type (parsing).

TIMEUNIT_QTY2 

END of cTimeParser.

◆ TZ_DSTRULE_TYPE

Enumerate the DST rules that might exist in the world. Try to be historically accurate. May or may not use DST. http://www.worldtimezone.com/daylight.html

Enumerator
TZ_DSTRULE_NONE 

don't use DST at all. UTC.

TZ_DSTRULE_AMERICAN 

use the American rules for DST.

◆ TZ_TYPE

Known/Common Time Zones. Subtract offset from UTC for specific Time Zones (and maybe DST) in minutes. e.g. 45 minutes TZ offset is possible. http://www.timeanddate.com/time/map/

Enumerator
TZ_UTC 

UTC = never use DST or any TZ offset.

TZ_GMT 

Greenwich mean time. similar to UTC.

TZ_AST 
TZ_EDT 

Eastern Daylight time.

TZ_EST 

Eastern Standard Time Zone. LocalTime+offset=GMT, GMT-offset=Local (seconds)

TZ_CST 
TZ_MST 
TZ_PST 

Pacific Standard Time Zone. Default for Windows.

TZ_MAX 

Max offset. over this is special mapped cTimeZone.

TZ_LOCAL 

just use local time zone. might include DST ??

◆ UNITTEST_LEVEL_TYPE

Which level/type of unit tests should we run ?

Enumerator
UNITTEST_LEVEL_None 
UNITTEST_LEVEL_Crit 

1=critical tests. usually stuff i want to debug now.

UNITTEST_LEVEL_Core 

2=only the most basic tests.

UNITTEST_LEVEL_Lib 

3

UNITTEST_LEVEL_Common 

4 = Common or application level tests.

UNITTEST_LEVEL_Slow 

5=slow tests

UNITTEST_LEVEL_All 

6=interactive tests, need special external rigs, db, etc

UNITTEST_LEVEL_Off 

These test don't work yet. or is broken.

Function Documentation

◆ __DECL_ALIGN() [1/2]

typedef Gray::__DECL_ALIGN ( )

◆ __DECL_ALIGN() [2/2]

typedef Gray::__DECL_ALIGN ( )

◆ _InterlockedCompareExchange64()

INT64 __cdecl Gray::_InterlockedCompareExchange64 ( _Inout_ INT64 volatile *  pDest,
IN INT64  nValNew,
IN INT64  nValComp 
)
inlinenoexcept

No native support for interlock 64, so i must implement it myself. Place 64 bit nValNew in *pDest if ( *pDest == nValComp )

Note
linux only provides interlocked operations for kernel level. NOT user level! BSD/Mac = OSAtomicCompareAndSwap64Barrier()

◆ _InterlockedDecrement64()

INT64 __cdecl Gray::_InterlockedDecrement64 ( _Inout_ INT64 volatile *  pDest)
inlinenoexcept

◆ _InterlockedExchange64()

INT64 __cdecl Gray::_InterlockedExchange64 ( _Inout_ INT64 volatile *  pDest,
IN INT64  Value 
)
inlinenoexcept

◆ _InterlockedExchangeAdd64()

INT64 __cdecl Gray::_InterlockedExchangeAdd64 ( _Inout_ INT64 volatile *  pDest,
IN INT64  Value 
)
inlinenoexcept

◆ _InterlockedIncrement64()

INT64 __cdecl Gray::_InterlockedIncrement64 ( _Inout_ INT64 volatile *  pDest)
inlinenoexcept

◆ _InterlockedSetIfEqual64()

bool Gray::_InterlockedSetIfEqual64 ( _Inout_ INT64 volatile *  pDest,
INT64  nValNew,
INT64  nValComp 
)
inlinenoexcept

No native support for interlock 64, so i must implement it myself. most common use of InterlockedCompareExchange It's more efficient to use the z flag than to do another compare value returned in eax

◆ bool()

typedef Gray::bool ( CALLBACK  AssertCallback_t) const

◆ check_cast()

template<class _TYPE_TO , class _TYPE_FROM >
_TYPE_TO* Gray::check_cast ( _TYPE_FROM *  p)
inline

like static_cast<>() but with some extra checking. up-casting can be dangerous. We assume it is safe in this case but check it anyhow. a static_cast that gets verified in _DEBUG mode. fast normal static_cast in release mode. nullptr is valid.

◆ ConstructElements()

template<class TYPE >
void __cdecl Gray::ConstructElements ( TYPE pElements,
ITERATE_t  nCount 
)

'new' an array of elements. For use with CArray

Note
we cannot always ASSUME that the constructor actually does anything. (i.e. new int) for instance void* has no constructor and will be left as CDCDCDCD NOT nullptr as expected.

◆ CopyElements()

template<class TYPE >
void __cdecl Gray::CopyElements ( TYPE pDest,
const TYPE pSrc,
ITERATE_t  nCount 
)

element-copy using class assignment operators

◆ CopyElements< BYTE >()

template<>
void __cdecl Gray::CopyElements< BYTE > ( BYTE *  pDest,
const BYTE *  pSrc,
ITERATE_t  nCount 
)
inline

Any integral type could use this ?

◆ cUnitTest_HookJump1()

INT_PTR __stdcall Gray::cUnitTest_HookJump1 ( )

◆ cUnitTest_HookJump2()

INT_PTR __stdcall Gray::cUnitTest_HookJump2 ( )

◆ DECLARE_INTERFACE()

Gray::DECLARE_INTERFACE ( IRandomNoise  )

◆ DestructElements()

template<class TYPE >
void __cdecl Gray::DestructElements ( TYPE pElements,
ITERATE_t  nCount 
)

Call the destructor(s) for an array. Does not explicitly free anything.

◆ IMPLEMENT_DYNAMIC()

Gray::IMPLEMENT_DYNAMIC ( cException  ,
cExceptionBase   
)

◆ InterlockedCompareExchange()

INT32 __cdecl Gray::InterlockedCompareExchange ( INT32 volatile *  pDest,
INT32  nValNew,
INT32  nValComp 
)
inlinenoexcept

Place 32 bit nValNew in *pDest if ( *pDest == nValComp )

Note
linux only provides interlocked operations for kernel level. NOT user level! similar to wine - interlocked_cmpxchg() http://www.ibiblio.org/gfreg/ldp/GCC-Inline-Asssembly-HOWTO.html
Returns
previous value in *pDest

◆ InterlockedDecrement()

INT32 __cdecl Gray::InterlockedDecrement ( INT32 volatile *  pDest)
inlinenoexcept

◆ InterlockedExchange()

INT32 __cdecl Gray::InterlockedExchange ( INT32 volatile *  pDest,
INT32  Value 
)
inlinenoexcept

◆ InterlockedExchangeAdd()

INT32 __cdecl Gray::InterlockedExchangeAdd ( INT32 volatile *  pDest,
INT32  Value 
)
inlinenoexcept

◆ InterlockedIncrement()

INT32 __cdecl Gray::InterlockedIncrement ( INT32 volatile *  pDest)
inlinenoexcept

◆ InterlockedSetIfEqual()

bool Gray::InterlockedSetIfEqual ( _Inout_ INT32 volatile *  pDest,
INT32  nValNew,
INT32  nValComp 
)
inlinenoexcept

most common use of InterlockedCompareExchange It's more efficient to use the z flag than to do another compare value returned in eax

◆ is_valid_cast()

template<class _TYPE_TO , class _TYPE_FROM >
bool Gray::is_valid_cast ( _TYPE_FROM *  p)
inline

◆ operator!=()

bool Gray::operator!= ( const cTimeDouble dt1,
const cTimeDouble dt2 
)
inline

◆ operator&()

cUInt64 Gray::operator& ( const cUInt64 roUI64_1,
const cUInt64 roUI64_2 
)
inline

◆ operator+() [1/3]

cStringA Gray::operator+ ( const char *  pStr1,
const cStringA s2 
)
inline

◆ operator+() [2/3]

cUInt64 Gray::operator+ ( const cUInt64 roUI64_1,
const cUInt64 roUI64_2 
)
inline

◆ operator+() [3/3]

cStringW Gray::operator+ ( const wchar_t *  pStr1,
const cStringW s2 
)
inline

◆ operator<()

bool Gray::operator< ( const cTimeDouble dt1,
const cTimeDouble dt2 
)
inline

◆ operator<<() [1/2]

template<typename _TYPE_CH >
void Gray::operator<< ( cArchive ar,
const cStringT< _TYPE_CH > &  pOb 
)
inline

◆ operator<<() [2/2]

cUInt64 Gray::operator<< ( const cUInt64 n,
BIT_ENUM_t  uiBits 
)
inline

◆ operator<=()

bool Gray::operator<= ( const cTimeDouble dt1,
const cTimeDouble dt2 
)
inline

◆ operator==()

bool Gray::operator== ( const cTimeDouble dt1,
const cTimeDouble dt2 
)
inline

◆ operator>()

bool Gray::operator> ( const cTimeDouble dt1,
const cTimeDouble dt2 
)
inline

◆ operator>=()

bool Gray::operator>= ( const cTimeDouble dt1,
const cTimeDouble dt2 
)
inline

◆ operator>>() [1/2]

template<typename _TYPE_CH >
void Gray::operator>> ( cArchive ar,
cStringT< _TYPE_CH > &  pOb 
)
inline

◆ operator>>() [2/2]

cUInt64 Gray::operator>> ( const cUInt64 n,
BIT_ENUM_t  uiBits 
)
inline

◆ operator^()

cUInt64 Gray::operator^ ( const cUInt64 roUI64_1,
const cUInt64 roUI64_2 
)
inline

◆ operator|()

cUInt64 Gray::operator| ( const cUInt64 roUI64_1,
const cUInt64 roUI64_2 
)
inline

◆ RunUnitTest()

void Gray::RunUnitTest ( )
overridevirtual

test reading cFileTextReader.

Note
any text changes to this file can invalidate the test results.

read and write tests. open some INI file.

read and write tests. open some INI file.

◆ StrArg() [1/13]

template<typename TYPE >
const TYPE* Gray::StrArg ( const BYTE *  pszStr)
inline

◆ StrArg() [2/13]

template<typename TYPE >
__DECL_IMPORT const TYPE* __stdcall Gray::StrArg ( const char *  pszStr)

◆ StrArg() [3/13]

template<typename TYPE >
__DECL_IMPORT const TYPE* __stdcall Gray::StrArg ( const wchar_t *  pszStr)

◆ StrArg() [4/13]

template<typename TYPE >
__DECL_IMPORT const TYPE* __stdcall Gray::StrArg ( double  dVal)

Get a temporary string that only lives long enough to satisfy the sprintf() assume float gets converted to double.

◆ StrArg() [5/13]

template<typename TYPE >
GRAYCORE_LINK const TYPE* GRAYCALL Gray::StrArg ( double  dVal)

Get a temporary string that only lives long enough to satisfy the sprintf() assume float gets converted to double.

◆ StrArg() [6/13]

template<typename TYPE >
__DECL_IMPORT const TYPE* __stdcall Gray::StrArg ( INT32  iVal)

Get a temporary string that only lives long enough to satisfy the sprintf() Assume auto convert char, short to int/INT32.

◆ StrArg() [7/13]

template<typename TYPE >
GRAYCORE_LINK const TYPE* GRAYCALL Gray::StrArg ( INT32  iVal)

Get a temporary string that only lives long enough to satisfy the sprintf() Assume auto convert char, short to int/INT32.

◆ StrArg() [8/13]

template<typename TYPE >
__DECL_IMPORT const TYPE* __stdcall Gray::StrArg ( INT64  iVal)

◆ StrArg() [9/13]

template<typename TYPE >
GRAYCORE_LINK const TYPE* GRAYCALL Gray::StrArg ( TYPE  ch,
StrLen_t  nRepeat 
)

Get a temporary string that is nRepeat chars repeating

◆ StrArg() [10/13]

template<typename TYPE >
__DECL_IMPORT const TYPE* __stdcall Gray::StrArg ( TYPE  ch,
StrLen_t  nRepeat = 1 
)

Get a temporary string that is nRepeat chars repeating

◆ StrArg() [11/13]

template<typename TYPE >
GRAYCORE_LINK const TYPE* GRAYCALL Gray::StrArg ( UINT32  uVal,
RADIX_t  uRadix 
)

Get a temporary string that only lives long enough to satisfy the sprintf() Assume auto convert BYTE, WORD to UINT/UINT32/DWORD.

◆ StrArg() [12/13]

template<typename TYPE >
__DECL_IMPORT const TYPE* __stdcall Gray::StrArg ( UINT32  uVal,
RADIX_t  uRadix = 10 
)

Get a temporary string that only lives long enough to satisfy the sprintf() Assume auto convert BYTE, WORD to UINT/UINT32/DWORD.

◆ StrArg() [13/13]

template<typename TYPE >
__DECL_IMPORT const TYPE* __stdcall Gray::StrArg ( UINT64  uVal,
RADIX_t  uRadix = 10 
)

◆ StrArg< BYTE >() [1/2]

template<>
const BYTE* __stdcall Gray::StrArg< BYTE > ( const BYTE *  pszStr)
inlinenoexcept

◆ StrArg< BYTE >() [2/2]

template<>
const BYTE* __stdcall Gray::StrArg< BYTE > ( const char *  pszStr)
inlinenoexcept

◆ StrArg< char >() [1/2]

template<>
const char* __stdcall Gray::StrArg< char > ( const char *  pszStr)
inlinenoexcept

safe convert arguments for sprintf("%s") type params. ONLY if needed. for string args to _cdecl (variable ...) functions inline this because no processing is needed.

◆ StrArg< char >() [2/2]

template<>
GRAYCORE_LINK const char* GRAYCALL Gray::StrArg< char > ( const wchar_t *  pwStrInp)

Get a temporary string that only lives long enough to satisfy a sprintf() argument.

Note
the UTF8 size is variable and >= Len(pwStr)

◆ StrArg< wchar_t >() [1/2]

template<>
GRAYCORE_LINK const wchar_t* GRAYCALL Gray::StrArg< wchar_t > ( const char *  pszStrInp)

Get a temporary string that only lives long enough to satisfy a sprintf() argument.

Note
the UNICODE size is variable and <= Len(pszStr)

◆ StrArg< wchar_t >() [2/2]

template<>
const wchar_t* __stdcall Gray::StrArg< wchar_t > ( const wchar_t *  pszStr)
inlinenoexcept

safe convert arguments for sprintf("%s") type params. ONLY if needed. for string args to _cdecl (variable ...) functions inline this because no processing is needed.

◆ StrArg_UnitTestT()

template<typename TYPE >
bool __stdcall Gray::StrArg_UnitTestT ( )

◆ TEST_CLASS() [1/55]

Gray::TEST_CLASS ( cAppConsoleTests  )

◆ TEST_CLASS() [2/55]

Gray::TEST_CLASS ( cAppStateTests  )

◆ TEST_CLASS() [3/55]

Gray::TEST_CLASS ( cArchiveTests  )

◆ TEST_CLASS() [4/55]

Gray::TEST_CLASS ( cArraySortStringTests  )

◆ TEST_CLASS() [5/55]

Gray::TEST_CLASS ( cArraySortTests  )

◆ TEST_CLASS() [6/55]

Gray::TEST_CLASS ( cAtomTests  )

◆ TEST_CLASS() [7/55]

Gray::TEST_CLASS ( cBitsTests  )

◆ TEST_CLASS() [8/55]

Gray::TEST_CLASS ( cCodeProfilerTests  )

◆ TEST_CLASS() [9/55]

Gray::TEST_CLASS ( cFileCopierTests  )

◆ TEST_CLASS() [10/55]

Gray::TEST_CLASS ( cFileDirTests  )

◆ TEST_CLASS() [11/55]

Gray::TEST_CLASS ( cFilePathTests  )

◆ TEST_CLASS() [12/55]

Gray::TEST_CLASS ( cFileTests  )

◆ TEST_CLASS() [13/55]

Gray::TEST_CLASS ( cFileTextReaderTests  )

◆ TEST_CLASS() [14/55]

Gray::TEST_CLASS ( cFileTextTests  )

◆ TEST_CLASS() [15/55]

Gray::TEST_CLASS ( cFloatDecoTests  )

◆ TEST_CLASS() [16/55]

Gray::TEST_CLASS ( cFloatTests  )

◆ TEST_CLASS() [17/55]

Gray::TEST_CLASS ( cHashTableTests  )

◆ TEST_CLASS() [18/55]

Gray::TEST_CLASS ( cHeapTests  )

◆ TEST_CLASS() [19/55]

Gray::TEST_CLASS ( cHookJumpTests  )

◆ TEST_CLASS() [20/55]

Gray::TEST_CLASS ( cIniFileTests  )

◆ TEST_CLASS() [21/55]

Gray::TEST_CLASS ( cIniObjectTests  )

◆ TEST_CLASS() [22/55]

Gray::TEST_CLASS ( cIniSectionTests  )

◆ TEST_CLASS() [23/55]

Gray::TEST_CLASS ( cInterlockedValTests  )

◆ TEST_CLASS() [24/55]

Gray::TEST_CLASS ( cListTests  )

◆ TEST_CLASS() [25/55]

Gray::TEST_CLASS ( cLogMgrTests  )

◆ TEST_CLASS() [26/55]

Gray::TEST_CLASS ( cMemTests  )

◆ TEST_CLASS() [27/55]

Gray::TEST_CLASS ( cOSHandleTests  )

◆ TEST_CLASS() [28/55]

Gray::TEST_CLASS ( cOSModuleTests  )

◆ TEST_CLASS() [29/55]

Gray::TEST_CLASS ( cOSProcessTests  )

◆ TEST_CLASS() [30/55]

Gray::TEST_CLASS ( cPtrTraceTests  )

◆ TEST_CLASS() [31/55]

Gray::TEST_CLASS ( cQueueTests  )

◆ TEST_CLASS() [32/55]

Gray::TEST_CLASS ( cRandomTests  )

◆ TEST_CLASS() [33/55]

Gray::TEST_CLASS ( cSingletonTests  )

◆ TEST_CLASS() [34/55]

Gray::TEST_CLASS ( cStreamTests  )

◆ TEST_CLASS() [35/55]

Gray::TEST_CLASS ( cStringTests  )

◆ TEST_CLASS() [36/55]

Gray::TEST_CLASS ( cSystemInfoTests  )

◆ TEST_CLASS() [37/55]

Gray::TEST_CLASS ( cThreadLockRWTests  )

◆ TEST_CLASS() [38/55]

Gray::TEST_CLASS ( cThreadLockTests  )

◆ TEST_CLASS() [39/55]

Gray::TEST_CLASS ( cTimeDoubleTests  )

◆ TEST_CLASS() [40/55]

Gray::TEST_CLASS ( cTimeFileTests  )

◆ TEST_CLASS() [41/55]

Gray::TEST_CLASS ( cTimeIntTests  )

◆ TEST_CLASS() [42/55]

Gray::TEST_CLASS ( cTimeSysTests  )

◆ TEST_CLASS() [43/55]

Gray::TEST_CLASS ( cTimeUnitsTests  )

◆ TEST_CLASS() [44/55]

Gray::TEST_CLASS ( cTimeZoneTests  )

◆ TEST_CLASS() [45/55]

Gray::TEST_CLASS ( cTypeInfoTests  )

◆ TEST_CLASS() [46/55]

Gray::TEST_CLASS ( cUInt64Tests  )

◆ TEST_CLASS() [47/55]

Gray::TEST_CLASS ( GrayCoreTests  )

◆ TEST_CLASS() [48/55]

Gray::TEST_CLASS ( HResultTests  )

◆ TEST_CLASS() [49/55]

Gray::TEST_CLASS ( StrArgTests  )

◆ TEST_CLASS() [50/55]

Gray::TEST_CLASS ( StrATests  )

◆ TEST_CLASS() [51/55]

Gray::TEST_CLASS ( StrCharTests  )

◆ TEST_CLASS() [52/55]

Gray::TEST_CLASS ( StrFormatTests  )

◆ TEST_CLASS() [53/55]

Gray::TEST_CLASS ( StrNumTests  )

◆ TEST_CLASS() [54/55]

Gray::TEST_CLASS ( StrTTests  )

◆ TEST_CLASS() [55/55]

Gray::TEST_CLASS ( StrUTests  )

◆ TEST_METHOD()

Gray::TEST_METHOD ( RunTest  )

◆ TEST_MODULE_CLEANUP()

Gray::TEST_MODULE_CLEANUP ( Cleanup  )

◆ TEST_MODULE_INITIALIZE()

Gray::TEST_MODULE_INITIALIZE ( Initialize  )

◆ TestClass1()

void Gray::TestClass1 ( )

◆ TestFloatTypes()

template<typename TYPE >
void Gray::TestFloatTypes ( )

◆ TestFunction()

void Gray::TestFunction ( )

◆ TestInt()

void Gray::TestInt ( )

◆ TestRef()

void Gray::TestRef ( )

◆ UnitTest_CopyFrom()

void __stdcall Gray::UnitTest_CopyFrom ( IFileCopier pSrc)

For testing an implementation of IFileCopier

◆ UnitTest_CopyTo()

void __stdcall Gray::UnitTest_CopyTo ( IFileCopier pDst)

For testing an implementation of IFileCopier

◆ UnitTest_Read()

GRAYCORE_TEST_LINK void GRAYCALL Gray::UnitTest_Read ( cStreamInput stmIn,
bool  bString 
)

Other side of UnitTest_Write() Read strings from it (as binary).

◆ UnitTest_Section()

HRESULT Gray::UnitTest_Section ( const cIniSection pSection)

k_asTextLines dump contexts of a section.

◆ UnitTest_StreamIntegrity()

GRAYCORE_TEST_LINK void GRAYCALL Gray::UnitTest_StreamIntegrity ( cStreamOutput stmOut,
cStreamInput stmIn,
size_t  nSizeTotal 
)

◆ UnitTest_Write()

GRAYCORE_TEST_LINK void GRAYCALL Gray::UnitTest_Write ( cStreamOutput testfile1)

Write strings to it.

◆ UnitTestFormat()

template<typename TYPE >
void __stdcall Gray::UnitTestFormat ( typename StrFormat< TYPE >::STRFORMAT_t  pFormat)

◆ UnitTestFormat1()

template<typename TYPE >
StrLen_t Gray::UnitTestFormat1 ( typename StrFormat< TYPE >::STRFORMAT_t  pFormat,
TYPE pszOut,
StrLen_t  nLenOut,
const TYPE pszFormat,
int  eArgs 
)

◆ UnitTestFormatX()

template<typename TYPE >
void __stdcall Gray::UnitTestFormatX ( typename StrFormat< TYPE >::STRFORMAT_t  pFormat,
TYPE pszOut,
StrLen_t  nLenOut 
)
Note
ASSUME sprintf() will '\0' terminate the far end even if it isn't needed? (or overflows)

◆ UnitTestMem()

template<class TYPE >
void Gray::UnitTestMem ( const TYPE  nValH)

◆ UnitTestsMs_AssertCallback()

bool CALLBACK Gray::UnitTestsMs_AssertCallback ( const char *  pszExp,
const cDebugSourceLine src 
)

Assert was called during a unit test. This is a failure! AssertCallback_t sm_pAssertCallback = cDebugAssert::Assert_Fail was called in UnitTest. GRAYCALL

◆ UnitTestStrT()

template<typename _TYPE_CH >
void __stdcall Gray::UnitTestStrT ( )

◆ WINHEAPN() [1/2]

template<class _TYPE >
struct Gray::WINHEAPN ( )

A type cast windows heap pointer/handle pair. like cMemBlockT<> CWinGlobalT<> or CWinLocalT<>

Note
Make sure you call UpdateHandle() after this.

◆ WINHEAPN() [2/2]

class WINHEAPN (Handle) class Gray::WINHEAPN ( )

CWinLocalV or CWinGlobalV Wrap the HANDLE_t heap/memory allocation object. Similar to MFC CGlobalHeap or CWin32Heap Similar to cHeapBlock Free on destruct

Get a pointer to an empty pointer.

Note
Make sure you call UpdateHandle() after this.
Make sure you call Lock() after this.

like _WIN32 GlobalAllocPtr( UINT, SIZE_T ) or GlobalAlloc nFlags = GMEM_MOVEABLE | GMEM_ZEROINIT

like _WIN32 GlobalFreePtr()

Note
Yes i know Unlock does nothing in modern OS

◆ ~ cFileTextReaderTests()

virtual Gray::~ cFileTextReaderTests ( )
virtualnoexcept

◆ ~ cIniFileTests()

virtual Gray::~ cIniFileTests ( )
virtualnoexcept

◆ ~ cIniObjectTests()

virtual Gray::~ cIniObjectTests ( )
virtualnoexcept

◆ ~ cTypeInfoTests()

virtual Gray::~ cTypeInfoTests ( )
virtualnoexcept

Variable Documentation

◆ cArchive

class __DECL_IMPORT Gray::cArchive

◆ CArray< cFileFindEntry, const cFileFindEntry & >

template class __DECL_IMPORT Gray::CArray< cFileFindEntry, const cFileFindEntry & >

◆ cArrayStruct< cFileFindEntry >

template class __DECL_IMPORT Gray::cArrayStruct< cFileFindEntry >

◆ cArrayTyped< cFileFindEntry, const cFileFindEntry & >

template class __DECL_IMPORT Gray::cArrayTyped< cFileFindEntry, const cFileFindEntry & >

◆ cException

class __DECL_IMPORT Gray::cException

◆ cFileStatus

class __DECL_IMPORT Gray::cFileStatus

◆ cInterlockedPtr< >

template class __DECL_IMPORT Gray::cInterlockedPtr< >

◆ cInterlockedPtrV

template<typename TYPE = void>
class __DECL_IMPORT __DECL_ALIGN ( 4 ) cInterlockedPtr typedef cInterlockedPtr Gray::cInterlockedPtrV

◆ cInterlockedVal< long >

template class __DECL_IMPORT Gray::cInterlockedVal< long >

◆ cInterlockedVal< ULONG >

template class __DECL_IMPORT Gray::cInterlockedVal< ULONG >

◆ cIUnkPtr< IUnknown >

template class __DECL_IMPORT Gray::cIUnkPtr< IUnknown >

◆ cOSModuleFunc< FARPROC >

template class __DECL_IMPORT Gray::cOSModuleFunc< FARPROC >

◆ cQueueRead< BYTE >

template class __DECL_IMPORT Gray::cQueueRead< BYTE >

◆ cQueueRW< BYTE >

template class __DECL_IMPORT Gray::cQueueRW< BYTE >

◆ cRefPtr< cRefBase >

template class __DECL_IMPORT Gray::cRefPtr< cRefBase >

◆ cStreamInput

class __DECL_IMPORT Gray::cStreamInput

◆ cStreamOutput

class __DECL_IMPORT Gray::cStreamOutput

◆ CStringT< char >

template class GRAYCORE_LINK Gray::CStringT< char >

◆ cStringT< char >

template class GRAYCORE_LINK Gray::cStringT< char >

◆ CStringT< wchar_t >

template class GRAYCORE_LINK Gray::CStringT< wchar_t >

◆ cStringT< wchar_t >

template class GRAYCORE_LINK Gray::cStringT< wchar_t >

◆ cUnitTest

◆ g_Module

cOSModImpl Gray::g_Module(GRAY_NAMES "Core") ( GRAY_NAMES "Core"  )

◆ g_Rand

GRAYCORE_LINK cRandomDef Gray::g_Rand

the global random number generator. NOT thread safe. but does that matter?

◆ k_HASHCODE_CLEAR

const HASHCODE_t Gray::k_HASHCODE_CLEAR = 0

not a valid index.

◆ k_ITERATE_BAD

const ITERATE_t Gray::k_ITERATE_BAD = -1

◆ k_StrLen_UNK

const StrLen_t Gray::k_StrLen_UNK = -1

use the default/current length of the string argument.

◆ k_va_list_empty

GRAYCORE_LINK va_list Gray::k_va_list_empty

◆ PROCESSID_BAD

constexpr PROCESSID_t Gray::PROCESSID_BAD = 0
constexpr

Invalid process id.

◆ StrFormat< char >

template class GRAYCORE_LINK Gray::StrFormat< char >

◆ StrFormat< wchar_t >

template class GRAYCORE_LINK Gray::StrFormat< wchar_t >