41 std::string buf(
"blah");
43 std::ostringstream os(buf);
44 ((T*)
this)->print(os);
52 friend std::ostream&
operator<<(std::ostream& Os,
const T& P)
53 { P.print(Os);
return Os;}
friend std::ostream & operator<<(std::ostream &Os, const T &P)
Print to stream.
std::string print_to_string() const
Print to string.
This is a Mixin for classes that can be printed.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
For use with SWIG, it is useful to have a base class that everything can be cast to.