From: Gonzalo A. <ga...@us...> - 2006-09-08 14:27:13
|
Update of /cvsroot/mod-c/ehtml/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14047/include Added Files: Dictionary.h Log Message: * Dictionary: a convenience child of map<string,string> --- NEW FILE: Dictionary.h --- #ifndef _DICT_H_ #define _DICT_H_ #include <string> #include <map> #include <iostream> /** * Dictionary (map<string,string>). */ class Dictionary: public std::map<std::string,std::string> { public: /** * serialize: transform into a printable (multiline) string. */ std::string Serialize(); /** * marshall: opposite of seralize. */ bool Marshall(const std::string& str); friend std::ostream& operator << (std::ostream& o, Dictionary& s); friend std::istream& operator >> (std::istream& i, Dictionary& s); }; /** * Dictionary serialization operator (@see Dictionary::serialize). */ std::ostream& operator << (std::ostream& o, Dictionary& s); /** * Dictionary marshalling operator (@see Dictionary::marhsall). */ std::istream& operator >> (std::istream& i, Dictionary& s); #endif |