00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __WESTRINGS_H__
00021 #define __WESTRINGS_H__
00022
00023 #include <string>
00024 #include <map>
00025 #include <list>
00026 #include "weiBase.h"
00027
00028 using namespace std;
00029
00030 typedef map<string, string> WeStringMap;
00031 typedef orderedmap<string, string> WeAttrMap;
00032 typedef list<string> WeStringList;
00033 typedef WeLinkedListElem<string, string> WeLinkedString;
00034 typedef WeLinkedList<string, string> WeLinkedListStr;
00035
00047 class WeStringLinks : public WeLinkedList<string, string>
00048 {
00049 public:
00050 WeStringLinks(string sep = "=", string delim = "\n\r");
00051 WeStringLinks(WeStringLinks& lst);
00052
00053 void Parse(string data, string sep = "", string delim = "");
00054 string& Compose(string sep = "", string delim = "");
00055
00056
00057 const string &Separator(void) const { return(separator);};
00058 void Separator(const string &sep) { separator = sep; };
00059
00060
00061 const string &Delimiter(void) const { return(delimiter); };
00062 void Delimiter(const string &delim) { delimiter = delim; };
00063
00064 protected:
00065 #ifndef __DOXYGEN__
00066 string separator;
00067 string delimiter;
00068 WeLinkedString* data;
00069 WeLinkedString* curr;
00070 #endif //__DOXYGEN__
00071 private:
00072 DECLARE_SERIALIZATOR
00073 {
00074 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(WeLinkedListStr);
00075 ar & BOOST_SERIALIZATION_NVP(separator);
00076 ar & BOOST_SERIALIZATION_NVP(delimiter);
00077 };
00078 };
00079
00080 BOOST_CLASS_TRACKING(WeLinkedString, boost::serialization::track_never)
00081 BOOST_CLASS_TRACKING(WeStringList, boost::serialization::track_never)
00082
00083 #endif //__WESTRINGS_H__