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

Represents a component of the boundary of a 2-manifold triangulation. More...

#include <dim2/dim2boundarycomponent.h>

Inheritance diagram for regina::Dim2BoundaryComponent:
regina::ShareableObject regina::NMarkedElement regina::boost::noncopyable

Public Member Functions

virtual ~Dim2BoundaryComponent ()
 Default destructor. More...
 
unsigned long index () const
 Returns the index of this boundary component in the underlying triangulation. More...
 
unsigned long getNumberOfEdges () const
 Returns the number of edges in this boundary component. More...
 
unsigned long getNumberOfVertices () const
 Returns the number of vertices in this boundary component. More...
 
Dim2EdgegetEdge (unsigned long index) const
 Returns the requested edge in this boundary component. More...
 
Dim2VertexgetVertex (unsigned long index) const
 Returns the requested vertex in this boundary component. More...
 
Dim2ComponentgetComponent () const
 Returns the component of the triangulation to which this boundary component belongs. More...
 
void writeTextShort (std::ostream &out) const
 Writes this object in short text format to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 Writes this object in long text format to the given output stream. More...
 
long markedIndex () const
 Returns the index at which this object is stored in an NMarkedVector. More...
 
Input and Output
std::string str () const
 Returns the output from writeTextShort() as a string. More...
 
std::string toString () const
 A deprecated alias for str(), which returns the output from writeTextShort() as a string. More...
 
std::string detail () const
 Returns the output from writeTextLong() as a string. More...
 
std::string toStringLong () const
 A deprecated alias for detail(), which returns the output from writeTextLong() as a string. More...
 

Friends

class Dim2Triangulation
 Allow access to private members. More...
 

Detailed Description

Represents a component of the boundary of a 2-manifold triangulation.

Boundary components are highly temporary; once a triangulation changes, all its boundary component objects will be deleted and new ones will be created.

Constructor & Destructor Documentation

regina::Dim2BoundaryComponent::~Dim2BoundaryComponent ( )
inlinevirtual

Default destructor.

Member Function Documentation

std::string regina::ShareableObject::detail ( ) const
inherited

Returns the output from writeTextLong() as a string.

Returns
a long text representation of this object.
Dim2Component * regina::Dim2BoundaryComponent::getComponent ( ) const
inline

Returns the component of the triangulation to which this boundary component belongs.

Returns
the component containing this boundary component.
Dim2Edge * regina::Dim2BoundaryComponent::getEdge ( unsigned long  index) const
inline

Returns the requested edge in this boundary component.

The index of a Dim2Edge in the boundary component need not be the index of the same edge in the entire 2-manifold triangulation.

Parameters
indexthe index of the requested edge in the boundary component. This should be between 0 and getNumberOfEdges()-1 inclusive.
Returns
the requested edge.
unsigned long regina::Dim2BoundaryComponent::getNumberOfEdges ( ) const
inline

Returns the number of edges in this boundary component.

Returns
the number of edges.
unsigned long regina::Dim2BoundaryComponent::getNumberOfVertices ( ) const
inline

Returns the number of vertices in this boundary component.

Returns
the number of vertices.
Dim2Vertex * regina::Dim2BoundaryComponent::getVertex ( unsigned long  index) const
inline

Returns the requested vertex in this boundary component.

The index of a Dim2Vertex in the boundary component need not be the index of the same vertex in the entire 2-manifold triangulation.

Parameters
indexthe index of the requested vertex in the boundary component. This should be between 0 and getNumberOfVertices()-1 inclusive.
Returns
the requested vertex.
unsigned long regina::Dim2BoundaryComponent::index ( ) const
inline

Returns the index of this boundary component in the underlying triangulation.

This is identical to calling getTriangulation()->boundaryComponentIndex(this).

Returns
the index of this boundary component vertex.
long regina::NMarkedElement::markedIndex ( ) const
inlineinherited

Returns the index at which this object is stored in an NMarkedVector.

If this object does not belong to an NMarkedVector, the return value is undefined.

Returns
the index at which this object is stored.
std::string regina::ShareableObject::str ( ) const
inherited

Returns the output from writeTextShort() as a string.

Python:
This implements the __str__() function.
Returns
a short text representation of this object.
std::string regina::ShareableObject::toString ( ) const
inlineinherited

A deprecated alias for str(), which returns the output from writeTextShort() as a string.

Deprecated:
This routine has (at long last) been deprecated; use the simpler-to-type str() instead.
Returns
a short text representation of this object.
std::string regina::ShareableObject::toStringLong ( ) const
inlineinherited

A deprecated alias for detail(), which returns the output from writeTextLong() as a string.

Deprecated:
This routine has (at long last) been deprecated; use the simpler-to-type detail() instead.
Returns
a long text representation of this object.
void regina::Dim2BoundaryComponent::writeTextLong ( std::ostream &  out) const
virtual

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

The output should provide the user with all the information they could want. The output should be human-readable, should not contain extremely long lines (so users can read the output in a terminal), and should end with a final 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::Dim2BoundaryComponent::writeTextShort ( std::ostream &  out) const
inlinevirtual

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

The output should be human-readable, should fit on a single line, and should not end with a newline.

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

Implements regina::ShareableObject.

Friends And Related Function Documentation

friend class Dim2Triangulation
friend

Allow access to private members.


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

Copyright © 1999-2014, 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@debian.org).