Class Index Cross Index Namespace Index

Class FrameCPP::Version_3_4_5::Output

Output.
Contained in: FrameCPP::Version_3_4_5
Derived from: none
Derived by: FrameCPP::Version_3_4_5::FrameWriterTOC

#include "../../../../../lib/framecpp/src/Version3_4_5/output.hh"


public function member index:

Output(std::ostream& out); Constructs an output object and writes the fileheader.
virtual ~Output(); Destructs the output object.
virtual void close(unsigned long tocOffset = 0); Finish frame file and close
void endRecord(const Base* b); Ends a record.
inline INT_4U getBytes() const; Get number of bytes written
inline INT_4U getFrames() const; Get the number of frame written
Output& operator <<(CHAR v); Output a character
Output& operator <<(CHAR_U v); Output an unsigned character
Output& operator <<(INT_2S v); Output short integer
Output& operator <<(INT_2U v); Output short unsigned integer
Output& operator <<(INT_4S v); Output signed integer
Output& operator <<(INT_4U v); Output unsigned integer
Output& operator <<(const INT_8S& v); Output long integer
Output& operator <<(const INT_8U& v); Output long unsigned integer
Output& operator <<(const REAL_4& v); Output real number
Output& operator <<(const REAL_8& v); Output double precision real number
Output& operator <<(const std::string& s); Output a std::string
Output& operator <<(const Base* b); Output an object
Output& operator <<(const Container< T >& c); Output a container.
Output& operator <<(const Frame&); Output a frame
Output& operator <<(const Reference& ref); Output a reference
void queueObject(const Base& o); Place an object into the subobjects queue
virtual void startRecord(INT_2U classId, INT_4U length, const Base* b); Begins a record.
void write(const void* buffer, unsigned int size); Write bytes to the stream.
virtual void writeFrame(const Frame& frame); Serialize a frame
 

protected function member index:

INT_2U getInstance(const Base* b); Get object instance.
 

private function member index:

void open(); Write file header out
 

Description:

Creates a frame file as an output stream.


Function Member Descriptions:


FrameCPP::Version_3_4_5::Output::Output - Constructs an output object and writes the fileheader.


Output(std::ostream& out);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::~Output - Destructs the output object.


virtual ~Output();

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::close - Finish frame file and close


virtual void close(unsigned long tocOffset = 0);



FrameCPP::Version_3_4_5::Output::endRecord - Ends a record.


void endRecord(const Base* b);
This method is executed when an object is finished writing itself. This method calls the write function for any objects it referred to and appends a pointer to the next object if it was a linked-list node.

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::getBytes - Get number of bytes written


inline INT_4U getBytes() const;



FrameCPP::Version_3_4_5::Output::getFrames - Get the number of frame written


inline INT_4U getFrames() const;



FrameCPP::Version_3_4_5::Output::getInstance - Get object instance.


INT_2U getInstance(const Base* b);



FrameCPP::Version_3_4_5::Output::open - Write file header out


void open();



FrameCPP::Version_3_4_5::Output::operator << - Output a character


Output& operator <<(CHAR v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output an unsigned character


Output& operator <<(CHAR_U v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output short integer


Output& operator <<(INT_2S v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output short unsigned integer


Output& operator <<(INT_2U v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output signed integer


Output& operator <<(INT_4S v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output unsigned integer


Output& operator <<(INT_4U v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output long integer


Output& operator <<(const INT_8S& v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output long unsigned integer


Output& operator <<(const INT_8U& v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output real number


Output& operator <<(const REAL_4& v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output double precision real number


Output& operator <<(const REAL_8& v);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output a std::string


Output& operator <<(const std::string& s);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output an object


Output& operator <<(const Base* b);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output a container.


Output& operator <<(const Container< T >& c);
This no longer needs to be a template

Exceptions:
ExceptionDescription
write_failureWrite failed.
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output a frame


Output& operator <<(const Frame&);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::operator << - Output a reference


Output& operator <<(const Reference& ref);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::queueObject - Place an object into the subobjects queue


void queueObject(const Base& o);



FrameCPP::Version_3_4_5::Output::startRecord - Begins a record.


virtual void startRecord(INT_2U classId, INT_4U length, const Base* b);
This writes out the length, class and instance id of the object and also initializes the ObjectInfo structure.

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::write - Write bytes to the stream.


void write(const void* buffer, unsigned int size);

Exceptions:
ExceptionDescription
write_failureWrite failed.



FrameCPP::Version_3_4_5::Output::writeFrame - Serialize a frame


virtual void writeFrame(const Frame& frame);
Outputs a frame object in the format defined by the frame spec.

Exceptions:
ExceptionDescription
write_failureWrite failed.



Variable Member Descriptions:


FrameCPP::Version_3_4_5::Output::dictionary - Frame dictionary.

Dictionary & dictionary;

FrameCPP::Version_3_4_5::Output::mClosed - Whether frame file was already closed.

bool mClosed;

FrameCPP::Version_3_4_5::Output::mCurrentInfo -

ObjectInfo* mCurrentInfo;

FrameCPP::Version_3_4_5::Output::mInstance - List of structure instances.

std::map< const Base*, INT_2U > mInstance;

FrameCPP::Version_3_4_5::Output::mIsNode - Whether the currently written object is a tree node.

bool mIsNode;

FrameCPP::Version_3_4_5::Output::mMaxInstance - Maximum instance values for structure classes.

std::map< INT_2U, INT_2U > mMaxInstance;

FrameCPP::Version_3_4_5::Output::mNBytes - Number of bytes written.

INT_4U mNBytes;

FrameCPP::Version_3_4_5::Output::mNFrames - Number of frames written.

INT_4U mNFrames;

FrameCPP::Version_3_4_5::Output::mNextNode - Next tree node.

Reference mNextNode;

FrameCPP::Version_3_4_5::Output::mObjectQueue - Object output queue.

ObjectQueue mObjectQueue;

FrameCPP::Version_3_4_5::Output::mOut - Output data stream.

std::ostream& mOut;

FrameCPP::Version_3_4_5::Output::mWritten - Set of object already written.

std::set< const Base* > mWritten;

FrameCPP::Version_3_4_5::Output::shWrittenSet - Set of structure class IDs for which SH and SEs were already written out.

std::set< INT_2U > shWrittenSet;
This is NOT reset for every frame. Kept throughout file output to make sure just one copy of SH (and one set of corresponding SEs) is output per structure type PER FILE.