TempStore Class Reference

#include <control.h>

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

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.
+ Inheritance diagram for TempStore:

Public Member Functions

 TempStore ()
 
 ~TempStore ()
 
CoreExport void ClearAll ()
 
CoreExport void PutBytes (int n, void *data, void *ptr)
 
CoreExport void GetBytes (int n, void *data, void *ptr)
 
CoreExport void Clear (void *ptr)
 
void PutFloat (float f, void *ptr)
 
CoreExport void PutInt (int i, void *ptr)
 
CoreExport void GetFloat (float *f, void *ptr)
 
CoreExport void GetInt (int *i, void *ptr)
 
CoreExport void PutPoint3 (Point3 f, void *ptr)
 
CoreExport void GetPoint3 (Point3 *f, void *ptr)
 
CoreExport void PutPoint4 (Point4 f, void *ptr)
 
CoreExport void GetPoint4 (Point4 *f, void *ptr)
 
CoreExport void PutQuat (Quat f, void *ptr)
 
CoreExport void GetQuat (Quat *f, void *ptr)
 
CoreExport void PutScaleValue (ScaleValue f, void *ptr)
 
CoreExport void GetScaleValue (ScaleValue *f, void *ptr)
 

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

Constructor & Destructor Documentation

TempStore ( )
inline
Remarks
Constructor. The list is set to NULL.
3125 { slotList = NULL; }
#define NULL
Definition: autoptr.h:18
~TempStore ( )
inline
Remarks
Destructor. This empties out the store.
3127 { ClearAll(); }
CoreExport void ClearAll()

Member Function Documentation

CoreExport void ClearAll ( )
Remarks
This empties out the store.
CoreExport void PutBytes ( int  n,
void data,
void ptr 
)
Remarks
This method puts bytes to the storage.
Parameters:
int n

The number of bytes to put.

void *data

Points to the data to put.

void *ptr

A key to identify the data in the store.
CoreExport void GetBytes ( int  n,
void data,
void ptr 
)
Remarks
This method gets bytes from the storage.
Parameters:
int n

The number of bytes to get.

void *data

Points to the data to get.

void *ptr

A key to identify the data in the store.
CoreExport void Clear ( void ptr)
Remarks
Remove a single entry from the storage.
Parameters:
void *ptr

A key to identify the data in the store.
void PutFloat ( float  f,
void ptr 
)
inline
Remarks
Puts the specified floating point value to the storage.
Parameters:
float f

The value to store.

void *ptr

A key to identify the data in the store.
3159  {
3160  PutBytes(sizeof(float),(void *)&f,ptr);
3161  }
CoreExport void PutBytes(int n, void *data, void *ptr)
CoreExport void PutInt ( int  i,
void ptr 
)
inline
Remarks
Parameters:
int f

The value to store.

void *ptr

A key to identify the data in the store.
3167  {
3168  PutBytes(sizeof(int),(void *)&i,ptr);
3169  }
CoreExport void PutBytes(int n, void *data, void *ptr)
CoreExport void GetFloat ( float *  f,
void ptr 
)
inline
Remarks
Retrieves a floating point value from the storage.
Parameters:
float *f

The value to retrieve is stored here.

void *ptr

A key to identify the data in the store.
3176  {
3177  GetBytes(sizeof(float),(void *)f,ptr);
3178  }
CoreExport void GetBytes(int n, void *data, void *ptr)
CoreExport void GetInt ( int i,
void ptr 
)
inline
Remarks
Retrieves an integer point value from the storage.
Parameters:
int *f

The value to retrieve is stored here.

void *ptr

A key to identify the data in the store.
3185  {
3186  GetBytes(sizeof(int),(void *)i,ptr);
3187  }
CoreExport void GetBytes(int n, void *data, void *ptr)
CoreExport void PutPoint3 ( Point3  f,
void ptr 
)
inline
Remarks
Puts a Point3 value to the storage.
Parameters:
Point3 f

The value to store.

void *ptr

A key to identify the data in the store.
3194  {
3195  PutBytes(sizeof(Point3),(void *)&f,ptr);
3196  }
Definition: point3.h:55
CoreExport void PutBytes(int n, void *data, void *ptr)
CoreExport void GetPoint3 ( Point3 f,
void ptr 
)
inline
Remarks
Retrieves a Point3 value from the storage.
Parameters:
Point3 *f

The value to retrieve is stored here.

void *ptr

A key to identify the data in the store.
3203  {
3204  GetBytes(sizeof(Point3),(void *)f,ptr);
3205  }
CoreExport void GetBytes(int n, void *data, void *ptr)
Definition: point3.h:55
CoreExport void PutPoint4 ( Point4  f,
void ptr 
)
inline
3206  {
3207  PutBytes(sizeof(Point4),(void *)&f,ptr);
3208  }
Definition: point4.h:41
CoreExport void PutBytes(int n, void *data, void *ptr)
CoreExport void GetPoint4 ( Point4 f,
void ptr 
)
inline
3209  {
3210  GetBytes(sizeof(Point4),(void *)f,ptr);
3211  }
CoreExport void GetBytes(int n, void *data, void *ptr)
Definition: point4.h:41
CoreExport void PutQuat ( Quat  f,
void ptr 
)
inline
Remarks
Puts a quaternion value to the storage.
Parameters:
Quat f

The quaternion to store.

void *ptr

A key to identify the data in the store.
3218  {
3219  PutBytes(sizeof(Quat),(void *)&f,ptr);
3220  }
Definition: quat.h:146
CoreExport void PutBytes(int n, void *data, void *ptr)
CoreExport void GetQuat ( Quat f,
void ptr 
)
inline
Remarks
Retrieves a quaternion from the storage.
Parameters:
Quat *f

The quaternion retrieved is stored here.

void *ptr

A key to identify the data in the store.
3227  {
3228  GetBytes(sizeof(Quat),(void *)f,ptr);
3229  }
Definition: quat.h:146
CoreExport void GetBytes(int n, void *data, void *ptr)
CoreExport void PutScaleValue ( ScaleValue  f,
void ptr 
)
inline
Remarks
Puts a ScaleValue to the storage.
Parameters:
ScaleValue f

The value to store.

void *ptr

A key to identify the data in the store.
3236  {
3237  PutBytes(sizeof(ScaleValue),(void *)&f,ptr);
3238  }
Definition: control.h:72
CoreExport void PutBytes(int n, void *data, void *ptr)
CoreExport void GetScaleValue ( ScaleValue f,
void ptr 
)
inline
Remarks
Retrieves a ScaleValue from the storage.
Parameters:
ScaleValue *f

The retrieved value is stored here.

void *ptr

A key to identify the data in the store.
3245  {
3246  GetBytes(sizeof(ScaleValue),(void *)f,ptr);
3247  }
CoreExport void GetBytes(int n, void *data, void *ptr)
Definition: control.h:72