8#include "PolymerType.h"
20 std::istream&
operator >> (std::istream& in, PolymerType::Enum& type)
24 if (buffer ==
"Branched" || buffer ==
"branched") {
25 type = PolymerType::Branched;
27 if (buffer ==
"Linear" || buffer ==
"linear") {
28 type = PolymerType::Linear;
30 std::string msg =
"Unknown input PolymerType value string: ";
40 std::ostream&
operator << (std::ostream& out, PolymerType::Enum& type)
42 if (type == PolymerType::Branched) {
45 if (type == PolymerType::Linear) {
49 UTIL_THROW(
"Error writing a PolymerType value");
File containing preprocessor macros for error handling.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.