MeVisLab Toolbox Reference
ml::FileMapWrapper Class Reference

Wraps a FileMap so we can handle errors and exceptions more easily. More...

#include <WEMPersistenceHelper.h>

Public Member Functions

 FileMapWrapper (MLuint64 filesize, char *startAddress)
template<typename DT>
DT readValueFromMapAhead ()
template<typename DT>
DT readValueFromMap ()
void readStringFromMap (std::string &value, size_t stringLength)
void readStringWithSizeFromMap (std::string &value)
void readVector3FromMap (Vector3 &value, size_t byteSize)
void readVector4FromMap (Vector4 &value, size_t byteSize)
const char * getInitialAddress () const
const char * getCurrentAddress () const
const char * getCurrentAddress (size_t byteSize)
void advance (size_t byteSize)
MLuint64 getNumBytesRead () const
void setSwapBytes (bool swapBytes)

Detailed Description

Wraps a FileMap so we can handle errors and exceptions more easily.

Definition at line 34 of file WEMPersistenceHelper.h.

Constructor & Destructor Documentation

◆ FileMapWrapper()

ml::FileMapWrapper::FileMapWrapper ( MLuint64 filesize,
char * startAddress )

Member Function Documentation

◆ advance()

void ml::FileMapWrapper::advance ( size_t byteSize)

◆ getCurrentAddress() [1/2]

const char * ml::FileMapWrapper::getCurrentAddress ( ) const
inline

Definition at line 78 of file WEMPersistenceHelper.h.

Referenced by readValueFromMapAhead().

◆ getCurrentAddress() [2/2]

const char * ml::FileMapWrapper::getCurrentAddress ( size_t byteSize)

◆ getInitialAddress()

const char * ml::FileMapWrapper::getInitialAddress ( ) const
inline

Definition at line 77 of file WEMPersistenceHelper.h.

◆ getNumBytesRead()

MLuint64 ml::FileMapWrapper::getNumBytesRead ( ) const

◆ readStringFromMap()

void ml::FileMapWrapper::readStringFromMap ( std::string & value,
size_t stringLength )

◆ readStringWithSizeFromMap()

void ml::FileMapWrapper::readStringWithSizeFromMap ( std::string & value)

◆ readValueFromMap()

template<typename DT>
DT ml::FileMapWrapper::readValueFromMap ( )
inline

Definition at line 64 of file WEMPersistenceHelper.h.

References readValueFromMapAhead().

◆ readValueFromMapAhead()

template<typename DT>
DT ml::FileMapWrapper::readValueFromMapAhead ( )
inline

Definition at line 40 of file WEMPersistenceHelper.h.

References getCurrentAddress(), and MLSwapBytes().

Referenced by readValueFromMap().

◆ readVector3FromMap()

void ml::FileMapWrapper::readVector3FromMap ( Vector3 & value,
size_t byteSize )

◆ readVector4FromMap()

void ml::FileMapWrapper::readVector4FromMap ( Vector4 & value,
size_t byteSize )

◆ setSwapBytes()

void ml::FileMapWrapper::setSwapBytes ( bool swapBytes)
inline

Definition at line 83 of file WEMPersistenceHelper.h.


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