Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

regina::NSurfaceFilterProperties Class Reference
[Normal Surfaces]

A normal surface filter that filters by basic properties of the normal surface. More...

#include <sfproperties.h>

Inheritance diagram for regina::NSurfaceFilterProperties:

regina::NSurfaceFilter regina::NPacket regina::NFilePropertyReader regina::ShareableObject regina::boost::noncopyable List of all members.

Public Member Functions

 NSurfaceFilterProperties ()
 Creates a new surface filter that accepts all normal surfaces.

 NSurfaceFilterProperties (const NSurfaceFilterProperties &cloneMe)
 Creates a new surface filter that is a clone of the given surface filter.

const std::set< NLargeInteger > & getECs () const
 Returns the set of allowable Euler characteristics.

unsigned long getNumberOfECs () const
 Returns the number of allowable Euler characteristics.

NLargeInteger getEC (unsigned long index) const
 Returns the allowable Euler characteristic at the given index in the set.

NBoolSet getOrientability () const
 Returns the set of allowable orientabilities.

NBoolSet getCompactness () const
 Returns the set of allowable compactness properties.

NBoolSet getRealBoundary () const
 Returns the set of allowable has-real-boundary properties.

void addEC (const NLargeInteger &ec)
 Adds the given Euler characteristic to the set of allowable Euler characteristics.

void removeEC (const NLargeInteger &ec)
 Removes the given Euler characteristic from the set of allowable Euler characteristics.

void removeAllECs ()
 Empties the set of allowable Euler characteristics.

void setOrientability (const NBoolSet &value)
 Sets the set of allowable orientabilities.

void setCompactness (const NBoolSet &value)
 Sets the set of allowable compactness properties.

void setRealBoundary (const NBoolSet &value)
 Sets the set of allowable has-real-boundary properties.

virtual bool accept (const NNormalSurface &surface) const
 Decides whether or not the given normal surface is accepted by this filter.

virtual void writeTextLong (std::ostream &out) const
 Writes this object in long text format to the given output stream.

virtual int getFilterID () const
 Returns the unique integer ID corresponding to the filtering method that is this particular subclass of NSurfaceFilter.

virtual std::string getFilterName () const
 Returns a string description of the filtering method that is this particular subclass of NSurfaceFilter.


Static Public Member Functions

NXMLFilterReadergetXMLFilterReader (NPacket *parent)
 Returns a newly created XML filter reader that will read the details of a particular type of surface filter.

NSurfaceFilterreadFilter (NFile &in, NPacket *parent)
 Reads the details of a normal surface filter from the specified old-style binary file and returns a newly created filter containing that information.


Static Public Attributes

const int filterID
 Contains the integer ID for this type of surface filter.


Protected Member Functions

virtual void writeXMLFilterData (std::ostream &out) const
 Writes a chunk of XML containing the details of this filter.

virtual void writeFilter (NFile &out) const
 Writes the details of this filter to the given old-style binary file.

virtual void writeProperties (NFile &out) const
 Writes to the given old-style binary file any properties associated specifically with this particular subclass of NSurfaceFilter.

virtual void readIndividualProperty (NFile &infile, unsigned propType)
 Reads an individual property from an old-style binary file.


Detailed Description

A normal surface filter that filters by basic properties of the normal surface.

If a property of the surface (such as Euler characteristic or orientability) cannot be determined, the surface will pass any test based on that particular property. For instance, say a surface is required to be both orientable and compact, and say that orientability cannot be determined. Then the surface will be accepted solely on the basis of whether or not it is compact.


Constructor & Destructor Documentation

regina::NSurfaceFilterProperties::NSurfaceFilterProperties  )  [inline]
 

Creates a new surface filter that accepts all normal surfaces.

regina::NSurfaceFilterProperties::NSurfaceFilterProperties const NSurfaceFilterProperties cloneMe  )  [inline]
 

Creates a new surface filter that is a clone of the given surface filter.

Parameters:
cloneMe the surface filter to clone.


Member Function Documentation

virtual bool regina::NSurfaceFilterProperties::accept const NNormalSurface surface  )  const [virtual]
 

Decides whether or not the given normal surface is accepted by this filter.

The default implementation simply returns true.

Parameters:
surface the normal surface under investigation.
Returns:
true if and only if the given surface is accepted by this filter.

Reimplemented from regina::NSurfaceFilter.

void regina::NSurfaceFilterProperties::addEC const NLargeInteger ec  )  [inline]
 

Adds the given Euler characteristic to the set of allowable Euler characteristics.

See getECs() for further details.

Parameters:
ec the new allowable Euler characteristic.

NBoolSet regina::NSurfaceFilterProperties::getCompactness  )  const [inline]
 

Returns the set of allowable compactness properties.

Note that this is a subset of { true, false }. Any surface whose compactness property is not in this set will not be accepted by this filter.

Returns:
the set of allowable compactness properties.

NLargeInteger regina::NSurfaceFilterProperties::getEC unsigned long  index  )  const
 

Returns the allowable Euler characteristic at the given index in the set.

See getECs() for further details.

Parameters:
index the index in the set of allowable Euler characteristics; this must be between 0 and getNumberOfECs()-1 inclusive.
Returns:
the requested allowable Euler characteristic.

const std::set< NLargeInteger > & regina::NSurfaceFilterProperties::getECs  )  const [inline]
 

Returns the set of allowable Euler characteristics.

Any surface whose Euler characteristic is not in this set will not be accepted by this filter. The set will be given in ascending order with no element repeated.

If this set is empty, all Euler characteristics will be accepted.

Python:
This routine returns a python sequence.
Returns:
the set of allowable Euler characteristics.

virtual int regina::NSurfaceFilterProperties::getFilterID  )  const [virtual]
 

Returns the unique integer ID corresponding to the filtering method that is this particular subclass of NSurfaceFilter.

Returns:
the unique integer filtering method ID.

Reimplemented from regina::NSurfaceFilter.

virtual std::string regina::NSurfaceFilterProperties::getFilterName  )  const [virtual]
 

Returns a string description of the filtering method that is this particular subclass of NSurfaceFilter.

Returns:
a string description of this filtering method.

Reimplemented from regina::NSurfaceFilter.

unsigned long regina::NSurfaceFilterProperties::getNumberOfECs  )  const [inline]
 

Returns the number of allowable Euler characteristics.

See getECs() for further details.

Returns:
the number of allowable Euler characteristics.

NBoolSet regina::NSurfaceFilterProperties::getOrientability  )  const [inline]
 

Returns the set of allowable orientabilities.

Note that this is a subset of { true, false }. Any surface whose orientability is not in this set will not be accepted by this filter.

Returns:
the set of allowable orientabilities.

NBoolSet regina::NSurfaceFilterProperties::getRealBoundary  )  const [inline]
 

Returns the set of allowable has-real-boundary properties.

Note that this is a subset of { true, false }. Any surface whose has-real-boundary property is not in this set will not be accepted by this filter.

Returns:
the set of allowable has-real-boundary properties.

NXMLFilterReader* regina::NSurfaceFilterProperties::getXMLFilterReader NPacket parent  )  [static]
 

Returns a newly created XML filter reader that will read the details of a particular type of surface filter.

You may assume that the filter to be read is of the same type as the class in which you are implementing this routine.

The XML filter reader should read exactly what writeXMLFilterData() writes, and vice versa.

parent represents the packet which will become the new filter's parent in the tree structure. This information is for reference only, and need not be used. See the description of parameter parent in NPacket::getXMLReader() for further details.

Python:
Not present.
Parameters:
parent the packet which will become the new filter's parent in the tree structure, or 0 if the new filter is to be tree matriarch.
Returns:
the newly created XML filter reader.

Reimplemented from regina::NSurfaceFilter.

NSurfaceFilter* regina::NSurfaceFilterProperties::readFilter NFile in,
NPacket parent
[static]
 

Reads the details of a normal surface filter from the specified old-style binary file and returns a newly created filter containing that information.

You may assume that the filter is of the same class as the class in which you are implementing this routine. The newly created filter must also be of this type.

The general packet information and the filter ID may be assumed to have already been read from the file, and should not be reread. The readFilter() routine should read exactly what writeFilter() writes, and vice versa.

Properties should not be read from here; this will be done later by another routine.

parent represents the packet which will become the new filter's parent in the tree structure. This information is for reference only, and need not be used. See the description of parameter parent in NPacket::readPacket() for further details.

New filter types should make this routine simply return 0 since this file format is now obsolete, and older calculation engines will not understand newer filter types anyway.

Deprecated:
For the preferred way to read filters from file, see getXMLFilterReader() and class NXMLFilterReader instead.
Precondition:
The given file is open for reading and all above conditions have been satisfied.
Python:
Not present.
Parameters:
in the file from which to read the filter.
parent the packet which will become the new filter's parent in the tree structure, or 0 if the new filter is to be tree matriarch.
Returns:
the filter read from file, or 0 if an error occurred.

Reimplemented from regina::NSurfaceFilter.

virtual void regina::NSurfaceFilterProperties::readIndividualProperty NFile infile,
unsigned  propType
[protected, virtual]
 

Reads an individual property from an old-style binary file.

The property type and bookmarking details should not read; merely the contents of the property that are written to file between NFile::writePropertyHeader() and NFile::writePropertyFooter(). See the NFile::writePropertyHeader() notes for details.

The property type of the property to be read will be passed in propType. If the property type is unrecognised, this routine should simply do nothing and return. If the property type is recognised, this routine should read the property and process it accordingly (e.g., store it in whatever data object is currently being read).

Parameters:
infile the file from which to read the property. This should be open for reading and at the position immediately after writePropertyHeader() would have been called during the corresponding write operation.
propType the property type of the property about to be read.

Reimplemented from regina::NSurfaceFilter.

void regina::NSurfaceFilterProperties::removeAllECs  )  [inline]
 

Empties the set of allowable Euler characteristics.

See getECs() for further details.

Note that this will mean that this filter will allow any Euler characteristic to pass.

void regina::NSurfaceFilterProperties::removeEC const NLargeInteger ec  )  [inline]
 

Removes the given Euler characteristic from the set of allowable Euler characteristics.

See getECs() for further details.

Note that if the allowable set is completely emptied, this filter will allow any Euler characteristic to pass.

Precondition:
The given Euler characteristic is currently in the allowable set.
Parameters:
ec the allowable Euler characteristic to remove.

void regina::NSurfaceFilterProperties::setCompactness const NBoolSet value  )  [inline]
 

Sets the set of allowable compactness properties.

See getCompactness() for further details.

Parameters:
value the new set of allowable compactness properties.

void regina::NSurfaceFilterProperties::setOrientability const NBoolSet value  )  [inline]
 

Sets the set of allowable orientabilities.

See getOrientability() for further details.

Parameters:
value the new set of allowable orientabilities.

void regina::NSurfaceFilterProperties::setRealBoundary const NBoolSet value  )  [inline]
 

Sets the set of allowable has-real-boundary properties.

See getRealBoundary() for further details.

Parameters:
value the new set of allowable has-real-boundary properties.

void regina::NSurfaceFilterProperties::writeFilter NFile out  )  const [inline, protected, virtual]
 

Writes the details of this filter to the given old-style binary file.

You may assume that general packet information and the filter ID have already been written. Only the actual data stored for this particular subclass of NSurfaceFilter need be written.

Properties should not be written from here; this will be done later by another routine.

The default implementation for this routine does nothing; new filter types should not implement this routine since this file format is now obsolete, and older calculation engines will simply skip unknown filter types when reading from binary files.

Deprecated:
For the preferred way to write data to file, see writeXMLFilterData() instead.
Precondition:
The given file is open for writing and satisfies the assumptions listed above.
Parameters:
out the file to be written to.

Reimplemented from regina::NSurfaceFilter.

virtual void regina::NSurfaceFilterProperties::writeProperties NFile out  )  const [protected, virtual]
 

Writes to the given old-style binary file any properties associated specifically with this particular subclass of NSurfaceFilter.

This routine should consist of a call to the superclass implementation followed by a series of writePropertyHeader() and writePropertyFooter() calls with property information being written inside these pairs.

This routine should not call writeAllPropertiesFooter().

The default implementation for this routine does nothing; new filter types should not implement this routine since this file format is now obsolete, and older calculation engines will simply skip unknown filter types when reading from binary files.

Deprecated:
For the preferred way to write data to file, see writeXMLFilterData() instead.
Parameters:
out the file to be written to.

Reimplemented from regina::NSurfaceFilter.

virtual void regina::NSurfaceFilterProperties::writeTextLong std::ostream &  out  )  const [virtual]
 

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:
out the output stream to which to write.

Reimplemented from regina::ShareableObject.

virtual void regina::NSurfaceFilterProperties::writeXMLFilterData std::ostream &  out  )  const [protected, virtual]
 

Writes a chunk of XML containing the details of this filter.

You may assume that the filter opening tag (including the filter type) has already been written, and that the filter closing tag will be written immediately after this routine is called. This routine need only write the additional details corresponding to this particular subclass of NSurfaceFilter.

Parameters:
out the output stream to which the XML should be written.

Reimplemented from regina::NSurfaceFilter.


Member Data Documentation

const int regina::NSurfaceFilterProperties::filterID [static]
 

Contains the integer ID for this type of surface filter.

Each distinct filtering class must have a unique ID, and this should be a non-negative integer. See filterregistry.h for further details.

This member must be declared for every filtering class that will be instantiated. A value need not be assigned; filterregistry.h will take care of this task when you register the filtering class.

Reimplemented from regina::NSurfaceFilter.


The documentation for this class was generated from the following file:
Copyright © 1999-2004, Ben Burton
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).