WSF
WsfConstellationManager.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 2020 Infoscitex, a DCS 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 WSFCONSTELLATIONMANAGER_HPP
13#define WSFCONSTELLATIONMANAGER_HPP
14
15#include <map>
16#include <memory>
17#include <string>
18#include <vector>
19
20class WsfSimulation;
21#include "WsfConstellation.hpp"
23
26{
27public:
29 ~WsfConstellationManager() override = default;
30
31 bool AddConstellation(std::unique_ptr<WsfConstellation> aConstellationPtr);
32 WsfConstellation* FindConstellation(const std::string& aConstellationName) const;
33 std::vector<WsfConstellation*> GetConstellations() const;
34
35 static WsfConstellationManager& Get(const WsfSimulation* aSimulation);
36
37 constexpr static const char* cEXTENSION_NAME{"wsf_constellation_manager"};
38
39private:
40 std::map<std::string, std::unique_ptr<WsfConstellation>> mConstellations{};
41};
42
43#endif // WSFCONSTELLATIONMANAGER_HPP
~WsfConstellationManager() override=default
bool AddConstellation(std::unique_ptr< WsfConstellation > aConstellationPtr)
Definition WsfConstellationManager.cpp:25
static WsfConstellationManager & Get(const WsfSimulation *aSimulation)
Accessor to get a handle to the instance of this extension for the given aSimulation.
Definition WsfConstellationManager.cpp:64
WsfConstellationManager()=default
WsfConstellation * FindConstellation(const std::string &aConstellationName) const
Definition WsfConstellationManager.cpp:41
static constexpr const char * cEXTENSION_NAME
Definition WsfConstellationManager.hpp:37
std::vector< WsfConstellation * > GetConstellations() const
Return the constellations defined in the current simulation.
Definition WsfConstellationManager.cpp:53
Definition WsfConstellation.hpp:25
WsfSimulationExtension()
Definition WsfSimulationExtension.cpp:23
friend class WsfSimulation
Definition WsfSimulationExtension.hpp:43
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Copyrights Multiple, All Rights Reserved