WSF
wsf::comm::medium::ContainerFactory< PARENT > Class Template Reference

A template class for common medium component factory registration. More...

#include <WsfCommMediumContainer.hpp>

Inheritance diagram for wsf::comm::medium::ContainerFactory< PARENT >:
Collaboration diagram for wsf::comm::medium::ContainerFactory< PARENT >:

Public Member Functions

bool ProcessAddOrEditCommand (UtInput &aInput, PARENT &aParent, bool aIsAdding) override
bool ProcessDeleteCommand (UtInput &aInput, PARENT &aParent) override
bool PreInitialize (double aSimTime, PARENT &aParent) override
Public Member Functions inherited from WsfComponentFactory< PARENT >
 WsfComponentFactory ()
virtual void PreInput (PARENT &aParent)
virtual bool ProcessInput (UtInput &aInput, PARENT &aParent)
Public Member Functions inherited from WsfComponentFactoryBase
 WsfComponentFactoryBase (int aParentRole)
virtual ~WsfComponentFactoryBase ()
int GetParentRole () const
 Return the parent role of the factory.

Additional Inherited Members

Protected Member Functions inherited from WsfComponentFactoryBase
WsfScenarioGetScenario () const
 Returns a reference to the scenario to which this factory is registered.

Detailed Description

template<typename PARENT>
class wsf::comm::medium::ContainerFactory< PARENT >

A template class for common medium component factory registration.

Member Function Documentation

◆ PreInitialize()

template<typename PARENT>
bool wsf::comm::medium::ContainerFactory< PARENT >::PreInitialize ( double aSimTime,
PARENT & aParent )
inlineoverridevirtual

Perform pre-initialization function. This is called by the parents Initialize prior to actually initializing the components on the parent (i.e.: calling Initialize and Initialize2 for each component). The primary reason for this method is to allow the factory to check for the existence of a required component and either add it or cause a failure. The method may examine the component list on the parent but it must not assume ANYTHING about the actual state of the components.

Parameters
aSimTimeThe current simulation time.
aParentThe parent object being initialized.
Returns
true if successful or false if unsuccessful (bad input data, etc.)

Reimplemented from WsfComponentFactory< PARENT >.

References wsf::comm::medium::ContainerComponent< PARENT >::Find().

◆ ProcessAddOrEditCommand()

template<typename PARENT>
bool wsf::comm::medium::ContainerFactory< PARENT >::ProcessAddOrEditCommand ( UtInput & aInput,
PARENT & aParent,
bool aIsAdding )
inlineoverridevirtual

Process the implicit or explicit 'add' or 'edit' command. This is typically used by the component factories whose parent is WsfPlatform. Others may use this if they follow similar syntax.

Parameters
aInputThe input stream.
aParentThe parent object.
aIsAdding'true' if the component is being added to the parent or 'false' if an existing component is to be edited.
Returns
true if the command was recognized and processed, or false if not (pass to the next factory).

Reimplemented from WsfComponentFactory< PARENT >.

References wsf::comm::medium::Container::cADD, wsf::comm::medium::Container::cEDIT, and wsf::comm::medium::ContainerComponent< PARENT >::Find().

◆ ProcessDeleteCommand()

template<typename PARENT>
bool wsf::comm::medium::ContainerFactory< PARENT >::ProcessDeleteCommand ( UtInput & aInput,
PARENT & aParent )
inlineoverridevirtual

Process the explicit component 'delete' command. This is typically used by component factories whose parent is WsfPlatform.

Parameters
aInputThe input stream.
aParentThe parent object.
Returns
true if the command was recognized and processed, or false if not (pass to the next factory).

Reimplemented from WsfComponentFactory< PARENT >.

References wsf::comm::medium::Container::cDELETE, and wsf::comm::medium::ContainerComponent< PARENT >::Find().


The documentation for this class was generated from the following file:
Copyrights Multiple, All Rights Reserved