virtual std::string serialize() const { std::stringstream ss; typename std::vector<U>::const_iterator it = this->begin(); std::string tmp; ss << _width << " " << _height << " "; for (; it != this->end() ; ++it) { tmp = it->serialize(); ss << tmp.length() << " " << tmp << " "; } return ss.str(); }