Index: ext/libicpf/src/libicpf/file.h =================================================================== diff -u -r667936664c2a9bdad9f7193e503b1bbef544f72f -rcc897193e71c0650a9226ce4c2fbb4430b1460d6 --- ext/libicpf/src/libicpf/file.h (.../file.h) (revision 667936664c2a9bdad9f7193e503b1bbef544f72f) +++ ext/libicpf/src/libicpf/file.h (.../file.h) (revision cc897193e71c0650a9226ce4c2fbb4430b1460d6) @@ -28,6 +28,7 @@ #include "exception.h" #include "libicpf.h" +#include //#include "str.h" #ifdef _WIN32 #include "windows.h" @@ -253,6 +254,19 @@ } return rFile; } + +template<> +inline file& operator<<(file& rFile, const std::vector& arrStr) +{ + size_t stCount = arrStr.size(); + rFile.swrite(&stCount, sizeof(stCount)); + + for(std::vector::const_iterator iterEntry = arrStr.begin(); iterEntry != arrStr.end(); ++iterEntry) + { + rFile<<((const tchar_t*)*iterEntry); + } + return rFile; +} #endif /// Reads some integral type from a serialization data block @@ -296,6 +310,22 @@ } return rFile; } + +template<> +inline file& operator>>(file& rFile, std::vector& arrStrings) +{ + arrStrings.clear(); + size_t stCount = 0; + rFile>>(stCount); + + CString str; + for(size_t stIndex = 0; stIndex != stCount; ++stIndex) + { + rFile >> (str); + arrStrings.push_back(str); + } + return rFile; +} #endif END_ICPF_NAMESPACE