ADTF  3.18.2
ddlelement.h
Go to the documentation of this file.
1 
7 #ifndef _DDLELEMENT_H_INCLUDED_
8 #define _DDLELEMENT_H_INCLUDED_
9 
10 namespace adtf_ddl
11 {
12  class cDDLByteorder;
13  class cDDLAlignment;
14 
19  {
20  public:
25 
53  const A_UTILS_NS::cString& strName,
54  unsigned int const uiBytepos,
55  unsigned int const uiArraysize,
56  cDDLByteorder::tByteorder const eByteorder,
57  cDDLAlignment::tAlignment const eAlignment,
58  IDDLUnit* poUnit = NULL,
59  unsigned int const uiBitpos = 0,
60  unsigned int const uiNumBits = 0,
61  const A_UTILS_NS::cString& strDescription = A_UTILS_NS::cString::Empty,
63  const A_UTILS_NS::cString& strArraySizeSource = A_UTILS_NS::cString::Empty,
65  bool const bMinValid = false,
67  bool const bMaxValid = false,
69  bool const bDefaultValid = false,
70  const A_UTILS_NS::cString& strDefaultValue = A_UTILS_NS::cString::Empty,
71  bool const bScaleValid = false,
72  const A_UTILS_NS::cString& strScaleValue = A_UTILS_NS::cString::Empty,
73  bool const bOffsetValid = false,
74  const A_UTILS_NS::cString& strOffsetValue = A_UTILS_NS::cString::Empty);
75 
81 
85  virtual ~cDDLElement();
86 
90  tResult Accept(IDDLVisitor *poVisitor);
91 
95  bool IsInitialized() const;
96 
97  /* tResult Serialize(void const *pvDeSerData,
98  size_t const &szSizeDeSerInByte,
99  size_t const &szAlignedOffsetInByte,
100  void *pvSerData,
101  size_t const &szSizeSerInByte,
102  size_t const &szOffsetInBit);
103 
104  tResult Deserialize(void *pvDeSerData,
105  size_t const &szSizeDeSerInByte,
106  size_t const &szAlignedOffsetInByte,
107  void const *pvSerData,
108  size_t const &szSizeSerInByte,
109  size_t const &szOffsetInBit);
110 
111  size_t GetSize() const;*/
112 
116  bool IsPredefined() const;
117 
121  int GetCreationLevel() const;
122 
151  const A_UTILS_NS::cString& strName,
152  unsigned int const uiBytepos,
153  unsigned int const uiArraysize,
154  cDDLByteorder::tByteorder const eByteorder,
155  cDDLAlignment::tAlignment const eAlignment,
156  IDDLUnit* poUnit,
157  unsigned int const uiBitpos = 0, unsigned int const uiNumBits = 0,
158  const A_UTILS_NS::cString& strDescription = A_UTILS_NS::cString::Empty,
160  const A_UTILS_NS::cString& strArraySizeSource = A_UTILS_NS::cString::Empty,
162  bool const bMinValid = false,
163  const A_UTILS_NS::cString& strMinValue = A_UTILS_NS::cString::Empty,
164  bool const bMaxValid = false,
165  const A_UTILS_NS::cString& strMaxValue = A_UTILS_NS::cString::Empty,
166  bool const bDefaultValid = false,
167  const A_UTILS_NS::cString& strDefaultValue = A_UTILS_NS::cString::Empty,
168  bool const bScaleValid = false,
169  const A_UTILS_NS::cString& strScaleValue = A_UTILS_NS::cString::Empty,
170  bool const bOffsetValid = false,
171  const A_UTILS_NS::cString& strOffsetValue = A_UTILS_NS::cString::Empty);
172 
177  const A_UTILS_NS::cString& GetType() const;
178 
185  void SetType(IDDLDataType* const pType);
186 
192 
197  const A_UTILS_NS::cString& GetName() const;
198 
205  void SetName(const A_UTILS_NS::cString& strName);
206 
211  unsigned int GetBytepos() const;
212 
219  void SetBytepos(unsigned int const uiBytePos);
220 
221 
226  unsigned int GetArraysize() const;
227 
234  void SetArraysize(unsigned int const uiArraySize);
235 
241 
248  void SetByteorder(cDDLByteorder::tByteorder const eByteOrder);
249 
255 
263 
270  void SetBitpos(unsigned int const uiBitpos);
271 
276  unsigned int GetBitpos() const;
277 
284  void SetNumBits(unsigned int const uiNumBits);
285 
290  unsigned int GetNumBits() const;
291 
298  void SetDescription(const A_UTILS_NS::cString& strDescription);
299 
305 
312  void SetUnit(IDDLUnit* poUnit);
313 
318  const A_UTILS_NS::cString& GetUnit() const;
319 
325 
332  void SetComment(const A_UTILS_NS::cString& strComment);
333 
339 
345 
352  void SetArraySizeSource(const A_UTILS_NS::cString& strArraySizeSource);
353 
354 
360 
367  void SetConstantValue(const A_UTILS_NS::cString& strConstantValue);
368 
373  bool IsDynamic() const;
374 
382  void SetMinValidity (bool const bMinValid);
383 
389  bool IsMinValid () const;
390 
397 
406 
414  void SetMaxValidity (bool const bMaxValid);
415 
421  bool IsMaxValid () const;
422 
429 
438 
446  void SetDefaultValidity (bool const bDefaultValid);
447 
453  bool IsDefaultValid () const;
454 
461 
470 
478  void SetScaleValidity (bool const bScaleValid);
479 
485  bool IsScaleValid () const;
486 
493 
501  tResult SetScaleValue (const A_UTILS_NS::cString& strScaleValue);
502 
510  void SetOffsetValidity (bool const bOffsetValid);
511 
517  bool IsOffsetValid () const;
518 
525 
533  tResult SetOffsetValue (const A_UTILS_NS::cString& strOffsetValue);
534 
535  private:
536  IDDLDataType * m_poType;
537  A_UTILS_NS::cString m_strName;
538  unsigned int m_uiBytepos;
539  unsigned int m_uiBitpos;
540  unsigned int m_uiNumBits;
541  A_UTILS_NS::cString m_strDescription;
542  unsigned int m_uiArraysize;
543  A_UTILS_NS::cString m_strArraySizeSource;
544  A_UTILS_NS::cString m_strConstantValue;
545  IDDLUnit * m_poUnit;
546  cDDLByteorder::tByteorder m_eByteorder;
547  cDDLAlignment::tAlignment m_eAlignment;
548  A_UTILS_NS::cString m_strComment;
549  bool m_bInitFlag;
550 
551  bool m_bMinValid;
552  A_UTILS_NS::cString m_strMinValue;
553  bool m_bMaxValid;
554  A_UTILS_NS::cString m_strMaxValue;
555  bool m_bDefaultValid;
556  A_UTILS_NS::cString m_strDefaultValue;
557  bool m_bScaleValid;
558  A_UTILS_NS::cString m_strScaleValue;
559  bool m_bOffsetValid;
560  A_UTILS_NS::cString m_strOffsetValue;
561  };
562 } // namespace adtf_ddl
563 
564 #endif // _DDLELEMENT_H_INCLUDED_
static const _myType Empty
Internally used empty string.
Definition: string.h:54
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.
tAlignment
Representation of the alignment enumeration.
Definition: ddlalignment.h:22
tByteorder
Representation of the byteorder enumeration.
Definition: ddlbyteorder.h:22
Representation of an element inside a struct in DDL a description.
Definition: ddlelement.h:19
const A_UTILS_NS::cString & GetOffsetValue() const
Getter for the offset value.
const A_UTILS_NS::cString & GetName() const
Getter for the name.
tResult SetMaxValue(const A_UTILS_NS::cString &strMaxVal)
Setter for the maximum value of the data type.
void SetOffsetValidity(bool const bOffsetValid)
Setter for the validity flag for the offset value.
void SetArraySizeSource(const A_UTILS_NS::cString &strArraySizeSource)
Setter for the array size source.
cDDLAlignment::tAlignment GetAlignment() const
Getter for the alignment.
void SetByteorder(cDDLByteorder::tByteorder const eByteOrder)
Setter for the byte order of the element.
cDDLByteorder::tByteorder GetByteorder() const
Getter for the byteorder.
void SetMinValidity(bool const bMinValid)
Setter for the validity flag for the minimum value.
const A_UTILS_NS::cString & GetDefaultValue() const
Getter for the default value.
unsigned int GetBytepos() const
Getter for the b byte position.
void SetNumBits(unsigned int const uiNumBits)
Setter for the amount of bits.
void SetAlignment(cDDLAlignment::tAlignment const eAlign)
Setter for the alignment of the element.
void SetUnit(IDDLUnit *poUnit)
Setter for the unit reference.
bool IsInitialized() const
Getter for the initialization flag.
const A_UTILS_NS::cString & GetScaleValue() const
Getter for the scaling value.
const A_UTILS_NS::cString & GetComment() const
Getter for the comment.
unsigned int GetNumBits() const
Getter for the amount of bits.
int GetCreationLevel() const
Getter for the creation level.
void SetArraysize(unsigned int const uiArraySize)
Setter for the array size of the element.
unsigned int GetArraysize() const
Getter for the array size.
cDDLElement(IDDLDataType *poType, const A_UTILS_NS::cString &strName, unsigned int const uiBytepos, unsigned int const uiArraysize, cDDLByteorder::tByteorder const eByteorder, cDDLAlignment::tAlignment const eAlignment, IDDLUnit *poUnit=NULL, unsigned int const uiBitpos=0, unsigned int const uiNumBits=0, const A_UTILS_NS::cString &strDescription=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strComment=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strArraySizeSource=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strValue=A_UTILS_NS::cString::Empty, bool const bMinValid=false, const A_UTILS_NS::cString &strMinValue=A_UTILS_NS::cString::Empty, bool const bMaxValid=false, const A_UTILS_NS::cString &strMaxValue=A_UTILS_NS::cString::Empty, bool const bDefaultValid=false, const A_UTILS_NS::cString &strDefaultValue=A_UTILS_NS::cString::Empty, bool const bScaleValid=false, const A_UTILS_NS::cString &strScaleValue=A_UTILS_NS::cString::Empty, bool const bOffsetValid=false, const A_UTILS_NS::cString &strOffsetValue=A_UTILS_NS::cString::Empty)
CTOR.
void SetScaleValidity(bool const bScaleValid)
Setter for the validity flag for the scaling value.
bool IsDefaultValid() const
Getter for the validity flag for the default value.
void SetBytepos(unsigned int const uiBytePos)
Setter for the byte position of the element.
void SetType(IDDLDataType *const pType)
Setter for the type of the element.
tResult SetMinValue(const A_UTILS_NS::cString &strMinVal)
Setter for the minimum value of the data type.
tResult SetScaleValue(const A_UTILS_NS::cString &strScaleValue)
Setter for the scaling value.
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 A_UTILS_NS::cString & GetArraySizeSource() const
Getter for the array size source.
IDDLUnit * GetUnitObject() const
Getter for the unit object.
bool IsScaleValid() const
Getter for the validity flag for the scaling value.
bool IsPredefined() const
Getter for the predefinition flag.
bool IsMinValid() const
Getter for the validity flag for the minimum value.
void SetConstantValue(const A_UTILS_NS::cString &strConstantValue)
Setter value of a constant element.
void SetComment(const A_UTILS_NS::cString &strComment)
Setter for the comment.
IDDLDataType * GetTypeObject() const
Getter for the data-type object.
void SetDescription(const A_UTILS_NS::cString &strDescription)
Setter for the description.
void SetDefaultValidity(bool const bDefaultValid)
Setter for the validity flag for the default value.
cDDLElement()
Default CTOR.
tResult Accept(IDDLVisitor *poVisitor)
Acceptance method for Visitor design-pattern.
void SetName(const A_UTILS_NS::cString &strName)
Setter for the name of the element.
bool IsDynamic() const
Checks if element is dynamic.
const A_UTILS_NS::cString & GetUnit() const
Getter for the unit name.
const A_UTILS_NS::cString & GetType() const
Getter for the data-type name.
tResult SetOffsetValue(const A_UTILS_NS::cString &strOffsetValue)
Setter for the offset value.
virtual ~cDDLElement()
DTOR.
bool IsMaxValid() const
Getter for the validity flag for the maximum value.
void SetBitpos(unsigned int const uiBitpos)
Setter for the bit position.
const A_UTILS_NS::cString & GetDescription() const
Getter for the description.
bool IsOffsetValid() const
Getter for the validity flag for the offset value.
unsigned int GetBitpos() const
Getter for the bit position.
tResult Create(IDDLDataType *poType, const A_UTILS_NS::cString &strName, unsigned int const uiBytepos, unsigned int const uiArraysize, cDDLByteorder::tByteorder const eByteorder, cDDLAlignment::tAlignment const eAlignment, IDDLUnit *poUnit, unsigned int const uiBitpos=0, unsigned int const uiNumBits=0, const A_UTILS_NS::cString &strDescription=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strComment=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strArraySizeSource=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strValue=A_UTILS_NS::cString::Empty, bool const bMinValid=false, const A_UTILS_NS::cString &strMinValue=A_UTILS_NS::cString::Empty, bool const bMaxValid=false, const A_UTILS_NS::cString &strMaxValue=A_UTILS_NS::cString::Empty, bool const bDefaultValid=false, const A_UTILS_NS::cString &strDefaultValue=A_UTILS_NS::cString::Empty, bool const bScaleValid=false, const A_UTILS_NS::cString &strScaleValue=A_UTILS_NS::cString::Empty, bool const bOffsetValid=false, const A_UTILS_NS::cString &strOffsetValue=A_UTILS_NS::cString::Empty)
Creation method to fill the obejct with data.
const A_UTILS_NS::cString & GetConstantValue() const
Getter for the value of a constant element.
cDDLElement(cDDLElement &oElem)
Copy CTOR.
tResult SetDefaultValue(const A_UTILS_NS::cString &strDefaultVal)
Setter for the default value.
Namespace for the mainpage_pkg_ddl.