Skip to content

Commit

Permalink
[ADDITIVE] Add new std memory array to field. Update memory array val…
Browse files Browse the repository at this point in the history
…idation.
  • Loading branch information
hagantsa committed Jul 24, 2023
1 parent b3ed700 commit 523cab9
Show file tree
Hide file tree
Showing 29 changed files with 963 additions and 654 deletions.
17 changes: 17 additions & 0 deletions IPXACTmodels/Component/Field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <IPXACTmodels/common/Parameter.h>
#include <IPXACTmodels/Component/EnumeratedValue.h>
#include <IPXACTmodels/Component/WriteValueConstraint.h>
#include <IPXACTmodels/Component/MemoryArray.h>

//-----------------------------------------------------------------------------
// Function: Field::Field()
Expand Down Expand Up @@ -154,6 +155,22 @@ void Field::setIsPresent(QString const& newIsPresent)
isPresent_ = newIsPresent;
}

//-----------------------------------------------------------------------------
// Function: Field::getMemoryArray()
//-----------------------------------------------------------------------------
QSharedPointer<MemoryArray> Field::getMemoryArray() const
{
return memoryArray_;
}

//-----------------------------------------------------------------------------
// Function: Field::setMemoryArray()
//-----------------------------------------------------------------------------
void Field::setMemoryArray(QSharedPointer<MemoryArray> memArray)
{
memoryArray_ = memArray;
}

//-----------------------------------------------------------------------------
// Function: Field::getBitOffset()
//-----------------------------------------------------------------------------
Expand Down
18 changes: 18 additions & 0 deletions IPXACTmodels/Component/Field.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
class Parameter;
class EnumeratedValue;
class WriteValueConstraint;
class MemoryArray;

//-----------------------------------------------------------------------------
//! Describes the ipxact:field element.
Expand Down Expand Up @@ -91,6 +92,20 @@ class IPXACTMODELS_EXPORT Field : public NameGroup, public Extendable
*/
void setIsPresent(QString const& newIsPresent);

/*!
* Get the memory array of the field.
*
* @return The field's memory array.
*/
QSharedPointer<MemoryArray> getMemoryArray() const;

/*!
* Set the field's memory array.
*
* @param [in] memArray Description
*/
void setMemoryArray(QSharedPointer<MemoryArray> memArray);

/*!
* Get the bit offset.
*
Expand Down Expand Up @@ -366,6 +381,9 @@ class IPXACTMODELS_EXPORT Field : public NameGroup, public Extendable
//! The presence of the field.
QString isPresent_;

//! The field's memory array.
QSharedPointer<MemoryArray> memoryArray_;

//! Describes the offset where this bit field starts.
QString bitOffset_;

Expand Down
158 changes: 76 additions & 82 deletions IPXACTmodels/Component/FieldReader.cpp

Large diffs are not rendered by default.

Loading

0 comments on commit 523cab9

Please sign in to comment.