25 #include "pink/objects/object.h" 32 void deserialize(
Archive &archive)
override {
33 uint size_ = archive.readWORD();
35 for (uint i = 0; i < size_; ++i) {
36 this->
data()[i] =
reinterpret_cast<T
>(archive.readObject());
43 void deserialize(
Archive &archive) {
44 uint32 size_ = archive.readWORD();
46 for (uint i = 0; i < size_; ++i) {
47 this->
data()[i] = archive.readString();
54 void serialize(
Archive &archive) {
55 archive.writeWORD(
size());
56 for (Common::StringMap::const_iterator it =
begin(); it !=
end(); ++it) {
57 archive.writeString(it->_key);
58 archive.writeString(it->_value);
62 void deserialize(
Archive &archive) {
63 uint size_ = archive.readWORD();
64 for (uint i = 0; i < size_; ++i) {
const T * data() const
Definition: array.h:207
iterator end()
Definition: array.h:379
iterator begin()
Definition: array.h:374
size_type size() const
Definition: array.h:315
void resize(size_type newSize)
Definition: array.h:411