Public Member Functions

TempStore Class Reference

This reference page is linked to from the following overview topics: Control Virtual Methods.


Search for all occurrences

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.

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.

#include <control.h>

Inheritance diagram for TempStore:
Inheritance graph
[legend]

List of all members.

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)

Constructor & Destructor Documentation

TempStore ( ) [inline]
Remarks:
Constructor. The list is set to NULL.
{  slotList = NULL;  }
~TempStore ( ) [inline]
Remarks:
Destructor. This empties out the store.
{ 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.
                                         {
          PutBytes(sizeof(float),(void *)&f,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.
                                               {
          PutBytes(sizeof(int),(void *)&i,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.
                                                    { 
         GetBytes(sizeof(float),(void *)f,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.
                                                { 
         GetBytes(sizeof(int),(void *)i,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.
                                                      {
          PutBytes(sizeof(Point3),(void *)&f,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.
                                                      { 
         GetBytes(sizeof(Point3),(void *)f,ptr);
         }
CoreExport void PutPoint4 ( Point4  f,
void *  ptr 
) [inline]
                                                      {
         PutBytes(sizeof(Point4),(void *)&f,ptr);
         }
CoreExport void GetPoint4 ( Point4 f,
void *  ptr 
) [inline]
                                                      { 
         GetBytes(sizeof(Point4),(void *)f,ptr);
         }
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.
                                                   {
          PutBytes(sizeof(Quat),(void *)&f,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.
                                                   { 
         GetBytes(sizeof(Quat),(void *)f,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.
                                                               {
          PutBytes(sizeof(ScaleValue),(void *)&f,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.
                                                               { 
         GetBytes(sizeof(ScaleValue),(void *)f,ptr);
         }

TempStore TempStore TempStore TempStore TempStore TempStore TempStore TempStore TempStore TempStore
TempStore TempStore TempStore TempStore TempStore TempStore TempStore TempStore TempStore TempStore