BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BALL::ConnectedToPredicate Class Reference

#include <BALL/KERNEL/standardPredicates.h>

Inheritance diagram for BALL::ConnectedToPredicate:
BALL::ExpressionPredicate BALL::UnaryPredicate< Atom >

Classes

class  CTPNode
 

Public Member Functions

 ConnectedToPredicate ()
 
 ConnectedToPredicate (const ConnectedToPredicate &predicate)
 
virtual ~ConnectedToPredicate ()
 
virtual void clear ()
 
virtual bool operator() (const Atom &atom) const
 
void dump () const
 
void dump (const CTPNode *current) const
 
virtual void setArgument (const String &argument)
 
- Public Member Functions inherited from BALL::ExpressionPredicate
 ExpressionPredicate ()
 
 ExpressionPredicate (const ExpressionPredicate &predicate)
 
 ExpressionPredicate (const String &argument)
 
virtual ~ExpressionPredicate ()
 
ExpressionPredicateoperator= (const ExpressionPredicate &predicate)
 
bool operator== (const ExpressionPredicate &predicate) const
 
const StringgetArgument () const
 
- Public Member Functions inherited from BALL::UnaryPredicate< Atom >
virtual ~UnaryPredicate ()
 

Private Member Functions

CTPNodecreateNewNode_ (CTPNode *node)
 
CTPNodeparse_ ()
 
void cleanUpNodes_ (std::vector< CTPNode * > &all_nodes)
 
CTPNodeparse_ (const String &input)
 
bool bondOrderMatch_ (const Bond &bond, const CTPNode &node) const
 
bool find_ (const Atom &atom, const CTPNode *current, HashSet< const Bond * > &visited) const
 

Private Attributes

CTPNodetree_
 
HashMap< char, std::pair
< CTPNode *, CTPNode * > > 
link_map_
 
char link_mark_
 

Additional Inherited Members

- Protected Attributes inherited from BALL::ExpressionPredicate
String argument_
 

Detailed Description

Predicate class for atoms being connected to a constellation defined by an expression. Syntax: {tabular}{cl} Bonds

- & single

= & double

# & triple

{126} & aromatic

. & any

Elements &

symbol & the desired element

* & any element

Groups &

( ) & symbols enlosed by brackets denote groups

{tabular}

Definition at line 480 of file standardPredicates.h.

Constructor & Destructor Documentation

BALL::ConnectedToPredicate::ConnectedToPredicate ( )
BALL::ConnectedToPredicate::ConnectedToPredicate ( const ConnectedToPredicate predicate)
virtual BALL::ConnectedToPredicate::~ConnectedToPredicate ( )
virtual

Member Function Documentation

bool BALL::ConnectedToPredicate::bondOrderMatch_ ( const Bond bond,
const CTPNode node 
) const
private
void BALL::ConnectedToPredicate::cleanUpNodes_ ( std::vector< CTPNode * > &  all_nodes)
private
virtual void BALL::ConnectedToPredicate::clear ( )
virtual

Clear method

Reimplemented from BALL::ExpressionPredicate.

CTPNode* BALL::ConnectedToPredicate::createNewNode_ ( CTPNode node)
private
void BALL::ConnectedToPredicate::dump ( ) const
void BALL::ConnectedToPredicate::dump ( const CTPNode current) const
bool BALL::ConnectedToPredicate::find_ ( const Atom atom,
const CTPNode current,
HashSet< const Bond * > &  visited 
) const
private
virtual bool BALL::ConnectedToPredicate::operator() ( const Atom atom) const
virtual

Evaluate the predicate for the atom atom.

Parameters
atomthe atom to test
Returns
true, if the predicate is true, false otherwise

Reimplemented from BALL::ExpressionPredicate.

CTPNode* BALL::ConnectedToPredicate::parse_ ( )
private
CTPNode* BALL::ConnectedToPredicate::parse_ ( const String input)
private
virtual void BALL::ConnectedToPredicate::setArgument ( const String argument)
virtual

set the Argument of this ExpressionPredicate

Parameters
argumentthe string to use for this predicate

Reimplemented from BALL::ExpressionPredicate.

Member Data Documentation

HashMap<char, std::pair<CTPNode*, CTPNode*> > BALL::ConnectedToPredicate::link_map_
private

Definition at line 699 of file standardPredicates.h.

char BALL::ConnectedToPredicate::link_mark_
private

Definition at line 703 of file standardPredicates.h.

CTPNode* BALL::ConnectedToPredicate::tree_
private

Definition at line 695 of file standardPredicates.h.