ADTF  3.18.2
ddlcomplex.h
Go to the documentation of this file.
1 
7 #ifndef _DDLCOMPLEX_H_INCLUDED_
8 #define _DDLCOMPLEX_H_INCLUDED_
9 
11 
12 namespace adtf_ddl
13 {
14 
15  class cDDLElement;
16  class cDDLAlignment;
17 
21  typedef std::vector<cDDLElement*> tDDLElementVec;
25  typedef tDDLElementVec::iterator tDDLElementIt;
29  typedef tDDLElementVec::const_iterator tDDLElementItConst;
30 
34  class cDDLComplex : public IDDLDataType
35  {
36  public:
40  PKG_ADTF_DDL_DEPRECATED("Use ddl::dd::StructType instead.")
42 
53  PKG_ADTF_DDL_DEPRECATED("Use ddl::dd::StructType instead.")
54  cDDLComplex(const A_UTILS_NS::cString& strName,
55  unsigned int const uiVersion,
56  const A_UTILS_NS::cString& strComment = A_UTILS_NS::cString::Empty,
57  cDDLAlignment::tAlignment const eAlignment = cDDLAlignment::e1,
58  tDDLElementVec vecDDLElements = tDDLElementVec(),
59  int const nCreationLevel = 1,
60  double fLanguageVersion = cDDLVersionHelper::GetDefaultVersion());
61 
67 
71  virtual ~cDDLComplex();
72 
73  tResult Accept(IDDLVisitor *poVisitor);
74 
75  const A_UTILS_NS::cString& GetName() const;
76 
83  void SetName(const A_UTILS_NS::cString& strName );
84 
85 
86  bool IsInitialized() const;
87 
88  bool IsPredefined() const;
89  bool IsOverwriteable() const;
90 
91  int GetCreationLevel() const;
92 
103  tResult Create(const A_UTILS_NS::cString& strName,
104  unsigned int const uiVersion,
105  const A_UTILS_NS::cString& strComment = A_UTILS_NS::cString::Empty,
106  cDDLAlignment::tAlignment const eAlignment = cDDLAlignment::e1,
107  tDDLElementVec vecDDLElements = tDDLElementVec(),
108  int const nCreationLevel = 1);
109 
114  unsigned int GetVersion() const;
115 
122  void SetVersion(unsigned int const uiVersion);
123 
128  double GetDDLVersion() const;
129 
136  tResult SetDDLVersion(double const fLanguageVersion);
137 
144  void SetComment(const A_UTILS_NS::cString& strComment);
145 
151 
158  void SetAlignment(cDDLAlignment::tAlignment const eAlignment);
159 
166  void CloneElements(tDDLElementVec vecDDLElements);
167 
174  void RefElements(tDDLElementVec vecDDLElements);
175 
183  void AddElement(cDDLElement* poElement, int nPos = -1);
184 
190  tResult RemoveElement(const A_UTILS_NS::cString& strElementName);
191 
196  const tDDLElementVec& GetElements() const;
197 
203 
208  cDDLAlignment::tAlignment GetAlignment() const;
209 
210  private:
213  A_UTILS_NS::cString m_strName;
214  unsigned int m_uiVersion;
215  A_UTILS_NS::cString m_strComment;
216  cDDLAlignment::tAlignment m_eAlignment;
217  tDDLElementVec m_vecDDLElements;
218 
219  bool m_bInitFlag;
220  int m_nLevel;
221  };
222 
223 } // namespace adtf_ddl
224 
225 #endif // _COMPLEX_H_INCLUDED_
Common interface for DDL datatypes.
Abstract base class/interface for Visitor design-pattern.
Abstract wrapper class for the alignment enumeration.
Definition: ddlalignment.h:16
Representation for a complex datatype inside a DDL specification.
Definition: ddlcomplex.h:35
void CloneElements(tDDLElementVec vecDDLElements)
Setter for the element vector.
const A_UTILS_NS::cString & GetName() const
Getter for the name of the representation object.
cDDLAlignment::tAlignment GetAlignment() const
Getter for the alignment of the complex datatype.
tResult RemoveElement(const A_UTILS_NS::cString &strElementName)
removal for an element.
double m_fLanguageVersion
The DDL Version this structure was created in.
Definition: ddlcomplex.h:212
void SetAlignment(cDDLAlignment::tAlignment const eAlignment)
Setter for the alignment.
void RefElements(tDDLElementVec vecDDLElements)
Setter for the element vector.
unsigned int GetVersion() const
Getter for the version.
A_UTILS_NS::cString GetComment() const
Getter for the comment.
double GetDDLVersion() const
Getter for the DDL version.
const tDDLElementVec & GetElements() const
Getter for the elements.
bool IsInitialized() const
Getter for the initialization flag.
tResult SetDDLVersion(double const fLanguageVersion)
Setter for the DDL version.
int GetCreationLevel() const
Getter for the creation level.
void SetVersion(unsigned int const uiVersion)
Setter for the version.
bool IsPredefined() const
Getter for the predefinition flag.
void SetComment(const A_UTILS_NS::cString &strComment)
Setter for the comment.
tResult Create(const A_UTILS_NS::cString &strName, unsigned int const uiVersion, const A_UTILS_NS::cString &strComment=A_UTILS_NS::cString::Empty, cDDLAlignment::tAlignment const eAlignment=cDDLAlignment::e1, tDDLElementVec vecDDLElements=tDDLElementVec(), int const nCreationLevel=1)
Creation method to fill the object with data.
tResult Accept(IDDLVisitor *poVisitor)
Acceptance method for Visitor design-pattern.
void SetName(const A_UTILS_NS::cString &strName)
Setter for the name of the complex datatype.
bool IsOverwriteable() const
Getter for the predefinition flag.
void AddElement(cDDLElement *poElement, int nPos=-1)
Adder for an element.
Representation of an element inside a struct in DDL a description.
Definition: ddlelement.h:19
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
Definition: d_ptr.h:11
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
Definition: string.h:2778
Namespace for the mainpage_pkg_ddl.
tDDLElementVec::iterator tDDLElementIt
Iterator type for tDDLElementVec.
Definition: ddlcomplex.h:25
std::vector< cDDLElement * > tDDLElementVec
Container type of cDDLElement objects.
Definition: ddlcomplex.h:16
tDDLElementVec::const_iterator tDDLElementItConst
Constant-iterator type for tDDLElementVec.
Definition: ddlcomplex.h:29
datamodel::StructType StructType
Reuse of datamodel structtype class - ddl::dd::datamodel::StructType.
Definition: dd.h:54
@ e1
Default alignment.
Copyright © Audi Electronics Venture GmbH.
#define PKG_ADTF_DDL_DEPRECATED(_depr_message_)
Mark a function or variable as deprecated.