Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
StrConst.h File Reference
#include "GrayCore.h"

Go to the source code of this file.

Classes

class  Gray::cStrConst
 

Namespaces

 Gray
 < The main namespace for all Core functions.
 

Macros

#define _AT(x)   x
 like __T(x) macro but a stub for no change to ATOMCHAR_t text. like CATOM_STR() More...
 
#define __TOA(x)   x
 like __T(x) macro for UTF8. Second layer "#define" to catch macro string arguments for x. More...
 
#define __TOW(x)   L##x
 like __T(x) macro for UNICODE. or OLESTR() More...
 
#define _GT(x)   __TOA(x)
 like _T(x) macro for static text. More...
 
#define _GTN(c)   c##A
 _WIN32 name has a A or W for UTF8 or UNICODE (like _FNF) More...
 
#define _GTNPST(c, p)   _GTN(c)##p
 add a postfix. More...
 
#define STRMAX(x)   ((StrLen_t)(_countof(x)-1))
 Get Max size of static string space. minus the '\0' terminator character. More...
 
#define STRLIT2(s)   (s), STRMAX(s)
 Macro to automatically add the size of literal string or fixed size buffer. More...
 
#define CSTRCONST(t)   cStrConst(t,__TOW(t))
 define a const for both Unicode and UTF8 in templates. used at run-time not just compile time. More...
 

Typedefs

typedef char Gray::ATOMCHAR_t
 the char form (UNICODE or not) for an atom. (for symbolic names) More...
 
typedef char Gray::GChar_t
 My version of TCHAR, _TCHAR. More...
 
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. More...
 

Variables

const StrLen_t Gray::k_StrLen_UNK = -1
 use the default/current length of the string argument. More...
 

Detailed Description

Macro Definition Documentation

◆ __TOA

#define __TOA (   x)    x

like __T(x) macro for UTF8. Second layer "#define" to catch macro string arguments for x.

◆ __TOW

#define __TOW (   x)    L##x

like __T(x) macro for UNICODE. or OLESTR()

◆ _AT

#define _AT (   x)    x

like __T(x) macro but a stub for no change to ATOMCHAR_t text. like CATOM_STR()

◆ _GT

#define _GT (   x)    __TOA(x)

like _T(x) macro for static text.

◆ _GTN

#define _GTN (   c)    c##A

_WIN32 name has a A or W for UTF8 or UNICODE (like _FNF)

◆ _GTNPST

#define _GTNPST (   c,
 
)    _GTN(c)##p

add a postfix.

◆ CSTRCONST

#define CSTRCONST (   t)    cStrConst(t,__TOW(t))

define a const for both Unicode and UTF8 in templates. used at run-time not just compile time.

◆ STRLIT2

#define STRLIT2 (   s)    (s), STRMAX(s)

Macro to automatically add the size of literal string or fixed size buffer.

◆ STRMAX

#define STRMAX (   x)    ((StrLen_t)(_countof(x)-1))

Get Max size of static string space. minus the '\0' terminator character.