okteta
bytearraysourcecodestreamencoder.cpp
Go to the documentation of this file.
64 : variableName( QString::fromLatin1("array") ), dataType( UnsignedCharType ), elementsPerLine( 4 ), unsignedAsHexadecimal( true )
69 : AbstractByteArrayStreamEncoder( i18nc("name of the encoding target","C Array"), QString::fromLatin1("text/x-csrc") )
72 const char* const* ByteArraySourceCodeStreamEncoder::dataTypeNames() const { return PrimitiveDataTypeName; }
121 QString ByteArraySourceCodeStreamEncoder::printFormatted( const Okteta::AbstractByteArrayModel* byteArrayModel, Okteta::Address offset,
133 byteArrayModel->copyTo( reinterpret_cast<Okteta::Byte*>(&e), offset, qMin<size_t>(sizeof(e),dataSize) );
141 byteArrayModel->copyTo( reinterpret_cast<Okteta::Byte*>(&e), offset, qMin(uint(sizeof(e)),dataSize) );
153 byteArrayModel->copyTo( reinterpret_cast<Okteta::Byte*>(&e), offset, qMin(uint(sizeof(e)),dataSize) );
161 byteArrayModel->copyTo( reinterpret_cast<Okteta::Byte*>(&e), offset, qMin(uint(sizeof(e)),dataSize) );
173 byteArrayModel->copyTo( reinterpret_cast<Okteta::Byte*>(&e), offset, qMin(uint(sizeof(e)),dataSize) );
181 byteArrayModel->copyTo( reinterpret_cast<Okteta::Byte*>(&e), offset, qMin(uint(sizeof(e)),dataSize) );
193 byteArrayModel->copyTo( reinterpret_cast<Okteta::Byte*>(&e), offset, qMin(uint(sizeof(e)),dataSize) );
201 byteArrayModel->copyTo( reinterpret_cast<Okteta::Byte*>(&e), offset, qMin(uint(sizeof(e)),dataSize) );
could it be useful to hide the data access behind an iterator? * class KDataBufferIterator { public: ...
Definition: abstractbytearraymodel.h:79
SourceCodeStreamEncoderSettings mSettings
Definition: bytearraysourcecodestreamencoder.h:89
Definition: bytearraysourcecodestreamencoder.h:44
int dataType
Definition: bytearraysourcecodestreamencoder.h:55
Definition: bytearraysourcecodestreamencoder.h:41
int dataTypesCount() const
Definition: bytearraysourcecodestreamencoder.cpp:73
virtual Size copyTo(Byte *dest, const AddressRange ©Range) const
copies the data of the section into a given array Dest.
Definition: abstractbytearraymodel.cpp:60
virtual ~ByteArraySourceCodeStreamEncoder()
Definition: bytearraysourcecodestreamencoder.cpp:213
Definition: bytearraysourcecodestreamencoder.h:43
int elementsPerLine
Definition: bytearraysourcecodestreamencoder.h:56
Definition: bytearraysourcecodestreamencoder.h:46
QString printFormatted(const Okteta::AbstractByteArrayModel *byteArrayModel, Okteta::Address offset, unsigned int dataSize) const
Definition: bytearraysourcecodestreamencoder.cpp:121
static const int SizeOfPrimitiveDataType[]
Definition: bytearraysourcecodestreamencoder.cpp:48
static const char *const PrimitiveDataTypeName[]
Definition: bytearraysourcecodestreamencoder.cpp:36
Definition: bytearraysourcecodestreamencoder.h:45
bool unsignedAsHexadecimal
Definition: bytearraysourcecodestreamencoder.h:57
virtual bool encodeDataToStream(QIODevice *device, const ByteArrayView *byteArrayView, const Okteta::AbstractByteArrayModel *byteArrayModel, const Okteta::AddressRange &range)
Definition: bytearraysourcecodestreamencoder.cpp:75
Definition: bytearraysourcecodestreamencoder.h:47
ByteArraySourceCodeStreamEncoder()
Definition: bytearraysourcecodestreamencoder.cpp:68
Definition: bytearraysourcecodestreamencoder.h:42
static const int NoOfPrimitiveDataTypes
Definition: bytearraysourcecodestreamencoder.cpp:60
QString variableName
Definition: bytearraysourcecodestreamencoder.h:54
const char *const * dataTypeNames() const
Definition: bytearraysourcecodestreamencoder.cpp:72
SourceCodeStreamEncoderSettings()
Definition: bytearraysourcecodestreamencoder.cpp:63
Definition: bytearrayview.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:07 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:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.