ldas-tools-framecpp  2.9.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
FrameCPP::Common::StreamRef2< LT, CKT, CT, IT > Class Template Reference

Generalized common elements of frame structure. More...

#include <StreamRef.hh>

Inherits FrameCPP::Common::StreamRefInterface, FrameCPP::Common::StreamRefInterface, and FrameCPP::Common::StreamRefInterface.

Public Member Functions

 StreamRef2 ()
 Constructor.
 
virtual ~StreamRef2 ()
 Destructor.
 
FrameSpec::size_type Bytes (const StreamBase &Stream) const
 Return the number of bytes for this object. More...
 
virtual self_typeCreate (IStream &Stream) const
 constructor - virtual
 
virtual self_typeClone () const
 constructor - virtual copy constructor
 
virtual const char * ObjectStructName () const
 Retrieve the class name of the object. More...
 
virtual void Write (OStream &Stream) const
 Write object to the stream. More...
 
virtual bool operator== (const StreamRef2< LT, CKT, CT, IT > &RHS) const
 comparison operator
 
virtual bool operator== (const Common::FrameSpec::Object &Obj) const
 comparison operator
 
 StreamRef2 ()
 Constructor.
 
virtual ~StreamRef2 ()
 Destructor.
 
FrameSpec::size_type Bytes (const StreamBase &Stream) const
 Return the number of bytes for this object. More...
 
virtual self_typeCreate (IStream &Stream) const
 constructor - virtual
 
virtual self_typeClone () const
 constructor - virtual copy constructor
 
virtual const char * ObjectStructName () const
 Retrieve the class name of the object. More...
 
virtual void Write (OStream &Stream) const
 Write object to the stream. More...
 
virtual bool operator== (const StreamRef2< LT, CKT, CT, IT > &RHS) const
 comparison operator
 
virtual bool operator== (const Common::FrameSpec::Object &Obj) const
 comparison operator
 
 StreamRef2 ()
 Constructor.
 
virtual ~StreamRef2 ()
 Destructor.
 
FrameSpec::size_type Bytes (const StreamBase &Stream) const
 Return the number of bytes for this object. More...
 
virtual self_typeCreate (IStream &Stream) const
 constructor - virtual
 
virtual self_typeClone () const
 constructor - virtual copy constructor
 
virtual const char * ObjectStructName () const
 Retrieve the class name of the object. More...
 
virtual void Write (OStream &Stream) const
 Write object to the stream. More...
 
virtual bool operator== (const StreamRef2< LT, CKT, CT, IT > &RHS) const
 comparison operator
 
virtual bool operator== (const Common::FrameSpec::Object &Obj) const
 comparison operator
 
const Description * GetDescription () const
 Retrieve FrSH/FrSE description of the parent object. More...
 
const Description * GetDescription () const
 Retrieve FrSH/FrSE description of the parent object. More...
 
const Description * GetDescription () const
 Retrieve FrSH/FrSE description of the parent object. More...
 
ostream_type & WriteNext (ostream_type &Stream) const
 Write a next pointer to the parent to the stream. More...
 
ostream_type & WriteNext (ostream_type &Stream) const
 Write a next pointer to the parent to the stream. More...
 
ostream_type & WriteNext (ostream_type &Stream) const
 Write a next pointer to the parent to the stream. More...
 
virtual ObjectCreate () const
 constructor - virtual
 
virtual ObjectCreate (std::istream &Buffer) const
 constructor - virtual
 
virtual void VerifyObject (Verify &Verifier, IFrameStream &Stream) const
 Verify an object. More...
 
virtual void VerifyObject (Verify &Verifier, IFrameStream &Stream) const
 Verify an object. More...
 
virtual void VerifyObject (Verify &Verifier, IFrameStream &Stream) const
 Verify an object. More...
 

Static Public Member Functions

static object_type DemoteObject (frame_spec_version_type Target, object_type Obj, istream_type *Stream)
 Down grade an object. More...
 
static object_type DemoteObject (frame_spec_version_type Target, object_type Obj, istream_type *Stream)
 Down grade an object. More...
 
static object_type DemoteObject (frame_spec_version_type Target, object_type Obj, istream_type *Stream)
 Down grade an object. More...
 
static object_type PromoteObject (frame_spec_version_type Target, frame_spec_version_type Source, object_type Obj, istream_type *Stream)
 Upgrade an object. More...
 
template<typename PreviousType , typename CurrentType >
static object_type PromoteObject (frame_spec_version_type Target, frame_spec_version_type Source, object_type Obj, istream_type *Stream)
 Upgrade an object. More...
 
static object_type PromoteObject (frame_spec_version_type Target, frame_spec_version_type Source, object_type Obj, istream_type *Stream)
 Upgrade an object. More...
 
template<typename PreviousType , typename CurrentType >
static object_type PromoteObject (frame_spec_version_type Target, frame_spec_version_type Source, object_type Obj, istream_type *Stream)
 Upgrade an object. More...
 
static object_type PromoteObject (frame_spec_version_type Target, frame_spec_version_type Source, object_type Obj, istream_type *Stream)
 Upgrade an object. More...
 
template<typename PreviousType , typename CurrentType >
static object_type PromoteObject (frame_spec_version_type Target, frame_spec_version_type Source, object_type Obj, istream_type *Stream)
 Upgrade an object. More...
 

Protected Member Functions

virtual demote_ret_type demote (INT_2U Target, demote_arg_type Obj, IStream *Stream) const
 Down grade an object.
 
virtual promote_ret_type promote (INT_2U Target, promote_arg_type Obj, IStream *Stream) const
 Upgrade an object.
 
virtual demote_ret_type demote (INT_2U Target, demote_arg_type Obj, IStream *Stream) const
 Down grade an object.
 
virtual promote_ret_type promote (INT_2U Target, promote_arg_type Obj, IStream *Stream) const
 Upgrade an object.
 
virtual demote_ret_type demote (INT_2U Target, demote_arg_type Obj, IStream *Stream) const
 Down grade an object.
 
virtual promote_ret_type promote (INT_2U Target, promote_arg_type Obj, IStream *Stream) const
 Upgrade an object.
 
virtual class_type getClass () const
 Retrieve the class identifier.
 
virtual class_type getClass () const
 Retrieve the class identifier.
 
virtual class_type getClass () const
 Retrieve the class identifier.
 

Detailed Description

template<class LT, class CKT, class CT, class IT>
class FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >

Generalized common elements of frame structure.

This templated implementation simplifies the actual implementation of the common elements of all frame structures by having each of the storage elements have a separate template parameter.

This implementation supports versions of the frame specification which require the chkType field.

Template Parameters
LTData type for the length field.
CKTData type for the chkType field.
CTData type for the class field.
ITData type for the instance field.

Member Function Documentation

◆ Bytes() [1/3]

template<typename LT , typename CKT , typename CT , typename IT >
cmn_streamsize_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::Bytes ( const StreamBase &  Stream) const
virtual

Return the number of bytes for this object.

Parameters
[in]StreamThe stream on which the object will be written or read.
Returns
The number of bytes required by this object for the specified stream.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ Bytes() [2/3]

template<class LT , class CKT , class CT , class IT >
FrameSpec::size_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::Bytes ( const StreamBase &  Stream) const
virtual

Return the number of bytes for this object.

Parameters
[in]StreamThe stream on which the object will be written or read.
Returns
The number of bytes required by this object for the specified stream.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ Bytes() [3/3]

template<class LT , class CKT , class CT , class IT >
FrameSpec::size_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::Bytes ( const StreamBase &  Stream) const
virtual

Return the number of bytes for this object.

Parameters
[in]StreamThe stream on which the object will be written or read.
Returns
The number of bytes required by this object for the specified stream.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ DemoteObject() [1/3]

FrameSpec::ObjectInterface::object_type FrameCPP::Common::FrameSpec::ObjectInterface::DemoteObject ( frame_spec_version_type  Target,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Down grade an object.

Parameters
[in]TargetThis is the version of the frame specification of the demoted object.
[in]ObjThe base object.
[in]StreamStream from which Obj was created.
Returns
A pointer to the objected derived by demoting Obj.

◆ DemoteObject() [2/3]

static object_type FrameCPP::Common::FrameSpec::ObjectInterface::DemoteObject ( frame_spec_version_type  Target,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Down grade an object.

Parameters
[in]TargetThis is the version of the frame specification of the demoted object.
[in]ObjThe base object.
[in]StreamStream from which Obj was created.
Returns
A pointer to the objected derived by demoting Obj.

◆ DemoteObject() [3/3]

static object_type FrameCPP::Common::FrameSpec::ObjectInterface::DemoteObject ( frame_spec_version_type  Target,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Down grade an object.

Parameters
[in]TargetThis is the version of the frame specification of the demoted object.
[in]ObjThe base object.
[in]StreamStream from which Obj was created.
Returns
A pointer to the objected derived by demoting Obj.

◆ GetDescription() [1/3]

const Description * FrameCPP::Common::FrameSpec::Object::GetDescription ( ) const
inlinevirtualinherited

Retrieve FrSH/FrSE description of the parent object.

Returns
The description of the parent class.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ GetDescription() [2/3]

const Description* FrameCPP::Common::FrameSpec::Object::GetDescription ( ) const
virtualinherited

Retrieve FrSH/FrSE description of the parent object.

Returns
The description of the parent class.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ GetDescription() [3/3]

const Description* FrameCPP::Common::FrameSpec::Object::GetDescription ( ) const
virtualinherited

Retrieve FrSH/FrSE description of the parent object.

Returns
The description of the parent class.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ ObjectStructName() [1/3]

template<typename LT , typename CKT , typename CT , typename IT >
const char * FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::ObjectStructName ( ) const
inlinevirtual

Retrieve the class name of the object.

Returns
The name of the class associated with the object.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ ObjectStructName() [2/3]

template<class LT , class CKT , class CT , class IT >
virtual const char* FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::ObjectStructName ( ) const
virtual

Retrieve the class name of the object.

Returns
The name of the class associated with the object.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ ObjectStructName() [3/3]

template<class LT , class CKT , class CT , class IT >
virtual const char* FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::ObjectStructName ( ) const
virtual

Retrieve the class name of the object.

Returns
The name of the class associated with the object.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ PromoteObject() [1/6]

FrameSpec::ObjectInterface::object_type FrameCPP::Common::FrameSpec::ObjectInterface::PromoteObject ( frame_spec_version_type  Target,
frame_spec_version_type  Source,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Upgrade an object.

Parameters
[in]TargetPromote Obj to this version of the frame specification.
[in]SourceObj conforms to this version of the frame specification.
[in]ObjObject to be converted
[in]StreamOriginating stream for Obj.
Returns
A pointer to the objected derived by promoting Obj.

◆ PromoteObject() [2/6]

template<typename PreviousType , typename CurrentType >
static object_type FrameCPP::Common::FrameSpec::ObjectInterface::PromoteObject ( frame_spec_version_type  Target,
frame_spec_version_type  Source,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Upgrade an object.

Parameters
[in]TargetPromote Obj to this version of the frame specification.
[in]SourceObj conforms to this version of the frame specification.
[in]ObjObject to be converted
[in]StreamOriginating stream for Obj.
Returns
A pointer to the objected derived by promoting Obj.

◆ PromoteObject() [3/6]

static object_type FrameCPP::Common::FrameSpec::ObjectInterface::PromoteObject ( frame_spec_version_type  Target,
frame_spec_version_type  Source,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Upgrade an object.

Parameters
[in]TargetPromote Obj to this version of the frame specification.
[in]SourceObj conforms to this version of the frame specification.
[in]ObjObject to be converted
[in]StreamOriginating stream for Obj.
Returns
A pointer to the objected derived by promoting Obj.

◆ PromoteObject() [4/6]

template<typename PreviousType , typename CurrentType >
static object_type FrameCPP::Common::FrameSpec::ObjectInterface::PromoteObject ( frame_spec_version_type  Target,
frame_spec_version_type  Source,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Upgrade an object.

Parameters
[in]TargetPromote Obj to this version of the frame specification.
[in]SourceObj conforms to this version of the frame specification.
[in]ObjObject to be converted
[in]StreamOriginating stream for Obj.
Returns
A pointer to the objected derived by promoting Obj.

◆ PromoteObject() [5/6]

static object_type FrameCPP::Common::FrameSpec::ObjectInterface::PromoteObject ( frame_spec_version_type  Target,
frame_spec_version_type  Source,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Upgrade an object.

Parameters
[in]TargetPromote Obj to this version of the frame specification.
[in]SourceObj conforms to this version of the frame specification.
[in]ObjObject to be converted
[in]StreamOriginating stream for Obj.
Returns
A pointer to the objected derived by promoting Obj.

◆ PromoteObject() [6/6]

template<typename PreviousType , typename CurrentType >
static object_type FrameCPP::Common::FrameSpec::ObjectInterface::PromoteObject ( frame_spec_version_type  Target,
frame_spec_version_type  Source,
object_type  Obj,
istream_type *  Stream 
)
staticinherited

Upgrade an object.

Parameters
[in]TargetPromote Obj to this version of the frame specification.
[in]SourceObj conforms to this version of the frame specification.
[in]ObjObject to be converted
[in]StreamOriginating stream for Obj.
Returns
A pointer to the objected derived by promoting Obj.

◆ VerifyObject() [1/3]

void FrameCPP::Common::FrameSpec::ObjectInterface::VerifyObject ( Verify &  Verifier,
IFrameStream &  Stream 
) const
virtualinherited

Verify an object.

Parameters
[in,out]VerifierSet of rules to use in verification of the object. If an error occurs, the violation is logged here.
[in]StreamThe stream that is being used to read the object.

Reimplemented in FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_3::FrameH, FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_3::FrameH, FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, and FrameCPP::Version_3::FrameH.

◆ VerifyObject() [2/3]

virtual void FrameCPP::Common::FrameSpec::ObjectInterface::VerifyObject ( Verify &  Verifier,
IFrameStream &  Stream 
) const
virtualinherited

Verify an object.

Parameters
[in,out]VerifierSet of rules to use in verification of the object. If an error occurs, the violation is logged here.
[in]StreamThe stream that is being used to read the object.

Reimplemented in FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_3::FrameH, FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_3::FrameH, FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, and FrameCPP::Version_3::FrameH.

◆ VerifyObject() [3/3]

virtual void FrameCPP::Common::FrameSpec::ObjectInterface::VerifyObject ( Verify &  Verifier,
IFrameStream &  Stream 
) const
virtualinherited

Verify an object.

Parameters
[in,out]VerifierSet of rules to use in verification of the object. If an error occurs, the violation is logged here.
[in]StreamThe stream that is being used to read the object.

Reimplemented in FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_3::FrameH, FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_3::FrameH, FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrEndOfFile, and FrameCPP::Version_3::FrameH.

◆ Write() [1/3]

template<typename LT , typename CKT , typename CT , typename IT >
void FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::Write ( OStream &  Stream) const
inlinevirtual

Write object to the stream.

Parameters
[in,out]StreamThe stream being written with the contents of object.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ Write() [2/3]

template<class LT , class CKT , class CT , class IT >
virtual void FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::Write ( OStream &  Stream) const
virtual

Write object to the stream.

Parameters
[in,out]StreamThe stream being written with the contents of object.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ Write() [3/3]

template<class LT , class CKT , class CT , class IT >
virtual void FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::Write ( OStream &  Stream) const
virtual

Write object to the stream.

Parameters
[in,out]StreamThe stream being written with the contents of object.

Implements FrameCPP::Common::FrameSpec::ObjectInterface.

◆ WriteNext() [1/3]

ostream_type & FrameCPP::Common::FrameSpec::Object::WriteNext ( ostream_type &  Stream) const
inherited

Write a next pointer to the parent to the stream.

Parameters
[in,out]StreamThe output stream to receive the next pointer.
Returns
The output stream.

◆ WriteNext() [2/3]

ostream_type& FrameCPP::Common::FrameSpec::Object::WriteNext ( ostream_type &  Stream) const
inherited

Write a next pointer to the parent to the stream.

Parameters
[in,out]StreamThe output stream to receive the next pointer.
Returns
The output stream.

◆ WriteNext() [3/3]

ostream_type& FrameCPP::Common::FrameSpec::Object::WriteNext ( ostream_type &  Stream) const
inherited

Write a next pointer to the parent to the stream.

Parameters
[in,out]StreamThe output stream to receive the next pointer.
Returns
The output stream.

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