dtHLAGM::OneToManyMapping::ParameterDefinition Class Reference

#include <onetomanymapping.h>

List of all members.

Public Member Functions

 ParameterDefinition ()
 ParameterDefinition (const std::string &name, dtDAL::DataType &type, const std::string &defaultValue, bool required)
virtual ~ParameterDefinition ()
 Destructor.
void SetGameName (const std::string &thisGameTypeName)
 Sets the Name for this Game Type.
const std::string & GetGameName () const
 Gets the Name of a Game Type.
const dtDAL::DataTypeGetGameType () const
 Gets the Data Type of the Game Type.
const std::string & GetDefaultValue () const
 Get the default value of this One to One mapping.
bool IsRequiredForGame () const
 Whether or not this field is required for the Game update.
void SetGameType (const dtDAL::DataType &thisGameTypeType)
 Sets the Data Type of the Game Type.
void SetDefaultValue (const std::string &defValue)
 Sets the default value of this mapping.
void SetRequiredForGame (bool requiredForGame)
 Sets whether or not field is required for an Game Update.
void AddEnumerationMapping (const std::string &hlaValue, const std::string &gameValue)
 Maps an HLA enumerated value to a string-base game enumeration value.
void ClearEnumerationMapping ()
 A simple method to clear all of the current enumeration mappings created using AddEnumerationMapping.
bool GetHLAEnumerationValue (const std::string &gameValue, std::string &hlaValue) const
 Get the HLA value for an enumeration based on the given string game value.
bool GetGameEnumerationValue (const std::string &hlaValue, std::string &gameValue) const
 Get the game value for an enumeration based on the given integer HLA value.
const std::map< std::string,
std::string > & 
GetHLAToGameEnumerationMappings () const
 
Returns:
a const map of the HLA values mapped to the game values

const std::map< std::string,
std::string > & 
GetGameToHLAEnumerationMappings () const
 
Returns:
a const map of the game values mapped to the HLA values

bool operator== (const ParameterDefinition &compareTo) const


Constructor & Destructor Documentation

dtHLAGM::OneToManyMapping::ParameterDefinition::ParameterDefinition (  )  [inline]

dtHLAGM::OneToManyMapping::ParameterDefinition::ParameterDefinition ( const std::string &  name,
dtDAL::DataType type,
const std::string &  defaultValue,
bool  required 
) [inline]

virtual dtHLAGM::OneToManyMapping::ParameterDefinition::~ParameterDefinition (  )  [inline, virtual]

Destructor.


Member Function Documentation

void dtHLAGM::OneToManyMapping::ParameterDefinition::SetGameName ( const std::string &  thisGameTypeName  )  [inline]

Sets the Name for this Game Type.

Parameters:
mGameTypeName Game Name

const std::string& dtHLAGM::OneToManyMapping::ParameterDefinition::GetGameName (  )  const [inline]

Gets the Name of a Game Type.

Returns:
the Game Name

const dtDAL::DataType& dtHLAGM::OneToManyMapping::ParameterDefinition::GetGameType (  )  const [inline]

Gets the Data Type of the Game Type.

Returns:
the Data Type of the Game Type

const std::string& dtHLAGM::OneToManyMapping::ParameterDefinition::GetDefaultValue (  )  const [inline]

Get the default value of this One to One mapping.

Returns:
the default value

bool dtHLAGM::OneToManyMapping::ParameterDefinition::IsRequiredForGame (  )  const [inline]

Whether or not this field is required for the Game update.

Returns:
is this field required

void dtHLAGM::OneToManyMapping::ParameterDefinition::SetGameType ( const dtDAL::DataType thisGameTypeType  )  [inline]

Sets the Data Type of the Game Type.

Parameters:
GameType Data Type

void dtHLAGM::OneToManyMapping::ParameterDefinition::SetDefaultValue ( const std::string &  defValue  )  [inline]

Sets the default value of this mapping.

Parameters:
defaultValue Default Value

void dtHLAGM::OneToManyMapping::ParameterDefinition::SetRequiredForGame ( bool  requiredForGame  )  [inline]

Sets whether or not field is required for an Game Update.

Parameters:
requiredForGame true if this field is required for the game messaging

void dtHLAGM::OneToManyMapping::ParameterDefinition::AddEnumerationMapping ( const std::string &  hlaValue,
const std::string &  gameValue 
)

Maps an HLA enumerated value to a string-base game enumeration value.

Note:
using this only makes sense if the GameType property is set to ENUMERATION.
Parameters:
hlaValue the hla value to map. This should be in a format that the parameter translator can translate into the hla type of the hla data.
gameValue the name of the enumeration value to map to. This will be passed to the property's SetStringValue method.

void dtHLAGM::OneToManyMapping::ParameterDefinition::ClearEnumerationMapping (  ) 

A simple method to clear all of the current enumeration mappings created using AddEnumerationMapping.

bool dtHLAGM::OneToManyMapping::ParameterDefinition::GetHLAEnumerationValue ( const std::string &  gameValue,
std::string &  hlaValue 
) const

Get the HLA value for an enumeration based on the given string game value.

Returns:
true if the string value has been mapped or false if not.
Parameters:
gameValue the string name of the enumeration value to get the integer value for.
hlaValue output parameter that will be set the requested HLA numeric value if this method returns true or undefined if not.

bool dtHLAGM::OneToManyMapping::ParameterDefinition::GetGameEnumerationValue ( const std::string &  hlaValue,
std::string &  gameValue 
) const

Get the game value for an enumeration based on the given integer HLA value.

Returns:
true if the value has been mapped or false if not.
Parameters:
hlaValue the value to get the string enumeration value for.
gameValue output parameter that will be set the requested game string value if this method returns true or undefined if not.

const std::map<std::string, std::string>& dtHLAGM::OneToManyMapping::ParameterDefinition::GetHLAToGameEnumerationMappings (  )  const [inline]

Returns:
a const map of the HLA values mapped to the game values

const std::map<std::string, std::string>& dtHLAGM::OneToManyMapping::ParameterDefinition::GetGameToHLAEnumerationMappings (  )  const [inline]

Returns:
a const map of the game values mapped to the HLA values

bool dtHLAGM::OneToManyMapping::ParameterDefinition::operator== ( const ParameterDefinition compareTo  )  const


http://www.delta3d.org
2.0.0 generated 14 Feb 2008