Regina 7.0 Calculation Engine
Public Member Functions | Static Public Member Functions | List of all members
regina::BanNone Class Reference

A do-nothing class that bans no coordinates and marks no coordinates. More...

#include <enumerate/treeconstraint.h>

Inheritance diagram for regina::BanNone:
regina::ShortOutput< BanNone > regina::Output< T, supportsUtf8 >

Public Member Functions

template<class LPConstraint >
 BanNone (const LPInitialTableaux< LPConstraint > &)
 
template<class LPConstraint , typename IntType >
void enforceBans (LPData< LPConstraint, IntType > &) const
 
bool operator== (const BanNone &other) const
 
bool operator!= (const BanNone &other) const
 
void writeTextShort (std::ostream &out) const
 
bool marked (size_t) const
 
void writeTextLong (std::ostream &out) const
 A default implementation for detailed output. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 

Static Public Member Functions

static bool supported (NormalEncoding)
 

Detailed Description

A do-nothing class that bans no coordinates and marks no coordinates.

This is intended to act as a drop-in replacement for a "real" BanConstraint class (i.e., a subclass of BanConstraintBase). However, to avoid any overhead in this trivial case, BanNone does not derive from BanConstraintBase, and all of its routines do nothing at all.

See the BanConstraintBase class notes for details on the interface that this class adheres to.

These ban constraint classes are designed mainly to act as C++ template arguments, and end users will typically not need to construct their own object of these classes. Instead, to use a ban constraint class, pass it as a template parameter to one of the tree traversal subclasses (e.g., TreeEnumeration, TreeSingleSolution, or TautEnumeration).

Python
It is rare that you would need to access this class directly through Python. Instead, to use this ban constraint class, you would typically create a tree traversal object with no ban constraint class suffix at all (since BanNone is the default behaviour). For example, all of the Python classes TreeEnumeration_NonSpun, TreeSingleSoln_EulerPositive and TautEnumeration use this do-nothing BanNone class. See the BanConstraintBase class notes for further details on accessing other types of ban constraints from within Python.
Warning
The API for this class has not yet been finalised. This means that the class interface may change in new versions of Regina, without maintaining backward compatibility. If you use this class directly in your own code, please watch the detailed changelogs upon new releases to see if you need to make changes to your code.

Member Function Documentation

◆ detail()

template<class T , bool supportsUtf8 = false>
std::string regina::Output< T, supportsUtf8 >::detail ( ) const
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ str()

template<class T , bool supportsUtf8 = false>
std::string regina::Output< T, supportsUtf8 >::str ( ) const
inherited

Returns a short text representation of this object.

This text should be human-readable, should use plain ASCII characters where possible, and should not contain any newlines.

Within these limits, this short text ouptut should be as information-rich as possible, since in most cases this forms the basis for the Python str() and repr() functions.

Python
The Python "stringification" function str() will use precisely this function, and for most classes the Python repr() function will incorporate this into its output.
Returns
a short text representation of this object.

◆ utf8()

template<class T , bool supportsUtf8 = false>
std::string regina::Output< T, supportsUtf8 >::utf8 ( ) const
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should not contain any newlines, and (within these constraints) should be as information-rich as is reasonable.

Unlike str(), this function may use unicode characters to make the output more pleasant to read. The string that is returned will be encoded in UTF-8.

Returns
a short text representation of this object.

◆ writeTextLong()

void regina::ShortOutput< BanNone , false >::writeTextLong ( std::ostream &  out) const
inlineinherited

A default implementation for detailed output.

This routine simply calls T::writeTextShort() and appends a final newline.

Python
Not present; instead you can call detail() from the subclass T, which returns this output as a string.
Parameters
outthe output stream to which to write.

The documentation for this class was generated from the following file:

Copyright © 1999-2021, 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).