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
1229  {
1230  Free();
1231  }
void Free()
Definition: vccorlib.h:1289
Platform::StringReference::StringReference ( )
inline
1233  {
1234  Init();
1235  }
void Init()
Definition: vccorlib.h:1293
Platform::StringReference::StringReference ( const StringReference __fstrArg)
inline
1237  {
1238  Init(__fstrArg);
1239  }
void Init()
Definition: vccorlib.h:1293
Platform::StringReference::StringReference ( const ::default::char16 *  __strArg)
inline
1251  {
1252  Init(__strArg, __Platform_wcslen(__strArg));
1253  }
void Init()
Definition: vccorlib.h:1293
size_t __cdecl __Platform_wcslen(const ::default::char16 *)
Platform::StringReference::StringReference ( const ::default::char16 *  __strArg,
size_t  __lenArg 
)
inline
1261  {
1262  Init(__strArg, __lenArg);
1263  }
void Init()
Definition: vccorlib.h:1293

Member Function Documentation

const ::default::char16* Platform::StringReference::Data ( ) const
inline
1266  {
1268  }
__declspec(no_release_return) __declspec(no_refcount) operator __declspec(no_release_return) __declspec(no_refcount) __abi_HSTRING GetHSTRING() const
Definition: vccorlib.h:1284
const ::default::char16 *__stdcall __Platform_WindowsGetStringRawBuffer(__abi_HSTRING, unsigned int *)
void Platform::StringReference::Free ( )
inlineprivate
1290  {
1292  }
__abi_HSTRING __hString
Definition: vccorlib.h:1326
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
1285  {
1286  return __hString;
1287  }
__abi_HSTRING __hString
Definition: vccorlib.h:1326
void Platform::StringReference::Init ( )
inlineprivate
1294  {
1295  __Platform_memset(this, 0, sizeof(StringReference));
1296  }
StringReference()
Definition: vccorlib.h:1232
void *__cdecl __Platform_memset(void *, int, size_t)
void Platform::StringReference::Init ( const StringReference __fstrArg)
inlineprivate
1298  {
1299  unsigned int __length = 0;
1300  const ::default::char16* __source = __Platform_WindowsGetStringRawBuffer(__fstrArg.GetHSTRING(), &__length);
1301  Init(__source, __length);
1302  }
void Init()
Definition: vccorlib.h:1293
const ::default::char16 *__stdcall __Platform_WindowsGetStringRawBuffer(__abi_HSTRING, unsigned int *)
void Platform::StringReference::Init ( const ::default::char16 *  __strArg,
unsigned __int64  __lenArg 
)
inlineprivate
1304  {
1305  if ((__strArg == nullptr) || (__lenArg == 0))
1306  Init();
1307  else if (__lenArg > 0xffffffffLL) // check if it exceeds the size of an integer
1308  __abi_WinRTraiseInvalidArgumentException();
1309  else
1310  {
1311  unsigned int __length = (unsigned int) (__lenArg & 0xffffffffLL);
1313  }
1314  }
void Init()
Definition: vccorlib.h:1293
__abi_HSTRING __hString
Definition: vccorlib.h:1326
unsigned int
Definition: vccorlib.h:2468
void CreateStringReference(const ::default::char16 *__sourceStringArg, unsigned int __lengthArg, __Platform_Details_HSTRING_HEADER *__hstringHeaderArg, __abi_HSTRING *__stringArg)
Definition: vccorlib.h:1218
__Platform_Details_HSTRING_HEADER __header
Definition: vccorlib.h:1325
void Platform::StringReference::Init ( const ::default::char16 *  __strArg,
unsigned int  __lenArg 
)
inlineprivate
1316  {
1317  if ((__strArg == nullptr) || (__lenArg == 0))
1318  Init();
1319  else
1320  {
1322  }
1323  }
void Init()
Definition: vccorlib.h:1293
__abi_HSTRING __hString
Definition: vccorlib.h:1326
void CreateStringReference(const ::default::char16 *__sourceStringArg, unsigned int __lengthArg, __Platform_Details_HSTRING_HEADER *__hstringHeaderArg, __abi_HSTRING *__stringArg)
Definition: vccorlib.h:1218
__Platform_Details_HSTRING_HEADER __header
Definition: vccorlib.h:1325
unsigned int Platform::StringReference::Length ( ) const
inline
1270  {
1272  }
__declspec(no_release_return) __declspec(no_refcount) operator __declspec(no_release_return) __declspec(no_refcount) __abi_HSTRING GetHSTRING() const
Definition: vccorlib.h:1284
unsigned int __stdcall __Platform_WindowsGetStringLen(__abi_HSTRING)
StringReference& Platform::StringReference::operator= ( const StringReference __fstrArg)
inline
1241  {
1242  if(this != &__fstrArg)
1243  {
1244  Free();
1245  Init(__fstrArg);
1246  }
1247  return *this;
1248  }
void Init()
Definition: vccorlib.h:1293
void Free()
Definition: vccorlib.h:1289
StringReference& Platform::StringReference::operator= ( const ::default::char16 *  __strArg)
inline
1255  {
1256  Free();
1257  Init(__strArg, __Platform_wcslen(__strArg));
1258  return *this;
1259  }
void Init()
Definition: vccorlib.h:1293
void Free()
Definition: vccorlib.h:1289
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: