VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
DtMappingList Class Reference

class DtMappingList: More...

Inheritance diagram for DtMappingList:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtMappingList ()
 default constructor
 DtMappingList (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0)
 constructor
virtual ~DtMappingList ()
 destructor
 DtMappingList (const DtString &writeName, const DtMappingList &orig, DtReaderWriterRegistry *parentRegistry=0)
 copy constructor
DtMappingListoperator= (const DtMappingList &orig)
 assignment operator
virtual DtMappingListclone (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0) const
virtual bool lookup (const DtString &name, DtSimulationAddress &address) const
 //! initialize object map from a file virtual bool readMapFile(const DtFilename& filename);
virtual const DtList & objects (const DtSimulationAddress &addr)
 get the list of objects for a given simulation address
virtual const DtList & addresses ()
 get a unique list of simulation addresses
virtual void addMapping (const DtString &name, const DtSimulationAddress &address)
 Create and add a new DtObjectMapEntry.

Protected Member Functions

DtlObjPtr getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
 This method must be overridden by a subclass.
virtual void emptyList ()
virtual void copyList (const DtMappingList &orig)

Protected Attributes

DtList myTmpObjList
DtList myTmpAddressList

Detailed Description

class DtMappingList:

Instances of DtMappingList contain DtObjectMapEntry objects which are used to associate an entity with the address on which it is being simulated. This list can be written out to create an object map file for a scenario.


Constructor & Destructor Documentation

default constructor

DtMappingList::DtMappingList ( const DtString writeName,
DtReaderWriterRegistry parentRegistry = 0 
)

constructor

virtual DtMappingList::~DtMappingList ( ) [virtual]

destructor

DtMappingList::DtMappingList ( const DtString writeName,
const DtMappingList orig,
DtReaderWriterRegistry parentRegistry = 0 
)

copy constructor


Member Function Documentation

DtMappingList& DtMappingList::operator= ( const DtMappingList orig)

assignment operator

virtual DtMappingList* DtMappingList::clone ( const DtString writeName,
DtReaderWriterRegistry parentRegistry = 0 
) const [virtual]
virtual bool DtMappingList::lookup ( const DtString name,
DtSimulationAddress &  address 
) const [virtual]

//! initialize object map from a file virtual bool readMapFile(const DtFilename& filename);

Look up the simulation address by name. If found, true is returned and the address found is assigned to the address parameter. If not found, false is returned and DtSimulationAddress:nullId is assigned to the address parameter.

virtual const DtList& DtMappingList::objects ( const DtSimulationAddress &  addr) [virtual]

get the list of objects for a given simulation address

virtual const DtList& DtMappingList::addresses ( ) [virtual]

get a unique list of simulation addresses

virtual void DtMappingList::addMapping ( const DtString name,
const DtSimulationAddress &  address 
) [virtual]

Create and add a new DtObjectMapEntry.

DtlObjPtr DtMappingList::getData ( DtlObjPtr  args,
const DtFilename &  searchPath,
const DtVariableBindingsList variableBindings 
) [protected, virtual]

This method must be overridden by a subclass.

Within this method, new instances of the DtReaderWriter subclass that is being handled by this list must be created, and then retrieved from the mtl stream, using the getSelf member of that item.

Here is some sample code that could be used to implement a override of this class: (This is used in the DtRwIntegerList::getData() method)
 DtlObjPtr nameObj = DtcCar(args);
 DtRwInt* value = new DtRwInt(nameObj->pname());
 value->getSelf(args, searchPath, variableBindings);
 this->add(value);
 return DtcCdr(DtcCdr(args));

Implements DtRwList.

virtual void DtMappingList::emptyList ( ) [protected, virtual]
virtual void DtMappingList::copyList ( const DtMappingList orig) [protected, virtual]

Member Data Documentation

DtList DtMappingList::myTmpObjList [protected]
DtList DtMappingList::myTmpAddressList [protected]

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)