// EdoHandle.cxx #include "EdoHandle.h" #include "hesbase/FileType.h" #include "hesbase/EdoType.h" #include using std::ostream; using hes::EdoHandle; //********************************************************************** // Member functions. //********************************************************************** // Destructor. EdoHandle::~EdoHandle() { } //********************************************************************** // Validity check. bool EdoHandle::is_valid() const { return edo_type().is_valid() && ( file_type().is_valid() || address() != 0 ); } //********************************************************************** // Free functions. //********************************************************************** // Output stream. ostream& operator<<(ostream& lhs, const EdoHandle& rhs) { if ( ! rhs.is_valid() ) { lhs << "invalid EDO handle"; return lhs; } lhs << "Handle for EDO of type " << rhs.edo_type(); if ( rhs.file_type().is_valid() ) { lhs << " from file type " << rhs.file_type(); } if ( rhs.address() != 0 ) { lhs << " at address " << rhs.address(); } return lhs; } //**********************************************************************