// Class Name: consequence // // Purpose: // // A consequence is the response that an operation makes when the operands // applied to its containing operation are matched by the consequence's // outcome specification. The object passed along the consequence must // conform to the consequence's result specification, which is a step in // the verification process. #ifndef CONSEQUENCE_CLASS #define CONSEQUENCE_CLASS #include "outcome.h" #include "result.h" class consequence : public outcome, public result { public: consequence(); ~consequence(); // well_formed: returns TRUE if this consequence is well formed. well formed // here means: // 1. the outcome is well formed, // 2. the result is well formed, // 3. the consequence has a name. int well_formed() const; string name() const; void name(const string &new_name); // pack: creates a packed form of the consequence. // virtual byte *pack(int &size) const; // this constructor reconstitutes a consequence from the packed form. // friend consequence *consequence_unpack(byte *packed_form); virtual void print() const; private: string my_name; }; #endif