Scopira 20080306

scopira::tool::iobjflow_i Class Reference

#include <flow.h>

Inheritance diagram for scopira::tool::iobjflow_i:
scopira::tool::itflow_i scopira::tool::iflow_i scopira::tool::flow_i scopira::tool::object scopira::tool::polyiflow scopira::tool::propiflow scopira::tool::isoiflow scopira::tool::archiveiflow

List of all members.

Public Member Functions

virtual bool read_object (object *&out)=0
template<class TT >
bool read_object_type (TT *&out)
template<class TT >
bool read_object_type (count_ptr< TT > &out)

Detailed Description

Input object serialization. This interface adds a virtual-object read method to itflow_t. In total - via inheritance - this interface may read objects, primitive types (including streams) and raw bytes.

Author:
Aleksander Demko

Member Function Documentation

virtual bool scopira::tool::iobjflow_i::read_object ( object *&  out) [pure virtual]

Reads a virtual object from the flow.

The method may succeed (by returning true) and still set out to be null. This is normal, and just means that a null pointer was stored in the stream.

Always pass a real object*. Do not attempt to pass (via a cast) yourobject* to this method. You will be bitten by subtlies in the way C++ moves pointers around on multiple or virtual inheritance heiarchies.

Parameters:
outthis will be set to the read object
Returns:
true on success, false on failure.
Author:
Aleksander Demko

Implemented in scopira::tool::polyiflow, scopira::tool::isoiflow, and scopira::tool::propiflow.

Referenced by read_object_type().

template<class TT >
bool scopira::tool::iobjflow_i::read_object_type ( count_ptr< TT > &  out)

Similar to read_object_type, but reads into an auto pointer directly.

Author:
Aleksander Demko
template<class TT >
bool scopira::tool::iobjflow_i::read_object_type ( TT *&  out)

This is a type safe helper around read_object. It will do read_object on its own temporary object* and verify (via assert) that it can be cast to your type TT.

Parameters:
outthe output pointer to set, may be null on success
Returns:
true on success
Author:
Aleksander Demko

References read_object().


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