Mapper  0.9.0
API documentation
Public Types | Public Member Functions | List of all members
OcdFile< F > Class Template Reference

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
 
OcdFileoperator= (const OcdFile &)=delete
 
 ~OcdFile ()=default
 Destructs the object. More...
 
const QByteArrayconstByteArray () const
 Returns the raw data. More...
 
const QByteArraybyteArray () const
 Returns the raw data. More...
 
QByteArraybyteArray ()
 Returns the raw data. More...
 
const FileHeaderheader () const
 Returns a pointer to the file header. More...
 
FileHeaderheader ()
 Returns a pointer to the file header. More...
 
const StringIndexstrings () const
 Returns a const reference to the parameter string index. More...
 
StringIndexstrings ()
 Returns a reference to the parameter string index. More...
 
const SymbolIndexsymbols () const
 Returns a const reference to the symbol index. More...
 
SymbolIndexsymbols () noexcept
 Returns a reference to the symbol index. More...
 
const ObjectIndexobjects () const
 Returns a const reference to the object index. More...
 
ObjectIndexobjects ()
 Returns a reference to the object index. More...
 

Detailed Description

template<class F>
class OcdFile< F >

A template class for dealing with OCD files.

Parameters
Fthe type defining the actual file format version

Member Typedef Documentation

◆ FileHeader

template<class F >
using OcdFile< F >::FileHeader = typename F::FileHeader

The actual file header type.

◆ Format

template<class F >
using OcdFile< F >::Format = F

The actual file format version type, reexported.

◆ ObjectIndex

template<class F >
using OcdFile< F >::ObjectIndex = OcdEntityIndex< F, typename F::Object >

The actual object index type.

◆ StringIndex

template<class F >
using OcdFile< F >::StringIndex = OcdEntityIndex< F, Ocd::ParameterString >

The actual string index type.

◆ SymbolIndex

template<class F >
using OcdFile< F >::SymbolIndex = OcdEntityIndex< F, typename F::BaseSymbol >

The actual symbol index type.

Constructor & Destructor Documentation

◆ OcdFile() [1/3]

template<class F >
OcdFile< F >::OcdFile ( )

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.

◆ OcdFile() [2/3]

template<class F >
OcdFile< F >::OcdFile ( const QByteArray data)
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.

◆ OcdFile() [3/3]

template<class F >
OcdFile< F >::OcdFile ( const OcdFile< F > &  )
delete

◆ ~OcdFile()

template<class F >
OcdFile< F >::~OcdFile ( )
default

Destructs the object.

Member Function Documentation

◆ byteArray() [1/2]

template<class F >
const QByteArray & OcdFile< F >::byteArray ( ) const

Returns the raw data.

◆ byteArray() [2/2]

template<class F >
QByteArray & OcdFile< F >::byteArray ( )

Returns the raw data.

◆ constByteArray()

template<class F >
const QByteArray & OcdFile< F >::constByteArray ( ) const

Returns the raw data.

◆ header() [1/2]

template<class F >
const F::FileHeader * OcdFile< F >::header ( ) const

Returns a pointer to the file header.

◆ header() [2/2]

template<class F >
FileHeader* OcdFile< F >::header ( )
inline

Returns a pointer to the file header.

◆ objects() [1/2]

template<class F >
const OcdFile< F >::ObjectIndex & OcdFile< F >::objects ( ) const

Returns a const reference to the object index.

◆ objects() [2/2]

template<class F >
ObjectIndex& OcdFile< F >::objects ( )
inline

Returns a reference to the object index.

◆ operator=()

template<class F >
OcdFile& OcdFile< F >::operator= ( const OcdFile< F > &  )
delete

◆ strings() [1/2]

template<class F >
const OcdFile< F >::StringIndex & OcdFile< F >::strings ( ) const

Returns a const reference to the parameter string index.

◆ strings() [2/2]

template<class F >
StringIndex& OcdFile< F >::strings ( )
inline

Returns a reference to the parameter string index.

◆ symbols() [1/2]

template<class F >
const OcdFile< F >::SymbolIndex & OcdFile< F >::symbols ( ) const

Returns a const reference to the symbol index.

◆ symbols() [2/2]

template<class F >
SymbolIndex& OcdFile< F >::symbols ( )
inlinenoexcept

Returns a reference to the symbol index.


The documentation for this class was generated from the following files: