3ds Max C++ API Reference
Loading...
Searching...
No Matches
StringConverter< char_type > Struct Template Reference

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/ManagedServices/StringConverter.h>

Public Types

typedef char_type * converted_type

Public Member Functions

char_type * Convert (System::String^ in)

Member Typedef Documentation

◆ converted_type

template<typename char_type>
typedef char_type* converted_type

Member Function Documentation

◆ Convert()

template<typename char_type>
char_type * Convert ( System::String^ in)
inline
73 {
74 // This should all be const, but INode methods are not const-correct
75 // Rather than jump through hoops to use const_casting wrapper functors,
76 // I'm stripping off the const here.
77
78 pin_ptr<const wchar_t> pinned( PtrToStringChars(in) );
79 mString = mString.FromUTF16(static_cast<const wchar_t*>(pinned));
80 return const_cast<char_type*>(mString.data());
81 }