boost.serialization and lazy initialization

Posted by niXman on Stack Overflow See other posts from Stack Overflow or by niXman
Published on 2010-03-31T09:54:10Z Indexed on 2010/03/31 10:03 UTC
Read the original article Hit count: 996

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 serialize the object of type "std::pair" in the moment of its serialization?

© Stack Overflow or respective owner

Related posts about boost-serialization

Related posts about lazy-initialization