aboutsummaryrefslogtreecommitdiff
path: root/src/archive.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/archive.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/archive.h b/src/archive.h
index b5477bb..dfaf327 100644
--- a/src/archive.h
+++ b/src/archive.h
@@ -120,8 +120,28 @@ namespace Bu
120 virtual Archive &operator&&(double &); 120 virtual Archive &operator&&(double &);
121 virtual Archive &operator&&(long double &); 121 virtual Archive &operator&&(long double &);
122 122
123 /**
124 * For storage, get an ID for the pointer to the object you're going to
125 * write.
126 */
123 uint32_t getID( const void *ptr ); 127 uint32_t getID( const void *ptr );
128
129 /**
130 * For loading. Assosiates an empty pointer with an id. When you wind
131 * up loading an id reference to a pointer for an object that may or
132 * may not have loaded yet, call this with the id, if it has been loaded
133 * already, you'll immediately get a pointer, if not, it will write one
134 * for you when the time comes.
135 */
124 void assocPtrID( void **ptr, uint32_t id ); 136 void assocPtrID( void **ptr, uint32_t id );
137
138 /**
139 * For loading. Call this when you load an object that other things may
140 * have pointers to. It will assosiate every pointer that's been
141 * registered with assocPtrID to the pointer passed in, and id passed
142 * in. It will also set things up so future calls to assocPtrID will
143 * automatically succeed immediately.
144 */
125 void readID( const void *ptr, uint32_t id ); 145 void readID( const void *ptr, uint32_t id );
126 146
127 private: 147 private:
@@ -134,7 +154,7 @@ namespace Bu
134 Archive &operator<<(Archive &, class Bu::Archival &); 154 Archive &operator<<(Archive &, class Bu::Archival &);
135 Archive &operator>>(Archive &, class Bu::Archival &); 155 Archive &operator>>(Archive &, class Bu::Archival &);
136 //Archive &operator&&(Archive &s, class Bu::Archival &p); 156 //Archive &operator&&(Archive &s, class Bu::Archival &p);
137 157
138 Archive &operator<<(Archive &, std::string &); 158 Archive &operator<<(Archive &, std::string &);
139 Archive &operator>>(Archive &, std::string &); 159 Archive &operator>>(Archive &, std::string &);
140 //Archive &operator&&(Archive &, std::string &); 160 //Archive &operator&&(Archive &, std::string &);
@@ -178,6 +198,9 @@ namespace Bu
178 198
179 return ar; 199 return ar;
180 } 200 }
201
202 Archive &operator<<(Archive &, class Bu::Archival *p);
203 Archive &operator>>(Archive &, class Bu::Archival *p);
181 204
182 template<typename key, typename value> 205 template<typename key, typename value>
183 Archive &operator<<( Archive &ar, Hash<key,value> &h ) 206 Archive &operator<<( Archive &ar, Hash<key,value> &h )