#include <file.h>
Inheritance diagram for NLMISC::CIFile:

Nevrax France
Definition at line 79 of file file.h.
Seek fonctionnality | |
| enum | TSeekOrigin { begin, current, end } |
| virtual bool | seek (sint32 offset, TSeekOrigin origin) |
standard STL containers serialisation. | |
Known Supported containers: vector<>, list<>, deque<>, set<>, multiset<>, map<>, multimap<> Support up to sint32 length containers.
| |
| virtual void | serialCont (std::vector< bool > &cont) |
| Specialisation of serialCont() for vector<bool>. | |
| virtual void | serialCont (std::vector< sint8 > &cont) |
| Specialisation of serialCont() for vector<sint8>. | |
| virtual void | serialCont (std::vector< uint8 > &cont) |
| Specialisation of serialCont() for vector<uint8>. | |
| template<class K, class T> void | serialCont (std::multimap< K, T > &cont) |
| Specialisation of serialCont() for vector<bool>. | |
| template<class K, class T> void | serialCont (std::map< K, T > &cont) |
| Specialisation of serialCont() for vector<bool>. | |
| template<class T> void | serialCont (std::multiset< T > &cont) |
| Specialisation of serialCont() for vector<bool>. | |
| template<class T> void | serialCont (std::set< T > &cont) |
| Specialisation of serialCont() for vector<bool>. | |
| template<class T> void | serialCont (std::deque< T > &cont) |
| Specialisation of serialCont() for vector<bool>. | |
| template<class T> void | serialCont (std::list< T > &cont) |
| Specialisation of serialCont() for vector<bool>. | |
| template<class T, class Allocator> void | serialCont (std::vector< T, Allocator > &cont) |
| Specialisation of serialCont() for vector<bool>. | |
Statistics | |
| void | dump (std::vector< std::string > &result) |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | getNumFileOpen () |
| Get the number of file open from the begining of the application. Files can be in a big file. | |
| uint32 | getNumFileRead () |
| Get the number of read acces to a file. | |
| uint32 | getReadFromFile () |
| Get the number of byte read from the file system since the application start. | |
| uint32 | getReadingFromFile () |
| Get the number of byte being reading from the file system at the moment. | |
| virtual void | serialBit (bool &bit) throw (EReadError) |
| Get the last 40 files opened. The files can be in a big file. | |
| void | loadIntoCache () |
| Get the last 40 files opened. The files can be in a big file. | |
| bool | _AllowBNPCacheFileOnOpen |
| Get the last 40 files opened. The files can be in a big file. | |
| bool | _AlwaysOpened |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | _BigFileOffset |
| Get the last 40 files opened. The files can be in a big file. | |
| uint8 * | _Cache |
| Get the last 40 files opened. The files can be in a big file. | |
| bool | _CacheFileOnOpen |
| Get the last 40 files opened. The files can be in a big file. | |
| FILE * | _F |
| Get the last 40 files opened. The files can be in a big file. | |
| std::string | _FileName |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | _FileSize |
| Get the last 40 files opened. The files can be in a big file. | |
| bool | _IsAsyncLoading |
| Get the last 40 files opened. The files can be in a big file. | |
| bool | _IsInBigFile |
| Get the last 40 files opened. The files can be in a big file. | |
| sint32 | _ReadPos |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | _FileOpened = 0 |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | _FileRead = 0 |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | _NbBytesLoaded = 0 |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | _NbBytesSerialized = 0 |
| Get the last 40 files opened. The files can be in a big file. | |
| CSynchronized< std::list< std::string > > | _OpenedFiles = CSynchronized<std::list<std::string> >("") |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | _ReadFromFile = 0 |
| Get the last 40 files opened. The files can be in a big file. | |
| uint32 | _ReadingFromFile = 0 |
| Get the last 40 files opened. The files can be in a big file. | |
XML implementation interface | |
| void | resetPtrTable () |
| void | setInOut (bool inputStream) |
| void | setXMLMode (bool on) |
| virtual bool | xmlBreakLineInternal () |
| xmlBreakLine implementation | |
| virtual bool | xmlCommentInternal (const char *comment) |
| xmlComment implementation | |
| virtual bool | xmlPopInternal () |
| xmlPop implementation | |
| virtual bool | xmlPushBeginInternal (const char *name) |
| xmlPushBegin implementation | |
| virtual bool | xmlPushEndInternal () |
| xmlPushEnd implementation | |
| virtual bool | xmlSetAttribInternal (const char *name) |
| xmlBreakLine implementation | |
Public Types | |
Public Member Functions | |
| void | allowBNPCacheFileOnOpen (bool newState) |
| CIFile (const std::string &path, bool text=false) | |
| CIFile () | |
| Object. NB: destructor close() the stream. | |
| void | close () |
| Explicit close. | |
| bool | eof () |
| void | flush () |
| flush the file. | |
| uint32 | getFileSize () |
| void | getline (char *buffer, uint32 bufferSize) |
| sint32 | getPos () throw (EStream) |
| Gt the location of the file pointer. | |
| virtual std::string | getStreamName () const |
| bool | isReading () const |
| Is this stream a Read/Input stream? | |
| bool | isXML () const |
| bool | open (const std::string &path, bool text=false) |
| Open a file for reading. false if failed. close() if a file was opened. | |
| bool | seek (sint32 offset, IStream::TSeekOrigin origin) throw (EStream) |
| Seek the file. | |
| template<class T> void | serial (T &obj) |
| virtual void | serialBuffer (uint8 *buf, uint len) throw (EReadError) |
| virtual void | serialBufferWithSize (uint8 *buf, uint32 len) |
| template<class T> void | serialEnum (T &em) |
| Template enum serialisation. Serialized as a sint32. | |
| virtual void | serialMemStream (CMemStream &b) |
| Serial memstream, bitmemstream... | |
| void | setAsyncLoading (bool newState) |
| Set the async loading state (to go to sleep 5 ms after 100 Ko serialized). | |
| void | setCacheFileOnOpen (bool newState) |
| Set the cache file on open option (default behaviour is false (file is not cached at opening). | |
| ~CIFile () | |
Static Public Member Functions | |
| void | getVersionException (bool &throwOnOlder, bool &throwOnNewer) |
| void | setVersionException (bool throwOnOlder, bool throwOnNewer) |
Protected Member Functions | |
| template<class T> void | serialVector (T &cont) |
|
|
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. Definition at line 549 of file stream.h.
|
|
|
Object. NB: destructor close() the stream.
Definition at line 49 of file file.cpp. References _AllowBNPCacheFileOnOpen, _BigFileOffset, _CacheFileOnOpen, _FileSize, _IsAsyncLoading, _IsInBigFile, and _ReadPos.
00049 : IStream(true) 00050 { 00051 _F = NULL; 00052 _Cache = NULL; 00053 _ReadPos = 0; 00054 _FileSize = 0; 00055 _BigFileOffset = 0; 00056 _IsInBigFile = false; 00057 _CacheFileOnOpen = false; 00058 _IsAsyncLoading = false; 00059 _AllowBNPCacheFileOnOpen= true; 00060 } |
|
||||||||||||
|
Definition at line 63 of file file.cpp. References _AllowBNPCacheFileOnOpen, _BigFileOffset, _CacheFileOnOpen, _FileSize, _IsAsyncLoading, _IsInBigFile, _ReadPos, and open().
00063 : IStream(true) 00064 { 00065 _F=NULL; 00066 _Cache = NULL; 00067 _ReadPos = 0; 00068 _FileSize = 0; 00069 _BigFileOffset = 0; 00070 _IsInBigFile = false; 00071 _CacheFileOnOpen = false; 00072 _IsAsyncLoading = false; 00073 _AllowBNPCacheFileOnOpen= true; 00074 open(path, text); 00075 } |
|
|
Definition at line 78 of file file.cpp. References close().
00079 {
00080 close();
00081 }
|
|
|
If the file is opened with a big file, CacheFileOnOpen is replaced with big file option. Except if allowBNPCacheFileOnOpen(false) is called. true is default. Definition at line 450 of file file.cpp. References _AllowBNPCacheFileOnOpen. Referenced by NL3D::CTextureFile::buildBitmapFromFile().
00451 {
00452 _AllowBNPCacheFileOnOpen= newState;
00453 }
|
|
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 457 of file file.cpp. References _OpenedFiles.
00458 {
00459 CSynchronized<list<string> >::CAccessor acces(&_OpenedFiles);
00460
00461 const list<string> &openedFile = acces.value();
00462
00463 // Resize the destination array
00464 result.clear ();
00465 result.reserve (openedFile.size ());
00466
00467 // Add the waiting strings
00468 list<string>::const_reverse_iterator ite = openedFile.rbegin ();
00469 while (ite != openedFile.rend ())
00470 {
00471 result.push_back (*ite);
00472
00473 // Next task
00474 ite++;
00475 }
00476 }
|
|
|
Definition at line 349 of file file.cpp. References _FileSize, _ReadPos, and sint32. Referenced by getSHA1(), and NLMISC::CPath::loadRemappedFiles().
|
|
|
flush the file.
Definition at line 291 of file file.cpp. References _CacheFileOnOpen.
00292 {
00293 if (_CacheFileOnOpen)
00294 {
00295 }
00296 else
00297 {
00298 if (_F)
00299 {
00300 fflush (_F);
00301 }
00302 }
00303 }
|
|
|
Definition at line 119 of file file.h. References _FileSize, and uint32. Referenced by NLSOUND::CAudioMixerUser::buildSampleBankList(), NLAIPYSERVER::CPyExport::getCodeFromFile(), getSHA1(), and NLSOUND::CAsyncFileManagerSound::CLoadWavFile::run().
00119 { return _FileSize; }
|
|
||||||||||||
|
Definition at line 306 of file file.cpp. References buffer, serialBuffer(), uint, uint32, and uint8. Referenced by NLAINIMAT::CMHiCSbase::loadClassifierFromFile(), and NLMISC::CPath::loadRemappedFiles().
00307 {
00308 if (bufferSize == 0)
00309 return;
00310
00311 uint read = 0;
00312 while (true)
00313 {
00314 if (read == bufferSize - 1)
00315 {
00316 *buffer = '\0';
00317 return;
00318 }
00319
00320 try
00321 {
00322 // read one byte
00323 serialBuffer ((uint8 *)buffer, 1);
00324 }
00325 catch (EFile &)
00326 {
00327 *buffer = '\0';
00328 return;
00329 }
00330
00331 if (*buffer == '\n')
00332 {
00333 *buffer = '\0';
00334 return;
00335 }
00336
00337 // skip '\r' char
00338 if (*buffer != '\r')
00339 {
00340 buffer++;
00341 read++;
00342 }
00343 }
00344
00345 }
|
|
|
Get the number of file open from the begining of the application. Files can be in a big file.
Definition at line 129 of file file.h. References _FileOpened, and uint32.
00129 {return _FileOpened;}
|
|
|
Get the number of read acces to a file.
Definition at line 132 of file file.h. References _FileRead, and uint32.
00132 {return _FileRead;}
|
|
|
Gt the location of the file pointer.
Reimplemented from NLMISC::IStream. Definition at line 436 of file file.cpp. References sint32. Referenced by NLSOUND::CSampleBank::load().
00437 {
00438 return _ReadPos;
00439 }
|
|
|
Get the number of byte read from the file system since the application start.
Definition at line 135 of file file.h. References _ReadFromFile, and uint32.
00135 {return _ReadFromFile;}
|
|
|
Get the number of byte being reading from the file system at the moment.
Definition at line 138 of file file.h. References _ReadingFromFile, and uint32.
00138 {return _ReadingFromFile;}
|
|
|
Get a name for this stream. maybe a fileName if FileStream. Default is to return "". Reimplemented from NLMISC::IStream. Definition at line 443 of file file.cpp.
00444 {
00445 return _FileName;
00446 }
|
|
||||||||||||
|
Get the behavior of IStream regarding input stream that are older/newer than the class.
Definition at line 78 of file stream.cpp. References NLMISC::IStream::_ThrowOnNewer, and NLMISC::IStream::_ThrowOnOlder.
00079 {
00080 throwOnOlder=_ThrowOnOlder;
00081 throwOnNewer=_ThrowOnNewer;
00082 }
|
|
|
|
Definition at line 221 of file stream.h. References NLMISC::IStream::_XML. Referenced by NLMISC::CMemStream::serial().
00221 { return _XML; }
|
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 85 of file file.cpp. References _FileRead, _FileSize, _IsAsyncLoading, _NbBytesLoaded, _ReadFromFile, _ReadingFromFile, index, NLMISC::nlSleep(), sint, uint, uint32, and uint8. Referenced by open().
00086 {
00087 const uint32 READPACKETSIZE = 64 * 1024;
00088 const uint32 INTERPACKETSLEEP = 5;
00089
00090 _Cache = new uint8[_FileSize];
00091 if(!_IsAsyncLoading)
00092 {
00093 _ReadingFromFile += _FileSize;
00094 int read = fread (_Cache, _FileSize, 1, _F);
00095 _FileRead++;
00096 _ReadingFromFile -= _FileSize;
00097 _ReadFromFile += read * _FileSize;
00098 }
00099 else
00100 {
00101 uint index= 0;
00102 while(index<_FileSize)
00103 {
00104 if( _NbBytesLoaded + (_FileSize-index) > READPACKETSIZE )
00105 {
00106 sint n= READPACKETSIZE-_NbBytesLoaded;
00107 n= max(n, 1);
00108 _ReadingFromFile += n;
00109 int read = fread (_Cache+index, n, 1, _F);
00110 _FileRead++;
00111 _ReadingFromFile -= n;
00112 _ReadFromFile += read * n;
00113 index+= n;
00114
00115 nlSleep (INTERPACKETSLEEP);
00116 _NbBytesLoaded= 0;
00117 }
00118 else
00119 {
00120 uint n= _FileSize-index;
00121 _ReadingFromFile += n;
00122 int read = fread (_Cache+index, n, 1, _F);
00123 _FileRead++;
00124 _ReadingFromFile -= n;
00125 _ReadFromFile += read * n;
00126 _NbBytesLoaded+= n;
00127 index+= n;
00128 }
00129 }
00130 }
00131 }
|
|
||||||||||||
|
Open a file for reading. false if failed. close() if a file was opened.
Definition at line 135 of file file.cpp. References _AllowBNPCacheFileOnOpen, _AlwaysOpened, _BigFileOffset, _CacheFileOnOpen, _FileOpened, _FileSize, _IsInBigFile, _OpenedFiles, _ReadPos, close(), loadIntoCache(), NLMISC::nlfseek64(), NLMISC_DONE_FILE_OPENED, and nlwarning. Referenced by NLLIGO::CZoneBank::addElement(), NLPACS::CRetrieverBank::addRetriever(), NL3D::CTextureFile::buildBitmapFromFile(), CIFile(), NL3D::CSceneUser::createAnimationSet(), NLPACS::UPrimitiveBlock::createPrimitiveBlockFromFile(), NLAINIMAT::CMHiCSbase::dbgPrintClassifierPriorityInFile(), getSHA1(), NL3D::CInstanceLighter::light(), NL3D::CInstanceLighter::lightIgSimple(), NL3D::CShapeBank::load(), NLMISC::CEntityIdTranslator::load(), NLAINIMAT::CMHiCSbase::loadClassifierFromFile(), STRING_MANAGER::loadExcelSheet(), loadForm(), NL3D::CAnimationSet::loadFromFiles(), NL3D::CDriverUser::loadHLSBank(), NLMISC::CPath::loadRemappedFiles(), NLMISC::CBitmap::loadSize(), NLMISC::CI18N::readTextFile(), NLMISC::CConfigFile::reparse(), NL3D::CAsyncFileManager3D::CIGLoad::run(), and NL3D::CAsyncFileManager3D::CMeshLoad::run().
00136 {
00137 // Log opened files
00138 {
00139 CSynchronized<list<string> >::CAccessor fileOpened(&_OpenedFiles);
00140 fileOpened.value().push_front (path);
00141 if (fileOpened.value().size () > NLMISC_DONE_FILE_OPENED)
00142 fileOpened.value().resize (NLMISC_DONE_FILE_OPENED);
00143 _FileOpened++;
00144 }
00145
00146 close();
00147
00148 // can't open empty filename
00149 if(path.empty ())
00150 return false;
00151
00152 char mode[3];
00153 mode[0] = 'r';
00154 mode[1] = 'b'; // No more reading in text mode
00155 mode[2] = '\0';
00156
00157 _FileName = path;
00158 _ReadPos = 0;
00159
00160 // Bigfile access requested ?
00161 if (path.find('@') != string::npos)
00162 {
00163 _IsInBigFile = true;
00164 if(_AllowBNPCacheFileOnOpen)
00165 {
00166 _F = CBigFile::getInstance().getFile (path, _FileSize, _BigFileOffset, _CacheFileOnOpen, _AlwaysOpened);
00167 }
00168 else
00169 {
00170 bool dummy;
00171 _F = CBigFile::getInstance().getFile (path, _FileSize, _BigFileOffset, dummy, _AlwaysOpened);
00172 }
00173 if(_F != NULL)
00174 {
00175 // Start to load the bigfile at the file offset.
00176 nlfseek64 (_F, _BigFileOffset, SEEK_SET);
00177
00178 // Load into cache ?
00179 if (_CacheFileOnOpen)
00180 {
00181 // load file in the cache
00182 loadIntoCache();
00183
00184 if (!_AlwaysOpened)
00185 {
00186 fclose (_F);
00187 _F = NULL;
00188 }
00189 return (_Cache != NULL);
00190 }
00191 }
00192 }
00193 else
00194 {
00195 _IsInBigFile = false;
00196 _BigFileOffset = 0;
00197 _AlwaysOpened = false;
00198 _F = fopen (path.c_str(), mode);
00199 if (_F != NULL)
00200 {
00201 /*
00202
00203 THIS CODE REPLACED BY SADGE BECAUSE SOMETIMES
00204 ftell() RETRUNS 0 FOR NO GOOD REASON - LEADING TO CLIENT CRASH
00205
00206 nlfseek64 (_F, 0, SEEK_END);
00207 _FileSize = ftell(_F);
00208 nlfseek64 (_F, 0, SEEK_SET);
00209 nlassert(_FileSize==filelength(fileno(_F)));
00210
00211 THE FOLLOWING WORKS BUT IS NOT PORTABLE
00212 _FileSize=filelength(fileno(_F));
00213 */
00214 _FileSize=CFile::getFileSize (_F);
00215 if (_FileSize == 0)
00216 {
00217 nlwarning ("FILE: Size of file '%s' is 0", path.c_str());
00218 fclose (_F);
00219 _F = NULL;
00220 }
00221 }
00222 else
00223 {
00224 _FileSize = 0;
00225 }
00226
00227 if ((_CacheFileOnOpen) && (_F != NULL))
00228 {
00229 // load file in the cache
00230 loadIntoCache();
00231
00232 fclose (_F);
00233 _F = NULL;
00234 return (_Cache != NULL);
00235 }
00236 }
00237
00238 return (_F != NULL);
00239 }
|
|
|
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 253 of file stream.cpp. References NLMISC::IStream::_IdMap, and NLMISC::IStream::_NextSerialPtrId. Referenced by close(), NLMISC::COXml::init(), NLMISC::COFile::internalClose(), NLMISC::IStream::IStream(), and NLMISC::IStream::operator=().
00254 {
00255 _IdMap.clear();
00256 _NextSerialPtrId = 1; // Start at 1 because 0 is the NULL pointer
00257 }
|
|
||||||||||||
|
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; }
Reimplemented in NLMISC::CMemStream. Definition at line 401 of file stream.cpp. References offset, and sint32. Referenced by NLMISC::CBitmap::load(), NL3D::CMeshMRMGeom::loadNextLod(), NLMISC::CBitmap::loadSize(), NLMISC::CBitmap::readDDS(), and NLMISC::CBitmap::readTGA().
00402 {
00403 throw ESeekNotSupported(*this);
00404 return false;
00405 }
|
|
||||||||||||
|
Seek the file.
Definition at line 404 of file file.cpp. References NLMISC::nlfseek64(), nlstop, offset, and sint32. Referenced by NLSOUND::CSampleBank::load().
00405 {
00406 if ((_CacheFileOnOpen) && (_Cache == NULL))
00407 return false;
00408 if ((!_CacheFileOnOpen) && (_F == NULL))
00409 return false;
00410
00411 switch (origin)
00412 {
00413 case IStream::begin:
00414 _ReadPos = offset;
00415 break;
00416 case IStream::current:
00417 _ReadPos = _ReadPos + offset;
00418 break;
00419 case IStream::end:
00420 _ReadPos = _FileSize + offset;
00421 break;
00422 default:
00423 nlstop;
00424 }
00425
00426 if (_CacheFileOnOpen)
00427 return true;
00428
00429 // seek in the file. NB: if not in bigfile, _BigFileOffset==0.
00430 if (nlfseek64(_F, _BigFileOffset+_ReadPos, SEEK_SET) != 0)
00431 return false;
00432 return true;
00433 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented in NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 313 of file stream.h. References NLMISC::IStream::serial().
|
|
||||||||||||||||||||||||||||
|
Reimplemented in NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 310 of file stream.h. References NLMISC::IStream::serial().
|
|
||||||||||||||||||||||||
|
Reimplemented in NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 307 of file stream.h. References NLMISC::IStream::serial().
|
|
||||||||||||||||||||
|
Reimplemented in NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 304 of file stream.h. References NLMISC::IStream::serial().
|
|
||||||||||||||||
|
Reimplemented in NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 301 of file stream.h. References NLMISC::IStream::serial().
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 304 of file stream_inline.h. References NLMISC::IStream::isReading(), len, NLMISC::IStream::serial(), sint, and sint32.
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 277 of file stream_inline.h. References NLMISC::IStream::isReading(), len, nlwarning, NLMISC::IStream::serial(), sint, and sint32.
00278 {
00279 sint32 len=0;
00280 // Read/Write the length.
00281 if(isReading())
00282 {
00283 serial(len);
00284 // nlassert( len<1000000 ); // limiting string size
00285 if (len>1000000)
00286 {
00287 nlwarning("Trying to serialize a string of %u character !", len);
00288 throw NLMISC::EStreamOverflow();
00289 }
00290 b.resize(len);
00291 }
00292 else
00293 {
00294 len= b.size();
00295 serial(len);
00296 }
00297 // Read/Write the string.
00298 for(sint i=0;i<len;i++)
00299 serial(b[i]);
00300 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 270 of file stream_inline.h. References NLMISC::IStream::serialBuffer(), and uint8.
00271 {
00272 serialBuffer((uint8 *)&b, 1);
00273 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 263 of file stream_inline.h. References NLMISC::IStream::serialBit().
00264 {
00265 serialBit(b);
00266 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 241 of file stream_inline.h. References NLMISC::IStream::isReading(), NLMISC_BSWAP64, NLMISC::IStream::serialBuffer(), uint64, uint8, and v.
00242 {
00243 #ifdef NL_LITTLE_ENDIAN
00244 serialBuffer((uint8 *)&b, 8);
00245 #else // NL_LITTLE_ENDIAN
00246 uint64 v;
00247 if(isReading())
00248 {
00249 serialBuffer((uint8 *)&v, 8);
00250 NLMISC_BSWAP64(v);
00251 b=*((double*)&v);
00252 }
00253 else
00254 {
00255 v=*((uint64*)&b);
00256 NLMISC_BSWAP64(v);
00257 serialBuffer((uint8 *)&v, 8);
00258 }
00259 #endif // NL_LITTLE_ENDIAN
00260 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 219 of file stream_inline.h. References NLMISC::IStream::isReading(), NLMISC_BSWAP32, NLMISC::IStream::serialBuffer(), uint32, uint8, and v.
00220 {
00221 #ifdef NL_LITTLE_ENDIAN
00222 serialBuffer((uint8 *)&b, 4);
00223 #else // NL_LITTLE_ENDIAN
00224 uint32 v;
00225 if(isReading())
00226 {
00227 serialBuffer((uint8 *)&v, 4);
00228 NLMISC_BSWAP32(v);
00229 b=*((float*)&v);
00230 }
00231 else
00232 {
00233 v=*((uint32*)&b);
00234 NLMISC_BSWAP32(v);
00235 serialBuffer((uint8 *)&v, 4);
00236 }
00237 #endif // NL_LITTLE_ENDIAN
00238 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 197 of file stream_inline.h. References NLMISC::IStream::isReading(), NLMISC_BSWAP64, NLMISC::IStream::serialBuffer(), sint64, uint64, uint8, and v.
00198 {
00199 #ifdef NL_LITTLE_ENDIAN
00200 serialBuffer((uint8 *)&b, 8);
00201 #else // NL_LITTLE_ENDIAN
00202 uint64 v;
00203 if(isReading())
00204 {
00205 serialBuffer((uint8 *)&v, 8);
00206 NLMISC_BSWAP64(v);
00207 b=v;
00208 }
00209 else
00210 {
00211 v=b;
00212 NLMISC_BSWAP64(v);
00213 serialBuffer((uint8 *)&v, 8);
00214 }
00215 #endif // NL_LITTLE_ENDIAN
00216 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 175 of file stream_inline.h. References NLMISC::IStream::isReading(), NLMISC_BSWAP64, NLMISC::IStream::serialBuffer(), uint64, uint8, and v.
00176 {
00177 #ifdef NL_LITTLE_ENDIAN
00178 serialBuffer((uint8 *)&b, 8);
00179 #else // NL_LITTLE_ENDIAN
00180 uint64 v;
00181 if(isReading())
00182 {
00183 serialBuffer((uint8 *)&v, 8);
00184 NLMISC_BSWAP64(v);
00185 b=v;
00186 }
00187 else
00188 {
00189 v=b;
00190 NLMISC_BSWAP64(v);
00191 serialBuffer((uint8 *)&v, 8);
00192 }
00193 #endif // NL_LITTLE_ENDIAN
00194 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 153 of file stream_inline.h. References NLMISC::IStream::isReading(), NLMISC_BSWAP32, NLMISC::IStream::serialBuffer(), sint32, uint32, uint8, and v.
00154 {
00155 #ifdef NL_LITTLE_ENDIAN
00156 serialBuffer((uint8 *)&b, 4);
00157 #else // NL_LITTLE_ENDIAN
00158 uint32 v;
00159 if(isReading())
00160 {
00161 serialBuffer((uint8 *)&v, 4);
00162 NLMISC_BSWAP32(v);
00163 b=v;
00164 }
00165 else
00166 {
00167 v=b;
00168 NLMISC_BSWAP32(v);
00169 serialBuffer((uint8 *)&v, 4);
00170 }
00171 #endif // NL_LITTLE_ENDIAN
00172 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 131 of file stream_inline.h. References NLMISC::IStream::isReading(), NLMISC_BSWAP32, NLMISC::IStream::serialBuffer(), uint32, uint8, and v.
00132 {
00133 #ifdef NL_LITTLE_ENDIAN
00134 serialBuffer((uint8 *)&b, 4);
00135 #else // NL_LITTLE_ENDIAN
00136 uint32 v;
00137 if(isReading())
00138 {
00139 serialBuffer((uint8 *)&v, 4);
00140 NLMISC_BSWAP32(v);
00141 b=v;
00142 }
00143 else
00144 {
00145 v=b;
00146 NLMISC_BSWAP32(v);
00147 serialBuffer((uint8 *)&v, 4);
00148 }
00149 #endif // NL_LITTLE_ENDIAN
00150 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 109 of file stream_inline.h. References NLMISC::IStream::isReading(), NLMISC_BSWAP16, NLMISC::IStream::serialBuffer(), sint16, uint16, uint8, and v.
00110 {
00111 #ifdef NL_LITTLE_ENDIAN
00112 serialBuffer((uint8 *)&b, 2);
00113 #else // NL_LITTLE_ENDIAN
00114 uint16 v;
00115 if(isReading())
00116 {
00117 serialBuffer((uint8 *)&v, 2);
00118 NLMISC_BSWAP16(v);
00119 b=v;
00120 }
00121 else
00122 {
00123 v=b;
00124 NLMISC_BSWAP16(v);
00125 serialBuffer((uint8 *)&v, 2);
00126 }
00127 #endif // NL_LITTLE_ENDIAN
00128 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 87 of file stream_inline.h. References NLMISC::IStream::isReading(), NLMISC_BSWAP16, NLMISC::IStream::serialBuffer(), uint16, uint8, and v.
00088 {
00089 #ifdef NL_LITTLE_ENDIAN
00090 serialBuffer((uint8 *)&b, 2);
00091 #else // NL_LITTLE_ENDIAN
00092 uint16 v;
00093 if(isReading())
00094 {
00095 serialBuffer((uint8 *)&v, 2);
00096 NLMISC_BSWAP16(v);
00097 b=v;
00098 }
00099 else
00100 {
00101 v=b;
00102 NLMISC_BSWAP16(v);
00103 serialBuffer((uint8 *)&v, 2);
00104 }
00105 #endif // NL_LITTLE_ENDIAN
00106 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 81 of file stream_inline.h. References NLMISC::IStream::serialBuffer(), sint8, and uint8.
00082 {
00083 serialBuffer((uint8 *)&b, 1);
00084 }
|
|
|
Reimplemented in NLAIAGENT::CMsgIStream, NLAIAGENT::CMsgOStream, NLMISC::CBitMemStream, NLMISC::CMemStream, NLMISC::COXml, and NLMISC::CStringStream. Definition at line 75 of file stream_inline.h. References NLMISC::IStream::serialBuffer(), and uint8.
00076 {
00077 serialBuffer((uint8 *)&b, 1);
00078 }
|
|
||||||||||
|
|
Get the last 40 files opened. The files can be in a big file.
Implements NLMISC::IStream. Definition at line 395 of file file.cpp.
00396 {
00397 // Simple for now.
00398 uint8 v=bit;
00399 serialBuffer(&v, 1);
00400 bit=(v!=0);
00401 }
|
|
|
Serialisation of bitfield <=16 bits.
Definition at line 332 of file stream_inline.h. References NLMISC::IStream::serial(), and uint16.
00333 {
00334 serial(bf);
00335 return bf;
00336 }
|
|
|
Serialisation of bitfield <=32 bits.
Definition at line 338 of file stream_inline.h. References NLMISC::IStream::serial(), and uint32.
00339 {
00340 serial(bf);
00341 return bf;
00342 }
|
|
|
Serialisation of bitfield <=8 bits.
Definition at line 326 of file stream_inline.h. References NLMISC::IStream::serial(), and uint8. Referenced by NL3D::CMaterial::CTexEnv::serial().
00327 {
00328 serial(bf);
00329 return bf;
00330 }
|
|
||||||||||||
|
Method to be specified by the Deriver.
Implements NLMISC::IStream. Definition at line 355 of file file.cpp. References len, NLMISC::nlSleep(), uint, and uint8. Referenced by NLSOUND::CAudioMixerUser::buildSampleBankList(), NLAIPYSERVER::CPyExport::getCodeFromFile(), getline(), getSHA1(), NLSOUND::CSampleBank::load(), loadForm(), and NLSOUND::CAsyncFileManagerSound::CLoadWavFile::run().
00356 {
00357 // Check the read pos
00358 if ((_ReadPos < 0) || ((_ReadPos+len) > _FileSize))
00359 throw EReadError (_FileName);
00360 if ((_CacheFileOnOpen) && (_Cache == NULL))
00361 throw EFileNotOpened (_FileName);
00362 if ((!_CacheFileOnOpen) && (_F == NULL))
00363 throw EFileNotOpened (_FileName);
00364
00365 if (_IsAsyncLoading)
00366 {
00367 _NbBytesSerialized += len;
00368 if (_NbBytesSerialized > 64 * 1024)
00369 {
00370 nlSleep (5);
00371 _NbBytesSerialized = 0;
00372 }
00373 }
00374
00375 if (_CacheFileOnOpen)
00376 {
00377 memcpy (buf, _Cache + _ReadPos, len);
00378 _ReadPos += len;
00379 }
00380 else
00381 {
00382 int read;
00383 _ReadingFromFile += len;
00384 read=fread(buf, 1, len, _F);
00385 _FileRead++;
00386 _ReadingFromFile -= len;
00387 _ReadFromFile += read * 1;
00388 if (read < (int)len)
00389 throw EReadError(_FileName);
00390 _ReadPos += len;
00391 }
00392 }
|
|
||||||||||||
|
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 877 of file stream.h. References len, NLMISC::IStream::serial(), NLMISC::IStream::serialBuffer(), uint32, and uint8.
00878 {
00879 serial (len);
00880 serialBuffer (buf, len);
00881 }
|
|
||||||||||
|
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.
Definition at line 520 of file stream.h. References NLMISC::IStream::isReading(), NLMISC::IStream::serial(), value, NLMISC::IStream::xmlPop(), and NLMISC::IStream::xmlPush(). Referenced by NLNET::cbPacsAnswer(), NLNET::CPacsClient::initMessage(), loadForm(), NLLIGO::CZoneRegion::serial(), NLLIGO::CZoneBankElement::serial(), NL3D::CZone::serial(), NL3D::CVegetableShape::serial(), NL3D::CSkeletonWeight::serial(), NL3D::CInstanceGroup::serial(), NL3D::CLodCharacterShape::serial(), NL3D::CLodCharacterShapeBuild::serial(), NL3D::CAnimationSet::serial(), and NL3D::CAnimation::serial().
00521 {
00522 // Open a node
00523 xmlPush ("CHECK");
00524
00525 if (isReading())
00526 {
00527 T read;
00528 serial (read);
00529 if (read!=value)
00530 throw EInvalidDataStream(*this);
00531 }
00532 else
00533 {
00534 serial (const_cast<T&>(value));
00535 }
00536
00537 // Close the node
00538 xmlPop ();
00539 }
|
|
|
Specialisation of serialCont() for vector<bool>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 356 of file stream.cpp. References NLMISC::IStream::isReading(), len, NLMISC::IStream::serial(), NLMISC::IStream::serialBuffer(), sint, sint32, uint, and uint8.
00357 {
00358 sint32 len=0;
00359 vector<uint8> vec;
00360
00361 if(isReading())
00362 {
00363 serial(len);
00364 cont.resize(len);
00365
00366 if (len != 0)
00367 {
00368 // read as uint8*.
00369 sint lb= (len+7)/8;
00370 vec.resize(lb);
00371 serialBuffer( (uint8*)&(*vec.begin()) , lb);
00372 for(sint i=0;i<len;i++)
00373 {
00374 uint bit= (vec[i>>3]>>(i&7)) & 1;
00375 cont[i]= bit?true:false;
00376 }
00377 }
00378 }
00379 else
00380 {
00381 len= cont.size();
00382 serial(len);
00383
00384 if (len != 0)
00385 {
00386 // write as uint8*.
00387 sint lb= (len+7)/8;
00388 vec.resize(lb);
00389 fill_n(vec.begin(), lb, 0);
00390 for(sint i=0;i<len;i++)
00391 {
00392 uint bit= cont[i]?1:0;
00393 vec[i>>3]|= bit<<(i&7);
00394 }
00395 serialBuffer( (uint8*)&(*vec.begin()) , lb);
00396 }
00397 }
00398
00399 }
|
|
|
Specialisation of serialCont() for vector<sint8>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 337 of file stream.cpp. References NLMISC::IStream::isReading(), len, NLMISC::IStream::serial(), NLMISC::IStream::serialBuffer(), sint32, and uint8.
00338 {
00339 sint32 len=0;
00340 if(isReading())
00341 {
00342 serial(len);
00343 cont.resize(len);
00344 if (len != 0)
00345 serialBuffer( (uint8*)&(*cont.begin()) , len);
00346 }
00347 else
00348 {
00349 len= cont.size();
00350 serial(len);
00351 if (len != 0)
00352 serialBuffer( (uint8*)&(*cont.begin()) , len);
00353 }
00354 }
|
|
|
Specialisation of serialCont() for vector<uint8>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 318 of file stream.cpp. References NLMISC::IStream::isReading(), len, NLMISC::IStream::serial(), NLMISC::IStream::serialBuffer(), sint32, and uint8.
00319 {
00320 sint32 len=0;
00321 if(isReading())
00322 {
00323 serial(len);
00324 cont.resize(len);
00325 if (len != 0)
00326 serialBuffer( (uint8*)&(*cont.begin()) , len);
00327 }
00328 else
00329 {
00330 len= cont.size();
00331 serial(len);
00332 if (len != 0)
00333 serialBuffer( (uint8*)&(*cont.begin()) , len);
00334 }
00335 }
|
|
||||||||||
|
Specialisation of serialCont() for vector<bool>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 336 of file stream.h. References NLMISC::IStream::serialMultimap().
00336 {serialMultimap(cont);}
|
|
||||||||||
|
Specialisation of serialCont() for vector<bool>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 334 of file stream.h. References NLMISC::IStream::serialMap().
00334 {serialMap(cont);}
|
|
||||||||||
|
Specialisation of serialCont() for vector<bool>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 332 of file stream.h. References NLMISC::IStream::serialSTLCont().
00332 {serialSTLCont(cont);}
|
|
||||||||||
|
Specialisation of serialCont() for vector<bool>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 330 of file stream.h. References NLMISC::IStream::serialSTLCont().
00330 {serialSTLCont(cont);}
|
|
||||||||||
|
Specialisation of serialCont() for vector<bool>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 328 of file stream.h. References NLMISC::IStream::serialSTLCont().
00328 {serialSTLCont(cont);}
|
|
||||||||||
|
Specialisation of serialCont() for vector<bool>.
Reimplemented in NLMISC::CBitMemStream, NLMISC::CMemStream, and NLMISC::CStringStream. Definition at line 326 of file stream.h. References NLMISC::IStream::serialSTLCont().
00326 {serialSTLCont(cont);}
|
|
||||||||||
|
Specialisation of serialCont() for vector<bool>.
Definition at line 324 of file stream.h. References NLMISC::IStream::serialVector(). Referenced by NL3D::H_AUTO_DECL(), NLAISCRIPT::CLdbHeapMemberiOpCode::load(), NLAISCRIPT::CLdbStackMemberiOpCode::load(), NLAISCRIPT::CLdbMemberiOpCode::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(), NLMISC::CEntityIdTranslator::load(), NLSOUND::CBackgroundSoundManager::load(), loadForm(), NLAISCRIPT::CLdbHeapMemberiOpCode::save(), NLAISCRIPT::CLdbStackMemberiOpCode::save(), NLAISCRIPT::CLdbMemberiOpCode::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(), NLMISC::CEntityIdTranslator::save(), NLLIGO::CZoneRegion::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::CRetrievableSurface::TLoop::serial(), NLPACS::CRetrievableSurface::serial(), NL3D::CPrimitiveBlock::serial(), NL3D::CPortal::serial(), NL3D::CPointLightNamedArray::serial(), NL3D::CPatch::serial(), NLMISC::CNoiseColorGradient::serial(), NL3D::CMeshMRMSkinnedGeom::CRdrPass::serial(), NL3D::CMeshMRMSkinnedGeom::CPackedVertexBuffer::serial(), NL3D::CMeshMRMSkinnedGeom::serial(), NL3D::CMeshBase::CLightMapInfoList::serial(), NL3D::CMeshBase::CLightInfoMapListV7::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(), NLPACS::CEdgeQuad::serial(), NLPACS::CCollisionMeshBuild::serial(), NL3D::CCluster::serial(), NLPACS::CChain::serial(), NLPACS::COrderedChain::serial(), NLPACS::COrderedChain3f::serial(), NLMISC::CBitSet::serial(), CAutomataDesc::CState::serial(), NL3D::CAnimationSet::serial(), NL3D::CAnimation::serial(), NL3D::CMaterialBase::serial(), and NLMISC::ICommand::serialCommands().
00324 {serialVector(cont);}
|
|
||||||||||
|
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.
Definition at line 379 of file stream.h. References NLMISC::IStream::serialSTLContPolyPtr().
00379 {serialSTLContPolyPtr(cont);}
|
|
||||||||||
|
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.
Definition at line 377 of file stream.h. References NLMISC::IStream::serialSTLContPolyPtr().
00377 {serialSTLContPolyPtr(cont);}
|
|
||||||||||
|
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.
Definition at line 375 of file stream.h. References NLMISC::IStream::serialSTLContPolyPtr().
00375 {serialSTLContPolyPtr(cont);}
|
|
||||||||||
|
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.
Definition at line 373 of file stream.h. References NLMISC::IStream::serialSTLContPolyPtr().
00373 {serialSTLContPolyPtr(cont);}
|
|
||||||||||
|
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.
Definition at line 371 of file stream.h. References NLMISC::IStream::serialVectorPolyPtr(). Referenced by NL3D::CAnimation::serial().
00371 {serialVectorPolyPtr(cont);}
|
|
||||||||||
|
Definition at line 362 of file stream.h. References NLMISC::IStream::serialSTLContPtr().
00362 {serialSTLContPtr(cont);}
|
|
||||||||||
|
Definition at line 360 of file stream.h. References NLMISC::IStream::serialSTLContPtr().
00360 {serialSTLContPtr(cont);}
|
|
||||||||||
|
Definition at line 358 of file stream.h. References NLMISC::IStream::serialSTLContPtr().
00358 {serialSTLContPtr(cont);}
|
|
||||||||||
|
Definition at line 356 of file stream.h. References NLMISC::IStream::serialSTLContPtr().
00356 {serialSTLContPtr(cont);}
|
|
||||||||||
|
Definition at line 354 of file stream.h. References NLMISC::IStream::serialVectorPtr(). Referenced by NL3D::CAnimationSet::serial().
00354 {serialVectorPtr(cont);}
|
|
||||||||||
|
Template enum serialisation. Serialized as a sint32.
Definition at line 261 of file stream.h. References NLMISC::IStream::isReading(), NLMISC::IStream::serial(), and sint32. Referenced by NLNET::cbTCReceiveOtherSideClass(), NL3D::CVegetableShape::serial(), NL3D::CVegetable::serial(), NLPACS::CRetrieverInstance::serial(), NL3D::CPointLight::serial(), NL3D::CMaterial::serial(), NLPACS::CLocalRetriever::serial(), NLMISC::CSerialCommand::serial(), and NL3D::CAnimationPlaylist::serial().
|
|
|
Serial memstream, bitmemstream...
Definition at line 436 of file stream.cpp. References NLMISC::CMemStream::buffer(), NLMISC::CMemStream::bufferToFill(), NLMISC::IStream::isReading(), len, NLMISC::CMemStream::length(), NLMISC::CMemStream::resetBufPos(), NLMISC::IStream::serial(), NLMISC::IStream::serialBuffer(), uint32, and uint8.
00437 {
00438 uint32 len=0;
00439
00440 // Serialize length
00441 if ( isReading() )
00442 {
00443 // fill b with data from this
00444 serial (len);
00445 serialBuffer (b.bufferToFill (len), len);
00446 b.resetBufPos ();
00447 }
00448 else
00449 {
00450 // fill this with data from b
00451 len = b.length();
00452
00453 serial( len );
00454 serialBuffer( (uint8*) b.buffer (), len );
00455 }
00456 }
|
|
||||||||||
|
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).
Definition at line 492 of file stream.h. References NLMISC::IStream::serialIStreamable(). Referenced by NL3D::CAnimationOptimizer::cloneTrack(), NL3D::CMaterial::CLightMap::serial(), NL3D::CMaterial::serial(), NL3D::CMaterialBase::CAnimatedTexture::serial(), NL3D::CMaterial::CLightMap::serial2(), and NLMISC::IStream::serialSTLContLenPolyPtr().
00493 { IStreamable *p=ptr; serialIStreamable(p); ptr= static_cast<T*>(p);}
|
|
||||||||||
|
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).
Definition at line 390 of file stream.h. References NLMISC::IStream::_IdMap, NLMISC::IStream::_NextSerialPtrId, NLMISC::IStream::isReading(), NLMISC::IStream::ItIdMap, NLMISC::IStream::serial(), uint, uint64, NLMISC::IStream::ValueIdMap, NLMISC::IStream::xmlPop(), NLMISC::IStream::xmlPushBegin(), NLMISC::IStream::xmlPushEnd(), and NLMISC::IStream::xmlSetAttrib(). Referenced by NL3D::CParticleSystemShape::buildFromPS(), NL3D::CParticleSystemShape::flushTextures(), NL3D::CParticleSystemShape::instanciatePS(), and NLMISC::IStream::serialSTLContLenPtr().
00391 {
00392 uint64 node;
00393
00394 // Open the node header
00395 xmlPushBegin ("PTR");
00396
00397 xmlSetAttrib ("id");
00398
00399 if(isReading())
00400 {
00401 serial(node);
00402
00403 // Close the header
00404 xmlPushEnd ();
00405
00406 if(node==0)
00407 ptr=NULL;
00408 else
00409 {
00410 ItIdMap it;
00411 it= _IdMap.find(node);
00412
00413 // Test if object already created/read.
00414 if( it==_IdMap.end() )
00415 {
00416 // Construct object.
00417 ptr= new T;
00418 if(ptr==NULL)
00419 throw EStream();
00420
00421 // Insert the node.
00422 _IdMap.insert( ValueIdMap(node, ptr) );
00423
00424 // Read the object!
00425 serial(*ptr);
00426 }
00427 else
00428 ptr= static_cast<T*>(it->second);
00429 }
00430 }
00431 else
00432 {
00433 if(ptr==NULL)
00434 {
00435 node= 0;
00436 serial(node);
00437
00438 // Close the header
00439 xmlPushEnd ();
00440 }
00441 else
00442 {
00443 ItIdMap it;
00444 it = _IdMap.find((uint64)(uint)ptr);
00445
00446 // Test if object has been already written
00447 if( it==_IdMap.end() )
00448 {
00449 // Not yet written
00450
00451 // Get the next available ID
00452 node = _NextSerialPtrId++;
00453
00454 // Serial the id
00455 serial(node);
00456
00457 // Insert the pointer in the map with the id
00458 _IdMap.insert( ValueIdMap((uint64)(uint)ptr, (void*)(uint)node) );
00459
00460 // Close the header
00461 xmlPushEnd ();
00462
00463 // Write the object
00464 serial(*ptr);
00465 }
00466 else
00467 {
00468 // Write only the object id
00469 node = (uint64)(uint)(it->second);
00470
00471 serial(node);
00472
00473 // Close the header
00474 xmlPushEnd ();
00475 }
00476 }
00477 }
00478
00479 // Close the node
00480 xmlPop ();
00481 }
|
|
||||||||||
|
special version for serializing a vector. Support up to sint32 length containers. Definition at line 992 of file stream.h. References NLMISC::contReset(), NLMISC::IStream::isReading(), len, NLMISC::IStream::serial(), sint, sint32, NLMISC::IStream::xmlPop(), NLMISC::IStream::xmlPush(), NLMISC::IStream::xmlPushBegin(), NLMISC::IStream::xmlPushEnd(), and NLMISC::IStream::xmlSetAttrib(). Referenced by NLMISC::CStringStream::serialCont(), NLMISC::IStream::serialCont(), and NLMISC::CBitMemStream::serialCont().
00993 {
00994 typedef typename T::value_type __value_type;
00995 typedef typename T::iterator __iterator;
00996
00997 // Open a node header
00998 xmlPushBegin ("VECTOR");
00999
01000 // Attrib size
01001 xmlSetAttrib ("size");
01002
01003 sint32 len=0;
01004 if(isReading())
01005 {
01006 serial(len);
01007
01008 // Open a node header
01009 xmlPushEnd ();
01010
01011 // special version for vector: adjut good size.
01012 contReset(cont);
01013 cont.resize (len);
01014
01015 // Read the vector
01016 for(sint i=0;i<len;i++)
01017 {
01018 xmlPush ("ELM");
01019
01020 serial(cont[i]);
01021
01022 xmlPop ();
01023 }
01024 }
01025 else
01026 {
01027 len= cont.size();
01028 serial(len);
01029
01030 // Close the node header
01031 xmlPushEnd ();
01032
01033 // Write the vector
01034 __iterator it= cont.begin();
01035 for(sint i=0;i<len;i++, it++)
01036 {
01037 xmlPush ("ELM");
01038
01039 serial(const_cast<__value_type&>(*it));
01040
01041 xmlPop ();
01042 }
01043 }
01044
01045 // Close the node
01046 xmlPop ();
01047 }
|
|
|
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..
Definition at line 266 of file stream.cpp. References NLMISC::IStream::_ThrowOnNewer, NLMISC::IStream::_ThrowOnOlder, NLMISC::IStream::isReading(), NLMISC::IStream::serial(), uint, uint32, uint8, v, NLMISC::IStream::xmlPop(), and NLMISC::IStream::xmlPush(). Referenced by NL3D::H_AUTO_DECL(), NLMISC::CEntityIdTranslator::load(), loadForm(), NLMISC::CEntityIdTranslator::save(), NLLIGO::CZoneRegion::serial(), NLLIGO::CZoneRegion::SZoneUnit2::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(), NL3D::CTrackSampledVector::serial(), NL3D::CTrackSampledQuat::serial(), NL3D::CTrackSampledCommon::CTimeBlock::serial(), NL3D::CTileVegetableDesc::serial(), NL3D::CTileNoiseMap::serial(), NL3D::CTileNoise::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::CRetrievableSurface::serial(), NL3D::CPSAttrib< T >::serial(), NL3D::CPrimitiveBlock::serial(), NL3D::CPortal::serial(), NL3D::CPointLightNamedArray::CPointLightGroup::serial(), NL3D::CPointLightNamedArray::serial(), NL3D::CPointLightNamed::serial(), NL3D::CPointLight::serial(), NL3D::CPatch::serial(), NLMISC::CNoiseColorGradient::serial(), NLMISC::CNoiseValue::serial(), NL3D::CMeshMRMSkinnedGeom::CRdrPass::serial(), NL3D::CMeshMRMSkinnedGeom::CShadowVertex::serial(), NL3D::CMeshMRMSkinnedGeom::CPackedVertexBuffer::CPackedVertex::serial(), NL3D::CMeshMRMSkinnedGeom::CPackedVertexBuffer::serial(), NL3D::CMeshMRMSkinned::serial(), NL3D::CMeshMRMSkinnedGeom::serial(), NL3D::CMeshMRMGeom::CLodInfo::serial(), NL3D::CMeshMRMGeom::CRdrPass::serial(), NL3D::CMeshMRMGeom::CShadowVertex::serial(), NL3D::CMeshBase::CLightMapInfoList::serial(), NL3D::CMeshBase::CLightMapInfoList::CMatStage::serial(), NL3D::CMeshGeom::CMatrixBlock::serial(), NL3D::CMeshGeom::CRdrPass::serial(), NLMISC::CMatrix::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(), 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(), NL3D::CCluster::serial(), NLPACS::CChainQuad::serial(), NLPACS::CChain::serial(), NLPACS::COrderedChain::serial(), NLPACS::COrderedChain3f::serial(), NL3D::CBoneBase::serial(), NLMISC::CBitSet::serial(), NL3D::CAnimationSet::serial(), NL3D::CAnimationPlaylist::serial(), NL3D::CAnimation::serial(), NL3D::CMaterialBase::CTexAnimTracks::serial(), NL3D::CMaterialBase::serial(), NLMISC::CAABBox::serial(), NL3D::CMaterial::CLightMap::serial2(), NL3D::CTrackSampledCommon::serialCommon(), NL3D::CVertexBuffer::serialHeader(), NL3D::CMeshMRMGeom::serialLodVertexData(), and NL3D::CVertexBuffer::serialSubset().
00267 {
00268 uint8 b=0;
00269 uint32 v=0;
00270 uint streamVersion;
00271
00272 // Open the node
00273 xmlPush ("VERSION");
00274
00275 if(isReading())
00276 {
00277 serial(b);
00278 if(b==0xFF)
00279 serial(v);
00280 else
00281 v=b;
00282 streamVersion=v;
00283
00284 // Exception test.
00285 if(_ThrowOnOlder && streamVersion < currentVersion)
00286 throw EOlderStream(*this);
00287 if(_ThrowOnNewer && streamVersion > currentVersion)
00288 throw ENewerStream(*this);
00289 }
00290 else
00291 {
00292 v= streamVersion=currentVersion;
00293 if(v>=0xFF)
00294 {
00295 b=0xFF;
00296 serial(b);
00297 serial(v);
00298 }
00299 else
00300 {
00301 b= (uint8)v;
00302 serial(b);
00303 }
00304 }
00305
00306 // Close the node
00307 xmlPop ();
00308
00309 return streamVersion;
00310 }
|
|
|
Set the async loading state (to go to sleep 5 ms after 100 Ko serialized).
Definition at line 248 of file file.cpp. References _IsAsyncLoading. Referenced by NL3D::CTextureFile::buildBitmapFromFile(), NL3D::CAsyncFileManager3D::CIGLoad::run(), and NL3D::CAsyncFileManager3D::CMeshLoad::run().
00249 {
00250 _IsAsyncLoading = true;
00251 }
|
|
|
Set the cache file on open option (default behaviour is false (file is not cached at opening).
Definition at line 242 of file file.cpp. References _CacheFileOnOpen. Referenced by NL3D::CTextureFile::buildBitmapFromFile(), getSHA1(), loadForm(), NLMISC::CPath::loadRemappedFiles(), NL3D::CAsyncFileManager3D::CIGLoad::run(), and NL3D::CAsyncFileManager3D::CMeshLoad::run().
00243 {
00244 _CacheFileOnOpen = newState;
00245 }
|
|
|
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 413 of file stream.cpp. References NLMISC::IStream::_InputStream. Referenced by NLMISC::CBitMemStream::getSerialItem(), and NLMISC::CMemStream::invert().
00414 {
00415 _InputStream= inputStream;
00416 }
|
|
||||||||||||
|
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.
Definition at line 71 of file stream.cpp. References NLMISC::IStream::_ThrowOnNewer, and NLMISC::IStream::_ThrowOnOlder.
00072 {
00073 _ThrowOnOlder=throwOnOlder;
00074 _ThrowOnNewer=throwOnNewer;
00075 }
|
|
|
Set the XML mode is true to enable XML mode else false Definition at line 427 of file stream.cpp. References NLMISC::IStream::_XML. Referenced by NLMISC::COXml::COXml(), and NLMISC::COXml::init().
00428 {
00429 _XML = on;
00430 }
|
|
|
xmlBreakLine() insert a break line in the XML stream.
Definition at line 794 of file stream.h. References NLMISC::IStream::_XML, and NLMISC::IStream::xmlBreakLineInternal().
00795 {
00796 // XML Mode ?
00797 if (_XML)
00798 {
00799 return xmlBreakLineInternal ();
00800 }
00801
00802 // Return ok
00803 return true;
00804 }
|
|
|
xmlBreakLine implementation
Reimplemented in NLMISC::COXml. Definition at line 845 of file stream.h. Referenced by NLMISC::IStream::xmlBreakLine().
00845 { return true; };
|
|
|
xmlComment() insert a comment line in the XML stream.
Definition at line 811 of file stream.h. References NLMISC::IStream::_XML, comment(), and NLMISC::IStream::xmlCommentInternal().
00812 {
00813 // XML Mode ?
00814 if (_XML)
00815 {
00816 return xmlCommentInternal (comment);
00817 }
00818
00819 // Return ok
00820 return true;
00821 }
|
|
|
xmlComment implementation
Reimplemented in NLMISC::COXml. Definition at line 848 of file stream.h. Referenced by NLMISC::IStream::xmlComment().
00848 { return true; };
|
|
|
xmlPop() close the node.
Definition at line 759 of file stream.h. References NLMISC::IStream::_XML, and NLMISC::IStream::xmlPopInternal(). Referenced by NLLIGO::CZoneRegion::serial(), NLLIGO::CZoneBankElement::serial(), NL3D::CZone::serial(), NL3D::CPatch::serial(), NLMISC::CObjectVector< sint8, false >::serial(), NLMISC::COXml::serial(), NLMISC::COXml::serialBuffer(), NLMISC::IStream::serialCheck(), NLMISC::IStream::serialIStreamable(), NLMISC::IStream::serialMap(), NLMISC::IStream::serialMultimap(), NLMISC::IStream::serialPtr(), NLMISC::IStream::serialSTLCont(), NLMISC::IStream::serialSTLContLen(), NLMISC::IStream::serialSTLContPtr(), NLMISC::IStream::serialVector(), NLMISC::IStream::serialVectorPolyPtr(), NLMISC::IStream::serialVectorPtr(), NLMISC::IStream::serialVersion(), and NLMISC::IStream::xmlSerial().
00760 {
00761 // XML Mode ?
00762 if (_XML)
00763 {
00764 return xmlPopInternal ();
00765 }
00766
00767 // Return ok
00768 return true;
00769 }
|
|
|
xmlPop implementation
Reimplemented in NLMISC::COXml. Definition at line 839 of file stream.h. Referenced by NLMISC::IStream::xmlPop().
00839 { return true; };
|
|
|
Definition at line 701 of file stream.h. References NLMISC::IStream::_XML, res, NLMISC::IStream::xmlPushBeginInternal(), and NLMISC::IStream::xmlPushEndInternal(). Referenced by NLLIGO::CZoneRegion::serial(), NLLIGO::CZoneBankElement::serial(), NL3D::CZone::serial(), NL3D::CPatch::serial(), NLMISC::CObjectVector< sint8, false >::serial(), NLMISC::COXml::serial(), NLMISC::COXml::serialBuffer(), NLMISC::IStream::serialCheck(), NLMISC::IStream::serialMap(), NLMISC::IStream::serialMultimap(), NLMISC::IStream::serialSTLContLen(), NLMISC::IStream::serialVector(), NLMISC::IStream::serialVersion(), and NLMISC::IStream::xmlSerial().
00702 {
00703 // XML Mode ?
00704 if (_XML)
00705 {
00706 // Open the header
00707 bool res=xmlPushBeginInternal (name);
00708 if (res)
00709 // close the header
00710 xmlPushEndInternal ();
00711 // Return the result
00712 return res;
00713 }
00714
00715 // Return ok
00716 return true;
00717 }
|
|
|
xmlBreakLine() insert a break line in the XML stream.
Definition at line 725 of file stream.h. References NLMISC::IStream::_XML, and NLMISC::IStream::xmlPushBeginInternal(). Referenced by NLMISC::CObjectVector< sint8, false >::serial(), NLMISC::IStream::serialIStreamable(), NLMISC::IStream::serialMap(), NLMISC::IStream::serialMultimap(), NLMISC::IStream::serialPtr(), NLMISC::IStream::serialSTLCont(), NLMISC::IStream::serialSTLContPtr(), NLMISC::IStream::serialVector(), NLMISC::IStream::serialVectorPolyPtr(), and NLMISC::IStream::serialVectorPtr().
00726 {
00727 // XML Mode ?
00728 if (_XML)
00729 {
00730 return xmlPushBeginInternal (name);
00731 }
00732
00733 // Return ok
00734 return true;
00735 }
|
|
|
xmlPushBegin implementation
Reimplemented in NLMISC::COXml. Definition at line 833 of file stream.h. Referenced by NLMISC::IStream::xmlPush(), and NLMISC::IStream::xmlPushBegin().
00833 { return true; };
|
|
|
xmlPushEnd() close the node header.
Definition at line 742 of file stream.h. References NLMISC::IStream::_XML, and NLMISC::IStream::xmlPushEndInternal(). Referenced by NLMISC::CObjectVector< sint8, false >::serial(), NLMISC::IStream::serialIStreamable(), NLMISC::IStream::serialMap(), NLMISC::IStream::serialMultimap(), NLMISC::IStream::serialPtr(), NLMISC::IStream::serialSTLCont(), NLMISC::IStream::serialSTLContPtr(), NLMISC::IStream::serialVector(), NLMISC::IStream::serialVectorPolyPtr(), and NLMISC::IStream::serialVectorPtr().
00743 {
00744 // XML Mode ?
00745 if (_XML)
00746 {
00747 return xmlPushEndInternal ();
00748 }
00749
00750 // Return ok
00751 return true;
00752 }
|
|
|
xmlPushEnd implementation
Reimplemented in NLMISC::COXml. Definition at line 836 of file stream.h. Referenced by NLMISC::IStream::xmlPush(), and NLMISC::IStream::xmlPushEnd().
00836 { return true; };
|
|
||||||||||||||||||||||||||||
|
Definition at line 683 of file stream.h. References NLMISC::IStream::serial(), NLMISC::IStream::xmlPop(), and NLMISC::IStream::xmlPush().
|
|
||||||||||||||||||||||||
|
Definition at line 671 of file stream.h. References NLMISC::IStream::serial(), NLMISC::IStream::xmlPop(), and NLMISC::IStream::xmlPush().
|
|
||||||||||||||||||||
|
Definition at line 659 of file stream.h. References NLMISC::IStream::serial(), NLMISC::IStream::xmlPop(), and NLMISC::IStream::xmlPush().
|
|
||||||||||||||||
|
xmlSerial() serial a values into a node. Definition at line 647 of file stream.h. References NLMISC::IStream::serial(), NLMISC::IStream::xmlPop(), and NLMISC::IStream::xmlPush(). Referenced by NLLIGO::CZoneRegion::serial(), NLLIGO::CZoneRegion::SZoneUnit2::serial(), NLLIGO::CZoneRegion::SZoneUnit::serial(), NL3D::CZone::serial(), NL3D::CPatchInfo::CBindInfo::serial(), NL3D::CZone::CPatchConnect::serial(), NL3D::CBorderVertex::serial(), NL3D::CTileElement::serial(), NL3D::CTileColorOldPatchVersion6::serial(), NL3D::CTileColor::serial(), and NL3D::CPatch::serial().
|
|
|
xmlSetAttrib() set the name of the next node header attribute serialised. is the name of the node header attribute serialised.
Definition at line 777 of file stream.h. References NLMISC::IStream::_XML, and NLMISC::IStream::xmlSetAttribInternal(). Referenced by NLMISC::CObjectVector< sint8, false >::serial(), NLMISC::IStream::serialIStreamable(), NLMISC::IStream::serialMap(), NLMISC::IStream::serialMultimap(), NLMISC::IStream::serialPtr(), NLMISC::IStream::serialSTLCont(), NLMISC::IStream::serialSTLContPtr(), NLMISC::IStream::serialVector(), NLMISC::IStream::serialVectorPolyPtr(), and NLMISC::IStream::serialVectorPtr().
00778 {
00779 // XML Mode ?
00780 if (_XML)
00781 {
00782 return xmlSetAttribInternal (name);
00783 }
00784
00785 // Return ok
00786 return true;
00787 }
|
|
|
xmlBreakLine implementation
Reimplemented in NLMISC::COXml. Definition at line 842 of file stream.h. Referenced by NLMISC::IStream::xmlSetAttrib().
00842 { return true; };
|
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 165 of file file.h. Referenced by allowBNPCacheFileOnOpen(), CIFile(), and open(). |
|
|
Get the last 40 files opened. The files can be in a big file.
|
|
|
Get the last 40 files opened. The files can be in a big file.
|
|
|
Get the last 40 files opened. The files can be in a big file.
|
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 164 of file file.h. Referenced by CIFile(), close(), flush(), open(), and setCacheFileOnOpen(). |
|
|
Get the last 40 files opened. The files can be in a big file.
|
|
|
Get the last 40 files opened. The files can be in a big file.
|
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 44 of file file.cpp. Referenced by getNumFileOpen(), and open(). |
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 45 of file file.cpp. Referenced by getNumFileRead(), and loadIntoCache(). |
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 168 of file file.h. Referenced by CIFile(), eof(), getFileSize(), loadIntoCache(), and open(). |
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 161 of file file.h. Referenced by CIFile(), loadIntoCache(), and setAsyncLoading(). |
|
|
Get the last 40 files opened. The files can be in a big file.
|
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 41 of file file.cpp. Referenced by loadIntoCache(). |
|
|
Get the last 40 files opened. The files can be in a big file.
|
|
|
Get the last 40 files opened. The files can be in a big file.
|
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 42 of file file.cpp. Referenced by getReadFromFile(), and loadIntoCache(). |
|
|
Get the last 40 files opened. The files can be in a big file.
Definition at line 43 of file file.cpp. Referenced by getReadingFromFile(), and loadIntoCache(). |
|
|
Get the last 40 files opened. The files can be in a big file.
|
1.3.6