class Exception1 : public dealii::ExceptionBase \
{ \
public: \
- Exception1(const type1 a1) : arg1(a1) \
- {} /*NOLINT*/ \
+ Exception1(type1 const &a1) : arg1(a1) \
+ {} \
virtual ~Exception1() noexcept \
{} \
virtual void \
} \
\
private: \
- const type1 arg1; \
+ type1 const arg1; \
}
*
* @ingroup Exceptions
*/
-# define DeclException2(Exception2, type1, type2, outsequence) \
- class Exception2 : public dealii::ExceptionBase \
- { \
- public: \
- Exception2(const type1 a1, const type2 a2) : \
- /*NOLINT*/ \
- arg1(a1), \
- arg2(a2) \
- {} \
- virtual ~Exception2() noexcept \
- {} \
- virtual void \
- print_info(std::ostream &out) const override \
- { \
- out << " " outsequence << std::endl; \
- } \
- \
- private: \
- const type1 arg1; \
- const type2 arg2; \
+# define DeclException2(Exception2, type1, type2, outsequence) \
+ class Exception2 : public dealii::ExceptionBase \
+ { \
+ public: \
+ Exception2(type1 const &a1, type2 const &a2) : arg1(a1), arg2(a2) \
+ {} \
+ virtual ~Exception2() noexcept \
+ {} \
+ virtual void \
+ print_info(std::ostream &out) const override \
+ { \
+ out << " " outsequence << std::endl; \
+ } \
+ \
+ private: \
+ type1 const arg1; \
+ type2 const arg2; \
}
class Exception3 : public dealii::ExceptionBase \
{ \
public: \
- Exception3(const type1 a1, const type2 a2, const type3 a3) : \
- /*NOLINT*/ \
+ Exception3(type1 const &a1, type2 const &a2, type3 const &a3) : \
arg1(a1), \
arg2(a2), \
arg3(a3) \
} \
\
private: \
- const type1 arg1; \
- const type2 arg2; \
- const type3 arg3; \
+ type1 const arg1; \
+ type2 const arg2; \
+ type3 const arg3; \
}
class Exception4 : public dealii::ExceptionBase \
{ \
public: \
- Exception4(const type1 a1, \
- const type2 a2, /*NOLINT*/ \
- const type3 a3, \
- const type4 a4) : \
- /*NOLINT*/ \
+ Exception4(type1 const &a1, \
+ type2 const &a2, \
+ type3 const &a3, \
+ type4 const &a4) : \
arg1(a1), \
arg2(a2), \
arg3(a3), \
} \
\
private: \
- const type1 arg1; \
- const type2 arg2; \
- const type3 arg3; \
- const type4 arg4; \
+ type1 const arg1; \
+ type2 const arg2; \
+ type3 const arg3; \
+ type4 const arg4; \
}
class Exception5 : public dealii::ExceptionBase \
{ \
public: \
- Exception5(const type1 a1, \
- const type2 a2, \
- const type3 a3, /*NOLINT*/ \
- const type4 a4, \
- const type5 a5) : \
- /*NOLINT*/ \
+ Exception5(type1 const &a1, \
+ type2 const &a2, \
+ type3 const &a3, \
+ type4 const &a4, \
+ type5 const &a5) : \
arg1(a1), \
arg2(a2), \
arg3(a3), \
} \
\
private: \
- const type1 arg1; \
- const type2 arg2; \
- const type3 arg3; \
- const type4 arg4; \
- const type5 arg5; \
+ type1 const arg1; \
+ type2 const arg2; \
+ type3 const arg3; \
+ type4 const arg4; \
+ type5 const arg5; \
}
#else /*ifndef DOXYGEN*/
* file.
*/
DeclException1(ExcFileNotOpen,
- char *,
+ std::string,
<< "Could not open file " << arg1 << ".");
/**
*/
DeclException2(ExcNoMatch,
std::string,
- Patterns::PatternBase &,
+ const Patterns::PatternBase *,
<< "The string " << arg1 << " does not match the pattern \""
- << arg2.description() << "\"");
+ << arg2->description() << "\"");
//@}
} // namespace Tools
} // namespace Patterns
str << (value ? "true" : "false");
else
str << value;
- AssertThrow(p->match(str.str()), ExcNoMatch(str.str(), *p));
+ AssertThrow(p->match(str.str()), ExcNoMatch(str.str(), p.get()));
return str.str();
}
const std::unique_ptr<Patterns::PatternBase> &p =
Convert<T>::to_pattern())
{
- AssertThrow(p->match(s), ExcNoMatch(s, *p));
+ AssertThrow(p->match(s), ExcNoMatch(s, p.get()));
T value;
if (std::is_same<T, bool>::value)
value = (s == "true");
for (unsigned int i = 1; i < vec.size(); ++i)
s += p->get_separator() + " " + vec[i];
- AssertThrow(pattern->match(s), ExcNoMatch(s, *p));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, p));
return s;
}
const std::unique_ptr<Patterns::PatternBase> &pattern =
Convert<T>::to_pattern())
{
- AssertThrow(pattern->match(s), ExcNoMatch(s, *pattern));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, pattern.get()));
auto p = dynamic_cast<const Patterns::List *>(pattern.get());
AssertThrow(p,
for (unsigned int i = 1; i < vec.size(); ++i)
s += p->get_separator() + " " + vec[i];
- AssertThrow(p->match(s), ExcNoMatch(s, *p));
+ AssertThrow(p->match(s), ExcNoMatch(s, p));
return s;
}
const std::unique_ptr<Patterns::PatternBase> &pattern =
Convert<T>::to_pattern())
{
- AssertThrow(pattern->match(s), ExcNoMatch(s, *pattern));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, pattern.get()));
auto p = dynamic_cast<const Patterns::Map *>(pattern.get());
AssertThrow(p,
for (unsigned int i = 1; i < vec.size(); ++i)
s += p->get_separator() + " " + vec[i];
- AssertThrow(p->match(s), ExcNoMatch(s, *p));
+ AssertThrow(p->match(s), ExcNoMatch(s, p));
return s;
}
const std::unique_ptr<Patterns::PatternBase> &pattern =
Convert<T>::to_pattern())
{
- AssertThrow(pattern->match(s), ExcNoMatch(s, *pattern));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, pattern.get()));
auto p = dynamic_cast<const Patterns::List *>(pattern.get());
AssertThrow(p,
p->get_separator() + " " +
Convert<typename T::value_type>::to_string(t.imag(), base_p);
- AssertThrow(pattern->match(s), ExcNoMatch(s, *p));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, p));
return s;
}
const std::unique_ptr<Patterns::PatternBase> &pattern =
Convert<T>::to_pattern())
{
- AssertThrow(pattern->match(s), ExcNoMatch(s, *pattern));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, pattern.get()));
auto p = dynamic_cast<const Patterns::List *>(pattern.get());
AssertThrow(p,
const std::unique_ptr<Patterns::PatternBase> &pattern =
Convert<T>::to_pattern())
{
- AssertThrow(pattern->match(t), ExcNoMatch(t, *pattern));
+ AssertThrow(pattern->match(t), ExcNoMatch(t, pattern.get()));
return t;
}
const std::unique_ptr<Patterns::PatternBase> &pattern =
Convert<T>::to_pattern())
{
- AssertThrow(pattern->match(s), ExcNoMatch(s, *pattern));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, pattern.get()));
return s;
}
};
std::unordered_map<Key, Value> m;
m.insert(t);
std::string s = Convert<decltype(m)>::to_string(m, pattern);
- AssertThrow(pattern->match(s), ExcNoMatch(s, *pattern));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, pattern.get()));
return s;
}
std::string str;
for (unsigned int i = 0; i < string_array.size(); ++i)
str += (i ? " " + p->get_separator() + " " : "") + string_array[i];
- AssertThrow(p->match(str), ExcNoMatch(str, *p));
+ AssertThrow(p->match(str), ExcNoMatch(str, p));
return str;
}
const std::unique_ptr<Patterns::PatternBase> &pattern =
Convert<T>::to_pattern())
{
- AssertThrow(pattern->match(s), ExcNoMatch(s, *pattern));
+ AssertThrow(pattern->match(s), ExcNoMatch(s, pattern.get()));
auto p = dynamic_cast<const Patterns::Tuple *>(pattern.get());
AssertThrow(p,