// Class Name: result // // Purpose: // // The data flow object produced by an operation. It is either a basic // element or a composite element. #ifndef RESULT_CLASS #define RESULT_CLASS #include "characteristic_predicate.h" class result : public characteristic_predicate { public: result(); ~result(); // type_name: the type of data contained in this result. this can be either // "nil" (meaning a non-data result), // "forward" (meaning it will be defined later), ?? // or a type name listed in the ZENO table of elements. string type_name() const; void type_name(const string &name); // well_formed: returns TRUE if this result is currently well formed. // these parts of a well formed result are checked: // 1. a type name is specified. // 2. a result expression is specified. boolean well_formed() const; // pack: returns a packed form of the result, including the tree stating // the result's characteristic predicate. // virtual byte *pack(int &size) const; // this constructor recreates the result from a packed form. // friend result *result_unpack(byte *packed_form); // print: prints out the information associated with the result. virtual void print() const; private: string my_type_name; }; #endif