Eaagles::Simulation::Otm Class Reference

Inherits Eaagles::Basic::LcObject.

Inheritance diagram for Eaagles::Simulation::Otm:

Inheritance graph
[legend]
Collaboration diagram for Eaagles::Simulation::Otm:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Otm ()
unsigned int getTypeId () const
virtual bool setTypeId (const unsigned int newType)
virtual bool setSlotTypeId (const Basic::LcNumber *const msg)
const Basic::LcIdentgetRefFormName () const
virtual bool setSlotRefFormName (const Basic::LcIdent *const msg)
const Basic::LcStringgetRefTypeName () const
virtual bool setSlotRefTypeName (const Basic::LcString *const msg)
virtual bool isMatchingPlayerType (const Player *const p) const

Private Attributes

SPtr< const Basic::LcIdentrefFormName
SPtr< const Basic::LcString
> refTypeNam unsigned int 
typeId

Detailed Description

OTW-Type-Mapper (OTM) -- 
                 Maps player's form name and type string to a OTW entity type ID.

    Form name: Otm
    Slots:
        formName      (Ident)    Reference form name
        typeName      (String)   Reference type name
        modelTypeId   (Number)   Entity type ID number (unsigned int)

    Examples:
       ( Otm  Aircraft  "B-1B"          203 )
       ( Otm  Aircraft  "F-14"          309 )
       ( Otm  Aircraft     modelTypeId: 302 )       // Default aircraft type

    Notes:
      1) If typeName isn't given, only the formName will be used.
      2) Derived class (OTW unique) can use 'modelTypeId' or add their own IDs

    Notes on comparing player types -- isMatchingPlayerType()

       1) Derived classes and more specific type should be checked first
          (see #2 & #5 below -- we get matches with the base classes and
           the more general type names)

       2) Form names will also match base class form names

       3) Form names are compared first and then the type names are compared

       4) It's considered a match if the form names match and no type name as given.

       5) For type names, we compare at most the length of our type name ...
             (e.g., Test player's "F-16C" would match our "F-16C"
             (e.g., Test player's "F-16C" would match our general "F-16" type)
             (e.g., Test player's general "F-16" type would not match our "F-16C") 


Constructor & Destructor Documentation

Eaagles::Simulation::Otm::Otm (  ) 


Member Function Documentation

unsigned int Eaagles::Simulation::Otm::getTypeId (  )  const [inline]

OTW entity type ID number.

bool Eaagles::Simulation::Otm::setTypeId ( const unsigned int  newType  )  [virtual]

Sets the OTW entity type number.

bool Eaagles::Simulation::Otm::setSlotTypeId ( const Basic::LcNumber *const  msg  )  [virtual]

Sets the OTW entity type number.

const Basic::LcIdent* Eaagles::Simulation::Otm::getRefFormName (  )  const [inline]

Reference form name.

bool Eaagles::Simulation::Otm::setSlotRefFormName ( const Basic::LcIdent *const  msg  )  [virtual]

Sets the Reference form name.

const Basic::LcString* Eaagles::Simulation::Otm::getRefTypeName (  )  const [inline]

Reference type name.

bool Eaagles::Simulation::Otm::setSlotRefTypeName ( const Basic::LcString *const  msg  )  [virtual]

Sets the Reference type name.

bool Eaagles::Simulation::Otm::isMatchingPlayerType ( const Player *const  p  )  const [virtual]

True if player's form & type names match our reference form and type names.


Member Data Documentation

SPtr<const Basic::LcIdent> Eaagles::Simulation::Otm::refFormName [private]

Reference form name.

SPtr<const Basic::LcString> refTypeNam unsigned int Eaagles::Simulation::Otm::typeId [private]

OTW entity type ID numbere;.


Generated on Tue Dec 19 16:28:31 2006 for Eaagles by  doxygen 1.5.0