Regina 7.3 Calculation Engine
Classes | Namespaces | Functions
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. More...
 
std::string regina::tightEncoding (int value)
 Returns the tight encoding of the given signed integer. More...
 
void regina::tightEncode (std::ostream &out, long value)
 Writes the tight encoding of the given signed long integer to the given output stream. More...
 
std::string regina::tightEncoding (long value)
 Returns the tight encoding of the given signed long integer. More...
 
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. More...
 
std::string regina::tightEncoding (long long value)
 Returns the tight encoding of the given signed long long integer. More...
 
void regina::tightEncode (std::ostream &out, unsigned value)
 Writes the tight encoding of the given unsigned integer to the given output stream. More...
 
std::string regina::tightEncoding (unsigned value)
 Returns the tight encoding of the given unsigned integer. More...
 
void regina::tightEncode (std::ostream &out, unsigned long value)
 Writes the tight encoding of the given unsigned long integer to the given output stream. More...
 
std::string regina::tightEncoding (unsigned long value)
 Returns the tight encoding of the given unsigned long integer. More...
 
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. More...
 
std::string regina::tightEncoding (unsigned long long value)
 Returns the tight encoding of the given unsigned long long integer. More...
 
void regina::tightEncode (std::ostream &out, bool value)
 Writes the tight encoding of the given boolean to the given output stream. More...
 
std::string regina::tightEncoding (bool value)
 Returns the tight encoding of the given boolean. More...
 
template<typename Int >
Int regina::tightDecoding (const std::string &enc)
 Reconstructs an integer or boolean from its given tight encoding. More...
 
template<typename Int >
Int regina::tightDecode (std::istream &input)
 Reconstructs an integer or boolean from its given tight encoding. More...
 
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. More...
 
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. More...
 
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. More...
 
void regina::detail::tightEncodeNoIndex (std::ostream &out)
 Internal function that writes the tight encoding of -1, using an encoding that is compatible with tightEncodeIndex(). More...
 
template<typename Int >
Int regina::detail::tightDecodeIndex (std::istream &input)
 Internal function that reconstructs an integer that was encoded using tightEncodeIndex(). More...
 

Detailed Description

Provides short ASCII printable encodings for various objects.


Copyright © 1999-2023, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).