Changeset 1105 for XIOS/trunk/src/attribute_map.cpp
- Timestamp:
- 04/25/17 10:57:48 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/attribute_map.cpp
r996 r1105 16 16 ///-------------------------------------------------------------- 17 17 18 /*! 19 Clear all attributes of an object and reset them to empty state 20 */ 18 21 void CAttributeMap::clearAllAttributes(void) 19 22 { … … 29 32 //--------------------------------------------------------------- 30 33 34 /* 35 Clear an attribute and reset its value 36 \param[in] key id of attribute 37 */ 31 38 void CAttributeMap::clearAttribute(const StdString& key) 32 39 { … … 36 43 //--------------------------------------------------------------- 37 44 45 /*! 46 Set an attribute of certain id with a value 47 \param[in] key id of the attribute 48 \param[in] attr value of attribute 49 */ 38 50 void CAttributeMap::setAttribute(const StdString& key, CAttribute* const attr) 39 51 { … … 50 62 //--------------------------------------------------------------- 51 63 64 /*! 65 Subscript operator. Return attribute with a specific id 66 */ 52 67 CAttribute* CAttributeMap::operator[](const StdString& key) 53 68 { … … 103 118 } 104 119 } 120 121 /*! 122 Compare two attribute maps 123 \param [in] another attribute map to compare 124 \return true if these two maps have same attributes whose value are identical 125 */ 126 bool CAttributeMap::isEqual(const CAttributeMap& another) 127 { 128 SuperClassMap::const_iterator itb = another.begin(), ite = another.end(), it; 129 for (it = itb; it !=ite; ++it) 130 { 131 if ((*it).first.compare(StdString("id")) != 0 && (*it).first.compare(StdString("src")) != 0) 132 { 133 if (this->hasAttribute(it->first)) 134 { 135 if (!((*it).second->isEqual(*(*this)[it->first]))) 136 return false; 137 } 138 else 139 return false; 140 } 141 } 142 143 return true; 144 } 145 105 146 106 147 //--------------------------------------------------------------- … … 139 180 } 140 181 182 /*! 183 Duplicate attribute map with a specific attribute map. 184 Copy all non-empty attribute of the current attribute map 185 \param [in] srcAttr attribute map which is copied from. 186 */ 141 187 void CAttributeMap::duplicateAttributes(const CAttributeMap* const srcAttr) 142 188 { … … 216 262 } 217 263 */ 264 265 218 266 void CAttributeMap::generateCInterface(ostream& oss, const string& className) 219 267 {
Note: See TracChangeset
for help on using the changeset viewer.