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

Node criterion that will pass for all nodes having a given id.

#include <Mesh/Geometry/nodeidcriterion.h>

Inheritance diagram for NodeIdCriterion:
[legend]

Public Member Functions

 NodeIdCriterion ()
 
 NodeIdCriterion (const DataExecution::ObjectArray &ids)
 
 NodeIdCriterion (const NodeIdCriterion &criterion)
 
 ~NodeIdCriterion () override
 
void clear ()
 
NodeIdCriterionclone () const override
 
void destroy () override
 
NodeIdCriterionoperator= (const NodeIdCriterion &criterion)
 
bool pass (const Node &node) const override
 
void setIds (const DataExecution::ObjectArray &ids)
 
void setIds (const int *idArray, unsigned numIds)
 
- 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
 

Constructor & Destructor Documentation

◆ NodeIdCriterion() [1/3]

◆ NodeIdCriterion() [2/3]

NodeIdCriterion ( const NodeIdCriterion criterion)

◆ NodeIdCriterion() [3/3]

◆ ~NodeIdCriterion()

~NodeIdCriterion ( )
override

Member Function Documentation

◆ clear()

void clear ( )

Clears the list of id's this criterion will pass. If left in this state, the criterion will fail all nodes.

◆ clone()

NodeIdCriterion * 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.

◆ operator=()

NodeIdCriterion & operator= ( const NodeIdCriterion criterion)

◆ pass()

bool pass ( const Node node) const
overridevirtual
Parameters
nodeThe node to be tested against the currently set id.
Returns
True if the criterion id has been set and equals node's id, false otherwise.

Implements NodeCriterion.

◆ setIds() [1/2]

void setIds ( const DataExecution::ObjectArray ids)
Parameters
idsThe new ids to match nodes against.

◆ setIds() [2/2]

void setIds ( const int *  idArray,
unsigned  numIds 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
idArrayMust point to an array of id's. It is not an error for an id to be repeated and the id list does not have to be sorted.
numIdsThe number of id's in idArray.
Note
It is permitted for idArray to be a null pointer if numIds is zero. It would be better, however, to call clear() in such cases, but the two have the same end result.