ldas-tools-framecpp  2.6.4
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
FrameCPP::Common::PTR_STRUCT< DC, DI > Struct Template Reference

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

#include <PTR_STRUCT.hh>

Inheritance diagram for FrameCPP::Common::PTR_STRUCT< DC, DI >:
FrameCPP::Common::PTR_STRUCT_BASE FrameCPP::Common::FrameSpec::Object FrameCPP::Common::FrameSpec::ObjectInterface

Public Types

typedef DC data_class_type
 
typedef DI data_instance_type
 
typedef PTR_STRUCT_BASE::class_type class_type
 
typedef PTR_STRUCT_BASE::instance_type instance_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

 PTR_STRUCT ()
 Default constructor. More...
 
 PTR_STRUCT (data_class_type ClassId, data_instance_type Instance)
 Constructor. More...
 
virtual class_type Class () const
 Retrieve the class identifier. More...
 
virtual void Class (class_type Value)
 Establish the class identifier. More...
 
data_class_type ClassRaw () const
 Retrieve the class identifier. More...
 
virtual instance_type Instance () const
 Retrieve the instance of the class. More...
 
virtual void Instance (instance_type Value)
 Establish the instance of the class. More...
 
data_instance_type InstanceRaw () const
 Establish the instance of the class. More...
 
const PTR_STRUCToperator= (const PTR_STRUCT &RHS)
 Assignment operator. More...
 
cmn_streamsize_type Bytes (const StreamBase &Stream) const
 Number of bytes needed to write this structure. More...
 
virtual PTR_STRUCTCreate (IStream &Stream) const
 Virtual constructor. More...
 
virtual PTR_STRUCTClone () const
 Virtual constructor. More...
 
virtual const char * ObjectStructName () const
 The name structure name of this object. More...
 
virtual void Write (OStream &Stream) const
 Write the structure to the stream. More...
 
bool operator== (const PTR_STRUCT &RHS) const
 comparison operator More...
 
virtual bool operator== (const Common::FrameSpec::Object &Obj) const
 comparison operator More...
 
bool operator!= (const PTR_STRUCT &RHS) const
 comparison operator More...
 
bool IsNULL () const
 Determine if the reference represents a NULL reference. More...
 
class_type GetClass () const
 Retrieve the class identifier. 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 cmn_streamsize_type Bytes ()
 Number of bytes needed to write this structure. 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 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 Public Attributes

static const PTR_STRUCTNULL_PTR = PTR_STRUCT< DC, DI >( 0, 0 )
 Version specific NULL reference. More...
 

Protected Member Functions

virtual FrameSpec::ObjectInterface::demote_ret_type demote (INT_2U Target, demote_arg_type Obj, IStream *Stream) const
 Demotes object to previous version of the frame spec. More...
 
virtual FrameSpec::ObjectInterface::promote_ret_type promote (INT_2U Target, FrameSpec::ObjectInterface::promote_arg_type Obj, IStream *Stream) const
 Promotes object to another version of the frame spec. More...
 
virtual class_type getClass () const
 Retrieve the class identifier. More...
 

Detailed Description

template<class DC, class DI>
struct FrameCPP::Common::PTR_STRUCT< DC, DI >

Holder of Stream reference to an object within the stream.

This is a version specific interface to the information.

Member Typedef Documentation

◆ class_type

template<class DC, class DI>
typedef PTR_STRUCT_BASE::class_type FrameCPP::Common::PTR_STRUCT< DC, DI >::class_type

◆ data_class_type

template<class DC, class DI>
typedef DC FrameCPP::Common::PTR_STRUCT< DC, DI >::data_class_type

◆ data_instance_type

template<class DC, class DI>
typedef DI FrameCPP::Common::PTR_STRUCT< DC, DI >::data_instance_type

◆ demote_arg_type

◆ demote_ret_type

◆ frame_spec_version_type

◆ instance_type

template<class DC, class DI>
typedef PTR_STRUCT_BASE::instance_type FrameCPP::Common::PTR_STRUCT< DC, DI >::instance_type

◆ object_type

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

◆ promote_arg_type

◆ promote_ret_type

◆ unique_object_type

Constructor & Destructor Documentation

◆ PTR_STRUCT() [1/2]

template<class DC , class DI >
FrameCPP::Common::PTR_STRUCT< DC, DI >::PTR_STRUCT ( )
inline

Default constructor.

Returns
New instance of this object

◆ PTR_STRUCT() [2/2]

template<class DC , class DI >
FrameCPP::Common::PTR_STRUCT< DC, DI >::PTR_STRUCT ( data_class_type  ClassId,
data_instance_type  Instance 
)
inline

Constructor.

Parameters
[in]ClassId
[in]Instance
Returns
New instance of this object

Member Function Documentation

◆ Bytes() [1/2]

template<class DC , class DI >
cmn_streamsize_type FrameCPP::Common::PTR_STRUCT< DC, DI >::Bytes ( )
inlinestatic

Number of bytes needed to write this structure.

Returns
The number of bytes need to read or write this object.

◆ Bytes() [2/2]

template<class DC , class DI >
cmn_streamsize_type FrameCPP::Common::PTR_STRUCT< DC, DI >::Bytes ( const StreamBase Stream) const
inlinevirtual

Number of bytes needed to write this structure.

Parameters
[in]StreamThe stream from which to the object is being read or written.
Returns
The number of bytes need to read or write this object.

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

◆ Class() [1/2]

template<class DC , class DI >
PTR_STRUCT< DC, DI >::class_type FrameCPP::Common::PTR_STRUCT< DC, DI >::Class ( ) const
virtual

Retrieve the class identifier.

Returns
The class identifier.

Implements FrameCPP::Common::PTR_STRUCT_BASE.

◆ Class() [2/2]

template<class DC , class DI >
void FrameCPP::Common::PTR_STRUCT< DC, DI >::Class ( class_type  Value)
virtual

Establish the class identifier.

Parameters
[in]ValueThe class identifier.

Implements FrameCPP::Common::PTR_STRUCT_BASE.

◆ ClassRaw()

template<class DC, class DI>
data_class_type FrameCPP::Common::PTR_STRUCT< DC, DI >::ClassRaw ( ) const
inline

Retrieve the class identifier.

◆ Clone()

template<class DC , class DI >
PTR_STRUCT< DC, DI > * FrameCPP::Common::PTR_STRUCT< DC, DI >::Clone ( ) const
inlinevirtual

Virtual constructor.

Returns
A new instance of this object.

Implements FrameCPP::Common::PTR_STRUCT_BASE.

◆ Create() [1/3]

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

◆ Create() [2/3]

template<class DC , class DI >
PTR_STRUCT< DC, DI > * FrameCPP::Common::PTR_STRUCT< DC, DI >::Create ( IStream Stream) const
inlinevirtual

Virtual constructor.

Parameters
[in]StreamThe input stream from which to read the object.
Returns
A new instance of this object.

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

◆ Create() [3/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.

◆ demote()

template<class DC , class DI >
FrameSpec::ObjectInterface::demote_ret_type FrameCPP::Common::PTR_STRUCT< DC, DI >::demote ( INT_2U  Target,
demote_arg_type  Obj,
IStream Stream 
) const
inlineprotectedvirtual

Demotes object to previous version of the frame spec.

Parameters
[in]TargetThe version of the frame specification to demote too.
[in]ObjThe version of the object to demote.
[in]StreamThe input stream from which the original object was read.
Returns
An object of the previous generation.

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.

◆ Desc()

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

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.

◆ GetClass()

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

Retrieve the class identifier.

Returns
The class identifier.

◆ 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.

◆ Instance() [1/2]

template<class DC , class DI >
PTR_STRUCT< DC, DI >::instance_type FrameCPP::Common::PTR_STRUCT< DC, DI >::Instance ( ) const
virtual

Retrieve the instance of the class.

Returns
The instance of the class.

Implements FrameCPP::Common::PTR_STRUCT_BASE.

◆ Instance() [2/2]

template<class DC , class DI >
void FrameCPP::Common::PTR_STRUCT< DC, DI >::Instance ( instance_type  Value)
virtual

Establish the instance of the class.

Parameters
[in]ValueThe instance of the class.

Implements FrameCPP::Common::PTR_STRUCT_BASE.

◆ InstanceRaw()

template<class DC, class DI>
data_instance_type FrameCPP::Common::PTR_STRUCT< DC, DI >::InstanceRaw ( ) const
inline

Establish the instance of the class.

Returns
The instance of the class.

◆ IsNULL()

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

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()

template<class DC , class DI >
const char * FrameCPP::Common::PTR_STRUCT< DC, DI >::ObjectStructName ( ) const
inlinevirtual

The name structure name of this object.

Returns
The name of the structure as specified by the frame specification.

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

◆ operator!=()

template<class DC , class DI >
bool FrameCPP::Common::PTR_STRUCT< DC, DI >::operator!= ( const PTR_STRUCT< DC, DI > &  RHS) const
inline

comparison operator

Parameters
[in]RHSThe PTR_STRUCT to compare.

◆ operator=()

template<class DC , class DI >
const PTR_STRUCT< DC, DI > & FrameCPP::Common::PTR_STRUCT< DC, DI >::operator= ( const PTR_STRUCT< DC, DI > &  RHS)

Assignment operator.

Parameters
[in]RHSThe source to copy.
Returns
Reference to this object.

◆ operator==() [1/2]

template<class DC , class DI >
bool FrameCPP::Common::PTR_STRUCT< DC, DI >::operator== ( const PTR_STRUCT< DC, DI > &  RHS) const
inline

comparison operator

Parameters
[in]RHSThe PTR_STRUCT to compare.
Returns
True if the two PTR_STRUCT elements reference the same stream object.

◆ operator==() [2/2]

template<class DC , class DI >
bool FrameCPP::Common::PTR_STRUCT< DC, DI >::operator== ( const Common::FrameSpec::Object Obj) const
inlinevirtual

comparison operator

Parameters
[in]ObjThe stream object to compare.
Returns
True if this PTR_STRUCT references Obj.

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

◆ promote()

template<class DC , class DI >
FrameSpec::ObjectInterface::promote_ret_type FrameCPP::Common::PTR_STRUCT< DC, DI >::promote ( INT_2U  Target,
FrameSpec::ObjectInterface::promote_arg_type  Obj,
IStream Stream 
) const
inlineprotectedvirtual

Promotes object to another version of the frame spec.

Parameters
[in]TargetThe version of the promoted frame specification.
[in]ObjThe object to be promoted.
[in]StreamThe input stream from which the original object was read.
Returns
An object promoted to the next generation.

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

◆ VerifyObject()

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

◆ Write()

template<class DC , class DI >
void FrameCPP::Common::PTR_STRUCT< DC, DI >::Write ( OStream Stream) const
inlinevirtual

Write the structure to the stream.

Parameters
[in]StreamThe output stream where the object is to be written.

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.

Member Data Documentation

◆ NULL_PTR

template<class DC, class DI>
const PTR_STRUCT< DC, DI > & FrameCPP::Common::PTR_STRUCT< DC, DI >::NULL_PTR = PTR_STRUCT< DC, DI >( 0, 0 )
static

Version specific NULL reference.


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