#include <AttributeParser.h>
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 |
It is used to hold the result of a parsed filter expression.
Definition at line 193 of file AttributeParser.h.
VGServer::FilterRoot::FilterRoot | ( | ) | [inline] |
Definition at line 203 of file AttributeParser.h.
VGServer::FilterRoot::~FilterRoot | ( | ) | [inline] |
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] |
bool VGServer::FilterRoot::isEmpty | ( | ) | const [inline] |
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.