Regina Calculation Engine
Public Member Functions | List of all members
regina::NSurfaceSubset Class Reference

Represents a subset of a normal surface set. More...

#include <surfaces/nsurfacesubset.h>

Inheritance diagram for regina::NSurfaceSubset:
regina::ShareableObject regina::NSurfaceSet regina::boost::noncopyable

Public Member Functions

 NSurfaceSubset (const NSurfaceSet &set, const NSurfaceFilter &filter)
 Creates a new normal surface subset. More...
 
virtual ~NSurfaceSubset ()
 Destroys this normal surface subset. More...
 
virtual int getFlavour () const
 Returns the flavour of coordinate system being used by the surfaces stored in this set. More...
 
virtual bool allowsAlmostNormal () const
 Determines if the flavour of coordinate system being used allows for almost normal surfaces, that is, allows for octagonal discs. More...
 
virtual bool allowsSpun () const
 Determines if the flavour of coordinate system being used allows for spun normal surfaces. More...
 
virtual bool allowsOriented () const
 Determines if the flavour of coordinate system being used allows for transversely oriented normal surfaces. More...
 
virtual bool isEmbeddedOnly () const
 Returns whether this set is known to contain only embedded normal surfaces. More...
 
virtual NTriangulationgetTriangulation () const
 Returns the triangulation in which these normal surfaces live. More...
 
virtual unsigned long getNumberOfSurfaces () const
 Returns the number of surfaces stored in this set. More...
 
virtual const NNormalSurfacegetSurface (unsigned long index) const
 Returns the surface at the requested index in this set. More...
 
virtual ShareableObjectgetShareableObject ()
 Returns this object cast as a ShareableObject. More...
 
virtual void writeTextShort (std::ostream &out) const
 Writes this object in short text format to the given output stream. More...
 
virtual void writeTextLong (std::ostream &out) const
 Writes this object in long text format to the given output stream. More...
 
- Public Member Functions inherited from regina::ShareableObject
 ShareableObject ()
 Default constructor that does nothing. More...
 
virtual ~ShareableObject ()
 Default destructor that does nothing. More...
 
std::string toString () const
 Returns the output from writeTextShort() as a string. More...
 
std::string toStringLong () const
 Returns the output from writeTextLong() as a string. More...
 
- Public Member Functions inherited from regina::NSurfaceSet
virtual ~NSurfaceSet ()
 Default destructor that does nothing. More...
 
void writeAllSurfaces (std::ostream &out) const
 Writes the number of surfaces in this set followed by the details of each surface to the given output stream. More...
 

Additional Inherited Members

- Protected Member Functions inherited from regina::boost::noncopyable
 noncopyable ()
 A constructor which does nothing. More...
 
 ~noncopyable ()
 A destructor which does nothing. More...
 

Detailed Description

Represents a subset of a normal surface set.

This subset merely contains pointers to some of the normal surfaces stored in the original set.

If the surfaces in the original set should change, the surfaces in this subset will thus change also. If the original set is deleted, this subset will become invalid.

Precondition
As long as this subset is in use, the surface set upon which this subset is based will never be deleted.

Constructor & Destructor Documentation

regina::NSurfaceSubset::NSurfaceSubset ( const NSurfaceSet set,
const NSurfaceFilter filter 
)

Creates a new normal surface subset.

The surfaces included in the subset will be those from the given set that are accepted by the given filter.

Parameters
setthe surface set for which this will be a subset.
filterthe filter that defines which surfaces in set will be included in this subset.
regina::NSurfaceSubset::~NSurfaceSubset ( )
inlinevirtual

Destroys this normal surface subset.

Member Function Documentation

bool regina::NSurfaceSubset::allowsAlmostNormal ( ) const
inlinevirtual

Determines if the flavour of coordinate system being used allows for almost normal surfaces, that is, allows for octagonal discs.

Returns
true if and only if almost normal surfaces are allowed.

Implements regina::NSurfaceSet.

bool regina::NSurfaceSubset::allowsOriented ( ) const
inlinevirtual

Determines if the flavour of coordinate system being used allows for transversely oriented normal surfaces.

Returns
true if and only if transverse orientations are supported.

Implements regina::NSurfaceSet.

bool regina::NSurfaceSubset::allowsSpun ( ) const
inlinevirtual

Determines if the flavour of coordinate system being used allows for spun normal surfaces.

Returns
true if and only if spun normal surface are supported.

Implements regina::NSurfaceSet.

int regina::NSurfaceSubset::getFlavour ( ) const
inlinevirtual

Returns the flavour of coordinate system being used by the surfaces stored in this set.

This will be one of the predefined coordinate system constants in NNormalSurfaceList.

Returns
the flavour of coordinate system used.

Implements regina::NSurfaceSet.

unsigned long regina::NSurfaceSubset::getNumberOfSurfaces ( ) const
inlinevirtual

Returns the number of surfaces stored in this set.

Returns
the number of surfaces.

Implements regina::NSurfaceSet.

ShareableObject * regina::NSurfaceSubset::getShareableObject ( )
inlinevirtual

Returns this object cast as a ShareableObject.

Generally the implementation of this routine will simply be return this;.

This routine is necessary because NSurfaceSet is not of type ShareableObject; however, it is presumed that each of its derived classes will be. The aim here is to reduce the mess that could arise combining virtual multiple inheritance with the voluminous casting and recasting that takes place when working with external interfaces.

Returns
this object cast as a ShareableObject.

Implements regina::NSurfaceSet.

const NNormalSurface * regina::NSurfaceSubset::getSurface ( unsigned long  index) const
inlinevirtual

Returns the surface at the requested index in this set.

Parameters
indexthe index of the requested surface in this set; this must be between 0 and getNumberOfSurfaces()-1 inclusive.
Returns
the normal surface at the requested index in this set.

Implements regina::NSurfaceSet.

NTriangulation * regina::NSurfaceSubset::getTriangulation ( ) const
inlinevirtual

Returns the triangulation in which these normal surfaces live.

Returns
the triangulation in which these surfaces live.

Implements regina::NSurfaceSet.

bool regina::NSurfaceSubset::isEmbeddedOnly ( ) const
inlinevirtual

Returns whether this set is known to contain only embedded normal surfaces.

If it is possible that there are non-embedded surfaces in this set but it is not known whether any are actually present or not, this routine should return false.

Returns
true if it is known that only embedded normal surfaces exist in this list, or false if immersed and/or singular normal surfaces might be present.

Implements regina::NSurfaceSet.

void regina::NSurfaceSubset::writeTextLong ( std::ostream &  out) const
inlinevirtual

Writes this object in long text format to the given output stream.

The output should provided the user with all the information they could want. The output should end with a newline.

The default implementation of this routine merely calls writeTextShort() and adds a newline.

Python:
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.

Reimplemented from regina::ShareableObject.

void regina::NSurfaceSubset::writeTextShort ( std::ostream &  out) const
inlinevirtual

Writes this object in short text format to the given output stream.

The output should fit on a single line and no newline should be written.

Python:
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.

Implements regina::ShareableObject.


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

Copyright © 1999-2012, The Regina development team
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).