MCPcopy Create free account
hub / github.com/davisking/dlib / deserialize

Function deserialize

dlib/hash_set/hash_set_kernel_1.h:137–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 typename mem_manager
136 >
137 void deserialize (
138 hash_set_kernel_1<T,expnum,hash_table,mem_manager>& item,
139 std::istream& in
140 )
141 {
142 try
143 {
144 item.clear();
145 unsigned long size;
146 deserialize(size,in);
147 T temp;
148 for (unsigned long i = 0; i < size; ++i)
149 {
150 deserialize(temp,in);
151 item.add(temp);
152 }
153 }
154 catch (serialization_error& e)
155 {
156 item.clear();
157 throw serialization_error(e.info + "\n while deserializing object of type hash_set_kernel_1");
158 }
159 }
160
161// ----------------------------------------------------------------------------------------
162// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

serialization_errorClass · 0.85
clearMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected