BALL::SmartsParser::SPNode Class Reference

Representation of a node in the smarts parser graph. More...

#include <BALL/STRUCTURE/smartsParser.h>

List of all members.

Public Member Functions

Constructors and destructors

 SPNode ()
 Default constructor.
 SPNode (SPAtom *atom)
 Detailed constructor with an atom.
 SPNode (SPNode *first, LogicalOperator log_op, SPNode *second)
 Detailed constructor with two nodes and a logical operator.
 SPNode (const SPNode &sp_node)
 Copy constructor.
virtual ~SPNode ()
 Destructor.
Accessors

bool isInternal () const
 returns true if the SPNode is an internal node
void setInternal (bool internal)
 sets the internal flag
bool isRecursive () const
 returns true if the SPNode is a recursive node (from recursive SMARTS)
void setRecursive (bool recursive)
 sets the recursive flag
void setComponentNumber (int no)
 set the component no of the component level grouping
Size getComponentNumber ()
 returns the component number
SPAtomgetSPAtom () const
 returns the associated SPAtom
void setSPAtom (SPAtom *sp_atom)
 set the associated SPAtom
SPEdgegetFirstEdge () const
 returns the first edge (for tree use)
void setFirstEdge (SPEdge *first)
 sets the first edge (for tree use)
SPEdgegetSecondEdge () const
 returns the second edge (for tree use)
void setSecondEdge (SPEdge *second)
 sets the second edge (for tree use)
bool getNot () const
 returns the negation flag
void setNot (bool is_not)
 sets the negation flag
void addSPEdge (SPEdge *sp_edge)
 flag whether the pattern is in brackets
void setLogicalOperator (LogicalOperator log_op)
 sets the logical operator associated with the SPNode
LogicalOperator getLogicalOperator () const
 returns the logical operator of the SPNode
Size countEdges () const
 counts the number of edges

Protected Attributes

bool internal_
 internal flag
bool is_not_
 negotiation flag
bool recursive_
 recursive flag
LogicalOperator log_op_
 in brackets flag
std::vector< SPEdge * > edges_
 edges list
SPEdgefirst_edge_
 first edge
SPEdgesecond_edge_
 second edge
SPAtomsp_atom_
 SPAtom associated with this SPNode.
int component_no_
 component level

Iterators



typedef std::vector< SPEdge * >
::iterator 
EdgeIterator
 non-constant edge iterator
typedef std::vector< SPEdge * >
::const_iterator 
EdgeConstIterator
 constant edge iterator
EdgeIterator begin ()
 mutable access to begin of edges list
EdgeIterator end ()
 mutable access to end of edges list
EdgeConstIterator begin () const
 non-mutable access to begin of edges list
EdgeConstIterator end () const
 non-mutable access to end of edges list

Detailed Description

Representation of a node in the smarts parser graph.


Member Typedef Documentation

typedef std::vector<SPEdge*>::const_iterator BALL::SmartsParser::SPNode::EdgeConstIterator

constant edge iterator

typedef std::vector<SPEdge*>::iterator BALL::SmartsParser::SPNode::EdgeIterator

non-constant edge iterator


Constructor & Destructor Documentation

BALL::SmartsParser::SPNode::SPNode (  ) 

Default constructor.

BALL::SmartsParser::SPNode::SPNode ( SPAtom atom  ) 

Detailed constructor with an atom.

BALL::SmartsParser::SPNode::SPNode ( SPNode first,
LogicalOperator  log_op,
SPNode second 
)

Detailed constructor with two nodes and a logical operator.

BALL::SmartsParser::SPNode::SPNode ( const SPNode sp_node  ) 

Copy constructor.

virtual BALL::SmartsParser::SPNode::~SPNode (  )  [virtual]

Destructor.


Member Function Documentation

void BALL::SmartsParser::SPNode::addSPEdge ( SPEdge sp_edge  )  [inline]

flag whether the pattern is in brackets

adds a new SPEdge (not for tree use)

EdgeConstIterator BALL::SmartsParser::SPNode::begin (  )  const [inline]

non-mutable access to begin of edges list

EdgeIterator BALL::SmartsParser::SPNode::begin (  )  [inline]

mutable access to begin of edges list

Size BALL::SmartsParser::SPNode::countEdges (  )  const [inline]

counts the number of edges

EdgeConstIterator BALL::SmartsParser::SPNode::end (  )  const [inline]

non-mutable access to end of edges list

EdgeIterator BALL::SmartsParser::SPNode::end (  )  [inline]

mutable access to end of edges list

Size BALL::SmartsParser::SPNode::getComponentNumber (  )  [inline]

returns the component number

SPEdge* BALL::SmartsParser::SPNode::getFirstEdge (  )  const [inline]

returns the first edge (for tree use)

LogicalOperator BALL::SmartsParser::SPNode::getLogicalOperator (  )  const [inline]

returns the logical operator of the SPNode

bool BALL::SmartsParser::SPNode::getNot (  )  const [inline]

returns the negation flag

SPEdge* BALL::SmartsParser::SPNode::getSecondEdge (  )  const [inline]

returns the second edge (for tree use)

SPAtom* BALL::SmartsParser::SPNode::getSPAtom (  )  const [inline]

returns the associated SPAtom

bool BALL::SmartsParser::SPNode::isInternal (  )  const [inline]

returns true if the SPNode is an internal node

bool BALL::SmartsParser::SPNode::isRecursive (  )  const [inline]

returns true if the SPNode is a recursive node (from recursive SMARTS)

void BALL::SmartsParser::SPNode::setComponentNumber ( int  no  )  [inline]

set the component no of the component level grouping

void BALL::SmartsParser::SPNode::setFirstEdge ( SPEdge first  )  [inline]

sets the first edge (for tree use)

void BALL::SmartsParser::SPNode::setInternal ( bool  internal  )  [inline]

sets the internal flag

void BALL::SmartsParser::SPNode::setLogicalOperator ( LogicalOperator  log_op  )  [inline]

sets the logical operator associated with the SPNode

void BALL::SmartsParser::SPNode::setNot ( bool  is_not  )  [inline]

sets the negation flag

void BALL::SmartsParser::SPNode::setRecursive ( bool  recursive  ) 

sets the recursive flag

void BALL::SmartsParser::SPNode::setSecondEdge ( SPEdge second  )  [inline]

sets the second edge (for tree use)

void BALL::SmartsParser::SPNode::setSPAtom ( SPAtom sp_atom  )  [inline]

set the associated SPAtom


Member Data Documentation

component level

std::vector<SPEdge*> BALL::SmartsParser::SPNode::edges_ [protected]

edges list

internal flag

negotiation flag

in brackets flag

logical operator associated with this SPNode

recursive flag

SPAtom associated with this SPNode.