Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Key Class Reference
[Data classes]

A 32-bit hash key identifier. More...

#include <Key.h>

Inheritance diagram for Key:

BaseType List of all members.

Public Methods

 Key ()
 Default constructor.

 Key (std::string const &k)
 Construct a new key from a string.

 Key (Key const &k)
 Copy constructor.

virtual ~Key ()
 Destructor.

const Key & operator= (std::string const &)
 Assign from a string, computing the corresponding key.

const Key & operator= (Key const &k)
 Copy method.

bool operator== (Key const &k) const
 Compare equal.

bool operator!= (Key const &k) const
 Compare unequal.

bool operator== (std::string const &) const
 String compare equal.

bool operator!= (std::string const &k) const
 String compare unequal.

bool operator< (Key const &k) const
 Order comparison, for use with standard stl comparisons.

virtual void serialize (Archive &)
 Serialize to or from a data archive.

virtual std::string asString () const
 Standard string representation.

virtual std::string typeString () const
 Return a string representation of the type.

virtual void parseXML (const char *cdata)
 Parse cdata from within the XML tags for this object.

virtual void convertXML ()
 Convert XML data to internal format prior to serialization.


Protected Attributes

uint32 _key

Detailed Description

A 32-bit hash key identifier.

Can be used in place of strings and enums to bind internal and external identifiers efficiently.

Author:
Mark Rose <mrose@stm.lbl.gov>


Constructor & Destructor Documentation

Key::Key   [inline]
 

Default constructor.

Key::Key std::string const &    k [inline]
 

Construct a new key from a string.

Key::Key Key const &    k [inline]
 

Copy constructor.

virtual Key::~Key   [inline, virtual]
 

Destructor.


Member Function Documentation

std::string Key::asString   [virtual]
 

Standard string representation.

Implements BaseType.

void BaseType::convertXML   [virtual, inherited]
 

Convert XML data to internal format prior to serialization.

This method is currently only called by the XML parser for Object classes. If another BaseType class requires this method, a call must be added to the appropriate XML handler in the parser.

bool Key::operator!= std::string const &    k const [inline]
 

String compare unequal.

bool Key::operator!= Key const &    k const [inline]
 

Compare unequal.

bool Key::operator< Key const &    k const [inline]
 

Order comparison, for use with standard stl comparisons.

const Key& Key::operator= Key const &    k [inline]
 

Copy method.

NAMESPACE_SIMDATA const Key & Key::operator= std::string const &   
 

Assign from a string, computing the corresponding key.

bool Key::operator== std::string const &    const
 

String compare equal.

bool Key::operator== Key const &    k const [inline]
 

Compare equal.

void BaseType::parseXML const char *    cdata [virtual, inherited]
 

Parse cdata from within the XML tags for this object.

Reimplemented in SimDate, EnumLink, GeoPos, LLA, UTM, Matrix3, Quat, Real, and Vector3.

void Key::serialize Archive   [virtual]
 

Serialize to or from a data archive.

Reimplemented from BaseType.

virtual std::string Key::typeString   const [inline, virtual]
 

Return a string representation of the type.

Implements BaseType.


Member Data Documentation

uint32 Key::_key [protected]
 


The documentation for this class was generated from the following files:
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:41 2003, using Doxygen 1.2.18.

[SF.net]