home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IVBASE_
- #define _IVBASE_
- /*******************************************************************************
- * FILE NAME: ivbase.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * IVBase - Empty "virtual base" class to provide generic functions to *
- * all library classes with virtual functions (e.g., virual dtor). *
- * *
- * COPYRIGHT: *
- * Licensed Materials - Property of IBM *
- * (C) Copyright IBM Corporation 1992, 1993 *
- * All Rights Reserved *
- * US Government Users Restricted Rights - Use, duplication, or disclosure *
- * restricted by GSA ADP Schedule Contract with IBM Corp. *
- * *
- *$Log: R:/IBMCLASS/IBASE/VCS/IVBASE.HPV $ *
- //
- // Rev 1.2 25 Oct 1992 16:46:48 nunn
- //changed library name to ICLUI
-
- Rev 1.1 13 Oct 1992 09:58:18 law
- Removed virtual inheritance from IBase.
-
- Rev 1.0 12 Oct 1992 12:54:38 law
- Initial revision.
- *******************************************************************************/
- #ifndef _IBASE_
- #include <ibase.hpp>
- #endif
-
- class IVBase : public IBase {
- /*******************************************************************************
- * This class provides basic generic behavior for all the library classes that *
- * have virtual functions. In addition, it gives derived classes the ability *
- * to exploit the nested type/value names in IBase (i.e, Boolean, true, false). *
- * *
- * Derived classes are expected to override the virtual functions asString and *
- * asDebugInfo. Note that this will enable automatic support for outputting *
- * derived class objects on ostreams (cout and/or cerr, etc.). *
- *******************************************************************************/
- public:
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | This class provides a virtual destructor to ensure that all derived |
- | classes' destructors are also virtual. |
- ------------------------------------------------------------------------------*/
- virtual
- ~IVBase ( );
-
- /*------------------------------- DIAGNOSTICS ----------------------------------
- | A left-shift (<<) operator is defined permitting any library object to be |
- | dumped to an ostream (e.g., cout << anObject;). This hides the equivalent |
- | function that accepts an IBase. IVBase has the luxury of being able to |
- | fully implement this function by invoking the virtual function asString() |
- | to obtain the data to output to the ostream. |
- | |
- | The related functions asString and asDebugInfo should be reimplemented in |
- | derived classes to return informatin specific to the subclass. |
- ------------------------------------------------------------------------------*/
- friend ostream
- &operator << ( ostream &aStream,
- const IVBase &anObject );
-
- virtual IString
- asString ( ) const,
- asDebugInfo ( ) const;
-
- }; // IVBase
-
- #endif /* _IVBASE_ */