ADTF  3.18.2
ddldatatype.h
Go to the documentation of this file.
1 
7 #ifndef _DDLDATATYPE_H_INCLUDED_
8 #define _DDLDATATYPE_H_INCLUDED_
9 
11 
12 namespace adtf_ddl
13 {
14 
18  class cDDLDataType : public IDDLDataType
19  {
20  public:
24  PKG_ADTF_DDL_DEPRECATED("Use ddl::dd::DataType instead.")
26 
43  PKG_ADTF_DDL_DEPRECATED("Use ddl::dd::DataType instead.")
44  cDDLDataType(const A_UTILS_NS::cString& strName,
45  unsigned int const uiSize,
46  IDDLUnit* poUnit = NULL,
47  const A_UTILS_NS::cString& strDescription = A_UTILS_NS::cString::Empty,
48  cDDLAlignment::tAlignment const eAlignment = cDDLAlignment::e1,
49  unsigned int const uiArraysize = 1,
50  int const nCreationLevel = 1,
51  const A_UTILS_NS::cString& strArraySizeSource = A_UTILS_NS::cString::Empty,
52  bool const bMinValid = false,
53  const A_UTILS_NS::cString& strMinVal = A_UTILS_NS::cString::Empty,
54  bool const bMaxValid = false,
55  const A_UTILS_NS::cString& strMaxVal = A_UTILS_NS::cString::Empty);
56 
62 
66  virtual ~cDDLDataType();
67 
68  tResult Accept(IDDLVisitor *poVisitor);
69 
70  bool IsPredefined() const;
71  bool IsOverwriteable() const;
72 
73  const A_UTILS_NS::cString& GetName() const;
74 
81  void SetName(const A_UTILS_NS::cString& strName);
82  int GetCreationLevel() const;
83 
84  bool IsInitialized() const;
85 
102  tResult Create(const A_UTILS_NS::cString& strName,
103  unsigned int const uiNumBits,
104  IDDLUnit* poUnit,
105  const A_UTILS_NS::cString& strDescription = A_UTILS_NS::cString::Empty,
106  cDDLAlignment::tAlignment const eAlignment = cDDLAlignment::e1,
107  unsigned int const uiArraysize = 1,
108  int const nCreationLevel = 1,
109  const A_UTILS_NS::cString& strArraySizeSource = A_UTILS_NS::cString::Empty,
110  bool const bMinValid = false,
111  const A_UTILS_NS::cString& strMinVal = A_UTILS_NS::cString::Empty,
112  bool const bMaxValid = false,
113  const A_UTILS_NS::cString& strMaxVal = A_UTILS_NS::cString::Empty);
114 
115 
122  void SetDescription(const A_UTILS_NS::cString& strDescription);
123 
129 
137  void SetArraysize(unsigned int const uiArraysize);
138 
143  unsigned int GetArraysize() const;
144 
151  void SetUnit(IDDLUnit* poUnit);
152 
158 
163  const IDDLUnit * GetUnitObject() const;
164 
170 
177  void SetAlignment(cDDLAlignment::tAlignment const eAlignment);
178 
183  cDDLAlignment::tAlignment GetAlignment() const;
184 
189  unsigned int GetNumBits() const;
190 
197  void SetNumBits(unsigned int const uiNumBits);
198 
204 
211  void SetArraySizeSource(const A_UTILS_NS::cString& strArraySizeSource);
212 
217  bool IsDynamic() const;
218 
223  double GetDDLVersion() const;
224 
231  tResult SetDDLVersion(double const fLanguageVersion);
232 
240  void SetMinValidity (bool const bMinValid);
241 
247  bool IsMinValid () const;
248 
254  const A_UTILS_NS::cString &GetMinValue () const;
255 
263  tResult SetMinValue (const A_UTILS_NS::cString& strMinVal);
264 
272  void SetMaxValidity (bool const bMaxValid);
273 
279  bool IsMaxValid () const;
280 
286  const A_UTILS_NS::cString &GetMaxValue () const;
287 
295  tResult SetMaxValue (const A_UTILS_NS::cString& strMaxVal);
296 
297  private: // methods
298  void UpdateSizesAndPositions();
299 
300  private: // members
303  A_UTILS_NS::cString m_strName;
304  unsigned int m_uiNumBits;
305  size_t m_szByteSize;
306  size_t m_szAlignedSize;
307  IDDLUnit* m_poUnit;
308  A_UTILS_NS::cString m_strDescription;
309  unsigned int m_uiArraysize;
310  A_UTILS_NS::cString m_strArraySizeSource;
311  cDDLAlignment::tAlignment m_eAlignment;
312 
313  bool m_bInitFlag;
314  int m_nLevel;
315 
316  bool m_bMinValid;
317  A_UTILS_NS::cString m_strMinVal;
318  bool m_bMaxValid;
319  A_UTILS_NS::cString m_strMaxVal;
320  bool m_bDefaultValid;
321  A_UTILS_NS::cString m_strDefaultVal;
322  };
323 
324 } // namespace adtf_ddl
325 
326 #endif // _DDLDATATYPE_H_INCLUDED_
Common interface for DDL datatypes.
Interface for unit classes of the object representation for DDL descriptions.
Definition: ddlunit_intf.h:17
Abstract base class/interface for Visitor design-pattern.
Abstract wrapper class for the alignment enumeration.
Definition: ddlalignment.h:16
Representation for a (simple) data type inside a DDL description.
Definition: ddldatatype.h:19
const A_UTILS_NS::cString & GetName() const
Getter for the name of the representation object.
tResult Create(const A_UTILS_NS::cString &strName, unsigned int const uiNumBits, IDDLUnit *poUnit, const A_UTILS_NS::cString &strDescription=A_UTILS_NS::cString::Empty, cDDLAlignment::tAlignment const eAlignment=cDDLAlignment::e1, unsigned int const uiArraysize=1, int const nCreationLevel=1, const A_UTILS_NS::cString &strArraySizeSource=A_UTILS_NS::cString::Empty, bool const bMinValid=false, const A_UTILS_NS::cString &strMinVal=A_UTILS_NS::cString::Empty, bool const bMaxValid=false, const A_UTILS_NS::cString &strMaxVal=A_UTILS_NS::cString::Empty)
Creation method to fill the object with data.
tResult SetMaxValue(const A_UTILS_NS::cString &strMaxVal)
Setter for the maximum value of the data type.
void SetArraySizeSource(const A_UTILS_NS::cString &strArraySizeSource)
Setter for the array size source.
cDDLAlignment::tAlignment GetAlignment() const
Getter for the alignment of the primitive data type.
A_UTILS_NS::cString GetUnit() const
Getter for the unit name.
void SetMinValidity(bool const bMinValid)
Setter for the validity flag for the minimum value.
double m_fLanguageVersion
The DDL Version this structure was created in.
Definition: ddldatatype.h:302
void SetAlignment(cDDLAlignment::tAlignment const eAlignment)
Setter for the alignment.
A_UTILS_NS::cString GetDescription() const
Getter for the description.
void SetNumBits(unsigned int const uiNumBits)
Setter for the size of the primitive data type.
void SetArraysize(unsigned int const uiArraysize)
Setter for the array size.
double GetDDLVersion() const
Getter for the DDL version.
void SetUnit(IDDLUnit *poUnit)
Setter for the unit.
bool IsInitialized() const
Getter for the initialization flag.
tResult SetDDLVersion(double const fLanguageVersion)
Setter for the DDL version.
unsigned int GetNumBits() const
Getter for the size of the primitive data type.
int GetCreationLevel() const
Getter for the creation level.
unsigned int GetArraysize() const
Getter for the array size.
tResult SetMinValue(const A_UTILS_NS::cString &strMinVal)
Setter for the minimum value of the data type.
void SetMaxValidity(bool const bMaxValid)
Setter for the validity flag for the maximum value.
const A_UTILS_NS::cString & GetMinValue() const
Getter for the minimum value of the data type.
const A_UTILS_NS::cString & GetMaxValue() const
Getter for the maximum value of the data type.
const IDDLUnit * GetUnitObject() const
Getter for the unit object.
bool IsPredefined() const
Getter for the predefinition flag.
bool IsMinValid() const
Getter for the validity flag for the minimum value.
void SetDescription(const A_UTILS_NS::cString &strDescription)
Setter for the description.
tResult Accept(IDDLVisitor *poVisitor)
Acceptance method for Visitor design-pattern.
void SetName(const A_UTILS_NS::cString &strName)
Setter for the name of the data type.
bool IsDynamic() const
Checks if element is dynamic.
bool IsOverwriteable() const
Getter for the predefinition flag.
bool IsMaxValid() const
Getter for the validity flag for the maximum value.
A_UTILS_NS::cString GetArraySizeSource() const
Getter for the array size source.
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.
datamodel::DataType DataType
Reuse of datamodel datatype class - ddl::dd::datamodel::DataType.
Definition: dd.h:46
@ e1
Default alignment.
Copyright © Audi Electronics Venture GmbH.
#define PKG_ADTF_DDL_DEPRECATED(_depr_message_)
Mark a function or variable as deprecated.