DataFormatBaseReaderInterface Class Reference

#include <dataformat_base.h>

Inheritance diagram for DataFormatBaseReaderInterface:

详细描述

This class serializes data from IoStreams. It defines a file format for each data type.

公共成员函数

MAXON_METHOD Result < void >  CloseInput ()
  MAXON_ADD_TO_REFERENCE_CLASS ( Result < void > ResetMaybeCloseInput() { Result < void > res= OK ;if(this->GetPointer()) { if( System::GetReferenceCounter (this->GetPointer())==1) res=this->GetPointer() -> CloseInput ();this->ResetReference();} return res;})
MAXON_FUNCTION Result < void >  ReadData (void *data, Int dataSize, Int elementCount)
MAXON_METHOD Result < Int ReadDataEOS (void *data, Int dataSize, Int elementCount)

私有成员函数

  MAXON_INTERFACE ( DataFormatBaseReaderInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.dataformatbasereader")

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( DataFormatBaseReaderInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.dataformatbasereader"   
)
private

◆  CloseInput()

MAXON_METHOD Result <void> CloseInput ( )

Close the stream and the stream handle.

返回
OK on success.

◆  MAXON_ADD_TO_REFERENCE_CLASS()

MAXON_ADD_TO_REFERENCE_CLASS ( Result < void > ResetMaybeCloseInput() { Result < void > res= OK ;if(this->GetPointer()) { if( System::GetReferenceCounter (this->GetPointer())==1) res=this->GetPointer() -> CloseInput ();this->ResetReference();} return res;}  )

◆  ReadData()

MAXON_FUNCTION Result <void> ReadData ( void *  data ,
Int   dataSize ,
Int   elementCount  
)

Reads data from the stream and keeps the right byte order. E.g. if a Int64 is written into the stream on a little endian system it will be flipped when reading into a big endian system.

参数
[in] data Pointer to a memory address with the data.
[in] dataSize Size of the data to write. Possible sizes are 1 (without byte order changes) or 2, 4, 8 (with byte order correction).
[in] elementCount Number of data elements.
返回
OK on success.

◆  ReadDataEOS()

MAXON_METHOD Result < Int > ReadDataEOS ( void *  data ,
Int   dataSize ,
Int   elementCount  
)

Reads data from the stream and keeps the right byte order. E.g. if a Int64 is written into the stream on a little endian system it will be flipped when reading into a big endian system.

参数
[in] data Pointer to a memory address with the data.
[in] dataSize Size of the data to write. Possible sizes are 1 (without byte order changes) or 2, 4, 8 (with byte order correction).
[in] elementCount Number of data elements.
返回
Returns the number of elements (not bytes) that have been read.