home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IADD_
- #define _IADD_
- /*******************************************************************************
- * FILE NAME: iadd.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * IAddress - IBM sample address part. *
- * *
- * COPYRIGHT: *
- * IBM(R) VisualAge(TM) for C++ *
- * (C) Copyright International Business Machines Corporation 1991, 1996 *
- * Licensed Material - Program-Property of IBM - All Rights Reserved. *
- * US Government Users Restricted Rights - Use, duplication, or disclosure *
- * restricted by GSA ADP Schedule Contract with IBM Corp. *
- * *
- * This program will not run in DOS mode. *
- * *
- * DISCLAIMER OF WARRANTIES: *
- * The following [enclosed] code is sample code created by IBM *
- * Corporation. This sample code is not part of any standard IBM product *
- * and is provided to you solely for the purpose of assisting you in the *
- * development of your applications. The code is provided "AS IS", *
- * without warranty of any kind. IBM shall not be liable for any damages *
- * arising out of your use of the sample code, even if they have been *
- * advised of the possibility of such damages. *
- *******************************************************************************/
- #ifndef _IVBDEFS__
- #include <ivbdefs.h>
- #endif
-
-
- #ifndef _ISTDNTFY_
- #include <istdntfy.hpp>
- #endif
-
- #ifndef _ISTRING_
- #include <istring.hpp>
- #endif
-
-
- /*-------------------------- Pragma Library Support --------------------------*/
- #ifndef __NO_DEFAULT_LIBS__
- #ifdef __OS2__
- #ifdef __IMPORTLIB__
- #pragma library("CPPOV03I.LIB")
- #else
- #pragma library("CPPOV03.LIB")
- #endif
- #endif
- #ifdef __WINDOWS__
- #ifdef __IMPORTLIB__
- #pragma library("CPPWV03I.LIB")
- #else
- #pragma library("CPPWV03.LIB")
- #endif
- #endif
- #endif
-
- /*----------------------------------------------------------------------------*/
- /* Align classes on four byte boundary. */
- /*----------------------------------------------------------------------------*/
- #pragma pack(4)
-
- class IAddress : public IStandardNotifier
- {
- typedef IStandardNotifier
- Inherited;
- public:
- /*--------------------------- PUBLIC -----------------------------------------*/
-
- /*------------------------- Constructors/Destructor ----------------------------
- ------------------------------------------------------------------------------*/
- IAddress ();
- IAddress (const IAddress& partCopy);
- virtual
- ~IAddress ();
-
- /*-------------------------------- Operators -----------------------------------
- | operator == - Operator == (return true if equal). |
- | operator != - Operator != (return true if not equal). |
- ------------------------------------------------------------------------------*/
- IAddress& operator= (const IAddress& aIAddress);
- Boolean
- operator == (const IAddress& aValue) const,
- operator != (const IAddress& aValue) const,
- operator == (const IAddress* aValue) const,
- operator != (const IAddress* aValue) const;
-
-
- /*-------------------------------- Attributes ----------------------------------
- | List of query and set members functions for this class: |
- | |
- | street - Query the street (IString) attribute. |
- | city - Query the city (IString) attribute. |
- | state - Query the state (IString) attribute. |
- | zip - Query the zip (IString) attribute. |
- | setStreet - Set the street (IString) attribute. |
- | setCity - Set the city (IString) attribute. |
- | setState - Set the state (IString) attribute. |
- | setZip - Set the zip (IString) attribute. |
- ------------------------------------------------------------------------------*/
-
- virtual IString
- street () const;
- virtual IAddress
- &setStreet (const IString& aStreet);
-
- virtual IString
- city () const;
- virtual IAddress
- &setCity (const IString& aCity);
-
- virtual IString
- state () const;
- virtual IAddress
- &setState (const IString& aState);
-
- virtual IString
- zip () const;
- virtual IAddress
- &setZip (const IString& aZip);
-
- /*-------------------------------- Actions -------------------------------------
- | List of operations or services provided by this class: |
- | |
- | setStreetToDefault - Perform the setStreetToDefault action. |
- | setCityToDefault - Perform the setCityToDefault action. |
- | setStateToDefault - Perform the setStateToDefault action. |
- | setZipToDefault - Perform the setZipToDefault action. |
- | setToDefault - Perform the setToDefault action. |
- ------------------------------------------------------------------------------*/
- virtual IAddress
- &setStreetToDefault (),
- &setCityToDefault (),
- &setStateToDefault (),
- &setZipToDefault (),
- &setToDefault ();
-
- /*----------------------- Notification Event Descriptions ----------------------
- | List of attribute and event notification identifiers: |
- | |
- | streetId - Notification ID provided to observers when the |
- | street attribute changes. |
- | cityId - Notification ID provided to observers when the |
- | city attribute changes. |
- | stateId - Notification ID provided to observers when the |
- | state attribute changes. |
- | zipId - Notification ID provided to observers when the |
- | zip attribute changes. |
- ------------------------------------------------------------------------------*/
- static INotificationId const
- IVB_IMPORT streetId,
- IVB_IMPORT cityId,
- IVB_IMPORT stateId,
- IVB_IMPORT zipId;
-
-
- private:
- /*--------------------------- PRIVATE ----------------------------------------*/
- IString iStreet; //Data member for street attribute
- IString iCity; //Data member for city attribute
- IString iState; //Data member for state attribute
- IString iZip; //Data member for zip attribute
- };
-
- /*----------------------------------------------------------------------------*/
- /* Resume compiler default packing. */
- /*----------------------------------------------------------------------------*/
- #pragma pack()
-
- #endif
-