| 45 | // I would define this outside the class but Borland 5.5 has some problems |
| 46 | // with non-inline templated friend functions. |
| 47 | friend void deserialize ( |
| 48 | static_set_kernel_1& item, |
| 49 | std::istream& in |
| 50 | ) |
| 51 | { |
| 52 | try |
| 53 | { |
| 54 | item.clear(); |
| 55 | size_t size; |
| 56 | deserialize(size,in); |
| 57 | item.set_size = size; |
| 58 | item.d = new T[size]; |
| 59 | for (size_t i = 0; i < size; ++i) |
| 60 | { |
| 61 | deserialize(item.d[i],in); |
| 62 | } |
| 63 | } |
| 64 | catch (serialization_error& e) |
| 65 | { |
| 66 | item.set_size = 0; |
| 67 | if (item.d) |
| 68 | { |
| 69 | delete [] item.d; |
| 70 | item.d = 0; |
| 71 | } |
| 72 | |
| 73 | throw serialization_error(e.info + "\n while deserializing object of type static_set_kernel_1"); |
| 74 | } |
| 75 | catch (...) |
| 76 | { |
| 77 | item.set_size = 0; |
| 78 | if (item.d) |
| 79 | { |
| 80 | delete [] item.d; |
| 81 | item.d = 0; |
| 82 | } |
| 83 | |
| 84 | throw; |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | public: |
| 89 |
nothing calls this directly
no test coverage detected