|
WSF
|
#include <WsfCommMediumContainer.hpp>


Public Member Functions | |
| ContainerComponent (const WsfScenario &aScenario) | |
| bool | Initialize (double aSimTime) override |
| bool | ProcessInput (UtInput &aInput) override |
| ~ContainerComponent () override=default | |
| WsfComponent * | CloneComponent () const override |
| Required method implementations for components. | |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| void * | QueryInterface (int aRole) override |
| Public Member Functions inherited from wsf::comm::medium::Container | |
| Container (const WsfScenario &aScenario) | |
| Container (const Container &aSrc) | |
| virtual | ~Container ()=default |
| Medium * | GetMedium () const |
| void | SetMedium (std::shared_ptr< Medium > aMedium) |
| void | SetSimulation (WsfSimulation *aSimPtr) |
| virtual bool | ProcessContainerInput (UtInput &aInput, InputAction aAction=cNONE) |
| const std::set< TypeIdentifier > & | GetValidMediums () const |
| void | AddValidMedium (TypeIdentifier aValue) |
| void | AddForbiddenMedium (TypeIdentifier aValue) |
| bool | IsValidMedium (TypeIdentifier aValue) const |
| Returns true if the provided TypeIdentifier is valid for this container. | |
| void | SetDefaultMedium (TypeIdentifier aValue) |
| TypeIdentifier | GetDefaultMedium () const |
| virtual bool | AddDefaultMedium () |
| const WsfScenario & | GetScenario () const |
| Public Member Functions inherited from WsfComponentT< PARENT > | |
| WsfComponentT () | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| virtual void | ComponentParentChanged (ParentType *aParentPtr) |
| ParentType * | GetComponentParent () const |
| void | SetComponentParent (ParentType *aParentPtr) |
| Public Member Functions inherited from WsfComponent | |
| virtual | ~WsfComponent ()=default |
| virtual int | GetComponentInitializationOrder () const |
| template<typename T> | |
| bool | QueryInterfaceT (T *&aRolePtr) |
| bool | ComponentHasRole (int aRole) |
| Returns true if the component has the specified role. | |
| virtual bool | PreInitialize (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual void | PreInput () |
Static Public Member Functions | |
| static ContainerComponent< PARENT > * | Find (const PARENT &aParent) |
| static ContainerComponent< PARENT > * | FindOrCreate (PARENT &aParent, const WsfScenario &aScenario) |
Additional Inherited Members | |
| Public Types inherited from wsf::comm::medium::Container | |
| enum | InputAction : int { cNONE , cADD , cEDIT , cDELETE } |
| Public Types inherited from WsfComponentT< PARENT > | |
| typedef PARENT | ParentType |
| This is needed to support the WsfComponentList template. | |
A templated component type for usage of medium Containers. Use of this template container type allows containers to be attached to parents that maintain a component list, without having to derive or instantiate a container object directly. The container, while a component itself, manages the medium object usage on the parent. The medium itself is NOT a component due to its potentially shared lifetime and incompatibilities due to assumptions in the implementation of components. As such, this container utilizes the traditional factory methods typically utilized by components and their default factories, but most of the usage is a wrapper for the functionality and handling of the medium objects themselves (which is passed to a separate factory for the handling of medium input parsing and other necessary method calls directly related to medium usage).
Note that any parent class using this template component container must still explicitly define the specialization for WSF_DECLARE_COMPONENT_ROLE_TYPE. A template factory is provided for component containers.
|
inline |
References wsf::comm::medium::Container::Container().
Referenced by CloneComponent(), Find(), FindOrCreate(), and QueryInterface().
|
overridedefault |
|
inlineoverridevirtual |
Required method implementations for components.
Implements WsfComponent.
References ContainerComponent().
|
inlinestatic |
Static Find and FindOrCreate Methods Convenience methods for the addition or query for existence of the container within the parent's component list.
References ContainerComponent().
Referenced by FindOrCreate(), wsf::comm::Comm::Initialize(), wsf::comm::router::Router::Initialize(), wsf::comm::medium::ContainerFactory< PARENT >::PreInitialize(), wsf::comm::medium::ContainerFactory< PARENT >::ProcessAddOrEditCommand(), wsf::comm::medium::ContainerFactory< PARENT >::ProcessDeleteCommand(), wsf::comm::RadioXmtrRcvr::RadioXmtrRcvr(), wsf::comm::PhysicalLayer::Send(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and wsf::comm::XmtrRcvr::XmtrRcvr().
|
inlinestatic |
References ContainerComponent(), and Find().
Referenced by wsf::comm::Comm::Comm(), and wsf::comm::router::Router::Router().
|
inlineoverridevirtual |
Returns the component's name. Each component in a component list has a unique name. Names are usually defined by the user, but they may also be generated by code and prefixed with a '#' to guarantee no collisions with user-defined names.
Implements WsfComponent.
References wsf::comm::medium::GetContainerComponentName().
|
inlineoverridevirtual |
Returns a zero-terminated array of component roles. Note that the array should be in decreasing order of specificity and should generally the inheritance hierarchy. The first entry should be the components 'primary' role. For example a sensor would do the following:
Implements WsfComponent.
References cWSF_COMPONENT_NULL.
|
inlineoverridevirtual |
Both WsfComponent and Container contain virtual Initialize methods with the same signature. This resolves the ambiguity.
Reimplemented from wsf::comm::medium::Container.
References wsf::comm::medium::Container::Initialize().
|
inlineoverridevirtual |
Both WsfComponent and Container contain virtual ProcessInput methods with the same signature. This resolves the ambiguity.
Reimplemented from wsf::comm::medium::Container.
References wsf::comm::medium::Container::ProcessInput().
|
inlineoverridevirtual |
Requests a component's role interface. A component can support one or more roles.
| aRole | The role whose interface is to be returned. |
Implements WsfComponent.
References ContainerComponent().