WSF
InputBlock.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 2019 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 INPUTBLOCK_HPP
13#define INPUTBLOCK_HPP
14
15#include "usmtf_export.h"
16
17#include <vector>
18
20
21namespace usmtf
22{
38class USMTF_EXPORT InputBlock
39{
40public:
41 InputBlock(const std::string& aHeader,
42 const std::string& aName,
43 const bool aExcludeFooter = false,
44 const bool aIgnoreNesting = false);
46 void AddProperty(const InputBlockProperty& aProp) noexcept;
48 void AddBlock(const InputBlock& aBlock) noexcept;
50 const std::string GetBlock(unsigned nesting = 0) const noexcept;
52 const std::vector<InputBlockProperty>& GetProperties() const noexcept;
53
54private:
55 const std::string BuildIndention(unsigned nesting) const noexcept;
56 std::vector<InputBlockProperty> mProperties;
57 std::vector<InputBlock> mNestedBlocks;
58 const std::string mHeader;
59 const std::string mName;
60 const std::string mFooter;
61 bool mIgnoreNesting;
62};
63} // namespace usmtf
64
65#endif
Definition InputBlockProperty.hpp:36
const std::string GetBlock(unsigned nesting=0) const noexcept
Return the constructed string complete with nesting space.
Definition InputBlock.cpp:26
InputBlock(const std::string &aHeader, const std::string &aName, const bool aExcludeFooter=false, const bool aIgnoreNesting=false)
Definition InputBlock.cpp:18
const std::vector< InputBlockProperty > & GetProperties() const noexcept
Grab the vector of input properties.
Definition InputBlock.cpp:79
void AddProperty(const InputBlockProperty &aProp) noexcept
Add an attribute to a block.
Definition InputBlock.cpp:51
void AddBlock(const InputBlock &aBlock) noexcept
Add a nested block.
Definition InputBlock.cpp:56
Definition Acmid.cpp:17
Copyrights Multiple, All Rights Reserved