WSF
wsf::comm::medium::FactoryManager Class Reference

#include <WsfCommMediumFactory.hpp>

Public Types

using FactoryMap = std::unordered_map<int, std::unique_ptr<FactoryInterface>>

Public Member Functions

 FactoryManager (WsfScenario &aScenario)
virtual ~FactoryManager ()=default
 FactoryManager (const FactoryManager &aSrc)=delete
 FactoryManager (FactoryManager &&aSrc)=delete
template<typename MEDIUM_TYPE>
void AddFactory (std::unique_ptr< Factory< MEDIUM_TYPE > > aFactory)
 Template function requires provision of derived type to ensure correct functionality/assignments.
bool ProcessInput (UtInput &aInput, Container &aParent) const
bool ProcessAddOrEditCommand (UtInput &aInput, Container &aParent, bool aIsAdding) const
bool ProcessDeleteCommand (UtInput &aInput, Container &aParent) const

Detailed Description

The factory manager class, which handles the registration of medium factories, and the correct processing of input for such classes based on the type of factory, and the valid types available for the parent class medium container. Since not all mediums may be valid for all object types, this restricts the types of mediums parsed for each parent container.

Since this class acts fundamentally different from typical components in runtime instantiation and input parsing, this object is held by the medium typelist itself. Users are required to query the medium typelist for this functionality.

Member Typedef Documentation

◆ FactoryMap

using wsf::comm::medium::FactoryManager::FactoryMap = std::unordered_map<int, std::unique_ptr<FactoryInterface>>

Constructor & Destructor Documentation

◆ FactoryManager() [1/3]

wsf::comm::medium::FactoryManager::FactoryManager ( WsfScenario & aScenario)
inline

Referenced by FactoryManager(), and FactoryManager().

◆ ~FactoryManager()

virtual wsf::comm::medium::FactoryManager::~FactoryManager ( )
virtualdefault

◆ FactoryManager() [2/3]

wsf::comm::medium::FactoryManager::FactoryManager ( const FactoryManager & aSrc)
delete

References FactoryManager().

◆ FactoryManager() [3/3]

wsf::comm::medium::FactoryManager::FactoryManager ( FactoryManager && aSrc)
delete

References FactoryManager().

Member Function Documentation

◆ AddFactory()

template<typename MEDIUM_TYPE>
void wsf::comm::medium::FactoryManager::AddFactory ( std::unique_ptr< Factory< MEDIUM_TYPE > > aFactory)
inline

Template function requires provision of derived type to ensure correct functionality/assignments.

Referenced by wsf::comm::medium::Guided::RegisterFactory(), and wsf::comm::medium::Unguided::RegisterFactory().

◆ ProcessAddOrEditCommand()

bool wsf::comm::medium::FactoryManager::ProcessAddOrEditCommand ( UtInput & aInput,
Container & aParent,
bool aIsAdding ) const
inline

◆ ProcessDeleteCommand()

bool wsf::comm::medium::FactoryManager::ProcessDeleteCommand ( UtInput & aInput,
Container & aParent ) const
inline

◆ ProcessInput()

bool wsf::comm::medium::FactoryManager::ProcessInput ( UtInput & aInput,
Container & aParent ) const
inline

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