<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>persist.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.5 on Thu Oct 4 15:32:58 2001 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>persist.h</h1><a href="persist_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">// Copyright (C) 1999-2001 Open Source Telecom Corporation.</font> 00002 <font class="comment">// </font> 00003 <font class="comment">// This program is free software; you can redistribute it and/or modify</font> 00004 <font class="comment">// it under the terms of the GNU General Public License as published by</font> 00005 <font class="comment">// the Free Software Foundation; either version 2 of the License, or</font> 00006 <font class="comment">// (at your option) any later version.</font> 00007 <font class="comment">// </font> 00008 <font class="comment">// This program is distributed in the hope that it will be useful,</font> 00009 <font class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</font> 00010 <font class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</font> 00011 <font class="comment">// GNU General Public License for more details.</font> 00012 <font class="comment">// </font> 00013 <font class="comment">// You should have received a copy of the GNU General Public License</font> 00014 <font class="comment">// along with this program; if not, write to the Free Software </font> 00015 <font class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</font> 00016 <font class="comment">// </font> 00017 <font class="comment">// As a special exception to the GNU General Public License, permission is </font> 00018 <font class="comment">// granted for additional uses of the text contained in its release </font> 00019 <font class="comment">// of Common C++.</font> 00020 <font class="comment">// </font> 00021 <font class="comment">// The exception is that, if you link the Common C++ library with other</font> 00022 <font class="comment">// files to produce an executable, this does not by itself cause the</font> 00023 <font class="comment">// resulting executable to be covered by the GNU General Public License.</font> 00024 <font class="comment">// Your use of that executable is in no way restricted on account of</font> 00025 <font class="comment">// linking the Common C++ library code into it.</font> 00026 <font class="comment">// </font> 00027 <font class="comment">// This exception does not however invalidate any other reasons why</font> 00028 <font class="comment">// the executable file might be covered by the GNU General Public License.</font> 00029 <font class="comment">// </font> 00030 <font class="comment">// This exception applies only to the code released under the </font> 00031 <font class="comment">// name Common C++. If you copy code from other releases into a copy of</font> 00032 <font class="comment">// Common C++, as the General Public License permits, the exception does</font> 00033 <font class="comment">// not apply to the code that you add in this way. To avoid misleading</font> 00034 <font class="comment">// anyone as to the status of such modified files, you must delete</font> 00035 <font class="comment">// this exception notice from them.</font> 00036 <font class="comment">// </font> 00037 <font class="comment">// If you write modifications of your own for Common C++, it is your choice</font> 00038 <font class="comment">// whether to permit this exception to apply to your modifications.</font> 00039 <font class="comment">// If you do not wish that, delete this exception notice. </font> 00040 00041 <font class="preprocessor">#ifndef __CCXX_PERSIST_H__</font> 00042 <font class="preprocessor"></font><font class="preprocessor">#define __CCXX_PERSIST_H__</font> 00043 <font class="preprocessor"></font> 00044 <font class="preprocessor">#ifndef __CCXX_CONFIG_H__</font> 00045 <font class="preprocessor"></font><font class="preprocessor">#include <cc++/<a class="code" href="config_h.html">config.h</a>></font> 00046 <font class="preprocessor">#endif</font> 00047 <font class="preprocessor"></font> 00048 <font class="preprocessor">#ifndef __CCXX_MACROS_H__</font> 00049 <font class="preprocessor"></font><font class="preprocessor">#include <cc++/<a class="code" href="macros_h.html">macros.h</a>></font> 00050 <font class="preprocessor">#else</font> 00051 <font class="preprocessor"></font><font class="preprocessor">#ifdef __CCXX_NAMESPACE_H__</font> 00052 <font class="preprocessor"></font><font class="preprocessor">#include <cc++/<a class="code" href="macros_h.html">macros.h</a>></font> 00053 <font class="preprocessor">#endif</font> 00054 <font class="preprocessor"></font><font class="preprocessor">#endif</font> 00055 <font class="preprocessor"></font> 00056 <font class="preprocessor">#ifdef HAVE_ZLIB_H</font> 00057 <font class="preprocessor"></font><font class="preprocessor">#ifndef NO_COMPRESSION</font> 00058 <font class="preprocessor"></font><font class="preprocessor">#include <zlib.h></font> 00059 <font class="preprocessor">#endif</font> 00060 <font class="preprocessor"></font><font class="preprocessor">#else</font> 00061 <font class="preprocessor"></font><font class="preprocessor">#define NO_COMPRESSION</font> 00062 <font class="preprocessor"></font><font class="preprocessor">#endif</font> 00063 <font class="preprocessor"></font> 00064 <font class="preprocessor">#include <iostream></font> 00065 <font class="preprocessor">#include <string></font> 00066 <font class="preprocessor">#include <vector></font> 00067 <font class="preprocessor">#include <map></font> 00068 00069 <font class="preprocessor">#if defined(__WIN32__)</font> <a name="l00070"></a><a class="code" href="persist_h.html#a0">00070</a> <font class="preprocessor"></font><font class="keyword">class </font>__EXPORT <a class="code" href="class_persistexception.html">PersistException</a>; <a name="l00071"></a><a class="code" href="persist_h.html#a1">00071</a> <font class="keyword">class </font>__EXPORT <a class="code" href="class_engine.html">Engine</a>; <a name="l00072"></a><a class="code" href="persist_h.html#a2">00072</a> <font class="keyword">class </font>__EXPORT <a class="code" href="class_typemanager.html">TypeManager</a>; <a name="l00073"></a><a class="code" href="persist_h.html#a3">00073</a> <font class="keyword">class </font>__EXPORT <a class="code" href="class_baseobject.html">BaseObject</a>; 00074 <font class="preprocessor">#endif</font> 00075 <font class="preprocessor"></font> <a name="l00076"></a><a class="code" href="class_persistexception.html">00076</a> <font class="keyword">class </font><a class="code" href="class_persistexception.html">PersistException</a> 00077 { 00078 <font class="keyword">public</font>: 00079 __MEMBER_EXPORT <a class="code" href="class_persistexception.html#a0">PersistException</a>(<font class="keyword">const</font> std::string& reason); 00080 __MEMBER_EXPORT <font class="keyword">const</font> std::string& <a class="code" href="class_persistexception.html#a1">GetMessage</a>() <font class="keyword">const</font>; 00081 __MEMBER_EXPORT <font class="keyword">virtual</font> <a class="code" href="class_persistexception.html#a2">~PersistException</a>(); 00082 <font class="keyword">protected</font>: <a name="l00083"></a><a class="code" href="class_persistexception.html#n0">00083</a> std::string myMessage; 00084 }; 00085 00086 <font class="comment">// This typedef allows us to declare NewBaseObjectFunction now</font> <a name="l00087"></a><a class="code" href="persist_h.html#a4">00087</a> <font class="keyword">typedef</font> <font class="keyword">class </font><a class="code" href="class_baseobject.html">BaseObject</a>* (*NewBaseObjectFunction) (void); 00088 <a name="l00097"></a><a class="code" href="class_typemanager.html">00097</a> <font class="keyword">class </font><a class="code" href="class_typemanager.html">TypeManager</a> 00098 { 00099 <font class="keyword">public</font>: 00100 <a name="l00105"></a><a class="code" href="class_typemanager__registration.html">00105</a> <font class="keyword">class </font>Registration 00106 { 00107 <font class="keyword">public</font>: <a name="l00108"></a><a class="code" href="class_typemanager__registration.html#a0">00108</a> <a class="code" href="class_typemanager__registration.html#a0">Registration</a>(<font class="keyword">const</font> <font class="keywordtype">char</font>* name, NewBaseObjectFunction func) 00109 : myName(name) { <a class="code" href="class_typemanager.html#d0">TypeManager::Add</a>(name,func); } <a name="l00110"></a><a class="code" href="class_typemanager__registration.html#a1">00110</a> <a class="code" href="class_typemanager__registration.html#a1">~Registration</a>()<font class="keyword"> </font>{ <a class="code" href="class_typemanager.html#d1">TypeManager::Remove</a>(myName.c_str()); } 00111 <font class="keyword">private</font>: 00112 std::string myName; 00113 }; 00114 00118 __MEMBER_EXPORT <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="class_typemanager.html#d0">Add</a>(<font class="keyword">const</font> <font class="keywordtype">char</font>* name, NewBaseObjectFunction construction); 00119 00123 __MEMBER_EXPORT <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="class_typemanager.html#d1">Remove</a>(<font class="keyword">const</font> <font class="keywordtype">char</font>* name); 00124 00130 <font class="keyword">static</font> <a class="code" href="class_baseobject.html">BaseObject</a>* <a class="code" href="class_typemanager.html#d2">CreateInstanceOf</a>(<font class="keyword">const</font> <font class="keywordtype">char</font>* name); 00131 <a name="l00132"></a><a class="code" href="class_typemanager.html#s0">00132</a> <font class="keyword">typedef</font> std::map<std::string,NewBaseObjectFunction> StringFunctionMap; 00133 }; 00134 00135 00136 <font class="comment">/*</font> 00137 <font class="comment"> * The following defines are used to declare and define the relevant code</font> 00138 <font class="comment"> * to allow a class to use the Persistence::Engine code.</font> 00139 <font class="comment"> */</font> 00140 00141 <font class="preprocessor">#define DECLARE_PERSISTENCE(ClassType) \</font> 00142 <font class="preprocessor"> public: \</font> 00143 <font class="preprocessor"> friend Engine& operator>>(Engine& ar, ClassType *&ob); \</font> 00144 <font class="preprocessor"> friend Engine& operator<<(Engine& ar, ClassType const *&ob); \</font> 00145 <font class="preprocessor"> friend BaseObject *CreateNew##ClassType(); \</font> 00146 <font class="preprocessor"> virtual const char* GetPersistenceID() const; \</font> 00147 <font class="preprocessor"> static TypeManager::Registration RegistrationFor##ClassType;</font> 00148 <font class="preprocessor"></font> 00149 <font class="preprocessor">#define IMPLEMENT_PERSISTENCE(ClassType,FullyQualifiedName) \</font> 00150 <font class="preprocessor"> BaseObject *CreateNew##ClassType() { return new ClassType; } \</font> 00151 <font class="preprocessor"> const char* ClassType::GetPersistenceID()const {return FullyQualifiedName;} \</font> 00152 <font class="preprocessor"> Engine& operator>>(Engine& ar, ClassType *&ob) \</font> 00153 <font class="preprocessor"> { ar >> (BaseObject *&) ob; return ar; } \</font> 00154 <font class="preprocessor"> Engine& operator<<(Engine& ar, ClassType const *ob) \</font> 00155 <font class="preprocessor"> { ar << (BaseObject const *)ob; return ar; } \</font> 00156 <font class="preprocessor"> TypeManager::Registration \</font> 00157 <font class="preprocessor"> ClassType::RegistrationFor##ClassType(FullyQualifiedName, \</font> 00158 <font class="preprocessor"> CreateNew##ClassType);</font> 00159 <font class="preprocessor"></font> 00160 <font class="keyword">class </font><a class="code" href="class_engine.html">Engine</a>; 00161 <a name="l00176"></a><a class="code" href="class_baseobject.html">00176</a> <font class="keyword">class </font>__EXPORT <a class="code" href="class_baseobject.html">BaseObject</a> 00177 { 00178 <font class="keyword">public</font>: 00184 <a class="code" href="class_baseobject.html#a0">BaseObject</a>(); 00185 00189 <font class="keyword">virtual</font> <a class="code" href="class_baseobject.html#a1">~BaseObject</a>(); 00190 00194 <font class="keyword">virtual</font> <font class="keyword">const</font> <font class="keywordtype">char</font>* <a class="code" href="class_baseobject.html#a2">GetPersistenceID</a>() <font class="keyword">const</font>; 00195 00201 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="class_baseobject.html#a3">Write</a>(<a class="code" href="class_engine.html">Engine</a>& archive) <font class="keyword">const</font>; 00202 00208 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="class_baseobject.html#a4">Read</a>(<a class="code" href="class_engine.html">Engine</a>& archive); 00209 }; 00210 00211 <a name="l00222"></a><a class="code" href="class_engine.html">00222</a> <font class="keyword">class </font><a class="code" href="class_engine.html">Engine</a> 00223 { 00224 <font class="keyword">public</font>: <a name="l00229"></a><a class="code" href="class_engine__exception.html">00229</a> <font class="keyword">class </font>Exception : <font class="keyword">public</font> <a class="code" href="class_persistexception.html">PersistException</a> 00230 { 00231 <font class="keyword">public</font>: <a name="l00232"></a><a class="code" href="class_engine__exception.html#a0">00232</a> <a class="code" href="class_engine__exception.html#a0">Exception</a>(<font class="keyword">const</font> std::string &reason) : <a class="code" href="class_persistexception.html">PersistException</a>(reason) {} 00233 }; 00234 <a name="l00238"></a><a class="code" href="class_engine.html#s2">00238</a> <font class="keyword">enum</font> EngineMode 00239 { 00240 modeRead, 00241 modeWrite 00242 }; 00243 00249 __MEMBER_EXPORT <a class="code" href="class_engine.html#a0">Engine</a>(<a class="code" href="class_std__iostream.html">std::iostream</a>& stream, EngineMode mode) THROWS (<a class="code" href="class_persistexception.html">PersistException</a>); 00250 00255 __MEMBER_EXPORT <a class="code" href="class_engine.html#a1">~Engine</a>(); 00256 00257 00258 <font class="comment">// Write operations</font> 00259 <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(<font class="keyword">const</font> <a class="code" href="class_baseobject.html">BaseObject</a> *object) THROWS (Exception); 00260 <font class="comment">/*</font> 00261 <font class="comment"> * shortcut, to make the following more readable</font> 00262 <font class="comment"> */</font> 00263 <font class="preprocessor">#define _ENGINEWRITE_REF(valref) WriteBinary((const uint8*)&valref,sizeof(valref))</font> <a name="l00264"></a><a class="code" href="class_engine.html#a3">00264</a> <font class="preprocessor"></font> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(int8 i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00265"></a><a class="code" href="class_engine.html#a4">00265</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(uint8 i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00266"></a><a class="code" href="class_engine.html#a5">00266</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(int16 i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00267"></a><a class="code" href="class_engine.html#a6">00267</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(uint16 i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00268"></a><a class="code" href="class_engine.html#a7">00268</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(int32 i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00269"></a><a class="code" href="class_engine.html#a8">00269</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(uint32 i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00270"></a><a class="code" href="class_engine.html#a9">00270</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(int64 i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00271"></a><a class="code" href="class_engine.html#a10">00271</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(uint64 i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00272"></a><a class="code" href="class_engine.html#a11">00272</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(<font class="keywordtype">float</font> i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } <a name="l00273"></a><a class="code" href="class_engine.html#a12">00273</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(<font class="keywordtype">double</font> i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEWRITE_REF(i); } 00274 <font class="preprocessor">#undef _ENGINEWRITE_REF</font> 00275 <font class="preprocessor"></font> 00276 <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a2">Write</a>(<font class="keyword">const</font> std::string& str) THROWS (Exception); 00277 <font class="comment">// Every write operation boils down to one or more of theses</font> 00278 <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a14">WriteBinary</a>(<font class="keyword">const</font> uint8* data, <font class="keyword">const</font> uint32 size) THROWS (Exception); 00279 00280 <font class="comment">// Read Operations</font> 00281 00282 <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(<a class="code" href="class_baseobject.html">BaseObject</a> *&object) THROWS (Exception); 00283 <font class="preprocessor">#define _ENGINEREAD_REF(valref) ReadBinary((uint8*)&valref,sizeof(valref))</font> <a name="l00284"></a><a class="code" href="class_engine.html#a16">00284</a> <font class="preprocessor"></font> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(int8& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00285"></a><a class="code" href="class_engine.html#a17">00285</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(uint8& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00286"></a><a class="code" href="class_engine.html#a18">00286</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(int16& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00287"></a><a class="code" href="class_engine.html#a19">00287</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(uint16& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00288"></a><a class="code" href="class_engine.html#a20">00288</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(int32& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00289"></a><a class="code" href="class_engine.html#a21">00289</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(uint32& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00290"></a><a class="code" href="class_engine.html#a22">00290</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(int64& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00291"></a><a class="code" href="class_engine.html#a23">00291</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(uint64& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00292"></a><a class="code" href="class_engine.html#a24">00292</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(<font class="keywordtype">float</font>& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } <a name="l00293"></a><a class="code" href="class_engine.html#a25">00293</a> <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(<font class="keywordtype">double</font>& i) THROWS (Exception)<font class="keyword"> </font>{ _ENGINEREAD_REF(i); } 00294 <font class="preprocessor">#undef _ENGINEREAD_REF</font> 00295 <font class="preprocessor"></font> 00296 <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a15">Read</a>(std::string& str) THROWS (Exception); 00297 <font class="comment">// Every read operation boild down to one or more of these</font> 00298 <font class="keywordtype">void</font> <a class="code" href="class_engine.html#a27">ReadBinary</a>(uint8* data, uint32 size) THROWS (Exception); 00299 00300 <font class="keyword">private</font>: 00304 <a class="code" href="class_std__iostream.html">std::iostream</a>& myUnderlyingStream; 00305 00309 EngineMode myOperationalMode; 00310 00314 <font class="keyword">typedef</font> std::vector<BaseObject*> ArchiveVector; 00315 <font class="keyword">typedef</font> std::map<BaseObject const*, int32> ArchiveMap; 00316 <font class="keyword">typedef</font> std::vector<std::string> ClassVector; 00317 <font class="keyword">typedef</font> std::map<std::string, int32> ClassMap; 00318 00319 ArchiveVector myArchiveVector; 00320 ArchiveMap myArchiveMap; 00321 ClassVector myClassVector; 00322 ClassMap myClassMap; 00323 00324 <font class="comment">// Compression support</font> 00325 <font class="preprocessor">#ifndef NO_COMPRESSION</font> 00326 <font class="preprocessor"></font> z_stream myZStream; 00327 uint8* myCompressedDataBuffer; 00328 uint8* myUncompressedDataBuffer; 00329 uint8* myLastUncompressedDataRead; 00330 <font class="preprocessor">#endif</font> 00331 <font class="preprocessor"></font>}; 00332 00333 <font class="comment">// Standard >> and << stream operators for BaseObject</font> <a name="l00334"></a><a class="code" href="persist_h.html#a5">00334</a> __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, <a class="code" href="class_baseobject.html">BaseObject</a> *&ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00335 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, <a class="code" href="class_baseobject.html">BaseObject</a> <font class="keyword">const</font> *ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00336 00337 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, int8& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00338 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, int8 ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00339 00340 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, uint8& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00341 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, uint8 ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00342 00343 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, int16& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00344 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, int16 ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00345 00346 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, uint16& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00347 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, uint16 ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00348 00349 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, int32& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00350 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, int32 ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00351 00352 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, uint32& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00353 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, uint32 ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00354 00355 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, int64& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00356 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, int64 ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00357 00358 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, uint64& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00359 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, uint64 ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00360 00361 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, <font class="keywordtype">float</font>& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00362 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, <font class="keywordtype">float</font> ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00363 00364 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, <font class="keywordtype">double</font>& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00365 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, <font class="keywordtype">double</font> ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00366 00367 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, std::string& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00368 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, std::string ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00369 00370 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, <font class="keywordtype">bool</font>& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00371 __EXPORT <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a7">operator <<</a>( <a class="code" href="class_engine.html">Engine</a>& ar, <font class="keywordtype">bool</font> ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>); 00372 00381 template<class T> 00382 <a class="code" href="class_engine.html">Engine</a>& operator <<( Engine& ar, std::vector<T> <font class="keyword">const</font>& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>)<font class="keyword"></font> 00383 <font class="keyword"></font>{ 00384 ar << (uint32)ob.size(); 00385 <font class="keywordflow">for</font>(uint i=0; i < ob.size(); ++i) 00386 ar << ob[i]; 00387 <font class="keywordflow">return</font> ar; 00388 } 00389 00394 template<class T> <a name="l00395"></a><a class="code" href="persist_h.html#a6">00395</a> <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, std::vector<T>& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>)<font class="keyword"></font> 00396 <font class="keyword"></font>{ 00397 ob.clear(); 00398 uint32 siz; 00399 ar >> siz; 00400 ob.resize(siz); 00401 <font class="keywordflow">for</font>(uint32 i=0; i < siz; ++i) 00402 ar >> ob[i]; 00403 <font class="keywordflow">return</font> ar; 00404 } 00405 00410 template<class Key, class Value> <a name="l00411"></a><a class="code" href="persist_h.html#a7">00411</a> <a class="code" href="class_engine.html">Engine</a>& operator <<( Engine& ar, std::map<Key,Value> <font class="keyword">const</font> & ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>)<font class="keyword"></font> 00412 <font class="keyword"></font>{ 00413 ar << (uint32)ob.size(); 00414 <font class="keywordflow">for</font>(std::map<Key,Value>::const_iterator it = ob.begin();it != ob.end();++it) 00415 ar << it->first << it->second; 00416 <font class="keywordflow">return</font> ar; 00417 } 00418 00423 template<class Key, class Value> <a name="l00424"></a><a class="code" href="persist_h.html#a8">00424</a> <a class="code" href="class_engine.html">Engine</a>& <a class="code" href="persist_h.html#a8">operator >></a>( <a class="code" href="class_engine.html">Engine</a>& ar, std::map<Key,Value>& ob) THROWS (<a class="code" href="class_engine__exception.html">Engine::Exception</a>)<font class="keyword"></font> 00425 <font class="keyword"></font>{ 00426 ob.clear(); 00427 uint32 siz; 00428 ar >> siz; 00429 <font class="keywordflow">for</font>(uint32 i=0; i < siz; ++i) { 00430 Key a; 00431 ar >> a; 00432 ar >> ob[a]; 00433 } 00434 <font class="keywordflow">return</font> ar; 00435 } 00436 00437 <font class="preprocessor">#ifdef __CCXX_NAMESPACE_H__</font> 00438 <font class="preprocessor"></font><font class="preprocessor">#undef __CCXX_NAMESPACE_H__</font> 00439 <font class="preprocessor"></font><font class="preprocessor">#include <cc++/<a class="code" href="namespace_h.html">namespace.h</a>></font> 00440 <font class="preprocessor">#endif</font> 00441 <font class="preprocessor"></font> 00442 <font class="preprocessor">#endif</font> 00443 <font class="preprocessor"></font> </div></pre><hr><address><small>Generated at Thu Oct 4 15:32:58 2001 for CommonC++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.5 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2001</small></address> </body> </html>