WSF
WsfGroupList.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 WSFGROUPLIST_HPP
13#define WSFGROUPLIST_HPP
14
15#include "wsf_export.h"
16
17#include <vector>
18
19class UtInput;
20class WsfGroup;
21class WsfGroupManager;
22class WsfPlatform;
23class WsfPlatformPart;
24class WsfSimulation;
25#include "WsfStringId.hpp"
26
28
30{
31public:
32 typedef std::vector<WsfStringId> GroupList;
33
35 WsfGroupList(const WsfGroupList& aSrc);
37 ~WsfGroupList() = default;
38
39 const GroupList& GetGroupList() const { return mGroups; }
40
41 bool Initialize(WsfPlatform* aPlatformPtr);
42 bool Initialize(WsfPlatformPart* aPlatformPartPtr);
43
44 bool ProcessInput(UtInput& aInput, WsfPlatform* aPlatformPtr);
45 bool ProcessInput(UtInput& aInput, WsfPlatformPart* aPlatformPartPtr);
46
47 void LeaveAllGroups();
48
49 void JoinGroup(WsfGroup* aGroupPtr, size_t aPlatformIndex, unsigned int aPlatformPartId = 0);
50
51 void LeaveGroup(WsfGroup* aGroupPtr, size_t aPlatformIndex, unsigned int aPlatformPartId = 0);
52
53 bool IsGroupMember(WsfStringId aGroupId) const;
54
55private:
56 bool ProcessInput(UtInput& aInput);
57
58 void JoinGroup(WsfStringId aGroupId);
59 void JoinGroup(WsfGroup* aGroupPtr);
60
61 void LeaveGroup(WsfStringId aGroupId);
62 void LeaveGroup(WsfGroup* aGroupPtr);
63
64 GroupList mGroups;
65 std::vector<WsfStringId> mGroupsToJoin;
66 std::vector<WsfStringId> mGroupsToLeave;
67 WsfGroupManager* mGroupManagerPtr;
68};
69
70#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
~WsfGroupList()=default
WsfGroupList & operator=(const WsfGroupList &)=delete
std::vector< WsfStringId > GroupList
Definition WsfGroupList.hpp:32
WsfGroupList()
Definition WsfGroupList.cpp:29
const GroupList & GetGroupList() const
Definition WsfGroupList.hpp:39
Definition WsfGroupManager.hpp:33
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