22 #define CATOM_STR(a) a
23 #define CATOM_CAT(a,b) a##b
24 #define CATOM_STATIC(a) #a
25 #define CATOM_STATSTR(a) #a
44 , m_nHashCode(StrT::GetHashCode32<ATOMCHAR_t>(s,
k_StrLen_UNK, 0))
86 void EmptyAtom(
bool isLast);
96 : m_pDef(FindorCreateAtomStr(sName))
101 : m_pDef(FindorCreateAtomStr(pszName))
110 size_t GetHeapStats(OUT
ITERATE_t& iAllocCount)
const;
117 return m_pDef->get_HashCode();
135 return m_pDef !=
nullptr && m_pDef->m_s.isValidCheck();
139 return m_pDef->m_s.IsEmpty();
143 return m_pDef->m_s.GetLength();
148 return(m_pDef == atom.m_pDef);
152 return m_pDef->m_s.CompareNoCase(pStr);
156 return !CompareNoCase(pStr);
161 if (m_pDef != atom.m_pDef)
164 m_pDef = atom.m_pDef;
173 m_pDef = FindorCreateAtomStr(pStr);
182 m_pDef = FindorCreateAtomStr(sStr);
191 void SetAtomStatic();
#define GRAYCORE_LINK
Definition: GrayCore.h:47
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define DEBUG_CHECK(exp)
Definition: cDebugAssert.h:90
#define UNITTEST2_PREDEF(x)
Definition: cUnitTestDecl.h:19
#define UNITTEST_FRIEND(n)
Define this in the class body to be unit tested. Allow the unit test to access private/protected stuf...
Definition: cUnitTestDecl.h:17
const ATOMCHAR_t * get_Name() const noexcept
Definition: cAtom.h:55
ATOMCODE_t get_HashCode() const noexcept
Definition: cAtom.h:50
Definition: cAtomManager.h:21
cAtomRef(const STR_t &sName) noexcept
Definition: cAtom.h:95
bool IsEmpty() const
Definition: cAtom.h:137
StrLen_t GetLength() const
Definition: cAtom.h:141
const STR_t & get_StrA() const noexcept
Definition: cAtom.h:120
~cAtomRef()
Definition: cAtom.h:105
bool isValidCheck() const noexcept
Definition: cAtom.h:133
bool operator==(const cAtomRef &atom) const noexcept
Definition: cAtom.h:146
ATOMCODE_t get_HashCode() const noexcept
Definition: cAtom.h:112
COMPARE_t CompareNoCase(const ATOMCHAR_t *pStr) const
Definition: cAtom.h:150
const ATOMCHAR_t * get_CPtr() const noexcept
< as a C string
Definition: cAtom.h:124
const THIS_t & operator=(const STR_t &sStr)
Definition: cAtom.h:177
const THIS_t & operator=(const THIS_t &atom)
Definition: cAtom.h:159
bool operator==(const ATOMCHAR_t *pStr) const
Definition: cAtom.h:154
cAtomRef(const THIS_t &ref) noexcept
Definition: cAtom.h:89
void EmptyAtom()
Definition: cAtom.h:187
cAtomRef(const ATOMCHAR_t *pszName="") noexcept
Definition: cAtom.h:100
const THIS_t & operator=(const ATOMCHAR_t *pStr)
Definition: cAtom.h:168
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
int COMPARE_t
result of compare. 0=same, 1=a>b, -1=a<b
Definition: cValT.h:17
const StrLen_t k_StrLen_UNK
use the default/current length of the string argument.
Definition: StrConst.h:34
int StrLen_t
the length of a string in chars (bytes for UTF8, wchar_t for UNICODE). or offset in characters....
Definition: StrConst.h:32
HASHCODE32_t ATOMCODE_t
Encode a atom as a 32 bit hashcode instead of using its name/pointer. StrT::GetHashCode32()
Definition: cAtom.h:18
cRefPtr< cAtomDef > cAtomDefPtr
Definition: cAtom.h:60
int ITERATE_t
like size_t but signed
Definition: Index.h:28
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22
char ATOMCHAR_t
the char form (UNICODE or not) for an atom. (for symbolic names)
Definition: StrConst.h:15
UINT32 HASHCODE32_t
always 32 bits.
Definition: GrayCore.h:117
@ COMPARE_Equal
VARCMP_EQ.
Definition: cValT.h:23