3ds Max C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MaxGuid Struct Reference

#include <MaxGuid.h>

+ Inheritance diagram for MaxGuid:

Public Member Functions

 MaxGuid ()
 Constructors.
 
UtilExport MaxGuid (const char *)
 
UtilExport MaxGuid (const wchar_t *)
 
UtilExport MaxGuid (const QString &)
 
 MaxGuid (const MSTR &idStr)
 
MaxGuidoperator= (const GUID &rhs)
 Assignment operator.
 
UtilExport bool operator< (const MaxGuid &rhs) const
 Less than operator needed for using MaxSDK::MaxGuid in unordered set, maps.
 
UtilExport MSTR ToString (bool lowerCaseResult=true, bool includeBraces=false) const
 Returns a string representation of the guid value.
 
UtilExport bool IsValid () const
 Returns whether valid guid value (!= CLSID_NULL).
 

Static Public Member Functions

static UtilExport MaxGuid CreateMaxGuid ()
 Create a MaxGuild value with random guid value.
 
static UtilExport bool StringToMaxGuid (const MCHAR *pString, MaxGuid &guid, bool throwExceptionOnError=false)
 Converts a string representation of a guid value to a guid value.
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Constructor & Destructor Documentation

◆ MaxGuid() [1/5]

MaxGuid ( )
inline

Constructors.

31 {
32 *this = CLSID_NULL;
33 }

◆ MaxGuid() [2/5]

UtilExport MaxGuid ( const char *  )
explicit

◆ MaxGuid() [3/5]

UtilExport MaxGuid ( const wchar_t *  )
explicit

◆ MaxGuid() [4/5]

UtilExport MaxGuid ( const QString &  )
explicit

◆ MaxGuid() [5/5]

MaxGuid ( const MSTR idStr)
inlineexplicit
37: MaxGuid(idStr.data()) {}
const wchar_t * data() const
MaxGuid()
Constructors.
Definition: MaxGuid.h:30

Member Function Documentation

◆ operator=()

MaxGuid & operator= ( const GUID &  rhs)
inline

Assignment operator.

43 {
44 *static_cast<GUID*>(this) = rhs;
45 return *this;
46 }

◆ operator<()

UtilExport bool operator< ( const MaxGuid rhs) const

Less than operator needed for using MaxSDK::MaxGuid in unordered set, maps.

◆ CreateMaxGuid()

static UtilExport MaxGuid CreateMaxGuid ( )
static

Create a MaxGuild value with random guid value.

◆ ToString()

UtilExport MSTR ToString ( bool  lowerCaseResult = true,
bool  includeBraces = false 
) const

Returns a string representation of the guid value.

Parameters
lowerCaseResultIf true, return string is lower case, otherwise is upper case.
includeBracesIf true, return string contains opening and closing braces.
Returns
The string representation of the guid value

◆ StringToMaxGuid()

static UtilExport bool StringToMaxGuid ( const MCHAR pString,
MaxGuid guid,
bool  throwExceptionOnError = false 
)
static

Converts a string representation of a guid value to a guid value.

Parameters
pStringThe string representation of a guid value. If null or an empty string, a guid value corresponding to an invalid guid is used and the function returns true.
guidThe MaxGuid value to set.
throwExceptionOnErrorIf false and pString is not a proper string representation of a guid value, a guid value corresponding to an invalid guid is used and the function returns true. If true and pString is not a proper string representation of a guid value, a MaxException is thrown.
Returns
True if null or an empty string, or if string could be converted to a guid value.

◆ IsValid()

UtilExport bool IsValid ( ) const

Returns whether valid guid value (!= CLSID_NULL).