Changeset 488 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/elementSoleno.cc
- Timestamp:
- Feb 7, 2014, 2:00:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/elementSoleno.cc
r424 r488 84 84 // } 85 85 86 string elementSoleno::FileOutputFlow() const87 {88 ostringstream sortie;89 // sortie << elementName_.getElementType() << endl;90 sortie << elementName_.getGenericLabel() << endl;91 sortie << specificName_ << endl;92 sortie << lenghtElem_ << " " << aperture_<< " " << B0_ << " " << varyB0_ << endl;93 return sortie.str();94 }86 // string elementSoleno::FileOutputFlow() const 87 // { 88 // ostringstream sortie; 89 // // sortie << elementName_.getElementType() << endl; 90 // sortie << elementName_.getGenericLabel() << endl; 91 // sortie << specificName_ << endl; 92 // sortie << lenghtElem_ << " " << aperture_<< " " << B0_ << " " << varyB0_ << endl; 93 // return sortie.str(); 94 // } 95 95 96 96 … … 110 110 } 111 111 112 void elementSoleno::FileInput(ifstream& ifs)113 {114 ifs >> specificName_;115 ifs >> lenghtElem_ >> aperture_ >> B0_ >> varyB0_ ;116 }112 // void elementSoleno::FileInput(ifstream& ifs) 113 // { 114 // ifs >> specificName_; 115 // ifs >> lenghtElem_ >> aperture_ >> B0_ >> varyB0_ ; 116 // } 117 117 118 118 string elementSoleno::print() … … 133 133 void elementSoleno::InputRep(UAPNode* root) 134 134 { 135 UAPNode* ele = root->addChild("element"); 136 ele->addAttribute("name",specificName_); 135 // UAPNode* ele = root->addChild("element"); 136 // ele->addAttribute("name",specificName_); 137 UAPNode* ele = setAMLelementHeader(root); 137 138 138 139 string txt = ""; … … 158 159 } 159 160 } 161 162 void elementSoleno::FileAMLInput(UAPNode* entree) 163 { 164 if ( !checkAMLelementGenericName(entree) ) return; 165 AMLtools::readAMLParameterAttribut(entree, "length", "design", lenghtElem_); 166 167 UAPNode* ouverture = entree->getChildByName("aperture"); 168 if ( !ouverture ) { 169 cout << " elementSoleno::FileAMLInput ERREUR pas de noeud AML <aperture> " << endl; 170 return; 171 } 172 AMLtools::readAMLParameterAttribut(ouverture, "xy_limit", "design", aperture_); 173 UAPNode* solenoide = entree->getChildByName("solenoid"); 174 if ( !solenoide ) { 175 cout << " elementSoleno::FileAMLInput ERREUR pas de noeud AML <solenoide> " << endl; 176 return; 177 } 178 AMLtools::readAMLParameterAttribut(solenoide, "ksol", "design", B0_); 179 string vrai; 180 AMLtools::readAMLParameterAttribut(solenoide, "vary", "is_on", vrai); 181 if ( vrai == string("true")) varyB0_ = true; 182 else varyB0_ = false; 183 }
Note: See TracChangeset
for help on using the changeset viewer.