// ABCOrder.h: interface for the ABCOrder class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_ABCORDER_H__4645BD44_A1E3_11D3_9D28_0000F80788FD__INCLUDED_) #define AFX_ABCORDER_H__4645BD44_A1E3_11D3_9D28_0000F80788FD__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "rtrapi.h" #include "ABCCommon.h" /* ABCOrder is an abstract base class for ABCBook and ABCMagazine. All orders have a title, price and author. */ class ABCOrder : public RTRApplicationMessage { public: ABCOrder(); virtual ~ABCOrder(); protected: // All derived classes must know how to Write their state virtual void WriteObject() = 0; // All derived classes must know how to Read their state virtual void ReadObject() = 0; // All derived classes must have some business logic that will // process the order. virtual abc_status ProcessOrder() = 0; // Common attributes of all orders unsigned int m_uiPrice; char m_szTitle[ABCMAX_STRING_LEN]; char m_szAuthor[ABCMAX_STRING_LEN]; private: /* Overides Dispatch() and redefines it to call ProcessOrder() instead of the default handler. note: the classes derived from ABCOrder don't know about RTR. This base class is hiding the details of the oRTR framework. */ rtr_status_t RTRAPICall Dispatch(); }; #endif // !defined(AFX_ABCORDER_H__4645BD44_A1E3_11D3_9D28_0000F80788FD__INCLUDED_)