Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

Rt2dStringLabel
[Rt2dAnim (inc. Maestro)]


Data Structures

struct   Rt2dStringLabel

Enumerations

enum   Rt2dStringLabelType {
  rt2dANIMLABELTYPENONE = 0, rt2dANIMLABELTYPEANIM, rt2dANIMLABELTYPEFRAME, rt2dANIMLABELTYPEBUTTON,
  rt2dANIMLABELTYPEFOREIGN, rt2dANIMLABELTYPESHAPE, rt2dANIMLABELTYPEURL, rt2dANIMLABELTYPEENUMSIZEINT = RWFORCEENUMSIZEINT
}

Functions

Rt2dStringLabelType  Rt2dStringLabelGetStringLabelType (Rt2dStringLabel *strLabel)
void  Rt2dStringLabelSetStringLabelType (Rt2dStringLabel *strLabel, Rt2dStringLabelType entityType)
RwInt32  Rt2dStringLabelGetNameIndex (Rt2dStringLabel *strLabel)
void  Rt2dStringLabelSetNameIndex (Rt2dStringLabel *strLabel, RwInt32 index)
void *  Rt2dStringLabelGetInternalData (Rt2dStringLabel *strLabel)
void  Rt2dStringLabelSetInternalData (Rt2dStringLabel *strLabel, void *internalData)
void *  Rt2dStringLabelGetUserData (Rt2dStringLabel *strLabel)
void  Rt2dStringLabelSetUserData (Rt2dStringLabel *strLabel, void *userData)
Rt2dMaestro Rt2dMaestroAddStringLabel (Rt2dMaestro *maestro, Rt2dStringLabelType entityType, const RwChar *name, void *internalData, RwInt32 *index)
Rt2dStringLabel Rt2dMaestroFindStringLabel (Rt2dMaestro *maestro, Rt2dStringLabelType entityType, const RwChar *lookupName, RwInt32 *index)
Rt2dStringLabel Rt2dMaestroGetStringLabelByIndex (Rt2dMaestro *maestro, RwInt32 index)
const RwChar Rt2dMaestroGetStringLabelName (Rt2dMaestro *maestro, Rt2dStringLabel *strLabel)

Detailed Description

String labels

Rt2dStringLabel Overview

Rt2dStringLabel is a string reference structure that is used by Rt2dMaestro to allow linking of internal and external data by name without a performance hit.

Rt2dMaestro stores a table of string labels. When a maestro is created or streamed in, the string label table is populated. The calling function can then look up names of interest within the table. The index that indicates where the name was found can be used as a handle to identify that name.

Additionally, an identifier is stored within the table to note what kind of data is being referenced by the name.

The user may store additional data in the table against each name. This provides a convenient location to place callbacks or flag locations. This would then be used by a custom message handler hooked to the Rt2dMaestro.

See also:
Rt2dMaestroCreate , Rt2dMessage , Rt2dStringLabel

Enumeration Type Documentation

enum Rt2dStringLabelType
 

Rt2dStringLabelType, this type represents the different types of object that can be labelled in the maestro's label table.

Enumeration values:
rt2dANIMLABELTYPEANIM  Animation label.
rt2dANIMLABELTYPEFRAME  Frame or cel label.
rt2dANIMLABELTYPEBUTTON  Button label.
rt2dANIMLABELTYPEFOREIGN  Application specific.
rt2dANIMLABELTYPESHAPE  Shape label.
rt2dANIMLABELTYPEURL  URL label.

Function Documentation

Rt2dMaestro* Rt2dMaestroAddStringLabel Rt2dMaestro   maestro,
Rt2dStringLabelType    entityType,
const RwChar   name,
void *    internalData,
RwInt32   index
 

Rt2dMaestroAddStringLabel is used to add a label entry into a table referencible by a string and an entity type. The table is used to store a small set of data that is common and can be shared.

It is also used to associate a name with a Rt2dAnim entity type, such as a button or cel. A string name can exist more than once providing it is for different entity type. If an entry already exist for name and entity type, the existing entry is updated and its index returned.

The maestro, enitityType and name parameters are mandatory. internalData and index are optional. The index parameter is used to return the index in the table if not NULL.

Parameters:
maestro  Pointer to the parent maestro.
entityType  Entity type of the label.
name  String name of the label.
internalData  Private data to be added
index  Pointer to a RwInt32 to return the index in the table.
Returns:
Returns a pointer to the maestro if successful, NULL otherwise.
See also:
Rt2dMaestroFindStringLabel , Rt2dMaestroGetStringLabelByIndex
Rt2dStringLabel* Rt2dMaestroFindStringLabel Rt2dMaestro   maestro,
Rt2dStringLabelType    entityType,
const RwChar   lookupName,
RwInt32   index
 

Rt2dMaestroFindStringLabel is used to search the label table for an entry with the given name and entity type.

The search is done on the name - entity type pairs. A string can appear appear more than once in the label table. Once for each entity type. Therefore both the string and the entity type must be given.

Parameters:
maestro  Pointer to the parent maestro.
entityType  Entity type to be searched.
lookupName  String name to be searched.
index  Pointer to a RwInt32 to return the index in the table.
Returns:
Returns the string label if found, NULL otherwise.
See also:
Rt2dMaestroAddStringLabel , Rt2dMaestroGetStringLabelByIndex
Rt2dStringLabel* Rt2dMaestroGetStringLabelByIndex Rt2dMaestro   maestro,
RwInt32    index
 

Rt2dMaestroGetStringLabelByIndex is used to return a label entry by using an index into the table. This index should be the index returned by Rt2dMaestroAddStringLabel or Rt2dMaestroFindStringLabel.

Parameters:
maestro  Pointer to the parent maestro.
index  Index into the label table.
Returns:
Returns the string label of the index, NULL otherwise.
See also:
Rt2dMaestroAddStringLabel , Rt2dMaestroFindStringLabel
const RwChar* Rt2dMaestroGetStringLabelName Rt2dMaestro   maestro,
Rt2dStringLabel   strLabel
 

Rt2dMaestroGetStringLabelName is used to retreive the actual label pointed by a Rt2dStringLabel.

Parameters:
maestro  Pointer to the parent maestro.
strLabel  Pointer to the Rt2dStringLabel.
Returns:
Returns a const pointer to the label, NULL otherwise
See also:
Rt2dMaestroAddStringLabel , Rt2dMaestroGetStringLabelByIndex , Rt2dMaestroFindStringLabel
void* Rt2dStringLabelGetInternalData Rt2dStringLabel   strLabel
 

Rt2dStringLabelGetInternalData is used to retrieve the internal data that is attached the string label. This internal data may be used by any entity that uses the string label.

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
strLabel  Pointer to the string label.
Returns:
Returns a pointer to the internal data attached to the string label.
See also:
Rt2dStringLabelSetInternalData , Rt2dMaestroAddStringLabel
RwInt32 Rt2dStringLabelGetNameIndex Rt2dStringLabel   strLabel
 

Rt2dStringLabelGetNameIndex is used to retrieve the name index of the string label. The name of the label is not stored with the string label but in a string table in the parent maestro.

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
strLabel  Pointer to the string label.
Returns:
Returns the name index of the string label.
See also:
Rt2dStringLabelSetNameIndex , Rt2dMaestroAddStringLabel
Rt2dStringLabelType Rt2dStringLabelGetStringLabelType Rt2dStringLabel   strLabel
 

Rt2dStringLabelGetStringLabelType is used to retrieve the label type of the string label, (Rt2dStringLabelType).

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
strLabel  Pointer to the string label.
Returns:
Returns the entity label type of the string label.
See also:
Rt2dStringLabelSetStringLabelType , Rt2dMaestroAddStringLabel
void* Rt2dStringLabelGetUserData Rt2dStringLabel   strLabel
 

Rt2dStringLabelGetUserData is used to retrieve the private data to the string label. The private data may be used by any entity that uses the string label.

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
strLabel  Pointer to the string label.
Returns:
Returns a pointer to the private data attached to the string label.
See also:
Rt2dStringLabelSetUserData , Rt2dMaestroAddStringLabel
void Rt2dStringLabelSetInternalData Rt2dStringLabel   strLabel,
void *    internalData
 

Rt2dStringLabelSetInternalData is used to attach internal data to the string label. The internal data may be used by any entity that uses the string label.

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
strLabel  Pointer to the string label.
internalData  Pointer to the internal data.
See also:
Rt2dStringLabelGetInternalData , Rt2dMaestroAddStringLabel
void Rt2dStringLabelSetNameIndex Rt2dStringLabel   strLabel,
RwInt32    index
 

Rt2dStringLabelSetNameIndex is used to set the name index of the string label. The name of the label is not stored with the string label but in a string table in the parent maestro.

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
strLabel  Pointer to the string label.
index  Name index of the string label.
See also:
Rt2dStringLabelGetNameIndex , Rt2dMaestroAddStringLabel
void Rt2dStringLabelSetStringLabelType Rt2dStringLabel   strLabel,
Rt2dStringLabelType    entityType
 

Rt2dStringLabelSetStringLabelType is used set the label type of the string label, (Rt2dStringLabelType).

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
strLabel  Pointer to the string label.
entityType  Entity label type.
See also:
Rt2dStringLabelGetStringLabelType , Rt2dMaestroAddStringLabel
void Rt2dStringLabelSetUserData Rt2dStringLabel   strLabel,
void *    userData
 

Rt2dStringLabelSetUserData is used to attach private data to the string label. The private data may be used by any entity that uses the string label

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
strLabel  Pointer to the string label.
userData  Pointer to the user data.
See also:
Rt2dStringLabelGetUserData , Rt2dMaestroAddStringLabel

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:50 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)