okteta
#include <stringdatainformation.h>
Public Types | |
enum | StringType { InvalidEncoding = -1, ASCII = 0, Latin1, UTF8, UTF16_LE, UTF16_BE, UTF32_LE, UTF32_BE } |
Public Types inherited from DataInformation | |
enum | Columns { ColumnName = 0, ColumnType, ColumnValue, COLUMN_COUNT } |
enum | DataInformationEndianess { EndianessFromSettings = 0, EndianessInherit, EndianessLittle, EndianessBig } |
Public Member Functions | |
StringDataInformation (const QString &name, StringType encoding, DataInformationBase *parent=0) | |
virtual | ~StringDataInformation () |
virtual bool | canHaveChildren () const |
virtual DataInformation * | childAt (unsigned int) const |
virtual unsigned int | childCount () const |
virtual QVariant | childData (int row, int column, int role) const |
virtual Qt::ItemFlags | childFlags (int row, int column, bool fileLoaded=true) const |
virtual BitCount64 | childPosition (const DataInformation *child, Okteta::Address start) const |
virtual BitCount32 | childSize (uint index) const |
virtual QScriptValue | childToScriptValue (uint index, QScriptEngine *engine, ScriptHandlerInfo *handlerInfo) const |
virtual QString | childTypeName (uint index) const |
virtual QWidget * | createChildEditWidget (uint index, QWidget *parent) const |
virtual QWidget * | createEditWidget (QWidget *parent) const |
virtual QVariant | data (int column, int role) const |
virtual QVariant | dataFromChildWidget (uint index, const QWidget *w) const |
virtual QVariant | dataFromWidget (const QWidget *w) const |
StringType | encoding () const |
virtual Qt::ItemFlags | flags (int column, bool fileLoaded=true) const |
virtual bool | isString () const |
uint | maxByteCount () const |
uint | maxCharCount () const |
virtual qint64 | readData (Okteta::AbstractByteArrayModel *input, Okteta::Address address, BitCount64 bitsRemaining, quint8 *bitOffset) |
virtual bool | setChildData (uint row, const QVariant &value, Okteta::AbstractByteArrayModel *out, Okteta::Address address, BitCount64 bitsRemaining, quint8 bitOffset) |
virtual void | setChildWidgetData (uint index, QWidget *w) const |
virtual bool | setData (const QVariant &value, Okteta::AbstractByteArrayModel *input, Okteta::Address address, BitCount64 bitsRemaining, quint8 bitOffset) |
void | setEncoding (StringType encoding) |
void | setMaxByteCount (uint count) |
void | setMaxCharCount (uint count) |
void | setTerminationCodePoint (uint term) |
virtual void | setWidgetData (QWidget *w) const |
virtual BitCount32 | size () const |
int | stringByteLength () const |
int | stringLength () const |
uint | terminationCodePoint () const |
uint | terminationMode () const |
void | unsetTerminationMode (StringData::TerminationMode mode) |
QString | valueAt (int index) const |
Public Member Functions inherited from DataInformationWithDummyChildren | |
DataInformationWithDummyChildren (const QString &name, DataInformationBase *parent=0) | |
virtual | ~DataInformationWithDummyChildren () |
virtual int | indexOf (const DataInformation *const data) const |
Public Member Functions inherited from DataInformation | |
DataInformation (const QString &name, DataInformationBase *parent=NULL) | |
virtual | ~DataInformation () |
void | beginRead () |
DataInformationEndianess | byteOrder () const |
virtual DataInformation * | child (const QString &name) const |
virtual DataInformation * | clone () const =0 |
QSysInfo::Endian | effectiveByteOrder () const |
QString | fullObjectPath () const |
bool | hasBeenUpdated () const |
bool | hasBeenValidated () const |
virtual bool | isTopLevel () const |
QDebug | logError () const |
ScriptLogger::LogLevel | loggedData () const |
ScriptLogger * | logger () const |
QDebug | logInfo () const |
QDebug | logWarn () const |
DataInformation * | mainStructure () |
QString | name () const |
DataInformationBase * | parent () const |
virtual BitCount64 | positionInFile (Okteta::Address start) const |
virtual void | resetValidationState () |
int | row () const |
void | setByteOrder (DataInformationEndianess newEndianess) |
void | setCustomTypeName (const QString &customTypeName) |
void | setLoggedData (ScriptLogger::LogLevel lvl) const |
void | setName (const QString &newName) |
void | setParent (DataInformationBase *newParent) |
void | setToStringFunction (const QScriptValue &value) |
void | setUpdateFunc (const QScriptValue &func) |
void | setValidationFunc (const QScriptValue &func) |
virtual QString | sizeString () const |
virtual QString | tooltipString () const |
TopLevelDataInformation * | topLevelDataInformation () const |
virtual QScriptValue | toScriptValue (QScriptEngine *engine, ScriptHandlerInfo *handlerInfo) |
QScriptValue | toScriptValue (TopLevelDataInformation *top) |
QScriptValue | toStringFunction () const |
QString | typeName () const |
QScriptValue | updateFunc () const |
QString | validationError () const |
QScriptValue | validationFunc () const |
bool | validationSuccessful () const |
QString | valueString () const |
bool | wasAbleToRead () const |
Public Member Functions inherited from DataInformationBase | |
DataInformationBase () | |
virtual | ~DataInformationBase () |
ArrayDataInformation * | asArray () |
const ArrayDataInformation * | asArray () const |
AbstractBitfieldDataInformation * | asBitfield () |
const AbstractBitfieldDataInformation * | asBitfield () const |
DataInformation * | asDataInformation () |
const DataInformation * | asDataInformation () const |
DummyDataInformation * | asDummy () |
const DummyDataInformation * | asDummy () const |
EnumDataInformation * | asEnum () |
const EnumDataInformation * | asEnum () const |
PointerDataInformation * | asPointer () |
const PointerDataInformation * | asPointer () const |
PrimitiveDataInformation * | asPrimitive () |
const PrimitiveDataInformation * | asPrimitive () const |
StringDataInformation * | asString () |
const StringDataInformation * | asString () const |
StructureDataInformation * | asStruct () |
const StructureDataInformation * | asStruct () const |
TaggedUnionDataInformation * | asTaggedUnion () |
const TaggedUnionDataInformation * | asTaggedUnion () const |
TopLevelDataInformation * | asTopLevel () |
const TopLevelDataInformation * | asTopLevel () const |
UnionDataInformation * | asUnion () |
const UnionDataInformation * | asUnion () const |
virtual bool | isArray () const |
virtual bool | isBitfield () const |
virtual bool | isDummy () const |
virtual bool | isEnum () const |
virtual bool | isPointer () const |
virtual bool | isPrimitive () const |
virtual bool | isStruct () const |
virtual bool | isTaggedUnion () const |
virtual bool | isUnion () const |
Additional Inherited Members | |
Protected Member Functions inherited from DataInformationWithDummyChildren | |
DataInformationWithDummyChildren (const DataInformationWithDummyChildren &d) | |
Protected Member Functions inherited from DataInformation | |
DataInformation (const DataInformation &) | |
void | setAdditionalFunction (AdditionalData::AdditionalDataType entry, const QScriptValue &value, const char *name) |
Static Protected Member Functions inherited from DataInformation | |
static QVariant | eofReachedData (int role) |
Protected Attributes inherited from DataInformation | |
AdditionalData | mAdditionalData |
DataInformationEndianess | mByteOrder:2 |
bool | mHasBeenUpdated:1 |
bool | mHasBeenValidated:1 |
ScriptLogger::LogLevel | mLoggedData:2 |
QString | mName |
DataInformationBase * | mParent |
bool | mValidationSuccessful:1 |
bool | mWasAbleToRead:1 |
Detailed Description
Definition at line 39 of file stringdatainformation.h.
Member Enumeration Documentation
Enumerator | |
---|---|
InvalidEncoding | |
ASCII | |
Latin1 | |
UTF8 | |
UTF16_LE | |
UTF16_BE | |
UTF32_LE | |
UTF32_BE |
Definition at line 43 of file stringdatainformation.h.
Constructor & Destructor Documentation
StringDataInformation::StringDataInformation | ( | const QString & | name, |
StringType | encoding, | ||
DataInformationBase * | parent = 0 |
||
) |
Definition at line 43 of file stringdatainformation.cpp.
|
virtual |
Definition at line 56 of file stringdatainformation.cpp.
Member Function Documentation
|
inlinevirtual |
true for unions and structs and arrays
Implements DataInformation.
Definition at line 105 of file stringdatainformation.h.
|
virtual |
Implements DataInformation.
Definition at line 60 of file stringdatainformation.cpp.
|
virtual |
Implements DataInformation.
Definition at line 134 of file stringdatainformation.cpp.
|
virtual |
the data of child at index row
.
Useful for arrays, or DataInformations with fake children
Implements DataInformationWithDummyChildren.
Definition at line 144 of file stringdatainformation.cpp.
|
virtual |
Implements DataInformationWithDummyChildren.
Definition at line 174 of file stringdatainformation.cpp.
|
virtual |
- Parameters
-
child the direct child we want to find the address for start the start of the root element
- Returns
- the address of
child
in the file
Implements DataInformation.
Definition at line 280 of file stringdatainformation.cpp.
|
virtual |
Implements DataInformationWithDummyChildren.
Definition at line 238 of file stringdatainformation.cpp.
|
virtual |
Implements DataInformationWithDummyChildren.
Definition at line 274 of file stringdatainformation.cpp.
|
virtual |
Implements DataInformationWithDummyChildren.
Definition at line 243 of file stringdatainformation.cpp.
|
virtual |
create a QWidget for the QItemDelegate
Implements DataInformationWithDummyChildren.
Definition at line 266 of file stringdatainformation.cpp.
create a QWidget for the QItemDelegate
Implements DataInformation.
Definition at line 122 of file stringdatainformation.cpp.
|
virtual |
get the necessary data (for the model)
Reimplemented from DataInformation.
Definition at line 297 of file stringdatainformation.cpp.
|
virtual |
get the needed data from the widget
Implements DataInformationWithDummyChildren.
Definition at line 257 of file stringdatainformation.cpp.
|
virtual |
get the needed data from the widget
Implements DataInformation.
Definition at line 115 of file stringdatainformation.cpp.
|
inline |
Definition at line 110 of file stringdatainformation.h.
|
virtual |
Reimplemented from DataInformation.
Definition at line 139 of file stringdatainformation.cpp.
|
virtual |
Reimplemented from DataInformationBase.
Definition at line 309 of file stringdatainformation.cpp.
|
inline |
Definition at line 115 of file stringdatainformation.h.
|
inline |
Definition at line 125 of file stringdatainformation.h.
|
virtual |
Reads the necessary data from input
and returns the number of bytes read.
- Parameters
-
input the byte array to read from address the starting offset to read from bitsRemaining the number of bits remaining in out
bitOffset the bits that have already been read from the current byte (should be modified in this method)
- Returns
- the number of bits read or
-1
if none were read
Implements DataInformation.
Definition at line 87 of file stringdatainformation.cpp.
|
virtual |
Implements DataInformationWithDummyChildren.
Definition at line 74 of file stringdatainformation.cpp.
|
virtual |
initialize the delegate widget with the correct data
Implements DataInformationWithDummyChildren.
Definition at line 249 of file stringdatainformation.cpp.
|
virtual |
Writes the current data contained in this object to out.
Implements DataInformation.
Definition at line 67 of file stringdatainformation.cpp.
void StringDataInformation::setEncoding | ( | StringDataInformation::StringType | encoding | ) |
Definition at line 183 of file stringdatainformation.cpp.
|
inline |
Definition at line 120 of file stringdatainformation.h.
|
inline |
Definition at line 130 of file stringdatainformation.h.
|
inline |
Definition at line 140 of file stringdatainformation.h.
|
virtual |
initialize the delegate widget with the correct data
Implements DataInformation.
Definition at line 110 of file stringdatainformation.cpp.
|
virtual |
the size in bits of this element
Implements DataInformation.
Definition at line 105 of file stringdatainformation.cpp.
|
inline |
Definition at line 150 of file stringdatainformation.h.
|
inline |
Definition at line 145 of file stringdatainformation.h.
|
inline |
Definition at line 135 of file stringdatainformation.h.
|
inline |
Definition at line 155 of file stringdatainformation.h.
void StringDataInformation::unsetTerminationMode | ( | StringData::TerminationMode | mode | ) |
Removes this mode from the termination modes.
If none is left, changes string to null terminated
- Parameters
-
mode The mode to remove
Definition at line 314 of file stringdatainformation.cpp.
|
inline |
Definition at line 160 of file stringdatainformation.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.