Changes in src/Actions/toPythonString.cpp [992839:33e801]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/toPythonString.cpp
r992839 r33e801 41 41 #include "LinearAlgebra/Vector.hpp" 42 42 43 #include "Parameters/Specifics/KeyValuePair.hpp" 44 43 45 template <> 44 46 const std::string toPythonString( const boost::filesystem::path & _value) … … 52 54 std::stringstream output; 53 55 output << _value.getAtomicNumber(); 56 return output.str(); 57 } 58 59 template <> 60 const std::string toPythonString( const KeyValuePair & _value) 61 { 62 std::stringstream output; 63 const char semicolon(';'); 64 const size_t semicolon_pos = _value.find_last_of(semicolon, std::string::npos); 65 const size_t final_equality_pos = _value.find('=', semicolon_pos); 66 output << _value; 67 if ((semicolon_pos == std::string::npos) 68 || (final_equality_pos != std::string::npos)) 69 output << semicolon; 54 70 return output.str(); 55 71 }
Note:
See TracChangeset
for help on using the changeset viewer.