STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Platform::StringReference Class Reference

#include <vccorlib.h>

Public Member Functions

 ~StringReference ()
 
 StringReference ()
 
 StringReference (const StringReference &__fstrArg)
 
StringReferenceoperator= (const StringReference &__fstrArg)
 
 StringReference (const ::default::char16 *__strArg)
 
StringReferenceoperator= (const ::default::char16 *__strArg)
 
 StringReference (const ::default::char16 *__strArg, size_t __lenArg)
 
const ::default::char16 * Data () const
 
unsigned int Length () const
 
__declspec(no_release_return) __declspec(no_refcount) operator __declspec(no_release_return) __declspec(no_refcount) __abi_HSTRING GetHSTRING () const
 

Private Member Functions

void Free ()
 
void Init ()
 
void Init (const StringReference &__fstrArg)
 
void Init (const ::default::char16 *__strArg, unsigned __int64 __lenArg)
 
void Init (const ::default::char16 *__strArg, unsigned int __lenArg)
 

Private Attributes

__Platform_Details_HSTRING_HEADER __header
 
__abi_HSTRING __hString
 

Constructor & Destructor Documentation

Platform::StringReference::~StringReference ( )
inline
1221  {
1222  Free();
1223  }
void Free()
Definition: vccorlib.h:1281
Platform::StringReference::StringReference ( )
inline
1225  {
1226  Init();
1227  }
void Init()
Definition: vccorlib.h:1285
Platform::StringReference::StringReference ( const StringReference __fstrArg)
inline
1229  {
1230  Init(__fstrArg);
1231  }
void Init()
Definition: vccorlib.h:1285
Platform::StringReference::StringReference ( const ::default::char16 *  __strArg)
inline
1243  {
1244  Init(__strArg, __Platform_wcslen(__strArg));
1245  }
void Init()
Definition: vccorlib.h:1285
size_t __cdecl __Platform_wcslen(const ::default::char16 *)
Platform::StringReference::StringReference ( const ::default::char16 *  __strArg,
size_t  __lenArg 
)
inline
1253  {
1254  Init(__strArg, __lenArg);
1255  }
void Init()
Definition: vccorlib.h:1285

Member Function Documentation

const ::default::char16* Platform::StringReference::Data ( ) const
inline
1258  {
1260  }
__declspec(no_release_return) __declspec(no_refcount) operator __declspec(no_release_return) __declspec(no_refcount) __abi_HSTRING GetHSTRING() const
Definition: vccorlib.h:1276
const ::default::char16 *__stdcall __Platform_WindowsGetStringRawBuffer(__abi_HSTRING, unsigned int *)
void Platform::StringReference::Free ( )
inlineprivate
1282  {
1284  }
__abi_HSTRING __hString
Definition: vccorlib.h:1318
long __stdcall __Platform_WindowsDeleteString(__abi_HSTRING)
__declspec (no_release_return) __declspec(no_refcount) operator __declspec (no_release_return) __declspec(no_refcount) __abi_HSTRING Platform::StringReference::GetHSTRING ( ) const
inline
1277  {
1278  return __hString;
1279  }
__abi_HSTRING __hString
Definition: vccorlib.h:1318
void Platform::StringReference::Init ( )
inlineprivate
1286  {
1287  __Platform_memset(this, 0, sizeof(StringReference));
1288  }
StringReference()
Definition: vccorlib.h:1224
void *__cdecl __Platform_memset(void *, int, size_t)
void Platform::StringReference::Init ( const StringReference __fstrArg)
inlineprivate
1290  {
1291  unsigned int __length = 0;
1292  const ::default::char16* __source = __Platform_WindowsGetStringRawBuffer(__fstrArg.GetHSTRING(), &__length);
1293  Init(__source, __length);
1294  }
void Init()
Definition: vccorlib.h:1285
const ::default::char16 *__stdcall __Platform_WindowsGetStringRawBuffer(__abi_HSTRING, unsigned int *)
void Platform::StringReference::Init ( const ::default::char16 *  __strArg,
unsigned __int64  __lenArg 
)
inlineprivate
1296  {
1297  if ((__strArg == nullptr) || (__lenArg == 0))
1298  Init();
1299  else if (__lenArg > 0xffffffffLL) // check if it exceeds the size of an integer
1300  __abi_WinRTraiseInvalidArgumentException();
1301  else
1302  {
1303  unsigned int __length = (unsigned int) (__lenArg & 0xffffffffLL);
1305  }
1306  }
void Init()
Definition: vccorlib.h:1285
__abi_HSTRING __hString
Definition: vccorlib.h:1318
unsigned int
Definition: vccorlib.h:2460
void CreateStringReference(const ::default::char16 *__sourceStringArg, unsigned int __lengthArg, __Platform_Details_HSTRING_HEADER *__hstringHeaderArg, __abi_HSTRING *__stringArg)
Definition: vccorlib.h:1210
__Platform_Details_HSTRING_HEADER __header
Definition: vccorlib.h:1317
void Platform::StringReference::Init ( const ::default::char16 *  __strArg,
unsigned int  __lenArg 
)
inlineprivate
1308  {
1309  if ((__strArg == nullptr) || (__lenArg == 0))
1310  Init();
1311  else
1312  {
1314  }
1315  }
void Init()
Definition: vccorlib.h:1285
__abi_HSTRING __hString
Definition: vccorlib.h:1318
void CreateStringReference(const ::default::char16 *__sourceStringArg, unsigned int __lengthArg, __Platform_Details_HSTRING_HEADER *__hstringHeaderArg, __abi_HSTRING *__stringArg)
Definition: vccorlib.h:1210
__Platform_Details_HSTRING_HEADER __header
Definition: vccorlib.h:1317
unsigned int Platform::StringReference::Length ( ) const
inline
1262  {
1264  }
__declspec(no_release_return) __declspec(no_refcount) operator __declspec(no_release_return) __declspec(no_refcount) __abi_HSTRING GetHSTRING() const
Definition: vccorlib.h:1276
unsigned int __stdcall __Platform_WindowsGetStringLen(__abi_HSTRING)
StringReference& Platform::StringReference::operator= ( const StringReference __fstrArg)
inline
1233  {
1234  if(this != &__fstrArg)
1235  {
1236  Free();
1237  Init(__fstrArg);
1238  }
1239  return *this;
1240  }
void Init()
Definition: vccorlib.h:1285
void Free()
Definition: vccorlib.h:1281
StringReference& Platform::StringReference::operator= ( const ::default::char16 *  __strArg)
inline
1247  {
1248  Free();
1249  Init(__strArg, __Platform_wcslen(__strArg));
1250  return *this;
1251  }
void Init()
Definition: vccorlib.h:1285
void Free()
Definition: vccorlib.h:1281
size_t __cdecl __Platform_wcslen(const ::default::char16 *)

Member Data Documentation

__Platform_Details_HSTRING_HEADER Platform::StringReference::__header
private
__abi_HSTRING Platform::StringReference::__hString
private

The documentation for this class was generated from the following file: