Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

mitk::NodePredicateAnd Class Reference
[Data Storage Classes]

Composite predicate that forms a logical AND relation from its child predicates. More...

#include <mitkNodePredicateAnd.h>

Inheritance diagram for mitk::NodePredicateAnd:
Inheritance graph
[legend]
Collaboration diagram for mitk::NodePredicateAnd:
Collaboration graph
[legend]

List of all members.

Public Types

typedef NodePredicateAnd Self
typedef NodePredicateCompositeBase Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
 itkFactorylessNewMacro (NodePredicateAnd)
virtual ~NodePredicateAnd ()
 Standard Destructor.
virtual bool CheckNode (const DataNode *node) const
 Checks, if the node fulfills all of the subpredicates conditions.

Static Public Member Functions

static Pointer New (const NodePredicateBase *_arga, const NodePredicateBase *_argb)
static Pointer New (const NodePredicateBase *_arga, const NodePredicateBase *_argb, const NodePredicateBase *_argc)

Protected Member Functions

 NodePredicateAnd ()
 Protected constructor, use static instantiation functions instead.
 NodePredicateAnd (const NodePredicateBase *p1, const NodePredicateBase *p2)
 Convenience constructor that adds p1 and p2 to list of child predicates Protected constructor, use static instantiation functions instead.
 NodePredicateAnd (const NodePredicateBase *p1, const NodePredicateBase *p2, const NodePredicateBase *p3)
 Convenience constructor that adds p1, p2 and p3 to list of child predicates Protected constructor, use static instantiation functions instead.

Detailed Description

Composite predicate that forms a logical AND relation from its child predicates.

Definition at line 33 of file mitkNodePredicateAnd.h.


Member Typedef Documentation

typedef itk::SmartPointer<const Self> mitk::NodePredicateAnd::ConstPointer

Reimplemented from mitk::NodePredicateCompositeBase.

Definition at line 36 of file mitkNodePredicateAnd.h.

typedef itk::SmartPointer<Self> mitk::NodePredicateAnd::Pointer

Reimplemented from mitk::NodePredicateCompositeBase.

Definition at line 36 of file mitkNodePredicateAnd.h.

Reimplemented from mitk::NodePredicateCompositeBase.

Definition at line 36 of file mitkNodePredicateAnd.h.

Reimplemented from mitk::NodePredicateCompositeBase.

Definition at line 36 of file mitkNodePredicateAnd.h.


Constructor & Destructor Documentation

mitk::NodePredicateAnd::~NodePredicateAnd (  ) [virtual]

Standard Destructor.

Definition at line 44 of file mitkNodePredicateAnd.cpp.

{
}
mitk::NodePredicateAnd::NodePredicateAnd (  ) [protected]

Protected constructor, use static instantiation functions instead.

Definition at line 21 of file mitkNodePredicateAnd.cpp.

: NodePredicateCompositeBase()
{
}
mitk::NodePredicateAnd::NodePredicateAnd ( const NodePredicateBase p1,
const NodePredicateBase p2 
) [protected]

Convenience constructor that adds p1 and p2 to list of child predicates Protected constructor, use static instantiation functions instead.

Definition at line 27 of file mitkNodePredicateAnd.cpp.

References mitk::NodePredicateCompositeBase::AddPredicate().

: NodePredicateCompositeBase()
{
  this->AddPredicate(p1);
  this->AddPredicate(p2);
}
mitk::NodePredicateAnd::NodePredicateAnd ( const NodePredicateBase p1,
const NodePredicateBase p2,
const NodePredicateBase p3 
) [protected]

Convenience constructor that adds p1, p2 and p3 to list of child predicates Protected constructor, use static instantiation functions instead.

Definition at line 35 of file mitkNodePredicateAnd.cpp.

References mitk::NodePredicateCompositeBase::AddPredicate().

: NodePredicateCompositeBase()
{
  this->AddPredicate(p1);
  this->AddPredicate(p2);
  this->AddPredicate(p3);
}

Member Function Documentation

bool mitk::NodePredicateAnd::CheckNode ( const DataNode node ) const [virtual]

Checks, if the node fulfills all of the subpredicates conditions.

Implements mitk::NodePredicateBase.

Definition at line 49 of file mitkNodePredicateAnd.cpp.

{
  if (m_ChildPredicates.empty())
    throw std::invalid_argument("NodePredicateAnd: no child predicates available");

  if (node == NULL)
    throw std::invalid_argument("NodePredicateAnd: invalid node");

  // return the conjunction of the child predicate. If any predicate returns false, we return false too
  for (ChildPredicates::const_iterator it = m_ChildPredicates.begin();  ( it != m_ChildPredicates.end() ); ++it)
    if ((*it)->CheckNode(node) == false)
      return false;   // if one element of the conjunction is false, the whole conjunction gets false
  return true;  // none of the childs was false, so return true
}
virtual const char* mitk::NodePredicateAnd::GetClassName (  ) const [virtual]

Reimplemented from mitk::NodePredicateCompositeBase.

mitk::NodePredicateAnd::itkFactorylessNewMacro ( NodePredicateAnd   )
static Pointer mitk::NodePredicateAnd::New ( const NodePredicateBase _arga,
const NodePredicateBase _argb 
) [inline, static]
static Pointer mitk::NodePredicateAnd::New ( const NodePredicateBase _arga,
const NodePredicateBase _argb,
const NodePredicateBase _argc 
) [inline, static]

Definition at line 40 of file mitkNodePredicateAnd.h.

:
      //##Documentation

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines