Changeset ddceb1 for src/Parameters
- Timestamp:
- May 8, 2017, 1:54:50 PM (8 years ago)
- Branches:
- ForceAnnealing_goodresults, ForceAnnealing_tocheck
- Children:
- 7630e3
- Parents:
- ac3a04
- git-author:
- Frederik Heber <heber@…> (03/31/17 19:18:12)
- git-committer:
- Frederik Heber <frederik.heber@…> (05/08/17 13:54:50)
- Location:
- src/Parameters
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parameters/Parameter.hpp
rac3a04 rddceb1 48 48 bool isValidAsString(const std::string &_value) const throw(ParameterValidatorException); 49 49 const std::string getAsString() const throw(ParameterValueException); 50 const std::string getAsStringUnvalidated() const throw(ParameterValueException); 50 51 void setAsString(const std::string &_value) throw(ParameterValueException); 51 52 -
src/Parameters/Parameter_impl.hpp
rac3a04 rddceb1 165 165 try { 166 166 return value.getAsString(); 167 } catch(ParameterException &e) { 168 e << ParameterName(ParameterInterface::getName()); 169 throw; 170 } 171 } 172 173 /** Catch call to value.getAsStringUnvalidated() to add exception information. 174 * 175 * @return parameter value as string 176 */ 177 template<typename T> 178 inline const std::string Parameter<T>::getAsStringUnvalidated() const throw(ParameterValueException) 179 { 180 try { 181 return value.getAsStringUnvalidated(); 167 182 } catch(ParameterException &e) { 168 183 e << ParameterName(ParameterInterface::getName()); -
src/Parameters/Specifics/Value_vector.cpp
rac3a04 rddceb1 190 190 const std::string Value<Vector>::getAsString() const throw(ParameterValueException) 191 191 { 192 converted_value = parseAsVector(value); 193 if (!ValueSet) throw ParameterValueException(); 194 if (!isValid(converted_value)) throw ParameterValueException(); 192 195 return value; 193 196 } 194 197 198 const std::string Value<Vector>::getAsStringUnvalidated() const throw(ParameterValueException) 199 { 200 if (!ValueSet) throw ParameterValueException(); 201 return value; 202 } 195 203 196 204 void Value<Vector>::setAsString(const std::string &_value) throw(ParameterException) -
src/Parameters/Specifics/Value_vector.hpp
rac3a04 rddceb1 53 53 bool isValidAsString(const std::string &_value) const throw(ParameterValidatorException); 54 54 const std::string getAsString() const throw(ParameterValueException); 55 const std::string getAsStringUnvalidated() const throw(ParameterValueException); 55 56 void setAsString(const std::string &_value) throw(ParameterException); 56 57 -
src/Parameters/Value.hpp
rac3a04 rddceb1 85 85 bool isValidAsString(const std::string &_value) const throw(ParameterValidatorException); 86 86 const std::string getAsString() const throw(ParameterValueException); 87 const std::string getAsStringUnvalidated() const throw(ParameterValueException); 87 88 void setAsString(const std::string &_value) throw(ParameterException); 88 89 -
src/Parameters/Value_impl.hpp
rac3a04 rddceb1 184 184 { 185 185 return toString(get()); 186 } 187 188 /** Getter of unvalidated value, returning string. 189 * 190 * @return string value 191 */ 192 template <class T> 193 inline const std::string Value<T>::getAsStringUnvalidated() const throw(ParameterValueException) 194 { 195 return toString(getUnvalidated()); 186 196 } 187 197
Note:
See TracChangeset
for help on using the changeset viewer.