#pragma once #include #include #include #include #include #include #include namespace Jenga{ namespace Common{ using namespace std; template class BoostSerializationSupport{ virtual const char *RootTagName() const = 0; void echo( const char *msg ) const; public: bool ReadXml( istream& ifs, bool isShowExceptionMessage = true ); bool WriteXml( ostream& ofs, bool isShowExceptionMessage = true ) const; bool ReadXml( const string &xmlFilePath, bool isShowExceptionMessage = true ); bool WriteXml( const string &xmlFilePath, bool isShowExceptionMessage = true ) const; bool ReadBinary( const string &filePath, bool isShowExceptionMessage = true ); bool WriteBinary( const string &filePath, bool isShowExceptionMessage = true ) const; bool ReadText( const string &filePath, bool isShowExceptionMessage = true ); bool WriteText( const string &filePath, bool isShowExceptionMessage = true ) const; bool ReadXmlFromString( const string &xmlBuffer ); }; }}