3ds Max C++ API Reference
IVariableDictionary Class Referenceabstract

IVariableDictionary is a map structure that contains key/variable pairs. More...

#include <IVariableDictionary.h>

+ Inheritance diagram for IVariableDictionary:

Public Member Functions

 IVariableDictionary ()
 Default constructor. More...
 
virtual ~IVariableDictionary ()
 Destructor. More...
 
virtual bool HasKey (const MSTR &key) const =0
 Checks if the dictionary has the given key. More...
 
virtual VariableFind (const MSTR &key)=0
 Finds the value of the given key. More...
 
virtual const VariableFind (const MSTR &key) const =0
 Finds the value of the given key. More...
 
virtual Variableoperator[] (const MSTR &key)=0
 Finds or creates a key-variable pair, and returns the reference to the given key. More...
 
virtual const Variableoperator[] (const MSTR &key) const =0
 Finds or or creates a key-variable pair, and returns the reference to the given key. More...
 
virtual bool RemoveKey (const MSTR &key)=0
 Removes a key. More...
 
virtual void Clear ()=0
 Clear all key/variable pairs. More...
 
virtual size_t Size () const =0
 Gets the number of keys. More...
 
virtual const MSTRGetKey (size_t index) const =0
 Gets one key by using the index. More...
 
virtual const VariableGetVariable (size_t index) const =0
 Gets one variable by using the index. More...
 

Additional Inherited Members

- 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Detailed Description

IVariableDictionary is a map structure that contains key/variable pairs.

We use this class to store some built-in parameters for Fragment and Fragment Graph. Every built-in parameter is given with a name as the key.

Constructor & Destructor Documentation

◆ IVariableDictionary()

IVariableDictionary ( )
inline

Default constructor.

28 {};

◆ ~IVariableDictionary()

virtual ~IVariableDictionary ( )
inlinevirtual

Destructor.

31 {};

Member Function Documentation

◆ HasKey()

virtual bool HasKey ( const MSTR key) const
pure virtual

Checks if the dictionary has the given key.

Parameters
[in]keythe key to check.
Returns
true if this variable is a dictionary and has that key, false otherwise.

◆ Find() [1/2]

virtual Variable* Find ( const MSTR key)
pure virtual

Finds the value of the given key.

Parameters
[in]keythe key to check.
Returns
the variable that is associated with that key. Returns NULL is no matching variable is found.

◆ Find() [2/2]

virtual const Variable* Find ( const MSTR key) const
pure virtual

Finds the value of the given key.

Parameters
[in]keythe key to check.
Returns
the variable that is associated with that key. Returns NULL is no matching variable is found.

◆ operator[]() [1/2]

virtual Variable& operator[] ( const MSTR key)
pure virtual

Finds or creates a key-variable pair, and returns the reference to the given key.

Parameters
[in]keythe key to find or create.
Returns
reference to the variable that is associated with that key. If the key does not exist in the dictionary, this creates the key-variable association and returns the newly created variable.

◆ operator[]() [2/2]

virtual const Variable& operator[] ( const MSTR key) const
pure virtual

Finds or or creates a key-variable pair, and returns the reference to the given key.

Parameters
[in]keythe key.
Returns
reference to the variable that is associated with that key. If the key does not exist in the dictionary, this creates the key-variable association and returns the newly created variable.

◆ RemoveKey()

virtual bool RemoveKey ( const MSTR key)
pure virtual

Removes a key.

Parameters
[in]keythe name of the key to remove.
Returns
true if removed successfully, false otherwise.

◆ Clear()

virtual void Clear ( )
pure virtual

Clear all key/variable pairs.

◆ Size()

virtual size_t Size ( ) const
pure virtual

Gets the number of keys.

Returns
the count of all keys, 0 if no key.

◆ GetKey()

virtual const MSTR& GetKey ( size_t  index) const
pure virtual

Gets one key by using the index.

Parameters
[in]indexthe index of this key in the container.
Returns
one key, or empty string if no index matches.

◆ GetVariable()

virtual const Variable& GetVariable ( size_t  index) const
pure virtual

Gets one variable by using the index.

Parameters
[in]indexthe index of this variable in the container.
Returns
one variable, or one int type variable if no index matches.