WSF
WsfGroupManager Class Reference

#include <WsfGroupManager.hpp>

Public Types

using GroupMap = std::map<WsfStringId, WsfGroup*>

Public Member Functions

 WsfGroupManager ()=default
 WsfGroupManager (WsfSimulation *aSimPtr)
 Constructor.
 ~WsfGroupManager ()
 Destructor.
bool AddGroup (WsfGroup *aNewGroupPtr)
 Adds the given group to the group list.
WsfGroupCreateGroup (const std::string &aGroupName, const std::string &aGroupType)
 Create a new group.
WsfGroupGetGroup (const WsfStringId aGroupId)
 Return the group that matches the given group id.
GroupMapGetGroups ()
bool LoadInstance (const std::string &aGroupName, WsfPlatformPart *aPlatformPartPtr)
bool LoadInstance (const std::string &aGroupName, WsfPlatform *aPlatformPtr)

Detailed Description

This is a singleton that contains a list of objects that have been created as 'group objects'.

Member Typedef Documentation

◆ GroupMap

Constructor & Destructor Documentation

◆ WsfGroupManager() [1/2]

WsfGroupManager::WsfGroupManager ( )
default

◆ WsfGroupManager() [2/2]

WsfGroupManager::WsfGroupManager ( WsfSimulation * aSimPtr)

Constructor.

◆ ~WsfGroupManager()

WsfGroupManager::~WsfGroupManager ( )

Destructor.

Member Function Documentation

◆ AddGroup()

bool WsfGroupManager::AddGroup ( WsfGroup * aNewGroupPtr)

Adds the given group to the group list.

References GetGroup(), and WsfObject::GetName().

Referenced by CreateGroup(), and WsfGroupManager().

◆ CreateGroup()

WsfGroup * WsfGroupManager::CreateGroup ( const std::string & aGroupName,
const std::string & aGroupType )

Create a new group.

References AddGroup(), GetGroup(), WsfObserver::GroupAdded(), and groupPtr.

Referenced by WsfGroupManager().

◆ GetGroup()

WsfGroup * WsfGroupManager::GetGroup ( const WsfStringId aGroupId)

Return the group that matches the given group id.

Referenced by AddGroup(), CreateGroup(), LoadInstance(), LoadInstance(), and WsfGroupManager().

◆ GetGroups()

GroupMap & WsfGroupManager::GetGroups ( )
inline

◆ LoadInstance() [1/2]

bool WsfGroupManager::LoadInstance ( const std::string & aGroupName,
WsfPlatform * aPlatformPtr )

create an instance of a group after replacing any tokens in the string

Parameters
aGroupName- the name of the group to instantiate
aPlatformPtr- the platform that will join the group
Returns
true if successfully created and joined group

References GetGroup(), WsfObject::GetName(), WsfObject::GetType(), groupPtr, and WsfPlatform::JoinGroup().

◆ LoadInstance() [2/2]

bool WsfGroupManager::LoadInstance ( const std::string & aGroupName,
WsfPlatformPart * aPlatformPartPtr )

create an instance of a group after replacing any tokens in the string

Parameters
aGroupName- the name of the group to instantiate
aPlatformPartPtr- the platform part that will join the group
Returns
true if successfully created and joined group

References GetGroup(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), groupPtr, WsfPlatformPart::JoinGroup(), and platformPtr.


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