Commit 3e787fe8 authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

Ainur: parse Matrix<String>

parent 45c20d18
......@@ -237,15 +237,15 @@ private:
}
template<typename T>
void convertInternal(T& t,
String value,
typename EnableIf<!Loki::TypeTraits<T>::isIntegral
&& !Loki::TypeTraits<T>::isFloat,
int>::Type = 0) const
{
err("convertInternal generic type value = " + value + "\n");
}
// template<typename T>
// void convertInternal(T& t,
// String value,
// typename EnableIf<!Loki::TypeTraits<T>::isIntegral
// && !Loki::TypeTraits<T>::isFloat,
// int>::Type = 0) const
// {
// err("convertInternal generic type value = " + value + "\n");
// }
template<typename T>
void convertInternal(std::vector<T>& t,
......@@ -256,10 +256,7 @@ private:
template<typename T>
void convertInternal(Matrix<T>& t,
String value,
typename EnableIf<Loki::TypeTraits<T>::isArith ||
IsComplexNumber<T>::True,
int>::Type = 0) const;
String value) const;
template<typename T>
void convertInternal(T& t,
......
......@@ -257,10 +257,7 @@ AinurState::Action<T>::operator()(A& attr,
template<typename T>
void AinurState::convertInternal(Matrix<T>& t,
String value,
typename EnableIf<Loki::TypeTraits<T>::isArith ||
IsComplexNumber<T>::True,
int>::Type) const
String value) const
{
namespace qi = boost::spirit::qi;
typedef std::string::iterator IteratorType;
......@@ -324,11 +321,12 @@ void AinurState::convertInternal(std::vector<T>& t,
std::cerr << "vector parsing: unmatched part exists\n";
}
template void AinurState::convertInternal(Matrix<DoubleOrFloatType>&,String, int) const;
template void AinurState::convertInternal(Matrix<DoubleOrFloatType>&,String) const;
template void AinurState::convertInternal(Matrix<std::complex<DoubleOrFloatType> >&,
String,
int) const;
String) const;
template void AinurState::convertInternal(Matrix<String>&, String) const;
template void AinurState::convertInternal(std::vector<DoubleOrFloatType>&, String, int) const;
......
......@@ -841,6 +841,14 @@ public:
}
}
void read(Matrix<String>& m, const String& label)
{
if (ainur_)
return ainur_->readValue(m, label);
throw RuntimeError("InputNg: Matrix<String> not supported in POD inputs\n");
}
const String& filename() const
{
return file_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment