Changeset 7630e3 for src


Ignore:
Timestamp:
May 8, 2017, 1:54:51 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_goodresults, ForceAnnealing_tocheck
Children:
cb6357
Parents:
ddceb1
git-author:
Frederik Heber <heber@…> (03/31/17 20:56:50)
git-committer:
Frederik Heber <frederik.heber@…> (05/08/17 13:54:51)
Message:

Moved toPythonString() from Action::outputAsPython() to Parameter::getAsStringUnvalidated().

  • This allows to have a special "getAsStringUnvalidated" for outputAsPython for type Vector in Parameter/Value, while all other types retain the same outout.
  • TESTFIX: Regression tests Options/Session used different Vector spellings in pre and post complextest.py.
Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/Action_impl_pre.hpp

    rddceb1 r7630e3  
    173173    output << \
    174174    BOOST_PP_IF(n, ", ", "") \
    175     << "\"" << toPythonString(params. \
     175    << "\"" << params. \
    176176        BOOST_PP_SEQ_ELEM(n, paramreferences) \
    177         .getAsStringUnvalidated()) \
     177        .getAsStringUnvalidated() \
    178178    << "\"";
    179179
  • src/Actions/MakroAction_impl_pre.hpp

    rddceb1 r7630e3  
    165165    output << \
    166166    BOOST_PP_IF(n, ", ", "") \
    167     << "\"" << toPythonString(params. \
     167    << "\"" << params. \
    168168        BOOST_PP_SEQ_ELEM(n, paramreferences) \
    169         .get()) \
     169        .getAsStringUnvalidated() \
    170170    << "\"";
    171171
  • src/Parameters/Value_impl.hpp

    rddceb1 r7630e3  
    2222#include "CodePatterns/Log.hpp"
    2323
     24#include "Actions/toPythonString.hpp"
    2425#include "Validators/DummyValidator.hpp"
    2526#include "Validators/DiscreteValidator.hpp"
     
    193194inline const std::string Value<T>::getAsStringUnvalidated() const throw(ParameterValueException)
    194195{
    195   return toString(getUnvalidated());
     196  return toPythonString(getUnvalidated());
    196197}
    197198
Note: See TracChangeset for help on using the changeset viewer.