i need to serialize directory tree. i have no trouble with this type:
std::map<
std::string, // string(path name)
std::vector<std::string> // string array(file names in the path)
> tree;
but for the serialization the directory tree with the content i need other type:
std::map<
std::string, // string(path name)
std::vector< // files array
std::pair<
std::string, // file name
std::vector< // array of file pieces
std::pair< // <<<<<<<<<<<<<<<<<<<<<< for this i need lazy initialization
std::string, // piece buf
boost::uint32_t // crc32 summ on piece
>
>
>
>
> tree;
how can i initialize the object of type "std::pair" in the moment of its serialization? i.e. read file piece/calculate crc32 summ.
up