Regina 7.4.1 Calculation Engine
tightencoding.h File Reference

Provides short ASCII printable encodings for various objects. More...

#include <iostream>
#include <string>
#include <sstream>
#include "utilities/exception.h"

Classes

struct  regina::TightEncodable< T >
 A base class that assists with support for tight encodings and corresponding decodings. More...

Namespaces

namespace  regina
 Contains the entire Regina calculation engine.
namespace  regina::detail
 Contains implementation details and common functionality for Regina's dimension-agnostic classes.

Functions

void regina::tightEncode (std::ostream &out, int value)
 Writes the tight encoding of the given signed integer to the given output stream.
std::string regina::tightEncoding (int value)
 Returns the tight encoding of the given signed integer.
void regina::tightEncode (std::ostream &out, long value)
 Writes the tight encoding of the given signed long integer to the given output stream.
std::string regina::tightEncoding (long value)
 Returns the tight encoding of the given signed long integer.
void regina::tightEncode (std::ostream &out, long long value)
 Writes the tight encoding of the given signed long long integer to the given output stream.
std::string regina::tightEncoding (long long value)
 Returns the tight encoding of the given signed long long integer.
void regina::tightEncode (std::ostream &out, unsigned value)
 Writes the tight encoding of the given unsigned integer to the given output stream.
std::string regina::tightEncoding (unsigned value)
 Returns the tight encoding of the given unsigned integer.
void regina::tightEncode (std::ostream &out, unsigned long value)
 Writes the tight encoding of the given unsigned long integer to the given output stream.
std::string regina::tightEncoding (unsigned long value)
 Returns the tight encoding of the given unsigned long integer.
void regina::tightEncode (std::ostream &out, unsigned long long value)
 Writes the tight encoding of the given unsigned long long integer to the given output stream.
std::string regina::tightEncoding (unsigned long long value)
 Returns the tight encoding of the given unsigned long long integer.
void regina::tightEncode (std::ostream &out, bool value)
 Writes the tight encoding of the given boolean to the given output stream.
std::string regina::tightEncoding (bool value)
 Returns the tight encoding of the given boolean.
template<typename Int>
Int regina::tightDecoding (const std::string &enc)
 Reconstructs an integer or boolean from its given tight encoding.
template<typename Int>
Int regina::tightDecode (std::istream &input)
 Reconstructs an integer or boolean from its given tight encoding.
template<typename Int>
void regina::detail::tightEncodeInteger (std::ostream &out, Int value)
 Internal function that writes the tight encoding of the given integer to the given output stream.
template<typename Int, typename iterator>
Int regina::detail::tightDecodeInteger (iterator start, iterator limit, bool noTrailingData)
 Internal function that reconstructs an integer from its given tight encoding.
template<typename Int>
void regina::detail::tightEncodeIndex (std::ostream &out, Int value)
 Internal function that writes the tight encoding of an integer whose value is either non-negative or -1.
void regina::detail::tightEncodeNoIndex (std::ostream &out)
 Internal function that writes the tight encoding of -1, using an encoding that is compatible with tightEncodeIndex().
template<typename Int>
Int regina::detail::tightDecodeIndex (std::istream &input)
 Internal function that reconstructs an integer that was encoded using tightEncodeIndex().

Detailed Description

Provides short ASCII printable encodings for various objects.