Changeset 488 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/elementBeam.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/elementBeam.cc
r424 r488 97 97 // } 98 98 99 string elementBeam::FileOutputFlow() const100 {101 ostringstream sortie;102 // sortie << elementName_.getElementType() << endl;103 sortie << elementName_.getGenericLabel() << endl;104 sortie << specificName_ << endl;105 sortie << x_ << " " << xp_ << " " << y_ << " " << yp_ << endl;106 sortie << dl_ << " " << del_ << " " << p0_ << endl;107 cout << " elementBeam::FileOutputFlow, p0 = " << p0_ << endl;108 return sortie.str();109 }99 // string elementBeam::FileOutputFlow() const 100 // { 101 // ostringstream sortie; 102 // // sortie << elementName_.getElementType() << endl; 103 // sortie << elementName_.getGenericLabel() << endl; 104 // sortie << specificName_ << endl; 105 // sortie << x_ << " " << xp_ << " " << y_ << " " << yp_ << endl; 106 // sortie << dl_ << " " << del_ << " " << p0_ << endl; 107 // cout << " elementBeam::FileOutputFlow, p0 = " << p0_ << endl; 108 // return sortie.str(); 109 // } 110 110 111 111 vector< pair<string, vector<string> > > elementBeam::parametersToSoftware () const … … 128 128 } 129 129 130 void elementBeam::elementBeam::FileInput(ifstream& ifs) 131 { 132 ifs >> specificName_; 133 ifs >> x_ >> xp_ >> y_ >> yp_; 134 ifs >> dl_ >> del_ >> p0_; 135 cout << " elementBeam::FileFileInput, p0 = " << p0_ << endl; 130 // void elementBeam::FileInput(ifstream& ifs) 131 // { 132 // ifs >> specificName_; 133 // ifs >> x_ >> xp_ >> y_ >> yp_; 134 // ifs >> dl_ >> del_ >> p0_; 135 // cout << " elementBeam::FileFileInput, p0 = " << p0_ << endl; 136 // lenghtElem_ = getLenghtOfElement(); 137 // cout << " elementBeam::FileInput calcule longueur = " << lenghtElem_ << endl; 138 // } 139 140 void elementBeam::FileAMLInput(UAPNode* entree) 141 { 142 // if ( !entree ) return; 143 // string nonGenerique; 144 // AMLtools::readAMLParameterAttribut(*iter, "description", "type", nonGenerique); 145 // if ( nonGenerique != elementName_.getGenericLabel() ) { 146 // cout << " elementBeam::FileAMLInput ERREUR d'element : " << nonGenerique << " ? attendu : " << elementName_.getGenericLabel() << endl; 147 // return; 148 // } 149 150 if ( !checkAMLelementGenericName(entree) ) return; 151 UAPNode* faisceau = entree->getChildByName("beam"); 152 if ( !faisceau ) { 153 cout << " elementBeam::FileAMLInput ERREUR pas de noeud AML <beam> : " << endl; 154 return; 155 } 156 AMLtools::readAMLParameterAttribut(faisceau, "11", "design", x_); 157 AMLtools::readAMLParameterAttribut(faisceau, "22", "design", xp_); 158 AMLtools::readAMLParameterAttribut(faisceau, "33", "design", y_); 159 AMLtools::readAMLParameterAttribut(faisceau, "44", "design", yp_); 160 AMLtools::readAMLParameterAttribut(faisceau, "55", "design", dl_); 161 AMLtools::readAMLParameterAttribut(faisceau, "66", "design", del_); 162 AMLtools::readAMLParameterAttribut(faisceau, "pc", "design", p0_); 136 163 lenghtElem_ = getLenghtOfElement(); 137 cout << " elementBeam::FileInput calcule longueur = " << lenghtElem_ << endl; 138 } 164 cout << " elementBeam::FileAMLInput calcule longueur = " << lenghtElem_ << endl; 165 } 166 167 139 168 140 169 string elementBeam::print() … … 161 190 void elementBeam::InputRep(UAPNode* root) 162 191 { 163 UAPNode* ele = root->addChild("element"); 164 ele->addAttribute("name",specificName_); 192 // UAPNode* ele = root->addChild("element"); 193 // ele->addAttribute("name",specificName_); 194 UAPNode* ele = setAMLelementHeader(root); 165 195 166 196 UAPNode* node = ele->addChild("beam");
Note: See TracChangeset
for help on using the changeset viewer.