|
WSF
|
#include <WsfCommMediumContainer.hpp>

Public Types | |
| enum | InputAction : int { cNONE , cADD , cEDIT , cDELETE } |
Public Member Functions | |
| Container (const WsfScenario &aScenario) | |
| Container (const Container &aSrc) | |
| virtual | ~Container ()=default |
| Medium * | GetMedium () const |
| void | SetMedium (std::shared_ptr< Medium > aMedium) |
| virtual bool | ProcessInput (UtInput &aInput) |
| virtual bool | Initialize (double aSimTime) |
| 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 |
A class container for usage of medium objects. Provides the API for usage of the medium object, as well as some convenience methods for using mediums. Mediums are maintained by the type list, and shared pointer instances are provided to containers - thus, the medium held by any given container may be shared between multiple containers.
| enum wsf::comm::medium::Container::InputAction : int |
|
inline |
Referenced by Container(), and wsf::comm::medium::ContainerComponent< PARENT >::ContainerComponent().
| wsf::comm::medium::Container::Container | ( | const Container & | aSrc | ) |
References Container().
|
virtualdefault |
|
virtual |
A public helper method, indicating to the container that it should use the default medium type, and acquire a copy if it. This is only valid if a medium is not currently assigned.
References AddDefaultMedium(), and wsf::comm::Types::Get().
Referenced by AddDefaultMedium(), and ProcessInput().
| void wsf::comm::medium::Container::AddForbiddenMedium | ( | TypeIdentifier | aValue | ) |
Adds a forbidden medium type for the parent of this container. This allows the removal of types that may not be valid for this particular instance.
References AddForbiddenMedium().
Referenced by AddForbiddenMedium().
| void wsf::comm::medium::Container::AddValidMedium | ( | TypeIdentifier | aValue | ) |
Add a valid medium type for use by the parent of this container. This is only successful if a medium type has not been forbidden, either by the parent of the container itself, or one of its derivations.
References AddValidMedium().
Referenced by AddValidMedium().
|
inline |
Referenced by wsf::comm::medium::Types::AddDefaultMedium(), and wsf::comm::medium::Types::DeleteMedium().
|
inline |
|
inline |
|
inline |
|
virtual |
Reimplemented in wsf::comm::medium::ContainerComponent< PARENT >.
References Initialize(), and ok.
Referenced by Initialize(), and wsf::comm::medium::ContainerComponent< PARENT >::Initialize().
| bool wsf::comm::medium::Container::IsValidMedium | ( | TypeIdentifier | aValue | ) | const |
Returns true if the provided TypeIdentifier is valid for this container.
References IsValidMedium().
Referenced by IsValidMedium(), and wsf::comm::medium::Types::LoadMedium().
|
virtual |
A method for processing medium input for the container parent. An additional parameter is provided to qualify the scope of the action being taken common to all mediums and akin to components, being adding, editing, or deleting.
References cADD, cDELETE, cEDIT, wsf::comm::Types::Get(), ProcessContainerInput(), and ProcessInput().
Referenced by ProcessContainerInput().
|
virtual |
In the base container implementation, ProcessInput primarily provides support for legacy input that was formerly found in physical layer implementations. This allows for legacy input to still be supported, while handling it properly using the medium objects without replicating the functionality.
Reimplemented in wsf::comm::medium::ContainerComponent< PARENT >.
References AddDefaultMedium(), wsf::comm::medium::Types::Get(), ProcessInput(), and SetMedium().
Referenced by ProcessContainerInput(), ProcessInput(), and wsf::comm::medium::ContainerComponent< PARENT >::ProcessInput().
| void wsf::comm::medium::Container::SetDefaultMedium | ( | TypeIdentifier | aValue | ) |
Sets/gets the default medium for the parent object. Medium usage does not require explicit input for backward compatibility, so a default medium is required.
The set function is ignored if the TypeIdentifier provided is a forbidden medium.
References SetDefaultMedium().
Referenced by SetDefaultMedium().
|
inline |
|
inline |
Required simulation object for subsequent provision to medium instances. Mediums require a simulation instance for runtime query and modification.