OTX-Runtime for C++  
Structure.h
1 #ifndef OpenTestSystem_Otx_Runtime_Api_DataTypes_Structure_H
2 #define OpenTestSystem_Otx_Runtime_Api_DataTypes_Structure_H
3 #include "Object.h"
4 #include <vector>
5 #include <memory>
6 
7 #include "Otx/Signature/IStructureSignature.h"
9 
10 namespace OpenTestSystem { namespace Otx { namespace Runtime { namespace Api { namespace Otx {
11  class IDocument;
12 }}}}}
13 
14 namespace OpenTestSystem {
15  namespace Otx {
16  namespace Runtime {
17  namespace Api {
18  namespace DataTypes {
19  class StructureElement;
23  class API_EXPORTS Structure :
24  public IStructureSignature,
25  public Object
26  {
27  private:
28  std::string _signature;
29  std::string _name;
30  std::string _specification;
31  std::weak_ptr<Otx::IDocument> _document;
32 
33  const std::vector<std::shared_ptr<StructureElement>> _elements;
34  std::string GetNameFromFullName(std::string fullName);
35  public:
44  const std::string &signature,
45  std::vector<std::shared_ptr<StructureElement>> elements,
46  std::shared_ptr<Otx::IDocument> document = nullptr,
47  std::string specification = "");
48 
49  virtual ~Structure();
50 
55  const std::vector<std::shared_ptr<StructureElement>>& GetElements() override;
56 
61  std::string GetSignature() const;
62 
67  std::string ToLiteralString() const override;
68 
69  std::string GetName() override;
70  std::string GetFullName() override;
71  std::string GetSpecification() override;
72  std::shared_ptr<Otx::IDocument> GetDocument() override;
73  };
74  };
75  }
76  }
77  }
78 }
79 #endif
Represents base of OTX DataTypes.
Definition: Object.h:17
Represents OTX Structure DataType.
Definition: Structure.h:26
std::shared_ptr< Otx::IDocument > GetDocument() override
Gets Document that contains the Signature.
std::string ToLiteralString() const override
Gets literal string.
std::string GetSpecification() override
Gets Signature specification.
Structure(const std::string &signature, std::vector< std::shared_ptr< StructureElement >> elements, std::shared_ptr< Otx::IDocument > document=nullptr, std::string specification="")
Initializes a new instance of the Structure class.
const std::vector< std::shared_ptr< StructureElement > > & GetElements() override
Gets all elements.
std::string GetName() override
Gets Signature name.
std::string GetFullName() override
Gets Signature full name.
std::string GetSignature() const
Gets full name of structure signature.
Represents an OTX Structure Signature.
Definition: IStructureSignature.h:19
Namespace for browsing at OTX signatures.
Definition: IDocument.h:18
Namespace containing all objects related to testing inside automotive industry