VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtElementFactory Class Reference

A factory for DtElement's.

Inheritance diagram for makVrv::DtElementFactory:
Inheritance graph
[legend]

Public Types

using CreatorMap = std::unordered_map< std::string, DtElementCreator * >
 

Public Member Functions

virtual ~DtElementFactory ()
 
const CreatorMapcreators () const
 
virtual void addElementCreator (DtDe &de, DtElementCreator *creator)
 
DtElementcreateElement (DtElementEntry::ElementType type, DtBaseConnection &connection, DtStateListener &listener, const std::string &tag)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Protected Member Functions

 DtElementFactory ()
 

Protected Attributes

CreatorMap myCreatorMap
 
 DtElementFactory (const DtElementFactory &rhs)
 
DtElementFactoryoperator= (const DtElementFactory &rhs)
 
virtual DtElementFactoryclone ()
 
static DtElementFactoryinstance (DtDe &de)
 
static DtElementFactoryinstance (DtBaseConnection &con)
 
static void copyInstance (DtBaseConnection &con, DtDe &de)
 

Member Typedef Documentation

using makVrv::DtElementFactory::CreatorMap = std::unordered_map<std::string, DtElementCreator*>

The key is the DtElementEntry::ElementType + creator->tag() Maps ElementType to creators.

Constructor & Destructor Documentation

virtual makVrv::DtElementFactory::~DtElementFactory ( )
virtual

DTOR.

makVrv::DtElementFactory::DtElementFactory ( const DtElementFactory rhs)

Instance accessors and copiersCopy CTOR; deep copies contents.

makVrv::DtElementFactory::DtElementFactory ( )
protected

Default CTOR - protected - use instance.

Member Function Documentation

DtElementFactory& makVrv::DtElementFactory::operator= ( const DtElementFactory rhs)

Assignment; deep copies contents.

static DtElementFactory& makVrv::DtElementFactory::instance ( DtDe de)
static

Get the instance of the factory from its owner de.

static DtElementFactory& makVrv::DtElementFactory::instance ( DtBaseConnection con)
static

Get the instance of the factory from its owner base connection.

virtual DtElementFactory* makVrv::DtElementFactory::clone ( )
virtual

Clone function so derived classes can be used with copyInstance.

static void makVrv::DtElementFactory::copyInstance ( DtBaseConnection con,
DtDe de 
)
static

Create a new instance for the DtBaseConnection which is a copy of the DtDe instance.

const CreatorMap& makVrv::DtElementFactory::creators ( ) const

Get the creators.

virtual void makVrv::DtElementFactory::addElementCreator ( DtDe de,
DtElementCreator creator 
)
virtual

Add element creator.

DtElement* makVrv::DtElementFactory::createElement ( DtElementEntry::ElementType  type,
DtBaseConnection connection,
DtStateListener listener,
const std::string &  tag 
)

Create an element Tag is a separate param and not pulled from the connection because there are Elements that do not have tagged (network) types.

Member Data Documentation

CreatorMap makVrv::DtElementFactory::myCreatorMap
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)