MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions
MFM::AtomSerializer< CC > Class Template Reference

#include <AtomSerializer.h>

Inheritance diagram for MFM::AtomSerializer< CC >:
MFM::ByteSerializable

Public Member Functions

 AtomSerializer (Atom< CC > &atom)
 
Result PrintTo (ByteSink &bs, s32 argument=0)
 
Result ReadFrom (ByteSource &bs, s32 argument=0)
 
const BitVector< BPA > & GetBits () const
 

Additional Inherited Members

- Public Types inherited from MFM::ByteSerializable
enum  Result { UNSUPPORTED = -1, FAILURE = 0, SUCCESS = 1 }
 

Detailed Description

template<class CC>
class MFM::AtomSerializer< CC >

A wrapper class to use for making an Atom ByteSerializable. We don' make Atom itself ByteSerializable because ByteSerializable has virtual functions and we're not going to pay for a vtable pointer in each Atom..

Member Function Documentation

template<class CC >
Result MFM::AtomSerializer< CC >::PrintTo ( ByteSink byteSink,
s32  argument = 0 
)
inlinevirtual

Print a representation of this ByteSerializble to the given byteSink, with its details possibly modified by argument. The meaning of argument is unspecified except that 0 should be interpreted as a request for default, 'no modification', formatting.

Returns
UNSUPPORTED if this object doesn't support printing itself, or SUCCESS if the printing was successful and FAIL if there was any problem.

Implements MFM::ByteSerializable.

template<class CC >
Result MFM::AtomSerializer< CC >::ReadFrom ( ByteSource byteSource,
s32  argument = 0 
)
inlinevirtual

Modify this object by reading a representation of a ByteSerializable from the given byteSource, with its details possibly modified by argument. The meaning of argument is unspecified except that 0 should be interpreted as a request for default, 'no modification', interpretation.

Returns
UNSUPPORTED if this object doesn't support reading itself, or SUCCESS if the reading was successful and FAIL if there was any problem.

Implements MFM::ByteSerializable.


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