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

Stores a single "hit" indicating that some given triangulation has been located in one of Regina's in-built census databases. More...

#include <census/census.h>

Public Member Functions

 CensusHit (const CensusHit &)=default
 Creates a new copy of the given census hit. More...
 
 CensusHit (CensusHit &&) noexcept=default
 Moves the contents of the given census hit into this new object. More...
 
CensusHitoperator= (const CensusHit &)=default
 Copies the given census hit into this object. More...
 
CensusHitoperator= (CensusHit &&) noexcept=default
 Moves the contents of the given census hit into this object. More...
 
void swap (CensusHit &other) noexcept
 Swaps the contents of this and the given census hit. More...
 
const std::string & name () const
 Returns the human-readable name associated with the triangulation in the database. More...
 
const CensusDBdb () const
 Returns details of the census database in which the triangulation was found. More...
 
bool operator== (const CensusHit &rhs) const
 Tests whether this and the given object represent the same census hit. More...
 
bool operator!= (const CensusHit &rhs) const
 Tests whether this and the given object represent different census hits. More...
 

Friends

class CensusDB
 

Detailed Description

Stores a single "hit" indicating that some given triangulation has been located in one of Regina's in-built census databases.

You cannot construct or modify instances of this class yourself, other than through the standard copy/move/swap operations. The only way to create "genuinely" new objects of this class is via the various static Census::lookup() routines.

This class implements C++ move semantics and adheres to the C++ Swappable requirement. It is designed to avoid deep copies wherever possible, even when passing or returning objects by value.

Constructor & Destructor Documentation

◆ CensusHit() [1/2]

regina::CensusHit::CensusHit ( const CensusHit )
default

Creates a new copy of the given census hit.

◆ CensusHit() [2/2]

regina::CensusHit::CensusHit ( CensusHit &&  )
defaultnoexcept

Moves the contents of the given census hit into this new object.

The census hit that is passed will no longer be usable.

Member Function Documentation

◆ db()

const CensusDB & regina::CensusHit::db ( ) const
inline

Returns details of the census database in which the triangulation was found.

Returns
the database for this hit.

◆ name()

const std::string & regina::CensusHit::name ( ) const
inline

Returns the human-readable name associated with the triangulation in the database.

This typically contains the name of the triangulation and/or the name of the underlying manifold.

Returns
the human-readable name for this hit.

◆ operator!=()

bool regina::CensusHit::operator!= ( const CensusHit rhs) const
inline

Tests whether this and the given object represent different census hits.

Two census hits are considered the same if they have the same human-readable name and also come from the same database (as identified by the CensusDB comparison operators).

Parameters
rhsthe census hit to compare this against.
Returns
true if and only if this and the given hit are different.

◆ operator=() [1/2]

CensusHit & regina::CensusHit::operator= ( CensusHit &&  )
defaultnoexcept

Moves the contents of the given census hit into this object.

The census hit that is passed will no longer be usable.

◆ operator=() [2/2]

CensusHit & regina::CensusHit::operator= ( const CensusHit )
default

Copies the given census hit into this object.

◆ operator==()

bool regina::CensusHit::operator== ( const CensusHit rhs) const
inline

Tests whether this and the given object represent the same census hit.

Two census hits are considered the same if they have the same human-readable name and also come from the same database (as identified by the CensusDB comparison operators).

Parameters
rhsthe census hit to compare this against.
Returns
true if and only if this and the given hit are the same.

◆ swap()

void regina::CensusHit::swap ( CensusHit other)
inlinenoexcept

Swaps the contents of this and the given census hit.

Parameters
otherthe census hit whose contents are to be swapped with this.

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

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).