3ds Max C++ API Reference
TempStore Class Reference

#include <control.h>

+ Inheritance diagram for TempStore:

Public Member Functions

CoreExport TempStore ()
 
CoreExport ~TempStore ()
 
 TempStore (const TempStore &)=delete
 
 TempStore (TempStore &&)=delete
 
TempStoreoperator= (const TempStore &)=delete
 
TempStoreoperator= (TempStore &&)=delete
 
CoreExport void ClearAll ()
 
CoreExport void PutBytes (size_t num_bytes, const void *data, const void *key)
 
CoreExport void GetBytes (size_t num_bytes, void *data, const void *key) const
 
CoreExport void Clear (const void *key)
 
CoreExport void PutFloat (float f, const void *key)
 
CoreExport void GetFloat (float *f, const void *key) const
 
CoreExport void PutInt (int i, const void *key)
 
CoreExport void GetInt (int *i, const void *key) const
 
CoreExport void PutPoint3 (Point3 f, const void *key)
 
CoreExport void GetPoint3 (Point3 *f, const void *key) const
 
CoreExport void PutPoint4 (Point4 f, const void *key)
 
CoreExport void GetPoint4 (Point4 *f, const void *key) const
 
CoreExport void PutQuat (Quat f, const void *key)
 
CoreExport void GetQuat (Quat *f, const void *key) const
 
CoreExport void PutScaleValue (ScaleValue f, const void *key)
 
CoreExport void GetScaleValue (ScaleValue *f, const void *key) const
 

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...
 

Detailed Description

See also
Structure Slot.

Description:
This class is used as a place to store values during Hold/Restore periods. All methods of this class are implemented by the system. For each key of data stored, you can only store 1 chunk of memory of different sizes. For example, 1 x 4 byte element, 1 x 8 byte element, etc.

TempStore tmpStore;

This is a global instance of TempStore whose methods may be called to store the values. For instance:

tmpStore.PutBytes(sizeof(Quat), &curval, this);

Note that the above code uses the plug-in's this pointer as the key to identify the owner of the data in the store.

Constructor & Destructor Documentation

◆ TempStore() [1/3]

Remarks
Constructor.

◆ ~TempStore()

Remarks
Destructor. This empties out the store.

◆ TempStore() [2/3]

TempStore ( const TempStore )
delete
Remarks
TempStore should only be accessed as a singleton.

◆ TempStore() [3/3]

TempStore ( TempStore &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

TempStore& operator= ( const TempStore )
delete

◆ operator=() [2/2]

TempStore& operator= ( TempStore &&  )
delete

◆ ClearAll()

CoreExport void ClearAll ( )
Remarks
This empties out the store.

◆ PutBytes()

CoreExport void PutBytes ( size_t  num_bytes,
const void data,
const void key 
)
Remarks
This method puts bytes to the storage.
Parameters:
size_t num_bytes

The number of bytes to put.

const void *data

Points to the data to put.

const void *key

A key to identify the data in the store. The address is the identifier.

◆ GetBytes()

CoreExport void GetBytes ( size_t  num_bytes,
void data,
const void key 
) const
Remarks
This method gets bytes from the storage. The stored bytes will be copied into data.
Parameters:
size_t num_bytes

The number of bytes to get.

void *data

Points to the data to get.

void *key

A key to identify the data in the store. The address is the identifier.

◆ Clear()

CoreExport void Clear ( const void key)
Remarks
Remove a single entry from the storage.
Parameters:
const void *key

A key to identify the data in the store.

◆ PutFloat()

CoreExport void PutFloat ( float  f,
const void key 
)
Remarks
Puts the specified floating point value to the storage.
Parameters:
float f

The value to store.

const void *key

A key to identify the data in the store.

◆ GetFloat()

CoreExport void GetFloat ( float *  f,
const void key 
) const
Remarks
Retrieves a floating point value from the storage.
Parameters:
float *f

The value to retrieve is stored here.

const void *key

A key to identify the data in the store.

◆ PutInt()

CoreExport void PutInt ( int  i,
const void key 
)
Remarks
Puts an int value in the storage.
Parameters:
int f

The value to store.

const void *key

A key to identify the data in the store.

◆ GetInt()

CoreExport void GetInt ( int i,
const void key 
) const
Remarks
Retrieves an integer point value from the storage.
Parameters:
int *f

The value to retrieve is stored here.

const void *key

A key to identify the data in the store.

◆ PutPoint3()

CoreExport void PutPoint3 ( Point3  f,
const void key 
)
Remarks
Puts a Point3 value to the storage.
Parameters:
Point3 f

The value to store.

const void *key

A key to identify the data in the store.

◆ GetPoint3()

CoreExport void GetPoint3 ( Point3 f,
const void key 
) const
Remarks
Retrieves a Point3 value from the storage.
Parameters:
Point3 *f

The value to retrieve is stored here.

const void *key

A key to identify the data in the store.

◆ PutPoint4()

CoreExport void PutPoint4 ( Point4  f,
const void key 
)
Remarks
Puts a Point4 value to the storage.
Parameters:
Point4 f

The value to store.

const void *key

A key to identify the data in the store.

◆ GetPoint4()

CoreExport void GetPoint4 ( Point4 f,
const void key 
) const
Remarks
Retrieves a Point4 value from the storage.
Parameters:
Point4 *f

The value to retrieve is stored here.

const void *key

A key to identify the data in the store.

◆ PutQuat()

CoreExport void PutQuat ( Quat  f,
const void key 
)
Remarks
Puts a quaternion value to the storage.
Parameters:
Quat f

The quaternion to store.

const void *key

A key to identify the data in the store.

◆ GetQuat()

CoreExport void GetQuat ( Quat f,
const void key 
) const
Remarks
Retrieves a quaternion from the storage.
Parameters:
Quat *f

The quaternion retrieved is stored here.

const void *key

A key to identify the data in the store.

◆ PutScaleValue()

CoreExport void PutScaleValue ( ScaleValue  f,
const void key 
)
Remarks
Puts a ScaleValue to the storage.
Parameters:
ScaleValue f

The value to store.

const void *key

A key to identify the data in the store.

◆ GetScaleValue()

CoreExport void GetScaleValue ( ScaleValue f,
const void key 
) const
Remarks
Retrieves a ScaleValue from the storage.
Parameters:
ScaleValue *f

The retrieved value is stored here.

const void *key

A key to identify the data in the store.