Changeset 888 for XIOS/trunk/src/node/scalar.cpp
- Timestamp:
- 07/05/16 15:59:10 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/scalar.cpp
r887 r888 27 27 { /* Ne rien faire de plus */ } 28 28 29 std::map<StdString, ETranformationType> CScalar::transformationMapList_ = std::map<StdString, ETranformationType>(); 30 bool CScalar::dummyTransformationMapList_ = CScalar::initializeTransformationMap(CScalar::transformationMapList_); 31 bool CScalar::initializeTransformationMap(std::map<StdString, ETranformationType>& m) 32 { 33 m["reduce_axis"] = TRANS_REDUCE_AXIS_TO_SCALAR; 34 } 35 29 36 StdString CScalar::GetName(void) { return (StdString("scalar")); } 30 37 StdString CScalar::GetDefName(void){ return (CScalar::GetName()); } … … 49 56 void CScalar::checkAttributes(void) 50 57 { 51 // if (this->value.isEmpty())52 // {53 // this->value.setValue(0);54 // }55 58 } 56 59 … … 124 127 } 125 128 129 /*! 130 Parse children nodes of a scalar in xml file. 131 \param node child node to process 132 */ 133 void CScalar::parse(xml::CXMLNode & node) 134 { 135 SuperClass::parse(node); 136 137 if (node.goToChildElement()) 138 { 139 StdString nodeElementName; 140 do 141 { 142 StdString nodeId(""); 143 if (node.getAttributes().end() != node.getAttributes().find("id")) 144 { nodeId = node.getAttributes()["id"]; } 145 146 nodeElementName = node.getElementName(); 147 std::map<StdString, ETranformationType>::const_iterator ite = transformationMapList_.end(), it; 148 it = transformationMapList_.find(nodeElementName); 149 if (ite != it) 150 { 151 transformationMap_.push_back(std::make_pair(it->second, CTransformation<CScalar>::createTransformation(it->second, 152 nodeId, 153 &node))); 154 } 155 } while (node.goToNextElement()) ; 156 node.goToParentElement(); 157 } 158 } 126 159 127 160 // Definition of some macros
Note: See TracChangeset
for help on using the changeset viewer.