SmacqGraph Class Reference

#include <SmacqGraph.h>

List of all members.


Detailed Description

This is a container for an SmacqGraphNode which may have multiple heads or tails.


Public Member Functions

 SmacqGraph ()
 Default CTOR.
 SmacqGraph (ThreadSafeMultiSet< SmacqGraphNode_ptr > &children)
 Construct from a vector of Children.
void addQuery (DTS *, SmacqScheduler *, std::string query)
 Parse a query and add it to a container.
void init (DTS *, SmacqScheduler *, bool do_optimize=true)
 This method must be called before the graphs are used.
void shutdown ()
 Shutdown all graphs.
void clear ()
 Erase container.
bool empty ()
 Return true iff the container is empty.
void print (FILE *fh, int indent)
 Print the graphs.
std::string print_query ()
 Print the graph in re-parsable syntax.
SmacqGraphclone (SmacqGraphNode *newParent=NULL)
 Recursively clone a graph.
void add_clone (SmacqGraphNode_ptr x, SmacqGraphNode *newParent)
 Add a clone of a graph to this container.
SmacqGraphNodegetInvariants (DTS *, SmacqScheduler *, DtsField &)
 Return a subgraph containing only invariants over the specified field.
void optimize ()
 Preoptimize graph (unnecessary after init).
Combining Graphs
A container can have multiple heads and tails and may even be disconnected.

void join (SmacqGraphNode *)
 Attach the specified graph onto the tail(s) of the graph(s).
void join (SmacqGraph *, bool dofree=false)
 Attach the specified graph onto the tail(s) of the graph(s).
void add_graph (SmacqGraphNode *)
 Add a new graph head.
void add_graph (SmacqGraph *, bool dofree=false)
 Add new graph heads.
void share_children_of (SmacqGraphNode *)
 Children of the specified graph will also become children of this.


Member Function Documentation

SmacqGraph * SmacqGraph::clone ( SmacqGraphNode newParent = NULL  ) 

Recursively clone a graph.

The clone is made a child of newParent, unless newParent is NULL.

SmacqGraphNode * SmacqGraph::getInvariants ( DTS ,
SmacqScheduler ,
DtsField  
)

Return a subgraph containing only invariants over the specified field.

The subgraph will contain only boolean filters that are applied to all objects in the graph (e.g. not within an OR) and that do NOT use the specified field. The returned graph is newly allocated.

std::string SmacqGraph::print_query (  ) 

Print the graph in re-parsable syntax.

So much for polymorphism


The documentation for this class was generated from the following files:
Generated on Wed Jan 23 10:01:07 2008 for SMACQ by  doxygen 1.4.7