// EdoHandle.h #ifndef hes_EdoHandle_H #define hes_EdoHandle_H // David Adams // February 2002 // // Handle for an EDO. A handle used for writing an EDO includes // the type and address of the transient representation of the EDO. // A handle used for reading an EDO includes the data required to // construct this transient representation. // // It is expected that there will be a subclass for each file type // and possibly EDO type. #include namespace hes { class EdoType; class FileType; class EdoHandle { public: // functions // Make destructor virtual. virtual ~EdoHandle(); // Return if this object is valid. // The object is valid if it holds the address of the persistent // representation or the data required to construct such an // object. virtual bool is_valid() const; // Return the ID for the type of the referenced object. // Should be valid if this object is valid. virtual EdoType edo_type() const =0; // Return the type of file to which this handle points. // Return is invalid if the file assignment is not known. virtual FileType file_type() const =0; // Return the address of the transient representation of // the EDO. // Returns 0 if the object has not been constructed. virtual const void* address() const =0; }; } // end namespace // Output stream. std::ostream& operator<<(std::ostream& lhs, const hes::EdoHandle& rhs); #endif