Inherited by Eaagles::Network::NtmDisIO.
Inheritance diagram for Eaagles::Simulation::Ntm:


Public Member Functions | |
| Ntm () | |
| const Player * | getTemplatePlayer () const |
| virtual bool | isMatchingPlayerType (const Player *const player) const |
| virtual bool | isMatchingEntityType (const Nib *const nib) const=0 |
| virtual bool | copyEntityType (Nib *const targetNib) const=0 |
| virtual bool | setSlotTemplatePlayer (const Player *const msg) |
Private Attributes | |
| SPtr< const Player > | tPlayer |
Abstract class: Network Type Mapper (NTM)
Form name: Ntm
Slots:
template (Player) Template player
Notes:
1) Maps player types to network entity types. Usually on outputs, a match
is found between a local, 'test' player and our 'template' player to
determine the correct entity type code(s) to send to the network.
2) Maps network entity types to player types. Usually on inputs, a match
is found between the incomming networks unique entity type code(s) and
our entity type code(s) and then our 'template' player is cloned to create
the IPlayer (networked player)
3) Player types are matches using the players' form names and type strings
by the isMatchingPlayerType() function (see below)
4) The network unique type codes are defined by our derived classes and
matched with the isMatchingEntityType() function (see below).
bool isMatchingPlayerType(Player* testPlayer)
Compare the test player, testPlayer, with our template player
and returns 'true' if the test player is the same type or is
derived from the same type as our template player.
Notes on comparing player types --
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) Player form names will also match their 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")
/pre>
| Eaagles::Simulation::Ntm::Ntm | ( | ) |
| const Player* Eaagles::Simulation::Ntm::getTemplatePlayer | ( | ) | const [inline] |
Template player.
| bool Eaagles::Simulation::Ntm::isMatchingPlayerType | ( | const Player *const | player | ) | const [virtual] |
True if player's form & type names match our template's form and type names.
| virtual bool Eaagles::Simulation::Ntm::isMatchingEntityType | ( | const Nib *const | nib | ) | const [pure virtual] |
As implemeted by our derived network I/O classes, this function will return 'true' if the entity type code(s) in the testNIB, testNib, matches our entity type code(s). These entity type codes are defined by the the derived network I/O class.
Implemented in Eaagles::Network::NtmDisIO.
| virtual bool Eaagles::Simulation::Ntm::copyEntityType | ( | Nib *const | targetNib | ) | const [pure virtual] |
As implemeted by our derived network I/O classes, this function will copy our network unique type code(s) to the target NIB, 'targetNib', object.
Implemented in Eaagles::Network::NtmDisIO.
| bool Eaagles::Simulation::Ntm::setSlotTemplatePlayer | ( | const Player *const | msg | ) | [virtual] |
Slot functions Sets the template player
SPtr<const Player> Eaagles::Simulation::Ntm::tPlayer [private] |
Template player.
1.5.0