# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CShapeStream Class Reference

This class is used to serialize a shape. More...

#include <shape.h>

List of all members.

Public Methods

 CShapeStream ()
 Default constructor. Set the IShape pointer to NULL. More...

 CShapeStream (IShape *shape)
 Constructor. More...

void setShapePointer (IShape *shape)
 Set the pointer to the IShape object. More...

IShapegetShapePointer () const
 Get the pointer to the IShape object. More...

virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 serial the shape. More...


Private Attributes

IShape_Shape


Detailed Description

This class is used to serialize a shape.

In reading, just create a CShapeStream object and serial your class with your input stream using "serial (IStream&)". Then take back the shape pointer. It is yours. In writing, create a CShapeStream object with a pointer on the IShape you want to serialize and serial it with "serial (IStream&)". You have to register all the IShape derived classes you want to serial.

See also:
IShape CClassRegistry

Definition at line 172 of file shape.h.


Constructor & Destructor Documentation

NL3D::CShapeStream::CShapeStream  
 

Default constructor. Set the IShape pointer to NULL.

Definition at line 91 of file shape.cpp.

References _Shape.

NL3D::CShapeStream::CShapeStream IShape   shape
 

Constructor.

Get a IShape pointer. Used to output serialization.

Parameters:
shape  the pointer on the IShape derived object you want to serialize.

Definition at line 98 of file shape.cpp.

References setShapePointer.


Member Function Documentation

IShape * NL3D::CShapeStream::getShapePointer   const
 

Get the pointer to the IShape object.

Used to serial a shape in input.

Returns:
shape the pointer on the IShape derived object serialized.

Definition at line 113 of file shape.cpp.

References _Shape.

void NL3D::CShapeStream::serial NLMISC::IStream   f throw (NLMISC::EStream) [virtual]
 

serial the shape.

Definition at line 120 of file shape.cpp.

void NL3D::CShapeStream::setShapePointer IShape   shape
 

Set the pointer to the IShape object.

Used to serial a shape in output.

Parameters:
shape  the pointer on the IShape derived object you want to serialize.

Definition at line 106 of file shape.cpp.

References _Shape.

Referenced by CShapeStream.


Member Data Documentation

IShape* NL3D::CShapeStream::_Shape [private]
 

Definition at line 196 of file shape.h.

Referenced by CShapeStream, getShapePointer, and setShapePointer.


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