Workspace 6.21.5
Public Member Functions | List of all members
NodeCriterionAllPass Class Reference

Node criterion that will pass for all nodes. More...

#include <Mesh/Geometry/nodecriterionallpass.h>

Inheritance diagram for NodeCriterionAllPass:
[legend]

Public Member Functions

NodeCriterionAllPassclone () const override
 
void destroy () override
 
bool pass (const Node &node) const override
 
- Public Member Functions inherited from NodeCriterion
 ~NodeCriterion () override=default
 
NodeCriterionclone () const override=0
 
virtual void destroy ()=0
 
virtual bool pass (const Node &node) const =0
 
virtual void postVisits ()
 
virtual bool preVisits (MeshModel &model)
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Detailed Description

This class has little purpose on its own other than as a sensible default criterion in some situations.

Member Function Documentation

◆ clone()

NodeCriterionAllPass * clone ( ) const
overridevirtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

We redeclare this function only so that the more derived return type is available without casting.

Implements NodeCriterion.

◆ destroy()

void destroy ( )
overridevirtual

Destroys the object. This function is usually implemented by calling operator delete on the object.

See also
clone()

Implements NodeCriterion.

◆ pass()

bool pass ( const Node node) const
overridevirtual
Parameters
nodeThe node for which the criterion is to be tested.
Precondition
Clients must have called preVisits() at some point before they are allowed to call pass(). The last call to preVisits() must have returned true.

The usual sequence for a client is to first call preVisits() and check that the return value is true. Then, they call pass() for all the nodes in a model or for some subset of nodes that interests them. Once the client must call postVisits() when they will no longer be calling pass() anymore. The model that was passed to preVisits() must remain valid until postVisits() returns.

Returns
True if node passes the criterion determined by the subclass.

For the NodeCriterionAllPass class, this function always returns true regardless of the node passed to it.

Implements NodeCriterion.