Loading...
Searching...
No Matches
SBDDataGraphNode::IsType Class Reference

This node predicate compares the node type with a given type. More...

Public Member Functions

 IsType (SBDDataGraphNode::Type argument0)
 
virtual IsTypeclone () const override
 
virtual bool operator() (SBDDataGraphNode const *node) override
 
virtual bool operator() (SBDDataGraphNode const *node) const override
 

Detailed Description

This node predicate returns true when the node type is equal to the type passed to the constructor of the predicate:

// collect all carbon atoms
SBNodeIndexer nodeIndexer;
SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom) && (SBAtom::GetElementType() == SBElement::Type::Carbon));
static SBDDocument * getActiveDocument()
Returns a pointer to SAMSON's active document.
Definition: SAMSON.cpp:738
This node predicate compares the node type with a given type.
Definition: SBDDataGraphNode.hpp:512
@ Atom
Atom.
Definition: SBDDataGraphNode.hpp:67
This class describes a node indexer.
Definition: SBDDataGraphNodeIndexer.hpp:21
virtual void getNodes(SBNodeIndexer &nodeIndexer, SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate &visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const override
Collects nodes into nodeIndexer, based on a nodeType, a selection status and a visitPredicate,...
Definition: SBDDocumentFolder.cpp:804
@ Carbon
The type of the Carbon element.
Definition: SBMElement.hpp:48
See also
Node predicates

Member Function Documentation

◆ clone()

virtual IsType * SBDDataGraphNode::IsType::clone ( ) const
overridevirtual

Reimplemented from SBCFunctor.