okteta
taggeduniondatainformation.cpp
Go to the documentation of this file.
48 TaggedUnionDataInformation::TaggedUnionDataInformation(const QString& name, DataInformation* parent)
54 : DataInformationWithChildren(d), mDefaultFields(cloneList(d.mDefaultFields, this)), mLastIndex(-1)
73 void TaggedUnionDataInformation::setAlternatives(const QVector<FieldInfo>& alternatives, bool emitSignal)
131 logError() << "Alternative number" << i << "is not valid. SelectIf is number, but there is not exactly one child!";
136 logError() << "Alternative number" << i << "is not valid. SelectIf is number, but only child is not primitive!";
Interface that must be implemented by all datatypes.
Definition: datainformation.h:67
virtual bool replaceChildAt(unsigned int index, DataInformation *newChild)
replaces child at index with newChild.
Definition: taggeduniondatainformation.cpp:235
could it be useful to hide the data access behind an iterator? * class KDataBufferIterator { public: ...
Definition: abstractbytearraymodel.h:79
TopLevelDataInformation * topLevelDataInformation() const
Definition: datainformation.cpp:240
virtual DataInformation * childAt(unsigned int index) const
Definition: taggeduniondatainformation.cpp:263
void _childCountAboutToChange(DataInformation *sender, uint oldCount, uint newCount)
Definition: topleveldatainformation.h:184
void _childCountChanged(DataInformation *sender, uint oldCount, uint newCount)
Definition: topleveldatainformation.h:192
QVector< DataInformation * > mChildren
Definition: datainformationwithchildren.h:32
Holds a number that was converted either from a QScriptValue or a QString.
Definition: parserutils.h:84
virtual BitCount32 size() const
the size in bits of this element
Definition: taggeduniondatainformation.cpp:224
virtual ~TaggedUnionDataInformation()
Definition: taggeduniondatainformation.cpp:39
Definition: scriptvalueconverter.h:30
A class holding the data of a struct for Okteta.
Definition: taggeduniondatainformation.h:31
virtual unsigned int childCount() const
Definition: taggeduniondatainformation.cpp:275
virtual qint64 readData(Okteta::AbstractByteArrayModel *input, Okteta::Address address, BitCount64 bitsRemaining, quint8 *bitOffset)
Reads the necessary data from input and returns the number of bytes read.
Definition: taggeduniondatainformation.cpp:146
QScriptValue callFunction(QScriptValue func, DataInformation *data, ScriptHandlerInfo::Mode mode)
Definition: scripthandler.cpp:162
virtual bool isTopLevel() const =0
virtual int indexOf(const DataInformation *const data) const
Find the index of a DataInformation in this object, needed to calculate the row.
Definition: taggeduniondatainformation.cpp:243
static bool readChildren(const QVector< DataInformation * > children, Okteta::AbstractByteArrayModel *input, Okteta::Address address, BitCount64 bitsRemaining, quint8 *bitOffset, qint64 *readBitsPtr, TopLevelDataInformation *top)
Definition: structuredatainformation.cpp:71
virtual BitCount64 childPosition(const DataInformation *child, Okteta::Address start) const
Definition: taggeduniondatainformation.cpp:187
virtual QVariant data(int column, int role) const
get the necessary data (for the model)
Definition: datainformation.cpp:156
If selector is a function and it evaluates to true these fields are chosen.
Definition: taggeduniondatainformation.h:39
DataInformation * asDataInformation()
Definition: datainformationbase.h:107
ScriptHandler * scriptHandler() const
Definition: topleveldatainformation.h:179
TaggedUnionDataInformation(const QString &name, DataInformation *parent=0)
Definition: taggeduniondatainformation.cpp:48
QVector< DataInformation * > fields
Definition: taggeduniondatainformation.h:47
static QVector< DataInformation * > cloneList(const QVector< DataInformation * > &other, DataInformation *parent)
Definition: datainformationwithchildren.cpp:255
virtual BitCount64 childPosition(const DataInformation *child, Okteta::Address start) const =0
ParsedNumber< quint64 > uint64FromScriptValue(const QScriptValue &val)
Definition: parserutils.cpp:120
void setAlternatives(const QVector< FieldInfo > &alternatives, bool emitSignal)
Definition: taggeduniondatainformation.cpp:73
void appendDefaultField(DataInformation *field, bool emitSignal)
Definition: taggeduniondatainformation.cpp:63
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.