ldas-tools-framecpp  2.7.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
FrameCPP::Common::PTR_STRUCT_BASE Struct Referenceabstract

Holder of Stream reference to an object within the stream. More...

#include <PTR_STRUCT_BASE.hh>

Inheritance diagram for FrameCPP::Common::PTR_STRUCT_BASE:
Inheritance graph
[legend]
Collaboration diagram for FrameCPP::Common::PTR_STRUCT_BASE:
Collaboration graph
[legend]

Public Types

typedef INT_2U class_type
 Data type for the class identifier. More...
 
typedef INT_4U instance_type
 Data type for the instance counter. More...
 
typedef INT_2U class_type
 Data type for the class identifier. More...
 
typedef INT_4U instance_type
 Data type for the instance counter. More...
 

Public Member Functions

 PTR_STRUCT_BASE ()
 Default constructor. More...
 
virtual ~PTR_STRUCT_BASE ()
 Destructor. More...
 
virtual class_type Class () const =0
 Retrieve the class identifier. More...
 
virtual void Class (class_type Class)=0
 Establish the class identifier. More...
 
virtual instance_type Instance () const =0
 Retrieve the instance of the class. More...
 
virtual void Instance (instance_type Value)=0
 Establish the instance of the class. More...
 
virtual PTR_STRUCT_BASEClone () const =0
 constructor - virtual copy constructor
 
bool IsNULL () const
 Determine if the reference represents a NULL reference. More...
 
 PTR_STRUCT_BASE ()
 Default constructor. More...
 
virtual ~PTR_STRUCT_BASE ()
 Destructor. More...
 
virtual class_type Class () const =0
 Retrieve the class identifier. More...
 
virtual void Class (class_type Class)=0
 Establish the class identifier. More...
 
virtual instance_type Instance () const =0
 Retrieve the instance of the class. More...
 
virtual void Instance (instance_type Value)=0
 Establish the instance of the class. More...
 
virtual PTR_STRUCT_BASEClone () const =0
 constructor - virtual copy constructor
 
bool IsNULL () const
 Determine if the reference represents a NULL reference. More...
 
class_type GetClass () const
 Retrieve the class identifier. More...
 
class_type GetClass () const
 Retrieve the class identifier. 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...
 
virtual streamsize_type Bytes (const StreamBase &Stream) const =0
 Return the number of bytes for this object. More...
 
virtual streamsize_type Bytes (const StreamBase &Stream) const =0
 Return the number of bytes for this object. More...
 
virtual ObjectCreate () const
 constructor - virtual
 
virtual ObjectCreate (istream_type &Stream) const =0
 constructor - virtual
 
virtual ObjectCreate (std::istream &Buffer) const
 constructor - virtual
 
virtual ObjectCreate () const
 constructor - virtual
 
virtual ObjectCreate (istream_type &Stream) const =0
 constructor - virtual
 
virtual ObjectCreate (std::istream &Buffer) const
 constructor - virtual
 
virtual bool operator== (const Object &Obj) const =0
 comparison operator
 
virtual bool operator== (const Object &Obj) const =0
 comparison operator
 
virtual const char * ObjectStructName () const =0
 Retrieve the class name of the object. More...
 
virtual const char * ObjectStructName () const =0
 Retrieve the class name of the 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...
 
virtual void Write (ostream_type &Stream) const =0
 Write object to the stream. More...
 
virtual void Write (ostream_type &Stream) const =0
 Write object to the stream. More...
 

Static Public Member Functions

static std::string Desc (const std::string &Type)
 Describe the reference object. More...
 
static std::string Desc (const std::string &Type)
 Describe the reference 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...
 

Protected Member Functions

virtual class_type getClass () const
 Retrieve the class identifier.
 
virtual class_type getClass () const
 Retrieve the class identifier.
 
virtual demote_ret_type demote (frame_spec_version_type Target, demote_arg_type Obj, istream_type *Stream) const =0
 Demotes object to previous version of the frame spec. More...
 
virtual demote_ret_type demote (frame_spec_version_type Target, demote_arg_type Obj, istream_type *Stream) const =0
 Demotes object to previous version of the frame spec. More...
 
virtual promote_ret_type promote (frame_spec_version_type Target, promote_arg_type Obj, istream_type *Stream) const =0
 Promotes object to another version of the frame spec. More...
 
virtual promote_ret_type promote (frame_spec_version_type Target, promote_arg_type Obj, istream_type *Stream) const =0
 Promotes object to another version of the frame spec. More...
 

Detailed Description

Holder of Stream reference to an object within the stream.

This is an interface class allowing access to the information in a version independent mannor.

Member Typedef Documentation

◆ class_type [1/2]

Data type for the class identifier.

Note
The data type used needs to be the maximum sized data type used in any of the frame specifications to ensure no rounding errors.

◆ class_type [2/2]

Data type for the class identifier.

Note
The data type used needs to be the maximum sized data type used in any of the frame specifications to ensure no rounding errors.

◆ instance_type [1/2]

Data type for the instance counter.

Note
The data type used needs to be the maximum sized data type used in any of the frame specifications to ensure no rounding errors.

◆ instance_type [2/2]

Data type for the instance counter.

Note
The data type used needs to be the maximum sized data type used in any of the frame specifications to ensure no rounding errors.

Constructor & Destructor Documentation

◆ PTR_STRUCT_BASE() [1/2]

FrameCPP::Common::PTR_STRUCT_BASE::PTR_STRUCT_BASE ( )

Default constructor.

Returns
New instance of this object.

◆ ~PTR_STRUCT_BASE() [1/2]

FrameCPP::Common::PTR_STRUCT_BASE::~PTR_STRUCT_BASE ( )
virtual

Destructor.

Release the resource back to system. Because there are other vitual methods, the destuctor is also virtual to ensure all the resources are properly released.

◆ PTR_STRUCT_BASE() [2/2]

FrameCPP::Common::PTR_STRUCT_BASE::PTR_STRUCT_BASE ( )

Default constructor.

Returns
New instance of this object.

◆ ~PTR_STRUCT_BASE() [2/2]

virtual FrameCPP::Common::PTR_STRUCT_BASE::~PTR_STRUCT_BASE ( )
virtual

Destructor.

Release the resource back to system. Because there are other vitual methods, the destuctor is also virtual to ensure all the resources are properly released.

Member Function Documentation

◆ Bytes() [1/2]

virtual streamsize_type FrameCPP::Common::FrameSpec::ObjectInterface::Bytes ( const StreamBase &  Stream) const
pure virtualinherited

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.

Implemented in FrameCPP::Version_3::FrameH, FrameCPP::Version_3::FrameH, FrameCPP::Version_4::FrTable, FrameCPP::Version_4::FrTable, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrSH, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrSH, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrameSpec::Object, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrameSpec::Object, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrDetector, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrDetector, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrameH, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrameH, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrTOC, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrTOC, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrStatData, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrStatData, checksum_type >, FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >, FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >, FrameCPP::Common::PTR_STRUCT< DC, DI >, FrameCPP::Common::PTR_STRUCT< DC, DI >, FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrHeader, FrameCPP::Version_4::FrAdcData, FrameCPP::Version_4::FrAdcData, FrameCPP::Version_3::FrAdcData, FrameCPP::Version_3::FrAdcData, FrameCPP::Version_6::FrTable, FrameCPP::Version_6::FrTable, FrameCPP::Version_8::FrEndOfFile, and FrameCPP::Version_8::FrEndOfFile.

◆ Bytes() [2/2]

virtual streamsize_type FrameCPP::Common::FrameSpec::ObjectInterface::Bytes ( const StreamBase &  Stream) const
pure virtualinherited

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.

Implemented in FrameCPP::Version_3::FrameH, FrameCPP::Version_3::FrameH, FrameCPP::Version_4::FrTable, FrameCPP::Version_4::FrTable, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrSH, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrSH, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrameSpec::Object, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrameSpec::Object, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrDetector, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrDetector, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrameH, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrameH, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrTOC, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrTOC, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrStatData, checksum_type >, FrameCPP::Common::FrameSpec::ObjectWithChecksum< Common::FrStatData, checksum_type >, FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >, FrameCPP::Common::StreamRef2< LT, CKT, CT, IT >, FrameCPP::Common::PTR_STRUCT< DC, DI >, FrameCPP::Common::PTR_STRUCT< DC, DI >, FrameCPP::Version_8::FrHeader, FrameCPP::Version_8::FrHeader, FrameCPP::Version_4::FrAdcData, FrameCPP::Version_4::FrAdcData, FrameCPP::Version_3::FrAdcData, FrameCPP::Version_3::FrAdcData, FrameCPP::Version_6::FrTable, FrameCPP::Version_6::FrTable, FrameCPP::Version_8::FrEndOfFile, and FrameCPP::Version_8::FrEndOfFile.

◆ Class() [1/4]

virtual class_type FrameCPP::Common::PTR_STRUCT_BASE::Class ( ) const
pure virtual

Retrieve the class identifier.

Returns
The class identifier.

Implemented in FrameCPP::Common::PTR_STRUCT< DC, DI >, and FrameCPP::Common::PTR_STRUCT< DC, DI >.

◆ Class() [2/4]

virtual class_type FrameCPP::Common::PTR_STRUCT_BASE::Class ( ) const
pure virtual

Retrieve the class identifier.

Returns
The class identifier.

Implemented in FrameCPP::Common::PTR_STRUCT< DC, DI >, and FrameCPP::Common::PTR_STRUCT< DC, DI >.

◆ Class() [3/4]

virtual void FrameCPP::Common::PTR_STRUCT_BASE::Class ( class_type  Class)
pure virtual

Establish the class identifier.

Parameters
[in]ClassThe class identifier.

Implemented in FrameCPP::Common::PTR_STRUCT< DC, DI >, and FrameCPP::Common::PTR_STRUCT< DC, DI >.

◆ Class() [4/4]

virtual void FrameCPP::Common::PTR_STRUCT_BASE::Class ( class_type  Class)
pure virtual

Establish the class identifier.

Parameters
[in]ClassThe class identifier.

Implemented in FrameCPP::Common::PTR_STRUCT< DC, DI >, and FrameCPP::Common::PTR_STRUCT< DC, DI >.

◆ demote() [1/2]

virtual demote_ret_type FrameCPP::Common::FrameSpec::ObjectInterface::demote ( frame_spec_version_type  Target,
demote_arg_type  Obj,
istream_type *  Stream 
) const
protectedpure virtualinherited

◆ demote() [2/2]

virtual demote_ret_type FrameCPP::Common::FrameSpec::ObjectInterface::demote ( frame_spec_version_type  Target,
demote_arg_type  Obj,
istream_type *  Stream 
) const
protectedpure virtualinherited

◆ DemoteObject() [1/2]

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

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.

◆ Desc() [1/2]

std::string FrameCPP::Common::PTR_STRUCT_BASE::Desc ( const std::string &  Type)
inlinestatic

Describe the reference object.

Parameters
[in]TypeThe type of object being referenced.
Returns
The text that describes the pointer reference.

Output the descriptive text that needs to be part of the FrSE object used to describe the entirety of an object.

◆ Desc() [2/2]

static std::string FrameCPP::Common::PTR_STRUCT_BASE::Desc ( const std::string &  Type)
static

Describe the reference object.

Parameters
[in]TypeThe type of object being referenced.
Returns
The text that describes the pointer reference.

◆ GetClass() [1/2]

class_type FrameCPP::Common::FrameSpec::Object::GetClass ( ) const
inherited

Retrieve the class identifier.

Returns
The class identifier.

◆ GetClass() [2/2]

FrameSpec::class_type FrameCPP::Common::FrameSpec::Object::GetClass ( ) const
inlineinherited

Retrieve the class identifier.

Returns
The class identifier.

◆ GetDescription() [1/2]

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

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.

◆ Instance() [1/4]

virtual instance_type FrameCPP::Common::PTR_STRUCT_BASE::Instance ( ) const
pure virtual

Retrieve the instance of the class.

Returns
The instance of the class.

Implemented in FrameCPP::Common::PTR_STRUCT< DC, DI >, and FrameCPP::Common::PTR_STRUCT< DC, DI >.

◆ Instance() [2/4]

virtual instance_type FrameCPP::Common::PTR_STRUCT_BASE::Instance ( ) const
pure virtual

Retrieve the instance of the class.

Returns
The instance of the class.

Implemented in FrameCPP::Common::PTR_STRUCT< DC, DI >, and FrameCPP::Common::PTR_STRUCT< DC, DI >.

◆ Instance() [3/4]

virtual void FrameCPP::Common::PTR_STRUCT_BASE::Instance ( instance_type  Value)
pure virtual

Establish the instance of the class.

Parameters
[in]ValueThe instance of the class.

Implemented in FrameCPP::Common::PTR_STRUCT< DC, DI >, and FrameCPP::Common::PTR_STRUCT< DC, DI >.

◆ Instance() [4/4]

virtual void FrameCPP::Common::PTR_STRUCT_BASE::Instance ( instance_type  Value)
pure virtual

Establish the instance of the class.

Parameters
[in]ValueThe instance of the class.

Implemented in FrameCPP::Common::PTR_STRUCT< DC, DI >, and FrameCPP::Common::PTR_STRUCT< DC, DI >.

◆ IsNULL() [1/2]

bool FrameCPP::Common::PTR_STRUCT_BASE::IsNULL ( ) const

Determine if the reference represents a NULL reference.

Returns
True if the reference represents a NULL reference, false otherwise.

◆ IsNULL() [2/2]

bool FrameCPP::Common::PTR_STRUCT_BASE::IsNULL ( ) const
inline

Determine if the reference represents a NULL reference.

A NULL reference is used to terminate a list of objects.

Returns
True if the reference represents a NULL reference, false otherwise.

◆ ObjectStructName() [1/2]

virtual const char* FrameCPP::Common::FrameSpec::ObjectInterface::ObjectStructName ( ) const
pure virtualinherited

◆ ObjectStructName() [2/2]

virtual const char* FrameCPP::Common::FrameSpec::ObjectInterface::ObjectStructName ( ) const
pure virtualinherited

◆ promote() [1/2]

virtual promote_ret_type FrameCPP::Common::FrameSpec::ObjectInterface::promote ( frame_spec_version_type  Target,
promote_arg_type  Obj,
istream_type *  Stream 
) const
protectedpure virtualinherited

◆ promote() [2/2]

virtual promote_ret_type FrameCPP::Common::FrameSpec::ObjectInterface::promote ( frame_spec_version_type  Target,
promote_arg_type  Obj,
istream_type *  Stream 
) const
protectedpure virtualinherited

◆ PromoteObject() [1/4]

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() [2/4]

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() [3/4]

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() [4/4]

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

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_3::FrameH, FrameCPP::Version_3::FrameH, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_8::FrHeader, and FrameCPP::Version_8::FrHeader.

◆ VerifyObject() [2/2]

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_3::FrameH, FrameCPP::Version_3::FrameH, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_8::FrEndOfFile, FrameCPP::Version_8::FrHeader, and FrameCPP::Version_8::FrHeader.

◆ Write() [1/2]

virtual void FrameCPP::Common::FrameSpec::ObjectInterface::Write ( ostream_type &  Stream) const
pure virtualinherited

◆ Write() [2/2]

virtual void FrameCPP::Common::FrameSpec::ObjectInterface::Write ( ostream_type &  Stream) const
pure virtualinherited

◆ WriteNext() [1/2]

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

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 struct was generated from the following files: