![]() |
Mapper
0.9.0
API documentation
|
A template class for dealing with OCD files. More...
#include <ocd_types.h>
Public Types | |
using | Format = F |
The actual file format version type, reexported. More... | |
using | FileHeader = typename F::FileHeader |
The actual file header type. More... | |
using | StringIndex = OcdEntityIndex< F, Ocd::ParameterString > |
The actual string index type. More... | |
using | SymbolIndex = OcdEntityIndex< F, typename F::BaseSymbol > |
The actual symbol index type. More... | |
using | ObjectIndex = OcdEntityIndex< F, typename F::Object > |
The actual object index type. More... | |
Public Member Functions | |
OcdFile () | |
Constructs a new empty file. More... | |
OcdFile (const QByteArray &data) noexcept | |
Constructs a new object for the Ocd file contents given by data. More... | |
OcdFile (const OcdFile &)=delete | |
OcdFile & | operator= (const OcdFile &)=delete |
~OcdFile ()=default | |
Destructs the object. More... | |
const QByteArray & | constByteArray () const |
Returns the raw data. More... | |
const QByteArray & | byteArray () const |
Returns the raw data. More... | |
QByteArray & | byteArray () |
Returns the raw data. More... | |
const FileHeader * | header () const |
Returns a pointer to the file header. More... | |
FileHeader * | header () |
Returns a pointer to the file header. More... | |
const StringIndex & | strings () const |
Returns a const reference to the parameter string index. More... | |
StringIndex & | strings () |
Returns a reference to the parameter string index. More... | |
const SymbolIndex & | symbols () const |
Returns a const reference to the symbol index. More... | |
SymbolIndex & | symbols () noexcept |
Returns a reference to the symbol index. More... | |
const ObjectIndex & | objects () const |
Returns a const reference to the object index. More... | |
ObjectIndex & | objects () |
Returns a reference to the object index. More... | |
A template class for dealing with OCD files.
F | the type defining the actual file format version |
using OcdFile< F >::FileHeader = typename F::FileHeader |
The actual file header type.
using OcdFile< F >::ObjectIndex = OcdEntityIndex< F, typename F::Object > |
The actual object index type.
using OcdFile< F >::StringIndex = OcdEntityIndex< F, Ocd::ParameterString > |
The actual string index type.
using OcdFile< F >::SymbolIndex = OcdEntityIndex< F, typename F::BaseSymbol > |
The actual symbol index type.
Constructs a new empty file.
The internal byte array is initialized with headers and and the first index blocks for parameter strings, symbols and objects.
|
noexcept |
Constructs a new object for the Ocd file contents given by data.
The data is not copied because of the implicit sharing provided by QByteArray. Const member functions in this class do not cause a deep copy.
const QByteArray & OcdFile< F >::byteArray | ( | ) | const |
Returns the raw data.
QByteArray & OcdFile< F >::byteArray | ( | ) |
Returns the raw data.
const QByteArray & OcdFile< F >::constByteArray | ( | ) | const |
Returns the raw data.
const F::FileHeader * OcdFile< F >::header | ( | ) | const |
Returns a pointer to the file header.
|
inline |
Returns a pointer to the file header.
const OcdFile< F >::ObjectIndex & OcdFile< F >::objects | ( | ) | const |
Returns a const reference to the object index.
|
inline |
Returns a reference to the object index.
const OcdFile< F >::StringIndex & OcdFile< F >::strings | ( | ) | const |
Returns a const reference to the parameter string index.
|
inline |
Returns a reference to the parameter string index.
const OcdFile< F >::SymbolIndex & OcdFile< F >::symbols | ( | ) | const |
Returns a const reference to the symbol index.
|
inlinenoexcept |
Returns a reference to the symbol index.