82 FrobbyStringStream::operator
const string&()
const {
87 unsigned long integer) {
88 unsigned long initialLength =
str.size();
93 unsigned long quotient = integer / 10;
94 unsigned long remainder = integer - quotient * 10;
96 char digit =
static_cast<char>(remainder +
'0');
102 }
while (integer != 0);
106 reverse(
str.begin() + initialLength,
str.end());
110 const mpz_class& integer) {
111 str += integer.get_str();
115 if (integer.set_str(
str, 10) != 0)
117 (
"Argument to FrobbyStringStream::parseInteger not a valid integer.");
NotAnIntegerException(const string &)
A replacement for stringstream.
FrobbyStringStream & operator<<(unsigned long long integer)
static void parseInteger(mpz_class &integer, const string &str)
Throws NotAnIntegerException if str is not the string representation of an integer.
static void appendIntegerToString(string &str, unsigned long integer)