ldas-tools-framecpp  2.6.4
Public Types | 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>

Inheritance diagram for FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >:
FrameCPP::Common::StreamRefInterface FrameCPP::Common::FrameSpec::Object FrameCPP::Common::FrameSpec::ObjectInterface

Public Types

typedef StreamRef2< LT, CKT, CT, IT > self_type
 
typedef INT_2U class_type
 
typedef INT_4U instance_type
 
typedef INT_8U length_type
 
typedef FrameSpec::version_type frame_spec_version_type
 
typedef boost::shared_ptr< Objectobject_type
 
typedef std::unique_ptr< Objectunique_object_type
 
typedef object_type demote_arg_type
 
typedef object_type demote_ret_type
 
typedef object_type promote_arg_type
 
typedef object_type promote_ret_type
 

Public Member Functions

 StreamRef2 ()
 Constructor. More...
 
virtual ~StreamRef2 ()
 Destructor. More...
 
FrameSpec::size_type Bytes (const StreamBase &Stream) const
 Return the number of bytes for this object. More...
 
virtual FrameSpec::size_type SizeOf () const
 
virtual INT_2U GetChkType () const
 
virtual class_type GetClass () const
 
virtual instance_type GetInstance () const
 
virtual length_type GetLength () const
 
virtual void SetChkType (INT_2U ChkType)
 
virtual void SetClass (class_type Class)
 
virtual void SetInstance (instance_type Instance)
 
virtual void SetLength (length_type Length)
 
virtual self_typeCreate (IStream &Stream) const
 constructor - virtual More...
 
virtual self_typeClone () const
 constructor - virtual copy constructor More...
 
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 More...
 
virtual bool operator== (const Common::FrameSpec::Object &Obj) const
 comparison operator More...
 
const DescriptionGetDescription () const
 Retrieve FrSH/FrSE description of the parent object. More...
 
ostream_typeWriteNext (ostream_type &Stream) const
 Write a next pointer to the parent to the stream. More...
 
virtual ObjectCreate () const
 constructor - virtual More...
 
virtual ObjectCreate (std::istream &Buffer) const
 constructor - virtual More...
 
template<typename PreviousType , typename CurrentType >
FrameSpec::ObjectInterface::promote_ret_type PromoteObject (FrameSpec::ObjectInterface::frame_spec_version_type Target, FrameSpec::ObjectInterface::frame_spec_version_type Source, FrameSpec::ObjectInterface::promote_arg_type Obj, IStream *Stream)
 
virtual void VerifyObject (Verify &Verifier, IFrameStream &Stream) const
 Verify an object. More...
 

Static Public Member Functions

static FrameSpec::size_type Bytes ()
 
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...
 

Protected Member Functions

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

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 Typedef Documentation

◆ class_type

◆ demote_arg_type

◆ demote_ret_type

◆ frame_spec_version_type

◆ instance_type

◆ length_type

◆ object_type

typedef boost::shared_ptr< Object > FrameCPP::Common::FrameSpec::ObjectInterface::object_type
inherited

◆ promote_arg_type

◆ promote_ret_type

◆ self_type

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

◆ unique_object_type

Constructor & Destructor Documentation

◆ StreamRef2()

template<typename LT , typename CKT , typename CT , typename IT >
FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::StreamRef2 ( )

Constructor.

◆ ~StreamRef2()

template<typename LT , typename CKT , typename CT , typename IT >
FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::~StreamRef2 ( )
virtual

Destructor.

Member Function Documentation

◆ assign()

template<typename LT , typename CKT , typename CT , typename IT >
void FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::assign ( IStringStream Stream)
inlineprotectedvirtual

◆ Bytes() [1/2]

template<typename LT , typename CKT , typename CT , typename IT >
cmn_streamsize_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::Bytes ( )
inlinestatic

◆ Bytes() [2/2]

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.

◆ Clone()

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

constructor - virtual copy constructor

Reimplemented from FrameCPP::Common::FrameSpec::ObjectInterface.

◆ Create() [1/3]

FrameSpec::Object * FrameCPP::Common::FrameSpec::ObjectInterface::Create ( ) const
virtualinherited

◆ Create() [2/3]

FrameSpec::Object * FrameCPP::Common::FrameSpec::ObjectInterface::Create ( std::istream &  Buffer) const
virtualinherited

constructor - virtual

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

◆ Create() [3/3]

template<typename LT , typename CKT , typename CT , typename IT >
StreamRef2< LT, CKT, CT, IT > * FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::Create ( IStream Stream) const
inlinevirtual

constructor - virtual

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

◆ demote()

template<typename LT , typename CKT , typename CT , typename IT >
StreamRef2< LT, CKT, CT, IT >::demote_ret_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::demote ( INT_2U  Target,
demote_arg_type  Obj,
IStream Stream 
) const
protectedvirtual

Down grade an object.

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

◆ DemoteObject()

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.

◆ GetChkType()

template<typename LT , typename CKT , typename CT , typename IT >
StreamRef2< LT, CKT, CT, IT >::class_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::GetChkType ( ) const
inlinevirtual

◆ GetClass()

template<typename LT , typename CKT , typename CT , typename IT >
StreamRef2< LT, CKT, CT, IT >::class_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::GetClass ( ) const
inlinevirtual

◆ getClass()

FrameSpec::class_type FrameCPP::Common::FrameSpec::Object::getClass ( ) const
protectedvirtualinherited

Retrieve the class identifier.

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

◆ GetDescription()

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.

◆ GetInstance()

template<typename LT , typename CKT , typename CT , typename IT >
StreamRef2< LT, CKT, CT, IT >::instance_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::GetInstance ( ) const
inlinevirtual

◆ GetLength()

template<typename LT , typename CKT , typename CT , typename IT >
StreamRef2< LT, CKT, CT, IT >::length_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::GetLength ( ) const
inlinevirtual

◆ ObjectStructName()

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.

◆ operator==() [1/2]

template<typename LT , typename CKT , typename CT , typename IT >
bool FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::operator== ( const StreamRef2< LT, CKT, CT, IT > &  RHS) const
inlinevirtual

comparison operator

◆ operator==() [2/2]

template<typename LT , typename CKT , typename CT , typename IT >
bool FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::operator== ( const Common::FrameSpec::Object Obj) const
inlinevirtual

comparison operator

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

◆ promote()

template<typename LT , typename CKT , typename CT , typename IT >
StreamRef2< LT, CKT, CT, IT >::promote_ret_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::promote ( INT_2U  Target,
promote_arg_type  Obj,
IStream Stream 
) const
protectedvirtual

Upgrade an object.

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

◆ PromoteObject() [1/3]

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/3]

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/3]

template<typename PreviousType , typename CurrentType >
FrameSpec::ObjectInterface::promote_ret_type FrameCPP::Common::FrameSpec::ObjectInterface::PromoteObject ( FrameSpec::ObjectInterface::frame_spec_version_type  Target,
FrameSpec::ObjectInterface::frame_spec_version_type  Source,
FrameSpec::ObjectInterface::promote_arg_type  Obj,
IStream Stream 
)
inherited

◆ SetChkType()

template<typename LT , typename CKT , typename CT , typename IT >
void FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::SetChkType ( INT_2U  ChkType)
inlinevirtual

◆ SetClass()

template<typename LT , typename CKT , typename CT , typename IT >
void FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::SetClass ( class_type  Class)
inlinevirtual

◆ SetInstance()

template<typename LT , typename CKT , typename CT , typename IT >
void FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::SetInstance ( instance_type  Instance)
inlinevirtual

◆ SetLength()

template<typename LT , typename CKT , typename CT , typename IT >
void FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::SetLength ( length_type  Length)
inlinevirtual

◆ SizeOf()

template<typename LT , typename CKT , typename CT , typename IT >
FrameSpec::size_type FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >::SizeOf ( ) const
virtual

◆ VerifyObject()

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

◆ Write()

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.

◆ WriteNext()

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: