Loading src/Ainur/AinurSpirit.h +7 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ public: typedef std::string::iterator IteratorType; typedef Vector<char>::Type VectorCharType; typedef AinurState::VectorStringType VectorStringType; Ainur(String str); Loading @@ -83,6 +84,12 @@ public: state_.readValue(t, dummy_ + label); } template<typename SomeMapType> void setMap(SomeMapType& map) const { state_.setMap(map); } private: static bool allEmpty(IteratorType first,IteratorType last) Loading src/Ainur/AinurState.h +11 −2 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ namespace PsimagLite { class AinurState { public: typedef Vector<SizeType>::Type VectorSizeType; typedef Vector<String>::Type VectorStringType; typedef std::complex<DoubleOrFloatType> ComplexType; Loading Loading @@ -60,8 +62,6 @@ class AinurState { Matrix<T>& t_; }; // struct ActionMatrix public: enum ErrorEnum { ERR_PARSE_UNDECLARED, Loading Loading @@ -150,6 +150,15 @@ public: used_[x]++; } template<typename SomeMapType> void setMap(SomeMapType& map) const { const SizeType n = keys_.size(); assert(n == values_.size()); for (SizeType i = 0; i < n; ++i) map[keys_[i]] = map[values_[i]]; } static bool verbose() { return false; } static String errLabel(ErrorEnum e, String key) Loading src/InputNg.h +6 −8 Original line number Diff line number Diff line Loading @@ -538,6 +538,7 @@ public: } ainur_ = new Ainur(inputWriteable.inputCheck().import() + data_); ainur_->setMap(mapStrStr_); } } Loading @@ -547,14 +548,6 @@ public: ainur_ = 0; } template<typename SomeMemResolvType> SizeType memResolv(SomeMemResolvType&, SizeType, String = "") const { return 0; } void rewind() {} bool isAinur() const { return (ainur_ != nullptr); } Loading Loading @@ -849,6 +842,11 @@ public: throw RuntimeError("InputNg: Matrix<String> not supported in POD inputs\n"); } MapStrStrType map() const { return mapStrStr_; } const String& filename() const { return file_; Loading Loading
src/Ainur/AinurSpirit.h +7 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ public: typedef std::string::iterator IteratorType; typedef Vector<char>::Type VectorCharType; typedef AinurState::VectorStringType VectorStringType; Ainur(String str); Loading @@ -83,6 +84,12 @@ public: state_.readValue(t, dummy_ + label); } template<typename SomeMapType> void setMap(SomeMapType& map) const { state_.setMap(map); } private: static bool allEmpty(IteratorType first,IteratorType last) Loading
src/Ainur/AinurState.h +11 −2 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ namespace PsimagLite { class AinurState { public: typedef Vector<SizeType>::Type VectorSizeType; typedef Vector<String>::Type VectorStringType; typedef std::complex<DoubleOrFloatType> ComplexType; Loading Loading @@ -60,8 +62,6 @@ class AinurState { Matrix<T>& t_; }; // struct ActionMatrix public: enum ErrorEnum { ERR_PARSE_UNDECLARED, Loading Loading @@ -150,6 +150,15 @@ public: used_[x]++; } template<typename SomeMapType> void setMap(SomeMapType& map) const { const SizeType n = keys_.size(); assert(n == values_.size()); for (SizeType i = 0; i < n; ++i) map[keys_[i]] = map[values_[i]]; } static bool verbose() { return false; } static String errLabel(ErrorEnum e, String key) Loading
src/InputNg.h +6 −8 Original line number Diff line number Diff line Loading @@ -538,6 +538,7 @@ public: } ainur_ = new Ainur(inputWriteable.inputCheck().import() + data_); ainur_->setMap(mapStrStr_); } } Loading @@ -547,14 +548,6 @@ public: ainur_ = 0; } template<typename SomeMemResolvType> SizeType memResolv(SomeMemResolvType&, SizeType, String = "") const { return 0; } void rewind() {} bool isAinur() const { return (ainur_ != nullptr); } Loading Loading @@ -849,6 +842,11 @@ public: throw RuntimeError("InputNg: Matrix<String> not supported in POD inputs\n"); } MapStrStrType map() const { return mapStrStr_; } const String& filename() const { return file_; Loading