|
|
|
|
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 ReferenceA IO stream interface.
More...
#include <stream.h>
Inheritance diagram for NLMISC::IStream
[legend]List of all members.
Public Types |
enum | TSeekOrigin {
begin,
current,
end
} |
| Parameters for seek(). More...
|
Public Methods |
| IStream (bool inputStream, bool needSwap) |
| 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<classT> void | serial (T &obj) |
| Template Object serialisation. More...
|
template<classT> void | serialEnum (T &em) |
| Template enum serialisation. Serialized as a sint32. More...
|
template<classT> void | serialCont (std::vector<T> &cont) |
template<classT> void | serialCont (std::list<T> &cont) |
template<classT> void | serialCont (std::deque<T> &cont) |
template<classT> void | serialCont (std::set<T> &cont) |
template<classT> void | serialCont (std::multiset<T> &cont) |
template<classK, classT> void | serialCont (std::map<K, T> &cont) |
template<classK, classT> 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<classT> void | serialContPtr (std::vector<T> &cont) |
template<classT> void | serialContPtr (std::list<T> &cont) |
template<classT> void | serialContPtr (std::deque<T> &cont) |
template<classT> void | serialContPtr (std::set<T> &cont) |
template<classT> void | serialContPtr (std::multiset<T> &cont) |
template<classT> void | serialContPolyPtr (std::vector<T> &cont) |
template<classT> void | serialContPolyPtr (std::list<T> &cont) |
template<classT> void | serialContPolyPtr (std::deque<T> &cont) |
template<classT> void | serialContPolyPtr (std::set<T> &cont) |
template<classT> void | serialContPolyPtr (std::multiset<T> &cont) |
template<classT> void | serialPtr (T* &ptr) |
| Serialize Non Polymorphic Objet Ptr. More...
|
template<classT> void | serialPolyPtr (T* &ptr) |
| Serialize Polymorphic Objet Ptr. More...
|
uint | serialVersion (uint currentVersion) |
| Serialize a version number. More...
|
template<classT> 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...
|
|
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) |
|
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...
|
|
Template for easy multiple serialisation.
|
template<classT0, classT1> void | serial (T0 &a, T1 &b) |
template<classT0, classT1, classT2> void | serial (T0 &a, T1 &b, T2 &c) |
template<classT0, classT1, classT2, classT3> void | serial (T0 &a, T1 &b, T2 &c, T3 &d) |
template<classT0, classT1, classT2, classT3, classT4> void | serial (T0 &a, T1 &b, T2 &c, T3 &d, T4 &e) |
template<classT0, classT1, classT2, classT3, classT4, classT5> void | serial (T0 &a, T1 &b, T2 &c, T3 &d, T4 &e, T5 &f) |
|
Known Supported containers: vector<>, list<>, deque<>, set<>, multiset<> Support up to sint32 length containers.
-
See also:
-
serialCont() serialContPtr()
|
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 | resetPtrTable () |
| for Deriver: reset the PtrTable in the stream. More...
|
void | setInOut (bool inputStream) |
| Change, in live, the state of the inputStream. More...
|
template<classT> 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<classT> void | serialSTLContLen (T &cont, sint32 len) |
| standard STL containers serialisation. More...
|
template<classT> void | serialSTLCont (T &cont) |
| standard STL containers serialisation. More...
|
template<classT> void | serialSTLContLenPtr (T &cont, sint32 len) |
| standard STL containers serialisation. More...
|
template<classT> void | serialSTLContPtr (T &cont) |
| standard STL containers serialisation. More...
|
template<classT> void | serialVectorPtr (T &cont) |
| special version for serializing a vector. More...
|
template<classT> void | serialSTLContLenPolyPtr (T &cont, sint32 len) |
| standard STL containers serialisation. More...
|
template<classT> void | serialSTLContPolyPtr (T &cont) |
| standard STL containers serialisation. More...
|
template<classT> void | serialVectorPolyPtr (T &cont) |
| special version for serializing a vector. More...
|
template<classT> void | serialMap (T &cont) |
| STL map<> and multimap<> serialisation. More...
|
Private Attributes |
bool | _InputStream |
bool | _NeedSwap |
std::map<uint64, void*> | _IdMap |
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;
Base *c,*d;
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(s):
-
Lionel Berenguier , Vianney Lecroart , Nevrax France
-
Date:
-
2000
Definition at line 156 of file stream.h.
Member Typedef Documentation
typedef std::map<uint64, void*>::iterator NLMISC::IStream::ItIdMap [private]
|
|
typedef std::map<uint64, void*>::value_type NLMISC::IStream::ValueIdMap [private]
|
|
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:
-
Definition at line 482 of file stream.h. |
Constructor & Destructor Documentation
NLMISC::IStream::IStream (
|
bool inputStream,
|
|
bool needSwap ) [inline]
|
|
|
Constructor.
You must set needSwap only if your stream need it (a CMemoryStream may not need it). IStream::IStream() force needSwap=false if NL_LITTLE_ENDIAN defined! Notice that those behavior can be set at construction only. -
Parameters:
-
inputStream
|
is the stream an Input (read) stream? |
needSwap
|
is the stream need endian swapping? |
Definition at line 53 of file stream_inline.h. |
NLMISC::IStream::~IStream (
|
) [inline, virtual]
|
|
NLMISC::IStream::IStream (
|
const IStream & other )
|
|
Member Function Documentation
sint32 NLMISC::IStream::getPos (
|
) [virtual]
|
|
void NLMISC::IStream::getVersionException (
|
bool & throwOnOlder,
|
|
bool & throwOnNewer ) [static]
|
|
bool NLMISC::IStream::isReading (
|
) const [inline]
|
|
|
Is this stream a Read/Input stream?
Definition at line 65 of file stream_inline.h.
Referenced by NLSOUND::CSound::load(), NLSOUND::CEnvSoundUser::load(), NLSOUND::CEnvEffect::load(), NLMISC::CBitmap::load(), NLMISC::CBitmap::loadSize(), NLMISC::CBitmap::readTGA(), NLSOUND::CSound::save(), NLSOUND::CEnvSoundUser::save(), NLSOUND::CEnvEffect::save(), NL3D::CZone::serial(), NLAISCRIPT::COperandSimpleListOr::serial(), NLAISCRIPT::COperandSimple::serial(), NL3D::CTextureFile::serial(), NLPACS::CSurfaceQuadTree::serial(), NLPACS::CQuadBranch::serial(), NLSOUND::CSourceUser::serial(), NLSOUND::CSound::serial(), NL3D::CInstanceGroup::serial(), NLPACS::CRetrieverInstance::serial(), NL3D::CPortal::serial(), CObjectViewer::serial(), NLNET::TMessageRecord::serial(), NL3D::CMaterial::CLightMap::serial(), NL3D::CMaterial::serial(), NLNET::CLoginCookie::serial(), NLNET::CInetAddress::serial(), NLAIC::CIdentTypeAlloc::serial(), NLPACS::CGlobalRetriever::serial(), NLSOUND::CEnvSoundUser::serial(), NLPACS::CEdgeQuad::serial(), NLPACS::CChainQuad::serial(), NL3D::CMaterialBase::CAnimatedTexture::serial(), NLMISC::CAABBoxExt::serial(), NL3D::CVertexBuffer::serialHeader(), NL3D::CMeshMRMGeom::serialLodVertexData(), NL3D::CVertexBuffer::serialOldV1Minus(), NL3D::CVertexBuffer::serialSubset(), and NLMISC::CBitmap::writeTGA(). |
IStream & NLMISC::IStream::operator= (
|
const IStream & other )
|
|
|
Assignment operator.
Definition at line 75 of file stream.cpp. |
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 159 of file stream.cpp. |
template<classT0, classT1, classT2, classT3, classT4, classT5> |
void NLMISC::IStream::serial (
|
T0 & a,
|
|
T1 & b,
|
|
T2 & c,
|
|
T3 & d,
|
|
T4 & e,
|
|
T5 & f ) [inline]
|
|
template<classT0, classT1, classT2, classT3, classT4> |
void NLMISC::IStream::serial (
|
T0 & a,
|
|
T1 & b,
|
|
T2 & c,
|
|
T3 & d,
|
|
T4 & e ) [inline]
|
|
template<classT0, classT1, classT2, classT3> |
void NLMISC::IStream::serial (
|
T0 & a,
|
|
T1 & b,
|
|
T2 & c,
|
|
T3 & d ) [inline]
|
|
template<classT0, classT1, classT2> |
void NLMISC::IStream::serial (
|
T0 & a,
|
|
T1 & b,
|
|
T2 & c ) [inline]
|
|
template<classT0, classT1> |
void NLMISC::IStream::serial (
|
T0 & a,
|
|
T1 & b ) [inline]
|
|
void NLMISC::IStream::serial (
|
ucstring & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
std::string & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
char & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
bool & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
double & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
float & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
sint64 & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
uint64 & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
sint32 & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
uint32 & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
sint16 & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
uint16 & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
sint8 & b ) [inline, virtual]
|
|
void NLMISC::IStream::serial (
|
uint8 & b ) [inline, virtual]
|
|
template<classT> |
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::CStringStream.
Definition at line 209 of file stream.h.
Referenced by NLAIAGENT::CAgentNumber::CAgentNumber(), NLAIAGENT::CIdent::CIdent(), NL3D::CAnimationSetUser::addAnimation(), NL3D::CAnimationSetUser::addSkeletonWeight(), CExportNel::buildShape(), NLAIAGENT::IConnectIA::connectLoadStream(), NL3D::UAnimation::createAnimation(), NLAISCRIPT::CVarPStackParam::load(), NLAISCRIPT::CVarPStack::load(), NLAILOGIC::CVarSet::load(), NLAILOGIC::CVar::load(), NLAILOGIC::CValueSet::load(), NLSOUND::CSound::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::CAgentNumber::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::load(), NLAIAGENT::IAgentInput::load(), NLAIAGENT::IVector::load(), NLAIAGENT::CActorScript::load(), NLAIAGENT::CIndexedVarName::loadClass(), NL3D::CMeshMRMGeom::loadFirstLod(), 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(), NLSOUND::CSound::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::CAgentNumber::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::save(), NLAIAGENT::CLocalAgentMail::save(), NLAIAGENT::IAgentInput::save(), NLAIAGENT::IVector::save(), NLAIAGENT::CActorScript::save(), NLAIAGENT::CActor::save(), NLAIAGENT::CIndexedVarName::saveClass(), NL3D::CZone::serial(), NL3D::CPatchInfo::CBindInfo::serial(), NL3D::CZone::CPatchConnect::serial(), NL3D::CBorderVertex::serial(), NL3D::CPaletteSkin::serial(), NLPACS::CVector2s::serial(), NLMISC::CVector2f::serial(), NLMISC::CVector2d::serial(), NLMISC::CUVW::serial(), NLMISC::CUV::serial(), NLAISCRIPT::COperandSimpleListOr::serial(), NLAISCRIPT::COperandSimple::serial(), NL3D::CTileElement::serial(), NL3D::CTileColor::serial(), NL3D::CTextureFile::serial(), NLPACS::IQuadNode::serial(), NLPACS::CSurfaceQuadTree::serial(), NLPACS::CQuadBranch::serial(), NLSOUND::CSourceUser::serial(), NLSOUND::CSound::serial(), NL3D::CSkeletonWeight::CNode::serial(), NL3D::CInstanceGroup::serial(), NL3D::CInstanceGroup::CInstance::serial(), NLPACS::CRetrieverInstance::CLink::serial(), NLPACS::CRetrieverInstance::serial(), NLPACS::CRetrievableSurface::CSurfaceLink::serial(), NL3D::CPrimitiveBlock::serial(), NL3D::CPortal::serial(), NL3D::CVector3s::serial(), NL3D::CPatch::serial(), CMeshDesc::serial(), CObjectViewer::serial(), NL3D::CMRMWedgeGeom::serial(), NLPACS::UTriggerInfo::serial(), NLPACS::UCollisionDesc::serial(), NL3D::CMeshMRMGeom::CLodInfo::serial(), NL3D::CMeshMRMGeom::CLod::serial(), NL3D::CMeshMRMGeom::CVertexBlock::serial(), NL3D::CMeshMRMGeom::CRdrPass::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(), NLPACS::CLocalRetriever::CInteriorFace::serial(), NLPACS::CLocalRetriever::CTip::serial(), NLPACS::CLocalRetriever::CTip::CChainTip::serial(), NLPACS::CLocalRetriever::serial(), NLNET::CInetAddress::serial(), NLPACS::CGlobalRetriever::serial(), NLPACS::CFaceGrid::serial(), NLPACS::CExteriorMesh::CLink::serial(), NLPACS::CExteriorMesh::COrderedEdges::serial(), NLPACS::CExteriorMesh::CEdge::serial(), NLPACS::CExteriorMesh::serial(), CExportNelOptions::serial(), NLSOUND::CEnvSoundUser::serial(), NLSOUND::TEnvEffectRoom::serial(), NLPACS::CEdgeQuad::serial(), NLPACS::CExteriorEdgeEntry::serial(), NLPACS::CCollisionFace::serial(), NLPACS::CSurfaceIdent::serial(), NLPACS::CChainQuad::serial(), NLSOUND::CBoundingSphere::serial(), NLSOUND::CBoundingBox::serial(), NL3D::CBoneBase::serial(), CAutomataDesc::CState::serial(), NL3D::CAnimationPlaylist::serial(), NL3D::CAnimation::serial(), NL3D::CMaterialBase::serial(), NLSOUND::CAmbiantSource::serial(), NLMISC::CAABBox::serial(), NLSOUND::CSound::serialFileHeader(), NLSOUND::CEnvEffect::serialFileHeader(), NL3D::CVertexBuffer::serialHeader(), NL3D::CMeshMRMGeom::serialLodVertexData(), NL3D::CVertexBuffer::serialOldV1Minus(), and NLMISC::CBitmap::writeTGA(). |
void NLMISC::IStream::serialBit (
|
bool & bit ) [pure virtual]
|
|
uint16 NLMISC::IStream::serialBitField16 (
|
uint16 bf ) [inline]
|
|
uint32 NLMISC::IStream::serialBitField32 (
|
uint32 bf ) [inline]
|
|
uint8 NLMISC::IStream::serialBitField8 (
|
uint8 bf ) [inline]
|
|
void NLMISC::IStream::serialBuffer (
|
uint8 * buf,
|
|
uint len ) [pure virtual]
|
|
template<classT> |
void NLMISC::IStream::serialCheck (
|
const T & value ) [inline]
|
|
void NLMISC::IStream::serialCont (
|
std::vector< bool >& cont ) [virtual]
|
|
void NLMISC::IStream::serialCont (
|
std::vector< sint8 >& cont ) [virtual]
|
|
void NLMISC::IStream::serialCont (
|
std::vector< uint8 >& cont ) [virtual]
|
|
template<classK, classT> |
void NLMISC::IStream::serialCont (
|
std::multimap< K,T >& cont ) [inline]
|
|
template<classK, classT> |
void NLMISC::IStream::serialCont (
|
std::map< K,T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialCont (
|
std::multiset< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialCont (
|
std::set< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialCont (
|
std::deque< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialCont (
|
std::list< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialCont (
|
std::vector< T >& cont ) [inline]
|
|
|
Reimplemented in NLMISC::CStringStream.
Definition at line 299 of file stream.h.
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(), 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(), NL3D::CZone::serial(), NL3D::CSkeletonWeight::serial(), NL3D::CInstanceGroup::serial(), NL3D::CInstanceGroup::CInstance::serial(), NLPACS::CRetrieverInstance::serial(), NLPACS::CRetrieverBank::serial(), NL3D::CPrimitiveBlock::serial(), NL3D::CPortal::serial(), NL3D::CPatch::serial(), CObjectViewer::serial(), NL3D::CMeshMRMGeom::CLod::serial(), NL3D::CMeshBase::CLightInfoMapList::serial(), NL3D::CMeshGeom::CMatrixBlock::serial(), NL3D::CMaterial::serial(), NLPACS::CLocalRetriever::CTopology::serial(), NLPACS::CLocalRetriever::CTip::serial(), NLPACS::CLocalRetriever::serial(), NLPACS::CGlobalRetriever::serial(), NLPACS::CFaceGrid::serial(), NLPACS::CExteriorMesh::serial(), NLSOUND::CEnvSoundUser::serial(), NLSOUND::CEnvEffect::serial(), NLPACS::CEdgeQuad::serial(), NLPACS::CCollisionMeshBuild::serial(), CAutomataDesc::CState::serial(), NL3D::CAnimationSet::serial(), NL3D::CAnimation::serial(), and NL3D::CMaterialBase::serial(). |
template<classT> |
void NLMISC::IStream::serialContPolyPtr (
|
std::multiset< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPolyPtr (
|
std::set< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPolyPtr (
|
std::deque< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPolyPtr (
|
std::list< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPolyPtr (
|
std::vector< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPtr (
|
std::multiset< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPtr (
|
std::set< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPtr (
|
std::deque< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPtr (
|
std::list< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialContPtr (
|
std::vector< T >& cont ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialEnum (
|
T & em ) [inline]
|
|
void NLMISC::IStream::serialIStreamable (
|
IStreamable *& ptr ) [private]
|
|
template<classT> |
void NLMISC::IStream::serialMap (
|
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 847 of file stream.h. |
template<classT> |
void NLMISC::IStream::serialPolyPtr (
|
T *& ptr ) [inline]
|
|
template<classT> |
void NLMISC::IStream::serialPtr (
|
T *& ptr ) [inline]
|
|
template<classT> |
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 603 of file stream.h. |
template<classT> |
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 561 of file stream.h. |
template<classT> |
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 750 of file stream.h. |
template<classT> |
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 668 of file stream.h. |
template<classT> |
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 780 of file stream.h. |
template<classT> |
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 698 of file stream.h. |
template<classT> |
void NLMISC::IStream::serialVector (
|
T & cont ) [inline, protected]
|
|
|
special version for serializing a vector.
Support up to sint32 length containers.
Definition at line 628 of file stream.h. |
template<classT> |
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 803 of file stream.h. |
template<classT> |
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 721 of file stream.h. |
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 171 of file stream.cpp.
Referenced by NL3D::CZone::serial(), NL3D::CPatchInfo::CBindInfo::serial(), NL3D::CZone::CPatchConnect::serial(), NL3D::CBorderVertex::serial(), NL3D::CVertexBuffer::serial(), NL3D::CTileNoiseMap::serial(), NL3D::CTextureFile::serial(), NLPACS::CSurfaceQuadTree::serial(), NL3D::CSkeletonWeight::CNode::serial(), NL3D::CSkeletonWeight::serial(), NL3D::CInstanceGroup::serial(), NL3D::CInstanceGroup::CInstance::serial(), NLPACS::CRetrieverInstance::serial(), NLPACS::CRetrieverBank::serial(), NL3D::CPrimitiveBlock::serial(), NL3D::CPortal::serial(), NL3D::CPatch::serial(), CMeshDesc::serial(), CObjectViewer::serial(), NL3D::CMeshMRMGeom::CLodInfo::serial(), NL3D::CMeshMRMGeom::CLod::serial(), NL3D::CMeshMRMGeom::CRdrPass::serial(), NL3D::CMeshMRM::serial(), NL3D::CMeshGeom::CMatrixBlock::serial(), NL3D::CMeshGeom::CRdrPass::serial(), NL3D::CMaterial::serial(), NLPACS::CLocalRetriever::serial(), NLPACS::CGlobalRetriever::serial(), NLPACS::CFaceGrid::serial(), NLPACS::CExteriorMesh::serial(), CExportNelOptions::serial(), NLPACS::CEdgeQuad::serial(), NLPACS::CChainQuad::serial(), NL3D::CBoneBase::serial(), NL3D::CAnimationSet::serial(), NL3D::CAnimationPlaylist::serial(), NL3D::CAnimation::serial(), NL3D::CMaterialBase::serial(), NLMISC::CAABBox::serial(), NLSOUND::CSound::serialFileHeader(), NLSOUND::CEnvSoundUser::serialFileHeader(), 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 302 of file stream.cpp. |
void NLMISC::IStream::setVersionException (
|
bool throwOnOlder,
|
|
bool throwOnNewer ) [static]
|
|
Member Data Documentation
std::map< uint64,void *> NLMISC::IStream::_IdMap [private]
|
|
bool NLMISC::IStream::_InputStream [private]
|
|
bool NLMISC::IStream::_NeedSwap [private]
|
|
bool NLMISC::IStream::_ThrowOnNewer = true [static, private]
|
|
bool NLMISC::IStream::_ThrowOnOlder = false [static, private]
|
|
The documentation for this class was generated from the following files:
|
|