WSF
WsfGroupManager.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFGROUPMANAGER_HPP
13#define WSFGROUPMANAGER_HPP
14
15#include "wsf_export.h"
16
17#include <map>
18#include <string>
19
20class UtInput;
21class WsfGroup;
22class WsfGroupManager;
23class WsfGroupTypes;
24class WsfPlatform;
25class WsfPlatformPart;
26class WsfSimulation;
27#include "WsfStringId.hpp"
28
31
33{
34public:
35 WsfGroupManager() = default;
38
39 bool AddGroup(WsfGroup* aNewGroupPtr);
40
41 WsfGroup* CreateGroup(const std::string& aGroupName, const std::string& aGroupType);
42
43 WsfGroup* GetGroup(const WsfStringId aGroupId);
44
45 using GroupMap = std::map<WsfStringId, WsfGroup*>;
46
47 GroupMap& GetGroups() { return mGroups; }
48
49 bool LoadInstance(const std::string& aGroupName, WsfPlatformPart* aPlatformPartPtr);
50 bool LoadInstance(const std::string& aGroupName, WsfPlatform* aPlatformPtr);
51
52private:
53 const WsfGroupTypes& GetTypes() const;
54
55 WsfSimulation* mSimPtr{nullptr};
56 GroupMap mGroups;
57};
58
59#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfGroupManager.hpp:33
WsfGroup * GetGroup(const WsfStringId aGroupId)
Return the group that matches the given group id.
Definition WsfGroupManager.cpp:88
bool AddGroup(WsfGroup *aNewGroupPtr)
Adds the given group to the group list.
Definition WsfGroupManager.cpp:48
WsfGroup * CreateGroup(const std::string &aGroupName, const std::string &aGroupType)
Create a new group.
Definition WsfGroupManager.cpp:65
std::map< WsfStringId, WsfGroup * > GroupMap
Definition WsfGroupManager.hpp:45
GroupMap & GetGroups()
Definition WsfGroupManager.hpp:47
WsfGroupManager()=default
Definition WsfGroupTypes.hpp:21
A class to support the concept of 'groups' and 'group membership'.
Definition WsfGroup.hpp:30
Definition WsfPlatformPart.hpp:61
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Copyrights Multiple, All Rights Reserved