#ifndef CONNECTION_CLASS #define CONNECTION_CLASS // connection: the zeno semantics allowing an operation to be connected to a // continuation operation. #include "strings.h" #include "conclusion.h" #include "zeno_tree.h" class connection : public chunk { public: connection(); ~connection(); // yielder: the name of the operation whose continuation is being connected // by this connection. string &yielder() const; void yielder(string &name); // consequence_name: the name of the consequence to which this connection is // connected (yielder yields consequence_name) string &consequence_name() const; void consequence_name(string &name); // block: the name of the ada block forming the continuation for the // connection. string &block() const; void block(string &name); // connected_conclusion: if this is non-NIL, it means that this particular // connection is directly connected to one of the operation's consequences. // when the operation yields the consequence involved in the connection, // then the containing operation's consequence will fire. conclusion *connected_conclusion() const; void connected_conclusion(conclusion *to_connect); // link: an association with a particular place in the parse tree. zeno_tree *link() const; void link(zeno_tree *link); // well_formed: returns TRUE when the following guarantees are met: // 1. the link is set. // 2. there is not necessarily a connected conclusion. // 3. the block name for the continuation is not necessarily set. // 4. the consequence name is set. // 5. the yielder name is set. int well_formed() const; // print: prints out the info for the connection. void print() const; private: string the_yielder; string conseq_name; string block_name; conclusion *conclusion_that_connection_causes; zeno_tree *connection_link; }; #endif