VGServer::FilterRoot Class Reference

FilterRoot holds the root node of either an edge filter or a vertex filter. More...

#include <AttributeParser.h>

List of all members.

Public Member Functions

bool eval_edge (const class GraphContainer &gc, const class Changelist &cl, unsigned int vidsrc, unsigned int vidtgt) const
 evaluate the filter for an edge
bool eval_vertex (const class GraphContainer &gc, const class Changelist &cl, unsigned int vid) const
 evaluate the filter for a vertex
 FilterRoot ()
vertex_or_edge_t getType () const
 returns the type of filter: vertex or edge filter
bool isEmpty () const
 returns true if the filter is the null-filter.
bool parseString (const std::string &input, const class GraphProperties &gp)
 uses the spirit parser to build a parse tree and fills this structure with the resulting filter tree.
std::string toString () const
 more a debug function which returns the parsed selection specification as a string.
 ~FilterRoot ()
 called to free all the filter trees


Detailed Description

FilterRoot holds the root node of either an edge filter or a vertex filter.

It is used to hold the result of a parsed filter expression.

Definition at line 193 of file AttributeParser.h.


Constructor & Destructor Documentation

VGServer::FilterRoot::FilterRoot (  )  [inline]

Definition at line 203 of file AttributeParser.h.

VGServer::FilterRoot::~FilterRoot (  )  [inline]

called to free all the filter trees

Definition at line 209 of file AttributeParser.h.


Member Function Documentation

bool VGServer::FilterRoot::eval_edge ( const class GraphContainer gc,
const class Changelist cl,
unsigned int  vidsrc,
unsigned int  vidtgt 
) const [inline]

evaluate the filter for an edge

Definition at line 244 of file AttributeParser.h.

References VGServer::ATTRTYPE_INVALID, VGServer::AnyType::getInteger(), VGServer::ParseNode::getValue(), and VGServer::VE_EDGE.

bool VGServer::FilterRoot::eval_vertex ( const class GraphContainer gc,
const class Changelist cl,
unsigned int  vid 
) const [inline]

evaluate the filter for a vertex

Definition at line 233 of file AttributeParser.h.

References VGServer::ATTRTYPE_INVALID, VGServer::AnyType::getInteger(), VGServer::ParseNode::getValue(), and VGServer::VE_VERTEX.

vertex_or_edge_t VGServer::FilterRoot::getType (  )  const [inline]

returns the type of filter: vertex or edge filter

Definition at line 229 of file AttributeParser.h.

bool VGServer::FilterRoot::isEmpty (  )  const [inline]

returns true if the filter is the null-filter.

Definition at line 225 of file AttributeParser.h.

bool VGServer::FilterRoot::parseString ( const std::string &  input,
const class GraphProperties gp 
)

uses the spirit parser to build a parse tree and fills this structure with the resulting filter tree.

Returns true if parsing was successful, throws Exceptions for various syntactic and semantic errors.

Definition at line 1494 of file AttributeParser.cc.

References VGServer::ATTRTYPE_BOOL, VGServer::ATTRTYPE_INVALID, VGServer::AttributeParser::filter_expr_id, g_snprintf, VGServer::ParseNode::getConstVal(), VGServer::VE_EDGE, and VGServer::VE_VERTEX.

Referenced by VGServer::GraphContainer::getArea(), and VGServer::GraphContainer::getNearestNeighbor().

std::string VGServer::FilterRoot::toString (  )  const

more a debug function which returns the parsed selection specification as a string.

Definition at line 1580 of file AttributeParser.cc.

References VGServer::ParseNode::toString(), and VGServer::VE_VERTEX.


The documentation for this class was generated from the following files:
Generated on Wed Sep 27 14:34:01 2006 for VGServer by  doxygen 1.4.7