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

Constructor & Destructor Documentation

TempStore ( )
inline
Remarks
Constructor. The list is set to NULL.
3124 { slotList = NULL; }
#define NULL
Definition: autoptr.h:18
~TempStore ( )
inline
Remarks
Destructor. This empties out the store.
3126 { 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.
3158  {
3159  PutBytes(sizeof(float),(void *)&f,ptr);
3160  }
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.
3166  {
3167  PutBytes(sizeof(int),(void *)&i,ptr);
3168  }
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.
3175  {
3176  GetBytes(sizeof(float),(void *)f,ptr);
3177  }
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.
3184  {
3185  GetBytes(sizeof(int),(void *)i,ptr);
3186  }
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.
3193  {
3194  PutBytes(sizeof(Point3),(void *)&f,ptr);
3195  }
Definition: point3.h:51
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.
3202  {
3203  GetBytes(sizeof(Point3),(void *)f,ptr);
3204  }
CoreExport void GetBytes(int n, void *data, void *ptr)
Definition: point3.h:51
CoreExport void PutPoint4 ( Point4  f,
void ptr 
)
inline
3205  {
3206  PutBytes(sizeof(Point4),(void *)&f,ptr);
3207  }
Definition: point4.h:41
CoreExport void PutBytes(int n, void *data, void *ptr)
CoreExport void GetPoint4 ( Point4 f,
void ptr 
)
inline
3208  {
3209  GetBytes(sizeof(Point4),(void *)f,ptr);
3210  }
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.
3217  {
3218  PutBytes(sizeof(Quat),(void *)&f,ptr);
3219  }
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.
3226  {
3227  GetBytes(sizeof(Quat),(void *)f,ptr);
3228  }
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.
3235  {
3236  PutBytes(sizeof(ScaleValue),(void *)&f,ptr);
3237  }
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.
3244  {
3245  GetBytes(sizeof(ScaleValue),(void *)f,ptr);
3246  }
CoreExport void GetBytes(int n, void *data, void *ptr)
Definition: control.h:72