Changeset e7ad08 for src/Actions
- Timestamp:
- Apr 11, 2018, 6:30:10 AM (7 years ago)
- Branches:
- Candidate_v1.6.1, ChemicalSpaceEvaluator, PythonUI_with_named_parameters, TremoloParser_IncreasedPrecision
- Children:
- cd91bd
- Parents:
- 8819d2
- git-author:
- Frederik Heber <frederik.heber@…> (09/06/17 12:58:47)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/11/18 06:30:10)
- Location:
- src/Actions
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/Action.hpp
r8819d2 re7ad08 14 14 #endif 15 15 16 #include <algorithm> 16 17 #include <iosfwd> 17 18 #include <string> … … 24 25 */ 25 26 #define NOPARAM_DEFAULT BOOST_PP_NIL 27 28 namespace MoleCuilder { 29 //!> helps normalizing Action's tokens for use as Python parameter names 30 #ifdef HAVE_INLINE 31 inline 32 #endif 33 std::string normalizeToken(std::string _token) { 34 std::replace(_token.begin(), _token.end(), '-', '_'); 35 return _token; 36 } 37 } /* namespace MoleCuilder */ 26 38 27 39 /** Nicely visible short-hand for push a status message -
src/Actions/Action_impl_pre.hpp
r8819d2 re7ad08 173 173 output << \ 174 174 BOOST_PP_IF(n, ", ", "") \ 175 << normalizeToken( BOOST_PP_SEQ_ELEM(n, paramtokens) ) \ 176 << "=" \ 175 177 << "\"" << params. \ 176 178 BOOST_PP_SEQ_ELEM(n, paramreferences) \ 177 .getAsStringUnvalidated() \178 << "\""; 179 .getAsStringUnvalidated() \ 180 << "\""; \ 179 181 180 182 // print an initialiser list, i.e. "var( token, valid (,default) )(,)" -
src/Actions/Action_impl_python.hpp
r8819d2 re7ad08 77 77 BOOST_PP_COMMA_IF(n) \ 78 78 boost::python::arg( \ 79 BOOST_PP_SEQ_ELEM(n, STRINGLIST) \79 MoleCuilder::normalizeToken( BOOST_PP_SEQ_ELEM(n, STRINGLIST) ).c_str() \ 80 80 ) \ 81 81 = \ … … 92 92 BOOST_PP_COMMA_IF(n) \ 93 93 boost::python::arg( \ 94 BOOST_PP_SEQ_ELEM(n, STRINGLIST) \94 MoleCuilder::normalizeToken( BOOST_PP_SEQ_ELEM(n, STRINGLIST) ).c_str() \ 95 95 ) 96 96 -
src/Actions/MakroAction_impl_pre.hpp
r8819d2 re7ad08 165 165 output << \ 166 166 BOOST_PP_IF(n, ", ", "") \ 167 << normalizeToken( BOOST_PP_SEQ_ELEM(n, paramtokens) ) \ 168 << "=" \ 167 169 << "\"" << params. \ 168 170 BOOST_PP_SEQ_ELEM(n, paramreferences) \
Note:
See TracChangeset
for help on using the changeset viewer.