# 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  

NLMISC::IStream Class Reference

A IO stream interface. More...

#include <stream.h>

Inheritance diagram for NLMISC::IStream:

NLAIAGENT::CMsgIStream NLAIAGENT::CMsgOStream NLMISC::CIFile NLMISC::CMemStream NLMISC::COFile NLMISC::COXml NLMISC::CBitMemStream NLMISC::CStringStream NLNET::CMessage List of all members.

Public Types

enum  TSeekOrigin { begin, current, end }
 Parameters for seek(). More...


Public Methods

 IStream (bool inputStream)
 Constructor. More...

virtual ~IStream ()
 Destructor. More...

 IStream (const IStream &other)
 Copy constructor. More...

IStream & operator= (const IStream &other)
 Assignment operator. More...

bool isReading () const
 Is this stream a Read/Input stream? More...

template<class T> void serial (T &obj)
 Template Object serialisation. More...

template<class T> void serialEnum (T &em)
 Template enum serialisation. Serialized as a sint32. More...

template<class T> void serialCont (std::vector< T > &cont)
template<class T> void serialCont (std::list< T > &cont)
template<class T> void serialCont (std::deque< T > &cont)
template<class T> void serialCont (std::set< T > &cont)
template<class T> void serialCont (std::multiset< T > &cont)
template<class K, class T> void serialCont (std::map< K, T > &cont)
template<class K, class T> void serialCont (std::multimap< K, T > &cont)
virtual void serialCont (std::vector< uint8 > &cont)
 Specialisation of serialCont() for vector<uint8>. More...

virtual void serialCont (std::vector< sint8 > &cont)
 Specialisation of serialCont() for vector<sint8>. More...

virtual void serialCont (std::vector< bool > &cont)
 Specialisation of serialCont() for vector<bool>. More...

template<class T> void serialContPtr (std::vector< T > &cont)
template<class T> void serialContPtr (std::list< T > &cont)
template<class T> void serialContPtr (std::deque< T > &cont)
template<class T> void serialContPtr (std::set< T > &cont)
template<class T> void serialContPtr (std::multiset< T > &cont)
template<class T> void serialContPolyPtr (std::vector< T > &cont)
template<class T> void serialContPolyPtr (std::list< T > &cont)
template<class T> void serialContPolyPtr (std::deque< T > &cont)
template<class T> void serialContPolyPtr (std::set< T > &cont)
template<class T> void serialContPolyPtr (std::multiset< T > &cont)
template<class T> void serialPtr (T *&ptr)
 Serialize Non Polymorphic Objet Ptr. More...

template<class T> void serialPolyPtr (T *&ptr)
 Serialize Polymorphic Objet Ptr. More...

uint serialVersion (uint currentVersion)
 Serialize a version number. More...

template<class T> void serialCheck (const T &value)
 Serialize a check value. More...

virtual bool seek (sint32 offset, TSeekOrigin origin)
 Moves the stream pointer to a specified location. More...

virtual sint32 getPos ()
 Get the location of the stream pointer. More...

virtual std::string getStreamName () const
 Get a name for this stream. More...

template<class T> void xmlSerial (T &value0, const char *nodeName)
 xmlSerial() serial a values into a node. More...

template<class T> void xmlSerial (T &value0, T &value1, const char *nodeName)
template<class T> void xmlSerial (T &value0, T &value1, T &value2, const char *nodeName)
template<class T> void xmlSerial (T &value0, T &value1, T &value2, T &value3, const char *nodeName)
bool xmlPush (const char *name)
bool xmlPushBegin (const char *name)
bool xmlPushEnd ()
 xmlPushEnd() close the node header. More...

bool xmlPop ()
 xmlPop() close the node. More...

bool xmlSetAttrib (const char *name)
 xmlSetAttrib() set the name of the next node header attribute serialised. More...

bool xmlBreakLine ()
 xmlBreakLine() insert a break line in the XML stream. More...

bool xmlComment ()
 xmlComment() insert a comment line in the XML stream. More...

virtual void serialBufferWithSize (uint8 *buf, uint32 len)
 This method first serializes the size of the buffer and after the buffer itself, it enables the possibility to serial with a serialCont() on the other side. More...

Base type serialisation.
Those method are a specialisation of template method "void serial(T&)".

virtual void serial (uint8 &b)
virtual void serial (sint8 &b)
virtual void serial (uint16 &b)
virtual void serial (sint16 &b)
virtual void serial (uint32 &b)
virtual void serial (sint32 &b)
virtual void serial (uint64 &b)
virtual void serial (sint64 &b)
virtual void serial (float &b)
virtual void serial (double &b)
virtual void serial (bool &b)
virtual void serial (char &b)
virtual void serial (std::string &b)
virtual void serial (ucstring &b)
BitField serialisation.
Unlike other serial method, The reading bitfield is returned!! If !this->isReading(), bf is returned.

MUST use it simply like this: a= serialBitFieldX(a); // where X== 8, 16 or 32.

NB: Performance warning: the data is stored as an uint8, uint16 or uint32, according to the method you use.

uint8 serialBitField8 (uint8 bf)
 Serialisation of bitfield <=8 bits. More...

uint16 serialBitField16 (uint16 bf)
 Serialisation of bitfield <=16 bits. More...

uint32 serialBitField32 (uint32 bf)
 Serialisation of bitfield <=32 bits. More...

Multiple serialisation.
Template for easy multiple serialisation.

template<class T0, class T1> void serial (T0 &a, T1 &b)
template<class T0, class T1, class T2> void serial (T0 &a, T1 &b, T2 &c)
template<class T0, class T1, class T2, class T3> void serial (T0 &a, T1 &b, T2 &c, T3 &d)
template<class T0, class T1, class T2, class T3, class T4> void serial (T0 &a, T1 &b, T2 &c, T3 &d, T4 &e)
template<class T0, class T1, class T2, class T3, class T4, class T5> void serial (T0 &a, T1 &b, T2 &c, T3 &d, T4 &e, T5 &f)
XML implementation interface
xmlPushBegin() open recurcively a new node and open its header.

You must call xmlPushEnd() to close the header and xmlPop() to close this node.

Returns:
true if you can open the node header, false if the stream is between a xmlPushBegin() and a xmlPushEnd() call.


virtual void serialBuffer (uint8 *buf, uint len)=0
 Method to be specified by the Deriver. More...

virtual void serialBit (bool &bit)=0

Static Public Methods

void setVersionException (bool throwOnOlder, bool throwOnNewer)
 Set the behavior of IStream regarding input stream that are older/newer than the class. More...

void getVersionException (bool &throwOnOlder, bool &throwOnNewer)
 Get the behavior of IStream regarding input stream that are older/newer than the class. More...


Protected Methods

void setXMLMode (bool on)
 Set the XML mode \on is true to enable XML mode else false. More...

virtual bool xmlPushBeginInternal (const char *name)
 xmlPushBegin implementation. More...

virtual bool xmlPushEndInternal ()
 xmlPushEnd implementation. More...

virtual bool xmlPopInternal ()
 xmlPop implementation. More...

virtual bool xmlSetAttribInternal (const char *name)
 xmlBreakLine implementation. More...

virtual bool xmlBreakLineInternal ()
 xmlBreakLine implementation. More...

virtual bool xmlCommentInternal ()
 xmlComment implementation. More...

void resetPtrTable ()
 for Deriver: reset the PtrTable in the stream. More...

void setInOut (bool inputStream)
 Change, in live, the state of the inputStream. More...

template<class T> void serialVector (T &cont)
 special version for serializing a vector. More...


Private Types

typedef std::map< uint64,
void * >::iterator 
ItIdMap
typedef std::map< uint64,
void * >::value_type 
ValueIdMap

Private Methods

void serialIStreamable (IStreamable *&ptr)
template<class T> void serialSTLContLen (T &cont, sint32 len)
 standard STL containers serialisation. More...

template<class T> void serialSTLCont (T &cont)
 standard STL containers serialisation. More...

template<class T> void serialSTLContLenPtr (T &cont, sint32 len)
 standard STL containers serialisation. More...

template<class T> void serialSTLContPtr (T &cont)
 standard STL containers serialisation. More...

template<class T> void serialVectorPtr (T &cont)
 special version for serializing a vector. More...

template<class T> void serialSTLContLenPolyPtr (T &cont, sint32 len)
 standard STL containers serialisation. More...

template<class T> void serialSTLContPolyPtr (T &cont)
 standard STL containers serialisation. More...

template<class T> void serialVectorPolyPtr (T &cont)
 special version for serializing a vector. More...

template<class T> void serialMultimap (T &cont)
 STL map<> and multimap<> serialisation. More...

template<class T> void serialMap (T &cont)
 STL map<> Support up to sint32 length containers. More...


Private Attributes

bool _InputStream
std::map< uint64, void * > _IdMap
bool _XML

Static Private Attributes

bool _ThrowOnOlder = false
bool _ThrowOnNewer = true

Detailed Description

A IO stream interface.

This is the base interface for stream objects. Differents kind of streams may be implemented, by specifying serialBuffer() methods.

Deriver Use:

The deriver must:

  • construct object specifying his type, see IStream(). A stream may be setup Input or Output at construction, but cannot change during his life.
  • specify serialBuffer(), to save or load pack of bytes.
  • specify serialBit(), to save or load a bit.
  • call resetPtrTable() when the stream reset itself (e.g.: CIFile::close() )
Sample of streams: COutMemoryStream, CInFileStream ...

Client Use:

An object which can be serialized, must provide a "void serial(IStream &)" method. In this method, he can use any of the IStream method to help himself like:

  • serial() with a base type (uint32, string, char...), or even with an object which provide "void serial(IStream &)"
  • template serial(T0&, T1&, ...) to serialize multiple object/variables in one call (up to 6).
  • serialCont() to serialize containers.
  • serialVersion() to check/store a version number of his class.
  • serialPtr() to use the ptr support of IStream (see serialPtr() for more information)
  • isReading() to know if he write in the stream, or if he read.
The using is very simple as shown in this example:

 class A
 {
 public:
        float   x;
        uint32  y;
        Class1  a;              // this class must provide a serial() method too...
        Base    *c,*d;  // Base must derive from IStreamable
        vector<Class2>  tab;

 public:
        void    serial(IStream &f)
        {
                sint    streamver= f.serialVersion(3);
                f.serial(x,y,a);
                f.serialPtr(c);
                f.serialCont(tab);
                if(streamver>=2)
                        f.serialPtr(d);
        }
 };

NB: YOU CANNOT use serial with a int / uint / sint type, since those type have unspecified length.

Author:
Lionel Berenguier , Vianney Lecroart , Nevrax France
Date:
2000

Definition at line 172 of file stream.h.


Member Typedef Documentation

typedef std::map<uint64, void*>::iterator NLMISC::IStream::ItIdMap [private]
 

Definition at line 858 of file stream.h.

Referenced by serialIStreamable, and serialPtr.

typedef std::map<uint64, void*>::value_type NLMISC::IStream::ValueIdMap [private]
 

Definition at line 859 of file stream.h.

Referenced by serialIStreamable, and serialPtr.


Member Enumeration Documentation

enum NLMISC::IStream::TSeekOrigin
 

Parameters for seek().

begin seek from the begining of the stream. current seek from the current location of the stream pointer. end seek from the end of the stream.

Enumeration values:
begin 
current 
end 

Definition at line 517 of file stream.h.

Referenced by NLMISC::CBitmap::load.


Constructor & Destructor Documentation

NLMISC::IStream::IStream bool    inputStream [inline, explicit]
 

Constructor.

Notice that those behavior can be set at construction only.

Parameters:
inputStream  is the stream an Input (read) stream?

Definition at line 55 of file stream_inline.h.

References _InputStream.

Referenced by NLMISC::CMemStream::CMemStream, NLAIAGENT::CMsgIStream::CMsgIStream, and NLAIAGENT::CMsgOStream::CMsgOStream.

virtual NLMISC::IStream::~IStream   [inline, virtual]
 

Destructor.

Definition at line 201 of file stream.h.

NLMISC::IStream::IStream const IStream &    other
 

Copy constructor.

Definition at line 88 of file stream.cpp.

References _XML, and operator=.


Member Function Documentation

sint32 NLMISC::IStream::getPos   [virtual]
 

Get the location of the stream pointer.

NB: If the stream doesn't support the seek fonctionnality, it throw ESeekNotSupported. Default implementation: { throw ESeekNotSupported; }

Parameters:
offset  is the wanted offset from the origin.
origin  is the origin of the seek
Returns:
the new offset regarding from the origin.
See also:
ESeekNotSupported SeekOrigin seek

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 394 of file stream.cpp.

Referenced by NLMISC::CBitmap::readTGA.

string NLMISC::IStream::getStreamName   const [virtual]
 

Get a name for this stream.

maybe a fileName if FileStream. Default is to return "".

Reimplemented in NLMISC::CIFile.

Definition at line 407 of file stream.cpp.

void NLMISC::IStream::getVersionException bool &    throwOnOlder,
bool &    throwOnNewer
[static]
 

Get the behavior of IStream regarding input stream that are older/newer than the class.

See also:
serialVersion() setVersionException()

Definition at line 77 of file stream.cpp.

References _ThrowOnNewer, and _ThrowOnOlder.

Referenced by loadForm.

bool NLMISC::IStream::isReading   const [inline]
 

Is this stream a Read/Input stream?

Definition at line 62 of file stream_inline.h.

References _InputStream.

Referenced by NL3D::CParticleSystemShape::buildFromPS, NLMISC::CMemStream::clear, NLPACS::UPrimitiveBlock::createPrimitiveBlock, NLMISC::CMemStream::fastSerial, NLMISC::CMemStream::fill, NLNET::CMessage::getHeaderSize, NLMISC::CBitMemStream::getPosInBit, NL3D::CParticleSystemShape::instanciatePS, NLNET::CMessage::invert, NLMISC::CMemStream::invert, NLMISC::CBitMemStream::invert, NLMISC::CMemStream::length, NLMISC::CBitMemStream::length, NLSOUND::CEnvEffect::load, NLMISC::CBitmap::load, NLMISC::CBitmap::loadSize, NLMISC::CBitmap::readTGA, NLNET::CMessage::readType, NLSOUND::CEnvEffect::save, NL3D::CVegetableShape::serial, NLPACS::CSurfaceQuadTree::serial, NLPACS::CQuadBranch::serial, NL3D::CSurfaceLightGrid::CCellCorner::serial, NLMISC::CStringStream::serial, serial, NLSOUND::CSoundSerializer::serial, NLSOUND::CSimpleSound::serial, NL3D::CInstanceGroup::serial, NL3D::CInstanceGroup::CInstance::serial, NLPACS::CRetrieverInstance::serial, NL3D::CPortal::serial, NL3D::CPointLight::serial, NL3D::CPatch::serial, NLMISC::CObjectVector< CVertex >::serial, NLMISC::COXml::serial, NLNET::TMessageRecord::serial, NLMISC::CMemStream::serial, NL3D::CMaterial::CLightMap::serial, NL3D::CMaterial::serial, NLNET::CLoginCookie::serial, NLNET::CInetAddress::serial, NL3D::CHLSTextureBank::serial, NLPACS::CGlobalRetriever::serial, NLPACS::CEdgeQuad::serial, NLSOUND::CContextSound::serial, NLSOUND::CComplexSound::serial, NLPACS::CChainQuad::serial, NLMISC::CBitMemStream::serial, NLSOUND::CBackgroundSound::serial, NL3D::CMaterialBase::CAnimatedTexture::serial, NLMISC::CAABBoxExt::serial, NLMISC::CStringStream::serialBit, NLMISC::CMemStream::serialBit, NLMISC::CBitMemStream::serialBit, NLMISC::CMemStream::serialBuffer, NLMISC::CBitMemStream::serialBuffer, serialCheck, NLMISC::CStringStream::serialCont, serialCont, NLMISC::CBitMemStream::serialCont, serialEnum, NL3D::CVertexBuffer::serialHeader, NLMISC::CStringStream::serialHex, NLMISC::CMemStream::serialHex, serialIStreamable, NL3D::CMeshMRMGeom::serialLodVertexData, serialMap, serialMultimap, NL3D::CVertexBuffer::serialOldV1Minus, serialPtr, NLMISC::CStringStream::serialSeparatedBufferIn, NLMISC::CMemStream::serialSeparatedBufferIn, NLMISC::CStringStream::serialSeparatedBufferOut, NLMISC::COXml::serialSeparatedBufferOut, NLMISC::CMemStream::serialSeparatedBufferOut, serialSTLCont, serialSTLContLen, serialSTLContLenPolyPtr, serialSTLContLenPtr, serialSTLContPolyPtr, serialSTLContPtr, NL3D::CVertexBuffer::serialSubset, serialVector, serialVectorPolyPtr, serialVectorPtr, serialVersion, NLNET::CMessage::setType, NLMISC::CBitmap::writeTGA, NLMISC::COXml::xmlBreakLineInternal, NLMISC::COXml::xmlCommentInternal, NLMISC::COXml::xmlPopInternal, NLMISC::COXml::xmlPushBeginInternal, NLMISC::COXml::xmlPushEndInternal, and NLMISC::COXml::xmlSetAttribInternal.

IStream & NLMISC::IStream::operator= const IStream &    other
 

Assignment operator.

Definition at line 100 of file stream.cpp.

References _InputStream.

Referenced by IStream.

void NLMISC::IStream::resetPtrTable   [protected]
 

for Deriver: reset the PtrTable in the stream.

If Derived stream provide reset()-like methods, they must call this method in their reset() methods. For example, CFile::close() must call it, so it will work correctly with next serialPtr()

Reimplemented in NLMISC::CMemStream.

Definition at line 241 of file stream.cpp.

References _IdMap.

Referenced by NLMISC::COFile::close, and NLMISC::CIFile::close.

bool NLMISC::IStream::seek sint32    offset,
TSeekOrigin    origin
[virtual]
 

Moves the stream pointer to a specified location.

NB: If the stream doesn't support the seek fonctionnality, it throw ESeekNotSupported. Default implementation: { throw ESeekNotSupported; }

Parameters:
offset  is the wanted offset from the origin.
origin  is the origin of the seek
Returns:
true if seek sucessfull.
See also:
ESeekNotSupported SeekOrigin getPos

Reimplemented in NLMISC::CMemStream.

Definition at line 388 of file stream.cpp.

References offset.

Referenced by NLMISC::CBitmap::load, NL3D::CMeshMRMGeom::loadNextLod, NLMISC::CBitmap::loadSize, NLMISC::CBitmap::readDDS, and NLMISC::CBitmap::readTGA.

template<class T0, class T1, class T2, class T3, class T4, class T5>
void NLMISC::IStream::serial T0 &    a,
T1 &    b,
T2 &    c,
T3 &    d,
T4 &    e,
T5 &    f
[inline]
 

Reimplemented in NLMISC::CMemStream.

Definition at line 301 of file stream.h.

References serial.

template<class T0, class T1, class T2, class T3, class T4>
void NLMISC::IStream::serial T0 &    a,
T1 &    b,
T2 &    c,
T3 &    d,
T4 &    e
[inline]
 

Reimplemented in NLMISC::CMemStream.

Definition at line 298 of file stream.h.

References serial.

template<class T0, class T1, class T2, class T3>
void NLMISC::IStream::serial T0 &    a,
T1 &    b,
T2 &    c,
T3 &    d
[inline]
 

Reimplemented in NLMISC::CMemStream.

Definition at line 295 of file stream.h.

References serial.

template<class T0, class T1, class T2>
void NLMISC::IStream::serial T0 &    a,
T1 &    b,
T2 &    c
[inline]
 

Reimplemented in NLMISC::CMemStream.

Definition at line 292 of file stream.h.

References serial.

template<class T0, class T1>
void NLMISC::IStream::serial T0 &    a,
T1 &    b
[inline]
 

Reimplemented in NLMISC::CMemStream.

Definition at line 289 of file stream.h.

References serial.

void NLMISC::IStream::serial ucstring   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 297 of file stream_inline.h.

References isReading, and serial.

void NLMISC::IStream::serial std::string &    b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 275 of file stream_inline.h.

References isReading, nlassert, and serial.

void NLMISC::IStream::serial char &    b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 268 of file stream_inline.h.

References serialBuffer.

void NLMISC::IStream::serial bool &    b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 261 of file stream_inline.h.

References serialBit.

void NLMISC::IStream::serial double &    b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 239 of file stream_inline.h.

References isReading, NLMISC_BSWAP64, serialBuffer, and v.

void NLMISC::IStream::serial float &    b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 217 of file stream_inline.h.

References isReading, NLMISC_BSWAP32, serialBuffer, and v.

void NLMISC::IStream::serial sint64   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 195 of file stream_inline.h.

References isReading, NLMISC_BSWAP64, serialBuffer, and v.

void NLMISC::IStream::serial uint64   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 173 of file stream_inline.h.

References isReading, NLMISC_BSWAP64, serialBuffer, and v.

void NLMISC::IStream::serial sint32   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 151 of file stream_inline.h.

References isReading, NLMISC_BSWAP32, serialBuffer, and v.

void NLMISC::IStream::serial uint32   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 129 of file stream_inline.h.

References isReading, NLMISC_BSWAP32, serialBuffer, and v.

void NLMISC::IStream::serial sint16   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 107 of file stream_inline.h.

References isReading, NLMISC_BSWAP16, serialBuffer, and v.

void NLMISC::IStream::serial uint16   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 85 of file stream_inline.h.

References isReading, NLMISC_BSWAP16, serialBuffer, and v.

void NLMISC::IStream::serial sint8   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 79 of file stream_inline.h.

References serialBuffer.

void NLMISC::IStream::serial uint8   b [inline, virtual]
 

Reimplemented in NLAIAGENT::CMsgIStream.

Definition at line 73 of file stream_inline.h.

References serialBuffer.

template<class T>
void NLMISC::IStream::serial T &    obj [inline]
 

Template Object serialisation.

Parameters:
obj  any object providing a "void serial(IStream&)" method. The object doesn't have to derive from IStreamable.
the VC++ error "error C2228: left of '.serial' must have class/struct/union type" means you don't provide a serial() method to your object. Or you may have use serial with a int / uint / sint type. REMEMBER YOU CANNOT do this, since those type have unspecified length.

Reimplemented in NLMISC::CBitMemStream.

Definition at line 222 of file stream.h.

Referenced by NL3D::CAnimationSetUser::addAnimation, NL3D::CAnimationSetUser::addSkeletonWeight, NLMISC::CEntityId::CEntityId, NLAIAGENT::IConnectIA::connectLoadStream, NL3D::UAnimation::createAnimation, NLAISCRIPT::CVarPStackParam::load, NLAISCRIPT::CVarPStack::load, NLAILOGIC::CVarSet::load, NLAILOGIC::CVar::load, NLAILOGIC::CValueSet::load, NLAISCRIPT::CScriptDebugSourceMemory::load, NLAISCRIPT::CScriptDebugSourceFile::load, NLAIC::CBinaryType::load, NLAILOGIC::IBaseOperator::load, NLAISCRIPT::CLdbRefOpCode::load, NLAISCRIPT::CLdbHeapMemberiOpCode::load, NLAISCRIPT::CLdbMemberOpCode::load, NLAISCRIPT::CLdbOpCode::load, NLAISCRIPT::CCallMethodi::load, NLAISCRIPT::CCallStackMethodi::load, NLAISCRIPT::CCallHeapMethodi::load, NLAISCRIPT::CCallMethod::load, NLAISCRIPT::CLibHeapMemberMethod::load, NLAISCRIPT::CLibStackMemberMethod::load, NLAISCRIPT::CLibCallMethodi::load, NLAISCRIPT::CLibCallInheritedMethod::load, NLAISCRIPT::CLibCallMethod::load, NLAISCRIPT::CLibMemberMethodi::load, NLAISCRIPT::CLibMemberInheritedMethod::load, NLAISCRIPT::CLibMemberMethod::load, NLAISCRIPT::CMarkMsg::load, NLAISCRIPT::CAffMemberOpCode::load, NLAISCRIPT::CAffHeapMemberiOpCode::load, NLAISCRIPT::CAffOpCode::load, NLAISCRIPT::CJmpOpCode::load, NLAISCRIPT::CJFalseOpCode::load, NLAISCRIPT::CAddParamNameDebug::load, NLAISCRIPT::CFindRunMsg::load, NLAISCRIPT::CAffOpCodeDebug::load, NLAISCRIPT::CLoadHeapObject::load, NLAIAGENT::CMessageGroup::load, NLAIAGENT::CVectorMsgContainer::load, NLAIAGENT::IMessageBase::load, NLAIAGENT::CLocalMailBox::load, NLAIAGENT::CSimpleLocalMailBox::load, NLAIAGENT::IListBasicManager::load, NLAISCRIPT::CAgentClass::load, NLAISCRIPT::CComponent::load, NLAISCRIPT::CMethodeName::load, NLAISCRIPT::CParam::load, NLAIAGENT::CIdent::load, NLAIAGENT::CIndexVariant::load, NLAIAGENT::CVectorGroupType::load, NLAIAGENT::CGroupType::load, NLAIFUZZY::CFuzzyVar::load, NLAIFUZZY::FuzzyType::load, NLAIFUZZY::CTriangleFuzzySet::load, NLAIFUZZY::CFuzzyRule::load, NLAILOGIC::CFactBase::load, NLSOUND::CEnvEffect::load, NLAISCRIPT::CCodeBrancheRunDebug::load, NLAISCRIPT::CCodeBrancheRun::load, NLAICHARACTER::CCharacterChild::load, NLAILOGIC::CBoolOperator::load, NLAILOGIC::CBoolAssert::load, NLMISC::CBitmap::load, NLAIAGENT::IAgentComposite::load, NLAIAGENT::CStringVarName::load, NLAIAGENT::CAgentScript::load, NLAIAGENT::CStringType::load, NLAIAGENT::INombre< sint32 >::load, NLAIAGENT::IAgentInput::load, NLAIAGENT::IVector::load, NLAIAGENT::CActorScript::load, NLAIAGENT::CIndexedVarName::loadClass, NL3D::CMeshMRMGeom::loadFirstLod, loadForm, NLAISCRIPT::IOpType::loadIOpType, NL3D::CMeshMRMGeom::loadNextLod, NLMISC::CBitmap::loadSize, NLMISC::CBitmap::readDDS, NLMISC::CBitmap::readTGA, NLAIAGENT::IRefrence::refLoadStream, NLAISCRIPT::CVarPStackParam::save, NLAISCRIPT::CVarPStack::save, NLAILOGIC::CVarSet::save, NLAILOGIC::CVar::save, NLAILOGIC::CValueSet::save, NLAISCRIPT::CScriptDebugSourceMemory::save, NLAISCRIPT::CScriptDebugSourceFile::save, NLAIC::CBinaryType::save, NLAILOGIC::IBaseOperator::save, NLAISCRIPT::CLdbRefOpCode::save, NLAISCRIPT::CLdbHeapMemberiOpCode::save, NLAISCRIPT::CLdbMemberOpCode::save, NLAISCRIPT::CLdbOpCode::save, NLAISCRIPT::CCallMethodi::save, NLAISCRIPT::CCallStackMethodi::save, NLAISCRIPT::CCallHeapMethodi::save, NLAISCRIPT::CCallMethod::save, NLAISCRIPT::CLibHeapMemberMethod::save, NLAISCRIPT::CLibStackMemberMethod::save, NLAISCRIPT::CLibCallMethodi::save, NLAISCRIPT::CLibCallInheritedMethod::save, NLAISCRIPT::CLibCallMethod::save, NLAISCRIPT::CLibMemberMethodi::save, NLAISCRIPT::CLibMemberInheritedMethod::save, NLAISCRIPT::CLibMemberMethod::save, NLAISCRIPT::CMarkMsg::save, NLAISCRIPT::CAffMemberOpCode::save, NLAISCRIPT::CAffHeapMemberiOpCode::save, NLAISCRIPT::CAffOpCode::save, NLAISCRIPT::CJmpOpCode::save, NLAISCRIPT::CJFalseOpCode::save, NLAISCRIPT::CLdbNewOpCode::save, NLAISCRIPT::CAddParamNameDebug::save, NLAISCRIPT::CFindRunMsg::save, NLAISCRIPT::CAffOpCodeDebug::save, NLAISCRIPT::CLoadHeapObject::save, NLAIAGENT::CMessageGroup::save, NLAIAGENT::CVectorMsgContainer::save, NLAIAGENT::IMessageBase::save, NLAIAGENT::CLocalMailBox::save, NLAIAGENT::CSimpleLocalMailBox::save, NLAIAGENT::IListBasicManager::save, NLAISCRIPT::CAgentClass::save, NLAISCRIPT::CComponent::save, NLAISCRIPT::CMethodeName::save, NLAISCRIPT::CParam::save, NLAIAGENT::CIdent::save, NLAIAGENT::CIndexVariant::save, NLAIAGENT::CVectorGroupType::save, NLAIAGENT::CGroupType::save, NLAIFUZZY::CFuzzyVar::save, NLAIFUZZY::FuzzyType::save, NLAIFUZZY::CTrapezeFuzzySet::save, NLAIFUZZY::CLeftFuzzySet::save, NLAIFUZZY::CTriangleFuzzySet::save, NLAIFUZZY::CRightFuzzySet::save, NLAIFUZZY::CFuzzyInterval::save, NLAILOGIC::CFactBase::save, NLSOUND::CEnvEffect::save, NLAISCRIPT::CCodeBrancheRunDebug::save, NLAISCRIPT::CCodeBrancheRun::save, NLAICHARACTER::CCharacterNoeud::save, NLAICHARACTER::CCharacterChild::save, NLAILOGIC::CBoolType::save, NLAILOGIC::CBoolOperator::save, NLAILOGIC::CBoolAssert::save, NLAIAGENT::IAgentComposite::save, NLAIAGENT::IRefrence::save, NLAIAGENT::IConnectIA::save, NLAIAGENT::CStringVarName::save, NLAIAGENT::CIndexedVarName::save, NLAIAGENT::CAgentScript::save, NLAIAGENT::CStringType::save, NLAIAGENT::INombre< sint32 >::save, NLAIAGENT::CLocalAgentMail::save, NLAIAGENT::IAgentInput::save, NLAIAGENT::IVector::save, NLAIAGENT::CActorScript::save, NLAIAGENT::CActor::save, NLAIAGENT::CIndexedVarName::saveClass, NLLIGO::CZoneRegion::serial, NLLIGO::CZoneRegion::SZoneUnit2::serial, NLLIGO::CZoneRegion::SZoneUnit::serial, NL3D::CZone::serial, NL3D::CZone::CPatchConnect::serial, NL3D::CPaletteSkin::serial, NL3D::CVegetableShape::serial, NL3D::CVegetable::serial, NLPACS::CVector2s::serial, NLMISC::CVector2f::serial, NLMISC::CVector2d::serial, NLMISC::CUVW::serial, NLMISC::CUV::serial, NLSOUND::UAudioMixer::TBackgroundFlags::serial, NL3D::CTrackSampledVector::serial, NL3D::CTrackSampledQuat::CQuatPack::serial, NL3D::CTrackSampledQuat::serial, NL3D::CTrackSampledCommon::CTimeBlock::serial, NL3D::CTileVegetableDesc::serial, NL3D::CTileLightInfluence::serial, NLPACS::IQuadNode::serial, NLPACS::CSurfaceQuadTree::serial, NLPACS::CQuadBranch::serial, NL3D::CSurfaceLightGrid::CCellCorner::serial, NL3D::CSurfaceLightGrid::serial, serial, NLSOUND::CSoundSerializer::serial, NLSOUND::CSound::serial, NL3D::CSkeletonWeight::CNode::serial, NLSOUND::CSimpleSound::serial, NL3D::CInstanceGroup::serial, NL3D::CInstanceGroup::CInstance::serial, NLPACS::CRetrieverInstance::CLink::serial, NLPACS::CRetrieverInstance::serial, NLPACS::CRetrievableSurface::CSurfaceLink::serial, NLPACS::CPrimitiveDesc::serial, NL3D::CPrimitiveBlock::serial, NL3D::CPortal::serial, NL3D::CPointLightNamedArray::CPointLightGroup::serial, NL3D::CPointLightNamed::serial, NL3D::CPointLight::serial, NL3D::CVector3s::serial, NL3D::CPatch::serial, NLMISC::CObjectVector< CVertex >::serial, NL3D::CMRMWedgeGeom::serial, NLPACS::UTriggerInfo::serial, NLPACS::UCollisionDesc::serial, NL3D::CMeshMRMGeom::CLodInfo::serial, NL3D::CMeshMRMGeom::CVertexBlock::serial, NL3D::CMeshMRMGeom::CRdrPass::serial, NL3D::CMeshMRMGeom::CLod::serial, NL3D::CMeshBase::CMatStage::serial, NL3D::CMeshGeom::CMatrixBlock::serial, NL3D::CMeshGeom::CRdrPass::serial, NL3D::CMaterial::CTexEnv::serial, NL3D::CMaterial::CLightMap::serial, NL3D::CMaterial::serial, NLNET::CLoginCookie::serial, NL3D::CLodCharacterTexture::CTUVQ::serial, NL3D::CLodCharacterTexture::serial, NL3D::CLodCharacterShape::CVertexInf::serial, NL3D::CLodCharacterShape::CVector3s::serial, NL3D::CLodCharacterShapeBuild::CPixelInfo::serial, NL3D::CLodCharacterShape::serial, NL3D::CLodCharacterShape::CBoneInfluence::serial, NL3D::CLodCharacterShape::CAnim::serial, NL3D::CLodCharacterShapeBuild::serial, NLPACS::CLocalRetriever::CInteriorFace::serial, NLPACS::CLocalRetriever::CTip::serial, NLPACS::CLocalRetriever::CTip::CChainTip::serial, NLPACS::CLocalRetriever::serial, NLNET::CInetAddress::serial, NL3D::CIGSurfaceLight::CRetrieverLightGrid::serial, NL3D::CIGSurfaceLight::serial, NL3D::CHLSTextureBank::CTextureInstance::serial, NL3D::CHLSColorTexture::serial, NL3D::CHLSColorTexture::CMask::serial, NL3D::CHLSColorDelta::serial, NLPACS::CGlobalRetriever::serial, NLPACS::CFaceGrid::serial, NLPACS::CExteriorMesh::CLink::serial, NLPACS::CExteriorMesh::COrderedEdges::serial, NLPACS::CExteriorMesh::CEdge::serial, NLPACS::CExteriorMesh::serial, NLSOUND::TEnvEffectRoom::serial, NLPACS::CEdgeQuad::serial, NLSOUND::CContextSound::serial, NLSOUND::CComplexSound::serial, NLPACS::CExteriorEdgeEntry::serial, NLPACS::CCollisionFace::serial, NLPACS::CSurfaceIdent::serial, NLPACS::CChainQuad::serial, NL3D::CBoneBase::serial, NLSOUND::CBackgroundSound::TSoundInfo::serial, CAutomataDesc::CState::serial, NL3D::CAnimationPlaylist::serial, NL3D::CAnimation::serial, NL3D::CMorphBase::serial, NL3D::CMaterialBase::CTexAnimTracks::serial, NL3D::CMaterialBase::serial, NLMISC::CAABBox::serial, serialBitField16, serialBitField32, serialBitField8, serialBufferWithSize, serialCheck, NL3D::CTrackSampledCommon::serialCommon, serialCont, serialEnum, NLSOUND::CEnvEffect::serialFileHeader, NL3D::CVertexBuffer::serialHeader, serialIStreamable, NL3D::CMeshMRMGeom::serialLodVertexData, serialMap, serialMultimap, NL3D::CVertexBuffer::serialOldV1Minus, serialPtr, serialSTLCont, serialSTLContLen, serialSTLContPolyPtr, serialSTLContPtr, serialVector, serialVectorPolyPtr, serialVectorPtr, serialVersion, NLMISC::CBitmap::writeTGA, and xmlSerial.

virtual void NLMISC::IStream::serialBit bool &    bit [pure virtual]
 

Implemented in NLAIAGENT::CMsgIStream.

Referenced by serial.

uint16 NLMISC::IStream::serialBitField16 uint16    bf [inline]
 

Serialisation of bitfield <=16 bits.

Definition at line 325 of file stream_inline.h.

References serial.

uint32 NLMISC::IStream::serialBitField32 uint32    bf [inline]
 

Serialisation of bitfield <=32 bits.

Definition at line 331 of file stream_inline.h.

References serial.

uint8 NLMISC::IStream::serialBitField8 uint8    bf [inline]
 

Serialisation of bitfield <=8 bits.

Definition at line 319 of file stream_inline.h.

References serial.

Referenced by NL3D::CMaterial::CTexEnv::serial.

virtual void NLMISC::IStream::serialBuffer uint8   buf,
uint    len
[pure virtual]
 

Method to be specified by the Deriver.

Warning:
Do not call these methods from outside, unless you really know what you are doing. Using them instead of serial() can lead to communication problems between different platforms !

Implemented in NLAIAGENT::CMsgIStream.

Referenced by NLMISC::CBitmap::readDDS, NLMISC::CBitmap::readTGA, NL3D::CTileNoiseMap::serial, serial, NLNET::CInetAddress::serial, serialBufferWithSize, serialCont, and NL3D::CVertexBuffer::serialSubset.

virtual void NLMISC::IStream::serialBufferWithSize uint8   buf,
uint32    len
[inline, virtual]
 

This method first serializes the size of the buffer and after the buffer itself, it enables the possibility to serial with a serialCont() on the other side.

Definition at line 845 of file stream.h.

References serial, and serialBuffer.

template<class T>
void NLMISC::IStream::serialCheck const T &    value [inline]
 

Serialize a check value.

An object can stream a check value to check integrity or format of filed or streamed data. Just call serial check with a const value. Write will serial the value. Read will check the value is the same. If it is not, it will throw EInvalidDataStream exception.

NB: The type of the value must implement an operator== and must be serializable.

Parameters:
value  the value used to the check.
See also:
EInvalidDataStream

Definition at line 488 of file stream.h.

References isReading, serial, value, xmlPop, and xmlPush.

Referenced by NLLIGO::CZoneTemplate::serial, NLLIGO::CZoneRegion::serial, NLLIGO::CZoneBankElement::serial, NL3D::CZone::serial, NL3D::CVegetableShape::serial, NLLIGO::CTransition::serial, NL3D::CSkeletonWeight::serial, NL3D::CInstanceGroup::serial, NLPACS::CPrimitiveBlock::serial, NL3D::CLodCharacterShape::serial, NL3D::CLodCharacterShapeBuild::serial, NLLIGO::CMaterial::serial, NL3D::CAnimationSet::serial, NL3D::CAnimation::serial, and NLSOUND::CEnvEffect::serialFileHeader.

void NLMISC::IStream::serialCont std::vector< bool > &    cont [virtual]
 

Specialisation of serialCont() for vector<bool>.

Reimplemented in NLMISC::CBitMemStream.

Definition at line 343 of file stream.cpp.

References isReading, serial, and serialBuffer.

void NLMISC::IStream::serialCont std::vector< sint8 > &    cont [virtual]
 

Specialisation of serialCont() for vector<sint8>.

Reimplemented in NLMISC::CBitMemStream.

Definition at line 324 of file stream.cpp.

References isReading, serial, and serialBuffer.

void NLMISC::IStream::serialCont std::vector< uint8 > &    cont [virtual]
 

Specialisation of serialCont() for vector<uint8>.

Reimplemented in NLMISC::CBitMemStream.

Definition at line 305 of file stream.cpp.

References isReading, serial, and serialBuffer.

template<class K, class T>
void NLMISC::IStream::serialCont std::multimap< K, T > &    cont [inline]
 

Reimplemented in NLMISC::CBitMemStream.

Definition at line 324 of file stream.h.

References serialMultimap.

template<class K, class T>
void NLMISC::IStream::serialCont std::map< K, T > &    cont [inline]
 

Reimplemented in NLMISC::CBitMemStream.

Definition at line 322 of file stream.h.

References serialMap.

template<class T>
void NLMISC::IStream::serialCont std::multiset< T > &    cont [inline]
 

Reimplemented in NLMISC::CBitMemStream.

Definition at line 320 of file stream.h.

References serialSTLCont.

template<class T>
void NLMISC::IStream::serialCont std::set< T > &    cont [inline]
 

Reimplemented in NLMISC::CBitMemStream.

Definition at line 318 of file stream.h.

References serialSTLCont.

template<class T>
void NLMISC::IStream::serialCont std::deque< T > &    cont [inline]
 

Reimplemented in NLMISC::CBitMemStream.

Definition at line 316 of file stream.h.

References serialSTLCont.

template<class T>
void NLMISC::IStream::serialCont std::list< T > &    cont [inline]
 

Reimplemented in NLMISC::CBitMemStream.

Definition at line 314 of file stream.h.

References serialSTLCont.

template<class T>
void NLMISC::IStream::serialCont std::vector< T > &    cont [inline]
 

Reimplemented in NLMISC::CBitMemStream.

Definition at line 312 of file stream.h.

References serialVector.

Referenced by NLAISCRIPT::CLdbMemberiOpCode::load, NLAISCRIPT::CLdbHeapMemberiOpCode::load, NLAISCRIPT::CLdbStackMemberiOpCode::load, NLAISCRIPT::CCallMethodi::load, NLAISCRIPT::CCallStackMethodi::load, NLAISCRIPT::CCallHeapMethodi::load, NLAISCRIPT::CLibStackMemberMethod::load, NLAISCRIPT::CLibCallMethodi::load, NLAISCRIPT::CLibMemberMethodi::load, NLAISCRIPT::CAffMemberiOpCode::load, NLAISCRIPT::CAffHeapMemberiOpCode::load, NLAISCRIPT::CLoadHeapObject::load, NLAISCRIPT::CLoadStackObject::load, NLAISCRIPT::CLoadSelfObject::load, loadForm, NLAISCRIPT::CLdbMemberiOpCode::save, NLAISCRIPT::CLdbHeapMemberiOpCode::save, NLAISCRIPT::CLdbStackMemberiOpCode::save, NLAISCRIPT::CCallMethodi::save, NLAISCRIPT::CCallStackMethodi::save, NLAISCRIPT::CCallHeapMethodi::save, NLAISCRIPT::CLibStackMemberMethod::save, NLAISCRIPT::CLibCallMethodi::save, NLAISCRIPT::CLibMemberMethodi::save, NLAISCRIPT::CAffMemberiOpCode::save, NLAISCRIPT::CAffHeapMemberiOpCode::save, NLAISCRIPT::CLoadHeapObject::save, NLAISCRIPT::CLoadStackObject::save, NLAISCRIPT::CLoadSelfObject::save, NLLIGO::CZoneTemplate::serial, NLLIGO::CZoneRegion::serial, NLLIGO::CZoneEdge::serial, NLLIGO::CZoneBankElement::serial, NL3D::CZone::serial, NL3D::CVegetableShape::serial, NL3D::CTileVegetableDesc::serial, NL3D::CSkeletonWeight::serial, NL3D::CInstanceGroup::serial, NL3D::CInstanceGroup::CInstance::serial, NLPACS::CRetrieverInstance::serial, NLPACS::CRetrieverBank::serial, NLPACS::CPrimitiveBlock::serial, NL3D::CPrimitiveBlock::serial, NL3D::CPortal::serial, NL3D::CPointLightNamedArray::serial, NL3D::CPatch::serial, NL3D::CMeshMRMGeom::CLod::serial, NL3D::CMeshBase::CLightInfoMapList::serial, NL3D::CMeshGeom::CMatrixBlock::serial, NL3D::CMaterial::serial, NL3D::CLodCharacterTexture::serial, NL3D::CLodCharacterShapeBank::serial, NL3D::CLodCharacterShape::serial, NL3D::CLodCharacterShape::CBoneInfluence::serial, NL3D::CLodCharacterShape::CAnim::serial, NL3D::CLodCharacterShapeBuild::serial, NLPACS::CLocalRetriever::CTopology::serial, NLPACS::CLocalRetriever::CTip::serial, NLPACS::CLocalRetriever::serial, NL3D::CIGSurfaceLight::serial, NL3D::CHLSTextureBank::serial, NL3D::CHLSColorTexture::serial, NL3D::CHLSColorTexture::CMask::serial, NLPACS::CGlobalRetriever::serial, NLPACS::CFaceGrid::serial, NLPACS::CExteriorMesh::serial, NLSOUND::CEnvEffect::serial, NLPACS::CEdgeQuad::serial, NLSOUND::CComplexSound::serial, NLPACS::CCollisionMeshBuild::serial, NLSOUND::CBackgroundSound::serial, CAutomataDesc::CState::serial, NL3D::CAnimationSet::serial, NL3D::CAnimation::serial, and NL3D::CMaterialBase::serial.

template<class T>
void NLMISC::IStream::serialContPolyPtr std::multiset< T > &    cont [inline]
 

Definition at line 367 of file stream.h.

References serialSTLContPolyPtr.

template<class T>
void NLMISC::IStream::serialContPolyPtr std::set< T > &    cont [inline]
 

Definition at line 365 of file stream.h.

References serialSTLContPolyPtr.

template<class T>
void NLMISC::IStream::serialContPolyPtr std::deque< T > &    cont [inline]
 

Definition at line 363 of file stream.h.

References serialSTLContPolyPtr.

template<class T>
void NLMISC::IStream::serialContPolyPtr std::list< T > &    cont [inline]
 

Definition at line 361 of file stream.h.

References serialSTLContPolyPtr.

template<class T>
void NLMISC::IStream::serialContPolyPtr std::vector< T > &    cont [inline]
 

Definition at line 359 of file stream.h.

References serialVectorPolyPtr.

Referenced by NL3D::CAnimation::serial.

template<class T>
void NLMISC::IStream::serialContPtr std::multiset< T > &    cont [inline]
 

Definition at line 350 of file stream.h.

References serialSTLContPtr.

template<class T>
void NLMISC::IStream::serialContPtr std::set< T > &    cont [inline]
 

Definition at line 348 of file stream.h.

References serialSTLContPtr.

template<class T>
void NLMISC::IStream::serialContPtr std::deque< T > &    cont [inline]
 

Definition at line 346 of file stream.h.

References serialSTLContPtr.

template<class T>
void NLMISC::IStream::serialContPtr std::list< T > &    cont [inline]
 

Definition at line 344 of file stream.h.

References serialSTLContPtr.

template<class T>
void NLMISC::IStream::serialContPtr std::vector< T > &    cont [inline]
 

Definition at line 342 of file stream.h.

References serialVectorPtr.

Referenced by NL3D::CAnimationSet::serial.

template<class T>
void NLMISC::IStream::serialEnum T &    em [inline]
 

Template enum serialisation. Serialized as a sint32.

Definition at line 251 of file stream.h.

References isReading, and serial.

Referenced by NL3D::CVegetableShape::serial, NL3D::CVegetable::serial, NLSOUND::CSoundSerializer::serial, NLSOUND::CSound::serial, NLPACS::CRetrieverInstance::serial, NLPACS::CPrimitiveDesc::serial, NL3D::CPointLight::serial, NL3D::CMaterial::serial, NLPACS::CLocalRetriever::serial, NLSOUND::CComplexSound::serial, and NL3D::CAnimationPlaylist::serial.

void NLMISC::IStream::serialIStreamable IStreamable *&    ptr [private]
 

Definition at line 113 of file stream.cpp.

References _IdMap, isReading, ItIdMap, nlassert, serial, ValueIdMap, xmlPop, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by serialPolyPtr.

template<class T>
void NLMISC::IStream::serialMap T &    cont [inline, private]
 

STL map<> Support up to sint32 length containers.

the object T must provide:

  • typedef iterator; (providing operator++() and operator *())
  • typedef value_type; (must be a std::pair<>)
  • typedef key_type; (must be the type of the key)
  • void clear();
  • size_type size const;
  • iterator begin;
  • iterator end;
  • iterator insert(iterator it, const value_type& x);
Known Supported containers: map<>
Parameters:
cont  a STL map<> container.

Definition at line 1327 of file stream.h.

References isReading, serial, xmlPop, xmlPush, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by serialCont.

template<class T>
void NLMISC::IStream::serialMultimap T &    cont [inline, private]
 

STL map<> and multimap<> serialisation.

Support up to sint32 length containers.

the object T must provide:

  • typedef iterator; (providing operator++() and operator *())
  • typedef value_type; (must be a std::pair<>)
  • typedef key_type; (must be the type of the key)
  • void clear();
  • size_type size const;
  • iterator begin;
  • iterator end;
  • iterator insert(iterator it, const value_type& x);
Known Supported containers: map<>, multimap<>.
Parameters:
cont  a STL map<> or multimap<> container.

Definition at line 1238 of file stream.h.

References isReading, serial, v, xmlPop, xmlPush, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by serialCont.

template<class T>
void NLMISC::IStream::serialPolyPtr T *&    ptr [inline]
 

Serialize Polymorphic Objet Ptr.

Works with NULL pointers. If the same object is found mutliple time in the stream, ONLY ONE instance is written! NB: The ptr is serialised as a uint64 (64 bit compliant).

Parameters:
ptr  a pointer on a IStreamable object.
See also:
resetPtrTable()

Definition at line 460 of file stream.h.

References serialIStreamable.

Referenced by NL3D::CMaterial::CLightMap::serial, NL3D::CMaterial::serial, NLSOUND::CEnvEffect::serial, NL3D::CMaterialBase::CAnimatedTexture::serial, and serialSTLContLenPolyPtr.

template<class T>
void NLMISC::IStream::serialPtr T *&    ptr [inline]
 

Serialize Non Polymorphic Objet Ptr.

Works with NULL pointers. If the same object is found mutliple time in the stream, ONLY ONE instance is written! NB: The ptr is serialised as a uint64 (64 bit compliant).

Parameters:
ptr  a pointer on a base type or an object.
See also:
resetPtrTable()

Definition at line 378 of file stream.h.

References _IdMap, isReading, ItIdMap, serial, ValueIdMap, xmlPop, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by NL3D::CParticleSystemShape::buildFromPS, NL3D::CParticleSystemShape::instanciatePS, and serialSTLContLenPtr.

template<class T>
void NLMISC::IStream::serialSTLCont T &    cont [inline, private]
 

standard STL containers serialisation.

Don't work with map<> and multimap<>. Support up to sint32 length containers.

the object T must provide:

  • typedef iterator; (providing operator++() and operator *())
  • typedef value_type; (a base type (uint...), or an object providing "void serial(IStream&)" method.)
  • void clear();
  • size_type size const;
  • iterator begin;
  • iterator end;
  • iterator insert(iterator it, const value_type& x);
Known Supported containers: vector<>, list<>, deque<>, set<>, multiset<>.
Parameters:
cont  a STL container (vector<>, set<> ...).

Definition at line 922 of file stream.h.

References isReading, serial, serialSTLContLen, xmlPop, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by serialCont.

template<class T>
void NLMISC::IStream::serialSTLContLen T &    cont,
sint32    len
[inline, private]
 

standard STL containers serialisation.

Don't work with map<> and multimap<>. Support up to sint32 length containers. serialize just len element of the container.

Definition at line 872 of file stream.h.

References isReading, serial, v, xmlPop, and xmlPush.

Referenced by serialSTLCont.

template<class T>
void NLMISC::IStream::serialSTLContLenPolyPtr T &    cont,
sint32    len
[inline, private]
 

standard STL containers serialisation.

Don't work with map<> and multimap<>. PolyPtr version Support up to sint32 length containers. serialize just len element of the container.

Definition at line 1129 of file stream.h.

References isReading, serialPolyPtr, and v.

Referenced by serialSTLContPolyPtr, and serialVectorPolyPtr.

template<class T>
void NLMISC::IStream::serialSTLContLenPtr T &    cont,
sint32    len
[inline, private]
 

standard STL containers serialisation.

Don't work with map<> and multimap<>. Ptr version. Support up to sint32 length containers. serialize just len element of the container.

Definition at line 1023 of file stream.h.

References isReading, serialPtr, and v.

Referenced by serialSTLContPtr, and serialVectorPtr.

template<class T>
void NLMISC::IStream::serialSTLContPolyPtr T &    cont [inline, private]
 

standard STL containers serialisation.

Don't work with map<> and multimap<>. PolyPtr version Support up to sint32 length containers.

Definition at line 1159 of file stream.h.

References isReading, serial, and serialSTLContLenPolyPtr.

Referenced by serialContPolyPtr.

template<class T>
void NLMISC::IStream::serialSTLContPtr T &    cont [inline, private]
 

standard STL containers serialisation.

Don't work with map<> and multimap<>. Ptr version. Support up to sint32 length containers.

Definition at line 1053 of file stream.h.

References isReading, serial, serialSTLContLenPtr, xmlPop, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by serialContPtr.

template<class T>
void NLMISC::IStream::serialVector T &    cont [inline, protected]
 

special version for serializing a vector.

Support up to sint32 length containers.

Definition at line 959 of file stream.h.

References NLMISC::contReset, isReading, serial, xmlPop, xmlPush, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by NLMISC::CStringStream::serialCont, serialCont, and NLMISC::CBitMemStream::serialCont.

template<class T>
void NLMISC::IStream::serialVectorPolyPtr T &    cont [inline, private]
 

special version for serializing a vector.

PolyPtr version Support up to sint32 length containers.

Definition at line 1182 of file stream.h.

References NLMISC::contReset, isReading, serial, serialSTLContLenPolyPtr, xmlPop, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by serialContPolyPtr.

template<class T>
void NLMISC::IStream::serialVectorPtr T &    cont [inline, private]
 

special version for serializing a vector.

Ptr version. Support up to sint32 length containers.

Definition at line 1088 of file stream.h.

References NLMISC::contReset, isReading, serial, serialSTLContLenPtr, xmlPop, xmlPushBegin, xmlPushEnd, and xmlSetAttrib.

Referenced by serialContPtr.

uint NLMISC::IStream::serialVersion uint    currentVersion
 

Serialize a version number.

Each object should store/read first a version number, using this method. Then he can use the streamVersion returned to see how he should serialise himself.

NB: Version Number is read/store as a uint8, or uint32 if too bigger..

Parameters:
currentVersion  the current version of the class, provided by user.
Returns:
the version of the stream. If the stream is an Output stream, currentVersion is returned.
See also:
setVersionException() getVersionException()

Definition at line 253 of file stream.cpp.

References _ThrowOnNewer, _ThrowOnOlder, isReading, serial, v, xmlPop, and xmlPush.

Referenced by loadForm, NLLIGO::CZoneRegion::serial, NLLIGO::CZoneRegion::SZoneUnit2::serial, NLLIGO::CZoneEdge::serial, NLLIGO::CZoneBankElement::serial, NL3D::CZone::serial, NL3D::CPatchInfo::CBindInfo::serial, NL3D::CZone::CPatchConnect::serial, NL3D::CBorderVertex::serial, NL3D::CVertexBuffer::serial, NL3D::CVegetableShape::serial, NL3D::CVegetable::serial, NLLIGO::CTransition::serial, NL3D::CTrackSampledVector::serial, NL3D::CTrackSampledQuat::serial, NL3D::CTrackSampledCommon::CTimeBlock::serial, NL3D::CTileVegetableDesc::serial, NL3D::CTileNoiseMap::serial, NLPACS::CSurfaceQuadTree::serial, NL3D::CSurfaceLightGrid::CCellCorner::serial, NL3D::CSurfaceLightGrid::serial, NL3D::CSkeletonWeight::CNode::serial, NL3D::CSkeletonWeight::serial, NL3D::CInstanceGroup::serial, NL3D::CInstanceGroup::CInstance::serial, NLPACS::CRetrieverInstance::serial, NLPACS::CRetrieverBank::serial, NLPACS::CPrimitiveBlock::serial, NLPACS::CPrimitiveDesc::serial, NL3D::CPrimitiveBlock::serial, NL3D::CPortal::serial, NL3D::CPointLightNamedArray::serial, NL3D::CPointLightNamed::serial, NL3D::CPointLight::serial, NL3D::CPatch::serial, NL3D::CMeshMRMGeom::CLodInfo::serial, NL3D::CMeshMRMGeom::CRdrPass::serial, NL3D::CMeshMRMGeom::CLod::serial, NL3D::CMeshGeom::CMatrixBlock::serial, NL3D::CMeshGeom::CRdrPass::serial, NL3D::CMaterial::serial, NL3D::CLodCharacterTexture::serial, NL3D::CLodCharacterShapeBank::serial, NL3D::CLodCharacterShape::serial, NL3D::CLodCharacterShape::CBoneInfluence::serial, NL3D::CLodCharacterShape::CAnim::serial, NL3D::CLodCharacterShapeBuild::serial, NLPACS::CLocalRetriever::serial, NLLIGO::CMaterial::serial, NL3D::CIGSurfaceLight::CRetrieverLightGrid::serial, NL3D::CIGSurfaceLight::serial, NL3D::CHLSTextureBank::CTextureInstance::serial, NL3D::CHLSTextureBank::serial, NL3D::CHLSColorTexture::serial, NL3D::CHLSColorTexture::CMask::serial, NL3D::CHLSColorDelta::serial, NLPACS::CGlobalRetriever::serial, NLPACS::CFaceGrid::serial, NLPACS::CExteriorMesh::serial, NLPACS::CEdgeQuad::serial, NLPACS::CChainQuad::serial, NL3D::CBoneBase::serial, NL3D::CAnimationSet::serial, NL3D::CAnimationPlaylist::serial, NL3D::CAnimation::serial, NL3D::CMaterialBase::CTexAnimTracks::serial, NL3D::CMaterialBase::serial, NLMISC::CAABBox::serial, NL3D::CTrackSampledCommon::serialCommon, NLSOUND::CEnvEffect::serialFileHeader, NL3D::CVertexBuffer::serialHeader, NL3D::CMeshMRMGeom::serialLodVertexData, and NL3D::CVertexBuffer::serialSubset.

void NLMISC::IStream::setInOut bool    inputStream [protected]
 

Change, in live, the state of the inputStream.

This could be usefull in certain case. The deriver which would want to do such a thing must call this method, and implement his own behavior. In certain case, it should call resetPtrTable() if he want to reset the stream ptr info (maybe always)...

Definition at line 400 of file stream.cpp.

References _InputStream.

Referenced by NLMISC::CMemStream::invert.

void NLMISC::IStream::setVersionException bool    throwOnOlder,
bool    throwOnNewer
[static]
 

Set the behavior of IStream regarding input stream that are older/newer than the class.

If throwOnOlder==true, IStream throws a EOlderStream when needed. If throwOnNewer==true, IStream throws a ENewerStream when needed.

By default, the behavior is throwOnOlder=false, throwOnNewer=true.

See also:
serialVersion() getVersionException()

Definition at line 70 of file stream.cpp.

References _ThrowOnNewer, and _ThrowOnOlder.

Referenced by loadForm.

void NLMISC::IStream::setXMLMode bool    on [protected]
 

Set the XML mode \on is true to enable XML mode else false.

Definition at line 414 of file stream.cpp.

References _XML.

Referenced by NLMISC::COXml::COXml, and NLMISC::COXml::init.

bool NLMISC::IStream::xmlBreakLine   [inline]
 

xmlBreakLine() insert a break line in the XML stream.

Returns:
true if the break line is added, return false if no node is opened.

Definition at line 762 of file stream.h.

References xmlBreakLineInternal.

virtual bool NLMISC::IStream::xmlBreakLineInternal   [inline, protected, virtual]
 

xmlBreakLine implementation.

Reimplemented in NLMISC::COXml.

Definition at line 813 of file stream.h.

Referenced by xmlBreakLine.

bool NLMISC::IStream::xmlComment   [inline]
 

xmlComment() insert a comment line in the XML stream.

Returns:
true if the comment is added, return false if no node is opened.

Definition at line 779 of file stream.h.

References xmlCommentInternal.

virtual bool NLMISC::IStream::xmlCommentInternal   [inline, protected, virtual]
 

xmlComment implementation.

Definition at line 816 of file stream.h.

Referenced by xmlComment.

bool NLMISC::IStream::xmlPop   [inline]
 

xmlPop() close the node.

Returns:
true if you can close the node, false if the node can't be closed (its header is still opened) or if there is no node to close.

Definition at line 727 of file stream.h.

References xmlPopInternal.

Referenced by NLLIGO::CZoneTemplate::serial, NLLIGO::CZoneEdge::serial, NLLIGO::CZoneBankElement::serial, NL3D::CZone::serial, NLLIGO::CTransition::serial, NLPACS::CPrimitiveBlock::serial, NLPACS::CPrimitiveDesc::serial, NL3D::CPatch::serial, NLMISC::CObjectVector< CVertex >::serial, NLMISC::COXml::serial, NLLIGO::CMaterial::serial, NLMISC::COXml::serialBuffer, serialCheck, serialIStreamable, serialMap, serialMultimap, serialPtr, serialSTLCont, serialSTLContLen, serialSTLContPtr, serialVector, serialVectorPolyPtr, serialVectorPtr, serialVersion, and xmlSerial.

virtual bool NLMISC::IStream::xmlPopInternal   [inline, protected, virtual]
 

xmlPop implementation.

Reimplemented in NLMISC::COXml.

Definition at line 807 of file stream.h.

Referenced by xmlPop.

bool NLMISC::IStream::xmlPush const char *    name [inline]
 

Definition at line 669 of file stream.h.

References res, xmlPushBeginInternal, and xmlPushEndInternal.

Referenced by NLLIGO::CZoneTemplate::serial, NLLIGO::CZoneEdge::serial, NLLIGO::CZoneBankElement::serial, NL3D::CZone::serial, NLLIGO::CTransition::serial, NLPACS::CPrimitiveBlock::serial, NLPACS::CPrimitiveDesc::serial, NL3D::CPatch::serial, NLMISC::CObjectVector< CVertex >::serial, NLMISC::COXml::serial, NLLIGO::CMaterial::serial, NLMISC::COXml::serialBuffer, serialCheck, serialMap, serialMultimap, serialSTLContLen, serialVector, serialVersion, and xmlSerial.

bool NLMISC::IStream::xmlPushBegin const char *    name [inline]
 

Definition at line 693 of file stream.h.

References xmlPushBeginInternal.

Referenced by NLMISC::CObjectVector< CVertex >::serial, serialIStreamable, serialMap, serialMultimap, serialPtr, serialSTLCont, serialSTLContPtr, serialVector, serialVectorPolyPtr, and serialVectorPtr.

virtual bool NLMISC::IStream::xmlPushBeginInternal const char *    name [inline, protected, virtual]
 

xmlPushBegin implementation.

Reimplemented in NLMISC::COXml.

Definition at line 801 of file stream.h.

Referenced by xmlPush, and xmlPushBegin.

bool NLMISC::IStream::xmlPushEnd   [inline]
 

xmlPushEnd() close the node header.

Returns:
true if you can close the node header, false if no node header have been opened with xmlPushBegin().

Definition at line 710 of file stream.h.

References xmlPushEndInternal.

Referenced by NLMISC::CObjectVector< CVertex >::serial, serialIStreamable, serialMap, serialMultimap, serialPtr, serialSTLCont, serialSTLContPtr, serialVector, serialVectorPolyPtr, and serialVectorPtr.

virtual bool NLMISC::IStream::xmlPushEndInternal   [inline, protected, virtual]
 

xmlPushEnd implementation.

Reimplemented in NLMISC::COXml.

Definition at line 804 of file stream.h.

Referenced by xmlPush, and xmlPushEnd.

template<class T>
void NLMISC::IStream::xmlSerial T &    value0,
T &    value1,
T &    value2,
T &    value3,
const char *    nodeName
[inline]
 

Definition at line 651 of file stream.h.

References serial, xmlPop, and xmlPush.

template<class T>
void NLMISC::IStream::xmlSerial T &    value0,
T &    value1,
T &    value2,
const char *    nodeName
[inline]
 

Definition at line 639 of file stream.h.

References serial, xmlPop, and xmlPush.

template<class T>
void NLMISC::IStream::xmlSerial T &    value0,
T &    value1,
const char *    nodeName
[inline]
 

Definition at line 627 of file stream.h.

References serial, xmlPop, and xmlPush.

template<class T>
void NLMISC::IStream::xmlSerial T &    value0,
const char *    nodeName
[inline]
 

xmlSerial() serial a values into a node.

Definition at line 615 of file stream.h.

References serial, xmlPop, and xmlPush.

Referenced by NLLIGO::CZoneEdge::serial, NL3D::CZone::serial, NL3D::CPatchInfo::CBindInfo::serial, NL3D::CZone::CPatchConnect::serial, NL3D::CBorderVertex::serial, NLLIGO::CTransition::serial, NL3D::CTileElement::serial, NL3D::CTileColorOldPatchVersion6::serial, NL3D::CTileColor::serial, NLPACS::CPrimitiveDesc::serial, NL3D::CPatch::serial, and NLLIGO::CMaterial::serial.

bool NLMISC::IStream::xmlSetAttrib const char *    name [inline]
 

xmlSetAttrib() set the name of the next node header attribute serialised.

\attribName is the name of the node header attribute serialised.

Returns:
true if the attribute name have been set, false if the node header is not open (the call is not between xmlPushBegin and xmlPushEnd)

Definition at line 745 of file stream.h.

References xmlSetAttribInternal.

Referenced by NLMISC::CObjectVector< CVertex >::serial, serialIStreamable, serialMap, serialMultimap, serialPtr, serialSTLCont, serialSTLContPtr, serialVector, serialVectorPolyPtr, and serialVectorPtr.

virtual bool NLMISC::IStream::xmlSetAttribInternal const char *    name [inline, protected, virtual]
 

xmlBreakLine implementation.

Reimplemented in NLMISC::COXml.

Definition at line 810 of file stream.h.

Referenced by xmlSetAttrib.


Member Data Documentation

std::map<uint64, void*> NLMISC::IStream::_IdMap [private]
 

Definition at line 857 of file stream.h.

Referenced by resetPtrTable, serialIStreamable, and serialPtr.

bool NLMISC::IStream::_InputStream [private]
 

Definition at line 852 of file stream.h.

Referenced by isReading, IStream, operator=, and setInOut.

bool NLMISC::IStream::_ThrowOnNewer = true [static, private]
 

Definition at line 66 of file stream.cpp.

Referenced by getVersionException, serialVersion, and setVersionException.

bool NLMISC::IStream::_ThrowOnOlder = false [static, private]
 

Definition at line 65 of file stream.cpp.

Referenced by getVersionException, serialVersion, and setVersionException.

bool NLMISC::IStream::_XML [private]
 

Definition at line 1410 of file stream.h.

Referenced by IStream, and setXMLMode.


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