Composite predicate that forms a logical OR relation from its child predicates. More...
#include <mitkNodePredicateOr.h>


Public Types | |
| typedef NodePredicateOr | Self |
| typedef NodePredicateCompositeBase | Superclass |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
| virtual const char * | GetClassName () const |
| itkFactorylessNewMacro (NodePredicateOr) | |
| virtual | ~NodePredicateOr () |
| Standard Destructor. | |
| virtual bool | CheckNode (const DataNode *node) const |
| Checks, if the node fulfills any of the subpredicates conditions. | |
Static Public Member Functions | |
| static Pointer | New (const NodePredicateBase *_arga, const NodePredicateBase *_argb) |
Protected Member Functions | |
| NodePredicateOr () | |
| Constructor. | |
| NodePredicateOr (const NodePredicateBase *p1, const NodePredicateBase *p2) | |
| Convenience constructor that adds p1 and p2 to list of child predicates. | |
Composite predicate that forms a logical OR relation from its child predicates.
Definition at line 33 of file mitkNodePredicateOr.h.
| typedef itk::SmartPointer<const Self> mitk::NodePredicateOr::ConstPointer |
Reimplemented from mitk::NodePredicateCompositeBase.
Definition at line 36 of file mitkNodePredicateOr.h.
| typedef itk::SmartPointer<Self> mitk::NodePredicateOr::Pointer |
Reimplemented from mitk::NodePredicateCompositeBase.
Definition at line 36 of file mitkNodePredicateOr.h.
Reimplemented from mitk::NodePredicateCompositeBase.
Definition at line 36 of file mitkNodePredicateOr.h.
Reimplemented from mitk::NodePredicateCompositeBase.
Definition at line 36 of file mitkNodePredicateOr.h.
| mitk::NodePredicateOr::~NodePredicateOr | ( | ) | [virtual] |
| mitk::NodePredicateOr::NodePredicateOr | ( | ) | [protected] |
Constructor.
Definition at line 23 of file mitkNodePredicateOr.cpp.
: NodePredicateCompositeBase()
{
}
| mitk::NodePredicateOr::NodePredicateOr | ( | const NodePredicateBase * | p1, |
| const NodePredicateBase * | p2 | ||
| ) | [protected] |
Convenience constructor that adds p1 and p2 to list of child predicates.
Definition at line 28 of file mitkNodePredicateOr.cpp.
References mitk::NodePredicateCompositeBase::AddPredicate().
: NodePredicateCompositeBase()
{
this->AddPredicate(p1);
this->AddPredicate(p2);
}
| bool mitk::NodePredicateOr::CheckNode | ( | const DataNode * | node ) | const [virtual] |
Checks, if the node fulfills any of the subpredicates conditions.
Implements mitk::NodePredicateBase.
Definition at line 40 of file mitkNodePredicateOr.cpp.
{
if (m_ChildPredicates.empty())
throw std::invalid_argument("NodePredicateOr: no child predicates available");
if (node == NULL)
throw std::invalid_argument("NodePredicateOr: invalid node");
/* return the disjunction of the child predicate. If any predicate returns true, we return true too. Return false only if all child predicates return false */
for (ChildPredicates::const_iterator it = m_ChildPredicates.begin(); it != m_ChildPredicates.end(); ++it)
if ((*it)->CheckNode(node) == true)
return true;
return false; // none of the childs was true, so return false
}
| virtual const char* mitk::NodePredicateOr::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::NodePredicateCompositeBase.
| mitk::NodePredicateOr::itkFactorylessNewMacro | ( | NodePredicateOr | ) |
| static Pointer mitk::NodePredicateOr::New | ( | const NodePredicateBase * | _arga, |
| const NodePredicateBase * | _argb | ||
| ) | [inline, static] |
Definition at line 38 of file mitkNodePredicateOr.h.
Referenced by QmitkToolWorkingDataSelectionBox::GetAllNodes(), QmitkToolReferenceDataSelectionBox::GetAllPossibleReferenceImagesPredicate(), mitk::LevelWindowManager::GetRelevantNodes(), and TestDataStorage().
:
//##Documentation
1.7.2