Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Class Members

SmacqGraph Class Reference

#include <SmacqGraph.h>

Inheritance diagram for SmacqGraph:

Inheritance graph
[legend]
Collaboration diagram for SmacqGraph:

Collaboration graph
[legend]
List of all members.

Detailed Description

This is a node in a graph. Each node references its parents and children.


Parent/Child Relationships

void join (SmacqGraph *)
 Attach the specified graph onto the tail(s) of the graph(s).

void join (SmacqGraphContainer *, bool dofree=false)
 Attach the specified graph onto the tail(s) of the graph(s).

void replace (SmacqGraphContainer *)
 Modify parent(s) and children to replace myself with the specified graph.

void dynamic_insert (SmacqGraph *, DTS *)
 Insert a new graph between my parents and me.

void add_child (SmacqGraph_ptr child, unsigned int channel=0)
 Add a new graph as one of my children.

void add_children (SmacqGraphContainer *child, unsigned int channel=0)
 Establish a parent/child relationship on the specified channel.

void remove_parent (SmacqGraph *parent)
 Remove the specified graph from the list of this graph's parents.

void remove_child_bynum (int, int)
void remove_child (SmacqGraph_ptr)
void replace_child (int, int, SmacqGraph *newchild)
void replace_child (int, int, SmacqGraphContainer *newchild)
void replace_child (SmacqGraph *oldchild, SmacqGraph *newchild)
void replace_child (SmacqGraph *oldchild, SmacqGraphContainer *newchild)
void remove_children ()
bool live_children ()
bool live_parents ()
const std::vector< ThreadSafeMultiSet<
SmacqGraph_ptr > > 
getChildren ()
void move_children (SmacqGraph *from, SmacqGraph *to, bool addvector=false)

Factories

SmacqGraphnew_child (int argc, char **argv)
 Construct a new graph using the given arguments.

SmacqGraphclone (SmacqGraph *newParent)
 Recursively clone a graph.

SmacqGraphContainernewQuery (DTS *, SmacqScheduler *, int argc, char **argv)
 Parse a query and construct a new graph to execute it.


Public Member Functions

bool set (int argc, char **argv)
 (Re-)Initialize module

const int getArgc () const
 Return argc.

char **const  getArgv () const
 Return argv (do not modify).

 SmacqGraph (int argc, char **argv)
SmacqGraphinit (DTS *, SmacqScheduler *)
 This method must be called before a graph is used.

void print (FILE *fh, int indent)
 Print the graph.

std::string print_query ()
 Print the graph in re-parsable syntax.

void log (const char *format,...)
 Log something about this graph (printf-style arguments).

bool distribute_children (DTS *)
 Attempt to distribute children of this graph. Return true iff successful.

Invariant Optimization
SmacqGraphgetInvariants (DTS *, SmacqScheduler *, DtsField &)
 Return a subgraph containing only invariants over the specified field.

SmacqGraphgetChildInvariants (DTS *, SmacqScheduler *, DtsField &)
 Same as getInvariants() but operates only on the graph's children.

Scheduling
void seed_produce ()
 Schedule the node to produce.

void runable (DtsObject)
 Schedule the given object to be consumed.

void produce_done ()
 Scheduler is done handling a mustProduce.


Static Public Member Functions

void do_shutdown (SmacqGraph_ptr f)
 Shutdown a graph node (will propagate to parents and children).


Public Attributes

runq< DtsObjectinputq
 Queue of input items to consume.


Protected Attributes

char ** argv
int argc
SmacqModule::algebra algebra
ThreadSafeBoolean shutdown
ThreadSafeBoolean mustProduce
SmacqModuleinstance

Friends

void intrusive_ptr_add_ref (SmacqGraph *o)
void intrusive_ptr_release (SmacqGraph *o)
 Decrement the reference count.


Member Function Documentation

SmacqGraph * SmacqGraph::clone SmacqGraph newParent  ) 
 

Recursively clone a graph.

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

void SmacqGraph::do_shutdown SmacqGraph_ptr  f  )  [static]
 

Shutdown a graph node (will propagate to parents and children).

The node may be destroyed by this call.

SmacqGraph * SmacqGraph::getInvariants DTS ,
SmacqScheduler ,
DtsField
 

Return a subgraph containing only invariants over the specified field.

The subgraph will contain only stateless 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.

SmacqGraph * SmacqGraph::init DTS ,
SmacqScheduler
 

This method must be called before a graph is used.

The graph may be modified as a side-effect, so the caller should replace the called object with the return pointer.

void SmacqGraph::move_children SmacqGraph from,
SmacqGraph to,
bool  addvector = false
[inline, static]
 

SmacqGraph * SmacqGraph::new_child int  argc,
char **  argv
 

Construct a new graph using the given arguments.

The new graph is automatically attached as a child of the current graph.


Friends And Related Function Documentation

void intrusive_ptr_release SmacqGraph o  )  [friend]
 

Decrement the reference count.

If the refcount is 0, then clean-up references and destroy


The documentation for this class was generated from the following files:
Generated on Mon Aug 28 23:37:12 2006 for SMACQ by doxygen 1.3.5