strbasic.h File Reference
 
 
 
strbasic.h File Reference
#include <tchar.h>

Defines

#define  _MBCS
#define  MCHAR_IS_CHAR
#define  MCHAR   char
  MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.
#define  LPCMSTR   const MCHAR*
#define  LPMSTR   MCHAR*
#define  _M_TEXT(x)   x
#define  M_STD_STRING   std::string
#define  M_LOADSTRING   ::LoadStringA
#define  M_STD_OSTRINGSTREAM   std::ostringstream
#define  M_STD_ISTRINGSTREAM   std::istringstream
#define  M_STD_CERR   std::cerr
#define  M_STD_CIN   std::cin
#define  M_STD_OSTREAM   std::ostream
#define  M_STD_ISTREAM   std::istream
#define  M_STD_COUT   std::cout
#define  M_STD_FOSTREAM   std::ofstream
#define  M_STD_FISTREAM   std::ifstream
#define  M_STD_ISTRSTREAM   std::istrstream
#define  M_EOF   EOF
  The 'EOF' value is unicode/mbcs build dependent for _puttc, _puttch, _ungettc, _ungettch, _ungettch_nolock, _fputts, _fputtc, _gettc, and _fgettc (and maybe other methods)
#define  _M(x)   _M_TEXT(x)
  Used to wrap string literals.
#define  M2A(p)   (p)
#define  A2M(p)   (p)
#define  M2W(p)   CA2W(p)
#define  W2M(p)   CW2A(p)
#define  M2W_UTF(lpa)   CA2W(lpa, CP_UTF8)
#define  W2M_UTF(lpw)   CW2A(lpw, CP_UTF8)
#define  M2T(p)   CA2T(p)
#define  T2M(p)   CT2A(p)
#define  A2CT_UTF(lpa)   CW2A(CA2W(lpa, CP_UTF8), CP_ACP)
#define  T2CA_UTF(lpw)   CW2A(CA2W(lpw, CP_ACP), CP_UTF8)
#define  A2CM_CP(lpa)   CW2A(CA2W(lpa, CP_UTF8), CP_ACP)
#define  M2CA_CP(lpw)   CW2A(CA2W(lpw, CP_ACP), CP_UTF8)

Define Documentation

#define MCHAR_IS_CHAR
#define MCHAR   char

MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.

If you try to output a character that is not representable in the current (window user) code page, the stream is flagged as 'in error', and no further output to that stream occurs. Plus, file output encoding should be that specified by the user, accessible via Interface14::DefaultTextSaveCodePage Thus, it is recommended that M_STD_FOSTREAM not be used. It is much better to use the TextFile::Reader/Writer classes and use the codepage accessed via Interface14::DefaultTextSaveCodePage. Likewise, the use std::wifstream (and _tfopen/fopen in text mode) is not recommended when reading string data as the current (window user) code page will be used. File input encoding should that specified by the user, accessible via Interface14::DefaultTextLoadCodePage Thus, it is recommended that M_STD_FISTREAM (and _tfopen/fopen in text mode) not be used. It is much better to use the TextFile::Reader/Writer classes and use the codepage accessed via Interface14::DefaultTextSaveCodePage. !

#define LPCMSTR   const MCHAR*
#define LPMSTR   MCHAR*
#define _M_TEXT (   x )    x
#define M_STD_STRING   std::string
#define M_LOADSTRING   ::LoadStringA
#define M_STD_OSTRINGSTREAM   std::ostringstream
#define M_STD_ISTRINGSTREAM   std::istringstream
#define M_STD_CERR   std::cerr
#define M_STD_CIN   std::cin
#define M_STD_OSTREAM   std::ostream
#define M_STD_ISTREAM   std::istream
#define M_STD_COUT   std::cout
#define M_STD_FOSTREAM   std::ofstream
#define M_STD_FISTREAM   std::ifstream
#define M_STD_ISTRSTREAM   std::istrstream
#define M_EOF   EOF

The 'EOF' value is unicode/mbcs build dependent for _puttc, _puttch, _ungettc, _ungettch, _ungettch_nolock, _fputts, _fputtc, _gettc, and _fgettc (and maybe other methods)

#define _M (   x )    _M_TEXT(x)

Used to wrap string literals.

#define M2A (   p )    (p)
#define A2M (   p )    (p)
#define M2W (   p )    CA2W(p)
#define W2M (   p )    CW2A(p)
#define M2W_UTF (   lpa )    CA2W(lpa, CP_UTF8)
#define W2M_UTF (   lpw )    CW2A(lpw, CP_UTF8)
#define M2T (   p )    CA2T(p)
#define T2M (   p )    CT2A(p)
#define A2CT_UTF (   lpa )    CW2A(CA2W(lpa, CP_UTF8), CP_ACP)
#define T2CA_UTF (   lpw )    CW2A(CA2W(lpw, CP_ACP), CP_UTF8)
#define A2CM_CP (   lpa )    CW2A(CA2W(lpa, CP_UTF8), CP_ACP)
#define M2CA_CP (   lpw )    CW2A(CA2W(lpw, CP_ACP), CP_UTF8)