Changeset 895 in Sophya for trunk/SophyaLib/BaseTools/dvlist.h
- Timestamp:
- Apr 12, 2000, 7:49:54 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/dvlist.h
r827 r895 70 70 // Classe liste de variables Dynamic Variable List 71 71 72 //! Dynamic Variable List class. 72 73 class DVList : public AnyDataObj { 73 74 public: … … 97 98 98 99 MuTyV& Get(string const& key); 100 /*! Returns the value associated with the name \b key */ 99 101 inline MuTyV& operator() (string const& key) { return Get(key); } 102 /*! Returns the value associated with the name \b key */ 100 103 inline MuTyV& operator[] (string const& key) { return Get(key); } 104 /*! Returns the global comment string associated with the object */ 101 105 inline string& Comment() { return(comment); } 102 106 103 inline void Print() const { Print(cout); } 107 /*! Prints a brief description of object on \b cout */ 108 inline void Show() const { Show(cout); } 109 virtual void Show(ostream& os) const; 110 /*! Prints the list of variables on \b cout */ 111 inline void Print() const { Print(cout); } 104 112 virtual void Print(ostream& os) const; 105 113 … … 111 119 struct dvlElement {MuTyV elval; string elcomm; } ; 112 120 typedef map<string, dvlElement, less<string> > ValList; 121 /*! Returns an iterator pointing on the first variable in the list */ 113 122 inline ValList::const_iterator Begin() { return(mvlist.begin()); } 123 /*! Returns the iterator end value */ 114 124 inline ValList::const_iterator End() { return(mvlist.end()); } 115 125 … … 121 131 }; 122 132 133 /*! operator << overloading - Prints the list on the stream \b s */ 123 134 inline ostream& operator << (ostream& s, DVList const & dvl) 124 135 { dvl.Print(s); return(s); } 125 136 137 /*! Writes the object in the POutPersist stream \b os */ 126 138 inline POutPersist& operator << (POutPersist& os, DVList & obj) 127 139 { ObjFileIO<DVList> fio(&obj); fio.Write(os); return(os); } 140 /*! Reads the object from the PInPersist stream \b is */ 128 141 inline PInPersist& operator >> (PInPersist& is, DVList & obj) 129 142 { ObjFileIO<DVList> fio(&obj); fio.Read(is); return(is); }
Note:
See TracChangeset
for help on using the changeset viewer.