Classes | |
struct | regina::boost::remove_pointer< T > |
A template class used to remove the indirection from a pointer type. More... | |
class | regina::boost::reference_wrapper< T > |
A wrapper allowing references to be passed through generic functions. More... | |
class | regina::boost::noncopyable |
A base class that guarantees that derived classes cannot be copied. More... | |
struct | regina::HashPointer |
A hash function used to calculate hash values for arbitrary pointers. More... | |
struct | regina::HashString |
A hash function used to calculate hash values for C++ strings. More... | |
struct | regina::FuncNew< T > |
An adaptable generator used to create objects using default constructors. More... | |
struct | regina::FuncNewCopyPtr< T > |
An adaptable unary function used to create objects using copy constructors. More... | |
struct | regina::FuncNewCopyRef< T > |
An adaptable unary function used to create objects using copy constructors. More... | |
struct | regina::FuncNewClonePtr< T > |
An adaptable unary function used to create objects using the clone() method. More... | |
struct | regina::FuncDelete< T > |
An adaptable unary function used to deallocate objects. More... | |
class | regina::NTriBool |
A three-way extension of the boolean type. More... | |
class | regina::NTriBool_Illegal_Integer_Conversion |
An exception thrown when an illegal integer conversion is attempted with NTriBool. More... | |
class | regina::NBoolSet |
A set of booleans. More... | |
class | regina::NIndexedArray< Data, HashFcn, EqualTo > |
A dynamically resizable array of objects of type T with fast random access and fast object-to-index lookup. More... | |
class | regina::NListOnCall< T > |
Offers a hard-coded list of expensive objects that should only be created if they are required. More... | |
class | regina::NMatrix2 |
Represents a 2-by-2 integer matrix. More... | |
class | regina::NLargeInteger |
Represents an arbitrary precision integer. More... | |
class | regina::StoreValue< T > |
An NProperty storage policy indicating that the property should be held by value. More... | |
class | regina::StoreConstPtr< T > |
An NProperty storage policy indicating that the property should be held by constant pointer. More... | |
class | regina::StoreManagedPtr< T > |
An NProperty storage policy indicating that the property should be held by pointer and that the property wrapper will also take responsibility for memory management. More... | |
class | regina::NPropertyBase |
A base class that provides routines shared by all properties, regardless of their individual NProperty template parameters. More... | |
class | regina::NProperty< T, Storage > |
Stores a calculable property of an object. More... | |
class | regina::NRational |
Represents an arbitrary precision rational number. More... | |
class | regina::NMutex |
A mutual exclusion device (mutex) used to ensure that different threads do not interfere when working with the same data. More... | |
class | regina::NThread |
Provides very basic thread handling. More... | |
class | regina::LessDeref< T, Comp > |
An adaptable binary function used to compare the objects to which pointers are pointing. More... | |
struct | regina::stl::select1st< Pair > |
An adaptable unary function used to select the first element of a pair. More... | |
struct | regina::stl::select2nd< Pair > |
An adaptable unary function used to select the second element of a pair. More... | |
class | regina::stl::unary_compose< Operation1, Operation2 > |
An adaptable unary function used to compose two unary functions. More... | |
class | regina::xml::XMLPropertyDict |
Represents a hashed map from property names to property values. More... | |
class | regina::xml::XMLParserCallback |
Provides the callbacks for an XMLParser. More... | |
class | regina::xml::XMLParser |
Used to parse an entire XML file. More... | |
class | regina::ZBuffer |
A common base class for compression/decompression stream buffers. More... | |
class | regina::CompressionBuffer |
An output stream buffer that compresses data as it is written. More... | |
class | regina::DecompressionBuffer |
An input stream buffer that decompresses data as it is read. More... | |
class | regina::CompressionStream |
An output stream that compresses data as it is written. More... | |
class | regina::DecompressionStream |
An input stream that decompresses data as it is read. More... | |
Typedefs | |
typedef pthread_t | regina::NThreadID |
The type used for a thread identifier. | |
Functions | |
template<class T> | |
reference_wrapper< T > const | regina::boost::ref (T &t) |
Returns a wrapper for the given reference. | |
template<class T> | |
reference_wrapper< T const > const | regina::boost::cref (T const &t) |
Returns a wrapper for the given const reference. | |
template<class T> | |
T | regina::boost::prior (T it) |
Returns the iterator prior to the given iterator. | |
template<class T> | |
T | regina::boost::next (T it) |
Returns the iterator following the given iterator. | |
std::ostream & | regina::operator<< (std::ostream &out, const NTriBool &set) |
Writes the given three-way boolean to the given output stream. | |
std::ostream & | regina::operator<< (std::ostream &out, const NBoolSet &set) |
Writes the given boolean set to the given output stream. | |
template<class Data, class HashFcn, class EqualTo> | |
bool | regina::operator== (const NIndexedArray< Data, HashFcn, EqualTo > &array1, const NIndexedArray< Data, HashFcn, EqualTo > &array2) |
See the C++ standard. | |
template<class Data, class HashFcn, class EqualTo> | |
bool | regina::operator< (const NIndexedArray< Data, HashFcn, EqualTo > &array1, const NIndexedArray< Data, HashFcn, EqualTo > &array2) |
See the C++ standard. | |
std::ostream & | regina::operator<< (std::ostream &out, const NMatrix2 &mat) |
Writes the given matrix to the given output stream. | |
bool | regina::simpler (const NMatrix2 &m1, const NMatrix2 &m2) |
Determines whether the first given matrix is more aesthetically pleasing than the second. | |
bool | regina::simpler (const NMatrix2 &pair1first, const NMatrix2 &pair1second, const NMatrix2 &pair2first, const NMatrix2 &pair2second) |
Determines whether the first given pair of matrices is more aesthetically pleasing than the second pair. | |
std::ostream & | regina::operator<< (std::ostream &out, const NLargeInteger &large) |
Writes the given integer to the given output stream. | |
std::ostream & | regina::operator<< (std::ostream &out, const NRational &rat) |
Writes the given rational to the given output stream. | |
template<class Operation1, class Operation2> | |
unary_compose< Operation1, Operation2 > | regina::stl::compose1 (const Operation1 &func1, const Operation2 &func2) |
Returns an adaptable unary function that is the composition of the two given functions. | |
char * | regina::duplicate (const std::string &str) |
Creates a new C string that is a duplicate of the given C++ string. | |
bool | regina::startsWith (const std::string &str, const std::string &prefix) |
Determines whether the given C++ string begins with the given prefix. | |
std::string | regina::stripWhitespace (const std::string &str) |
Strips all whitespace from the beginning and end of the given C++ string. | |
bool | regina::valueOf (const std::string &str, int &dest) |
Converts the entire given string to an integer and reports whether this conversion was successful. | |
bool | regina::valueOf (const std::string &str, unsigned &dest) |
Converts the entire given string to an unsigned integer and reports whether this conversion was successful. | |
bool | regina::valueOf (const std::string &str, long &dest) |
Converts the entire given string to a long integer and reports whether this conversion was successful. | |
bool | regina::valueOf (const std::string &str, unsigned long &dest) |
Converts the entire given string to an unsigned long integer and reports whether this conversion was successful. | |
bool | regina::valueOf (const std::string &str, NLargeInteger &dest) |
Converts the entire given string to an arbitrary precision integer and reports whether this conversion was successful. | |
bool | regina::valueOf (const std::string &str, double &dest) |
Converts the entire given string to a double precision real number and reports whether this conversion was successful. | |
bool | regina::valueOf (const std::string &str, bool &dest) |
Converts the entire given string to a boolean and reports whether this conversion was successful. | |
bool | regina::valueOf (const std::string &str, NTriBool &dest) |
Converts the entire given string to a three-way boolean (true, false or unknown) and reports whether this conversion was successful. | |
bool | regina::valueOf (const std::string &str, NBoolSet &dest) |
Converts the entire given string to a set of booleans and reports whether this conversion was successful. | |
template<class OutputIterator> | |
unsigned | regina::basicTokenise (OutputIterator results, const std::string &str) |
Decomposes the given string into tokens. | |
std::string | regina::xml::xmlEncodeSpecialChars (const std::string &original) |
Returns the given string with special characters converted to XML entities. | |
std::string | regina::xml::xmlEncodeComment (const std::string &comment) |
Returns the given string encoded so it is suitable for use inside an XML comment. | |
template<class T> | |
std::string | regina::xml::xmlValueTag (const std::string &tagName, const T &value) |
Returns an XML tag with a single property containing the given value. |
typedef pthread_t regina::NThreadID |
The type used for a thread identifier.
unsigned regina::basicTokenise | ( | OutputIterator | results, | |
const std::string & | str | |||
) |
Decomposes the given string into tokens.
This is an extremely simple tokeniser; tokens are defined to be separated by whitespace.
results | the output iterator to which the resulting tokens will be written; this must accept objects of type const std::string& . | |
str | the string to decompose. |
unary_compose<Operation1, Operation2> regina::stl::compose1 | ( | const Operation1 & | func1, | |
const Operation2 & | func2 | |||
) | [inline] |
Returns an adaptable unary function that is the composition of the two given functions.
This class is for use with the Standard Template Library.
The composition of functions func1
and func2
is the function comp
for which comp(x) == func1(func2(x))
.
Type Operation1::argument_type
is the same as (or can be constructed from) type Operation2::result_type
.
func1 | the first function to use in the composition. | |
func2 | the second function to use in the composition. |
reference_wrapper<T const> const regina::boost::cref | ( | T const & | t | ) | [inline] |
Returns a wrapper for the given const reference.
See reference_wrapper for further details.
t | the reference to wrap. |
char* regina::duplicate | ( | const std::string & | str | ) |
Creates a new C string that is a duplicate of the given C++ string.
The deallocation of the new C string is the responsibility of the caller of this routine.
str | the C++ string to duplicate. |
T regina::boost::next | ( | T | it | ) | [inline] |
Returns the iterator following the given iterator.
This function avoids having to explicitly create a temporary to increment.
Only the increment operator ++it
needs to be defined.
it | the iterator to examine. |
bool regina::operator< | ( | const NIndexedArray< Data, HashFcn, EqualTo > & | array1, | |
const NIndexedArray< Data, HashFcn, EqualTo > & | array2 | |||
) | [inline] |
See the C++ standard.
std::ostream& regina::operator<< | ( | std::ostream & | out, | |
const NRational & | rat | |||
) |
Writes the given rational to the given output stream.
Infinity will be written as Inf
. Undefined will be written as Undef
. A rational with denominator one will be written as a single integer. All other rationals will be written in the form r/s
.
out | the output stream to which to write. | |
rat | the rational to write. |
std::ostream& regina::operator<< | ( | std::ostream & | out, | |
const NLargeInteger & | large | |||
) |
Writes the given integer to the given output stream.
out | the output stream to which to write. | |
large | the integer to write. |
std::ostream & regina::operator<< | ( | std::ostream & | out, | |
const NMatrix2 & | mat | |||
) | [inline] |
Writes the given matrix to the given output stream.
The matrix will be written entirely on a single line, with the first row followed by the second row.
out | the output stream to which to write. | |
mat | the matrix to write. |
std::ostream& regina::operator<< | ( | std::ostream & | out, | |
const NBoolSet & | set | |||
) |
Writes the given boolean set to the given output stream.
The set will be written in the form { true, false }
, { true }
, { false }
or { }
.
out | the output stream to which to write. | |
set | the boolean set to write. |
std::ostream& regina::operator<< | ( | std::ostream & | out, | |
const NTriBool & | set | |||
) |
Writes the given three-way boolean to the given output stream.
The value will be written in the form true
, false
or unknown
.
out | the output stream to which to write. | |
set | the three-way boolean to write. |
bool regina::operator== | ( | const NIndexedArray< Data, HashFcn, EqualTo > & | array1, | |
const NIndexedArray< Data, HashFcn, EqualTo > & | array2 | |||
) | [inline] |
See the C++ standard.
T regina::boost::prior | ( | T | it | ) | [inline] |
Returns the iterator prior to the given iterator.
This function avoids having to explicitly create a temporary to decrement.
Only the decrement operator --it
needs to be defined.
it | the iterator to examine. |
reference_wrapper<T> const regina::boost::ref | ( | T & | t | ) | [inline] |
Returns a wrapper for the given reference.
See reference_wrapper for further details.
t | the reference to wrap. |
bool regina::simpler | ( | const NMatrix2 & | pair1first, | |
const NMatrix2 & | pair1second, | |||
const NMatrix2 & | pair2first, | |||
const NMatrix2 & | pair2second | |||
) |
Determines whether the first given pair of matrices is more aesthetically pleasing than the second pair.
The way in which this judgement is made is purely aesthetic on the part of the author, and is subject to change in future versions of Regina.
Note that pairs are ordered, so the pair (M, N) may be more (or perhaps less) pleasing than the pair (N, M).
pair1first | the first matrix of the first pair to examine. | |
pair1second | the second matrix of the first pair to examine. | |
pair2first | the first matrix of the second pair to examine. | |
pair2second | the second matrix of the second pair to examine. |
true
if the first pair is deemed to be more pleasing than the second pair, or false
if either the ordered pairs are equal or the second pair is more pleasing than the first. bool regina::simpler | ( | const NMatrix2 & | m1, | |
const NMatrix2 & | m2 | |||
) |
Determines whether the first given matrix is more aesthetically pleasing than the second.
The way in which this judgement is made is purely aesthetic on the part of the author, and is subject to change in future versions of Regina.
m1 | the first matrix to examine. | |
m2 | the second matrix to examine. |
true
if m1 is deemed to be more pleasing than m2, or false
if either the matrices are equal or m2 is more pleasing than m1. bool regina::startsWith | ( | const std::string & | str, | |
const std::string & | prefix | |||
) |
Determines whether the given C++ string begins with the given prefix.
str | the full C++ string to examine. | |
prefix | the prefix whose presence we are testing for. |
true
if and only if str begins with prefix. std::string regina::stripWhitespace | ( | const std::string & | str | ) |
Strips all whitespace from the beginning and end of the given C++ string.
The new stripped string is returned; the original string is not altered.
str | the string to be stripped. |
bool regina::valueOf | ( | const std::string & | str, | |
NBoolSet & | dest | |||
) |
Converts the entire given string to a set of booleans and reports whether this conversion was successful.
A set of booleans is represented by one of the four strings --
, T-
, -F
or TF
. If the conversion is unsuccessful, argument dest will be set to NBoolSet::sNone and false
will be returned.
str | the string to convert. | |
dest | the variable in which to store the resulting set of booleans. |
true
if the conversion was successful or false
otherwise. bool regina::valueOf | ( | const std::string & | str, | |
NTriBool & | dest | |||
) |
Converts the entire given string to a three-way boolean (true, false or unknown) and reports whether this conversion was successful.
If the given string begins with T
, F
or U
(either upper- or lower-case), the string will be successfully converted to true, false or unknown respectively. If the string is one of 1
, -1
or 0
, the string will likewise be converted to true, false or unknown respectively. Otherwise the conversion will be unsuccessful and argument dest will be set to unknown.
str | the string to convert. | |
dest | the variable in which to store the resulting set of booleans. |
true
if the conversion was successful or false
otherwise. bool regina::valueOf | ( | const std::string & | str, | |
bool & | dest | |||
) |
Converts the entire given string to a boolean and reports whether this conversion was successful.
If the given string begins with T
or F
(either upper- or lower-case), the string will be successfully converted to true
or false
respectively. Otherwise the conversion will be unsuccessful and argument dest will be set to false
.
str | the string to convert. | |
dest | the variable in which to store the resulting boolean. |
true
if the conversion was completely successful or false
otherwise. bool regina::valueOf | ( | const std::string & | str, | |
double & | dest | |||
) |
Converts the entire given string to a double precision real number and reports whether this conversion was successful.
The given string should contain no whitespace or other characters that are not a part of the real number that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false
will be returned.
str | the string to convert. | |
dest | the variable in which to store the resulting real number. |
true
if the conversion was completely successful or false
otherwise. bool regina::valueOf | ( | const std::string & | str, | |
NLargeInteger & | dest | |||
) |
Converts the entire given string to an arbitrary precision integer and reports whether this conversion was successful.
The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false
will be returned.
str | the string to convert. | |
dest | the variable in which to store the resulting arbitrary precision integer. |
true
if the conversion was completely successful or false
otherwise. bool regina::valueOf | ( | const std::string & | str, | |
unsigned long & | dest | |||
) |
Converts the entire given string to an unsigned long integer and reports whether this conversion was successful.
The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false
will be returned.
str | the string to convert. | |
dest | the variable in which to store the resulting unsigned long integer. |
true
if the conversion was completely successful or false
otherwise. bool regina::valueOf | ( | const std::string & | str, | |
long & | dest | |||
) |
Converts the entire given string to a long integer and reports whether this conversion was successful.
The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false
will be returned.
str | the string to convert. | |
dest | the variable in which to store the resulting long integer. |
true
if the conversion was completely successful or false
otherwise. bool regina::valueOf | ( | const std::string & | str, | |
unsigned & | dest | |||
) |
Converts the entire given string to an unsigned integer and reports whether this conversion was successful.
The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false
will be returned.
str | the string to convert. | |
dest | the variable in which to store the resulting unsigned integer. |
true
if the conversion was completely successful or false
otherwise. bool regina::valueOf | ( | const std::string & | str, | |
int & | dest | |||
) |
Converts the entire given string to an integer and reports whether this conversion was successful.
The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false
will be returned.
str | the string to convert. | |
dest | the variable in which to store the resulting integer. |
true
if the conversion was completely successful or false
otherwise. std::string regina::xml::xmlEncodeComment | ( | const std::string & | comment | ) |
Returns the given string encoded so it is suitable for use inside an XML comment.
As well as converting special characters to XML entities, this routine will replace dashes with underscores to avoid double-hyphens (which are illegal in XML comments).
comment | the string to convert; this string will not be changed. |
std::string regina::xml::xmlEncodeSpecialChars | ( | const std::string & | original | ) |
Returns the given string with special characters converted to XML entities.
For instance, the string "a \< b"
would be converted to "a \< b"
.
original | the string to convert; this string will not be changed. |
std::string regina::xml::xmlValueTag | ( | const std::string & | tagName, | |
const T & | value | |||
) | [inline] |
Returns an XML tag with a single property containing the given value.
The tag will be of the form <tagName value="..."/>
.
The value itself will be written to the tag string using the standard output stream operator <<.
<
or &
) that need to be encoded as XML entities.tagName | the name of the XML tag to create. | |
value | the value to assign to the value property of the tag. |