
/*
 * This file was generated by the SOM Compiler.
 * FileName: page.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emith.dll: 2.31.1.64
 */

/*
 *   This class is adapted from the book
 *     Class Construction in C and C++, Object Oriented Fundamentals
 *     by Roger Sessions, Copyright (c) 1992 Prentice Hall.
 *   Reprinted with permission.
 */


#ifndef SOM_page_h
#define SOM_page_h


/*
 * The SOM_STRICT_IDL macro means that we can ignore stars
 * in our declarations of objects.
 */
#define SOM_STRICT_IDL 1


/*
 * Passthru lines: File: "C.h", "before"
 */
#include "tpword.h"
#include "textline.h"
#include "colblk.h"

#include <som.h>

/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * Define the class name as an object type
 */
#ifndef page
#define page SOMObject
#endif

/*
 * Include Parent Bindings
 */
#ifndef SOM_SOMObject_h
#ifdef SOMLOCALINCLUDES
#include "somobj.h"
#else
#include <somobj.h>
#endif
#endif

/*
 * Start of bindings for IDL types
 */

#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef textLine
    #define textLine SOMObject
#endif /* textLine */
#ifndef TPWord
    #define TPWord SOMObject
#endif /* TPWord */
#ifndef columnBlock
    #define columnBlock SOMObject
#endif /* columnBlock */

/*
 * End of bindings for IDL types.
 */

#define page_MajorVersion 0
#define page_MinorVersion 0

/*
 * Declare the class creation procedure
 */
SOMEXTERN 
#if defined(SOM_Module_page_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMClass  SOMLINK pageNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct pageClassDataStructure {
	SOMClass classObject;
	somMToken pgPrint;
	somMToken pgSetHeight;
	somMToken pgSetWidth;
	somMToken pgSetNumberOfColumns;
	somMToken pgSetPageNumber;
	somMToken pgGetColumnBlock;
	somMToken pgGetHeaderBlock;
	somMToken pgGetFooterBlock;
} 
#if defined(SOM_Module_page_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMDLINK pageClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct pageCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} 
#if defined(SOM_Module_page_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMDLINK pageCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_page (pageClassData.classObject)
#ifndef SOMGD_page
    #if (defined(_page) || defined(__page))
        #undef _page
        #undef __page
        #define SOMGD_page 1
    #else
        #define _page _SOMCLASS_page
    #endif /* _page */
#endif /* SOMGD_page */
#define page_classObj _SOMCLASS_page
#define _SOMMTOKEN_page(method) ((somMToken)pageClassData.method)

/*
 * New and Renew macros for page
 */
#define pageNew() \
   ( _page ? \
	_somNew(_page) \
	: ( pageNewClass(\
		page_MajorVersion, \
		page_MinorVersion),\
	   _somNew(_page)))
#define pageRenew(buf) \
   ( _page ? \
	_somRenew(_page, buf) \
	: ( pageNewClass(\
		page_MajorVersion, \
		page_MinorVersion),\
	   _somRenew(_page, buf)))

/*
 * New Method: pgPrint
 */
typedef void   SOMLINK somTP_page_pgPrint(page somSelf, 
		FILE* output);
typedef somTP_page_pgPrint *somTD_page_pgPrint;
#define somMD_page_pgPrint "::page::pgPrint"
#define page_pgPrint(somSelf,output) \
    (SOM_Resolve(somSelf, page, pgPrint) \
	(somSelf,output))
#ifndef SOMGD_pgPrint
    #if (defined(_pgPrint) || defined(__pgPrint))
        #undef _pgPrint
        #undef __pgPrint
        #define SOMGD_pgPrint 1
    #else
        #define _pgPrint page_pgPrint
    #endif /* _pgPrint */
#endif /* SOMGD_pgPrint */

/*
 * New Method: pgSetHeight
 */
typedef void   SOMLINK somTP_page_pgSetHeight(page somSelf, 
		long newHeight);
typedef somTP_page_pgSetHeight *somTD_page_pgSetHeight;
/*
 *  Set the height of a page in characters.
 */
#define somMD_page_pgSetHeight "::page::pgSetHeight"
#define page_pgSetHeight(somSelf,newHeight) \
    (SOM_Resolve(somSelf, page, pgSetHeight) \
	(somSelf,newHeight))
#ifndef SOMGD_pgSetHeight
    #if (defined(_pgSetHeight) || defined(__pgSetHeight))
        #undef _pgSetHeight
        #undef __pgSetHeight
        #define SOMGD_pgSetHeight 1
    #else
        #define _pgSetHeight page_pgSetHeight
    #endif /* _pgSetHeight */
#endif /* SOMGD_pgSetHeight */

/*
 * New Method: pgSetWidth
 */
typedef void   SOMLINK somTP_page_pgSetWidth(page somSelf, 
		long newWidth);
typedef somTP_page_pgSetWidth *somTD_page_pgSetWidth;
/*
 *  Set the width of a page in characters.
 */
#define somMD_page_pgSetWidth "::page::pgSetWidth"
#define page_pgSetWidth(somSelf,newWidth) \
    (SOM_Resolve(somSelf, page, pgSetWidth) \
	(somSelf,newWidth))
#ifndef SOMGD_pgSetWidth
    #if (defined(_pgSetWidth) || defined(__pgSetWidth))
        #undef _pgSetWidth
        #undef __pgSetWidth
        #define SOMGD_pgSetWidth 1
    #else
        #define _pgSetWidth page_pgSetWidth
    #endif /* _pgSetWidth */
#endif /* SOMGD_pgSetWidth */

/*
 * New Method: pgSetNumberOfColumns
 */
typedef void   SOMLINK somTP_page_pgSetNumberOfColumns(page somSelf, 
		long ncolumns);
typedef somTP_page_pgSetNumberOfColumns *somTD_page_pgSetNumberOfColumns;
/*
 *  Set the number of columns in a page.
 */
#define somMD_page_pgSetNumberOfColumns "::page::pgSetNumberOfColumns"
#define page_pgSetNumberOfColumns(somSelf,ncolumns) \
    (SOM_Resolve(somSelf, page, pgSetNumberOfColumns) \
	(somSelf,ncolumns))
#ifndef SOMGD_pgSetNumberOfColumns
    #if (defined(_pgSetNumberOfColumns) || defined(__pgSetNumberOfColumns))
        #undef _pgSetNumberOfColumns
        #undef __pgSetNumberOfColumns
        #define SOMGD_pgSetNumberOfColumns 1
    #else
        #define _pgSetNumberOfColumns page_pgSetNumberOfColumns
    #endif /* _pgSetNumberOfColumns */
#endif /* SOMGD_pgSetNumberOfColumns */

/*
 * New Method: pgSetPageNumber
 */
typedef void   SOMLINK somTP_page_pgSetPageNumber(page somSelf, 
		TPWord newPageWord);
typedef somTP_page_pgSetPageNumber *somTD_page_pgSetPageNumber;
/*
 *  Tell the page about a special word to be used to
 *  store page numbers.
 */
#define somMD_page_pgSetPageNumber "::page::pgSetPageNumber"
#define page_pgSetPageNumber(somSelf,newPageWord) \
    (SOM_Resolve(somSelf, page, pgSetPageNumber) \
	(somSelf,newPageWord))
#ifndef SOMGD_pgSetPageNumber
    #if (defined(_pgSetPageNumber) || defined(__pgSetPageNumber))
        #undef _pgSetPageNumber
        #undef __pgSetPageNumber
        #define SOMGD_pgSetPageNumber 1
    #else
        #define _pgSetPageNumber page_pgSetPageNumber
    #endif /* _pgSetPageNumber */
#endif /* SOMGD_pgSetPageNumber */

/*
 * New Method: pgGetColumnBlock
 */
typedef columnBlock   SOMLINK somTP_page_pgGetColumnBlock(page somSelf);
typedef somTP_page_pgGetColumnBlock *somTD_page_pgGetColumnBlock;
/*
 *  Get the columnBlock being used by this page.
 */
#define somMD_page_pgGetColumnBlock "::page::pgGetColumnBlock"
#define page_pgGetColumnBlock(somSelf) \
    (SOM_Resolve(somSelf, page, pgGetColumnBlock) \
	(somSelf))
#ifndef SOMGD_pgGetColumnBlock
    #if (defined(_pgGetColumnBlock) || defined(__pgGetColumnBlock))
        #undef _pgGetColumnBlock
        #undef __pgGetColumnBlock
        #define SOMGD_pgGetColumnBlock 1
    #else
        #define _pgGetColumnBlock page_pgGetColumnBlock
    #endif /* _pgGetColumnBlock */
#endif /* SOMGD_pgGetColumnBlock */

/*
 * New Method: pgGetHeaderBlock
 */
typedef textLine   SOMLINK somTP_page_pgGetHeaderBlock(page somSelf);
typedef somTP_page_pgGetHeaderBlock *somTD_page_pgGetHeaderBlock;
/*
 *  Get the textLine representing the page header.
 */
#define somMD_page_pgGetHeaderBlock "::page::pgGetHeaderBlock"
#define page_pgGetHeaderBlock(somSelf) \
    (SOM_Resolve(somSelf, page, pgGetHeaderBlock) \
	(somSelf))
#ifndef SOMGD_pgGetHeaderBlock
    #if (defined(_pgGetHeaderBlock) || defined(__pgGetHeaderBlock))
        #undef _pgGetHeaderBlock
        #undef __pgGetHeaderBlock
        #define SOMGD_pgGetHeaderBlock 1
    #else
        #define _pgGetHeaderBlock page_pgGetHeaderBlock
    #endif /* _pgGetHeaderBlock */
#endif /* SOMGD_pgGetHeaderBlock */

/*
 * New Method: pgGetFooterBlock
 */
typedef textLine   SOMLINK somTP_page_pgGetFooterBlock(page somSelf);
typedef somTP_page_pgGetFooterBlock *somTD_page_pgGetFooterBlock;
/*
 *  Get the textLine representing the page footer.
 */
#define somMD_page_pgGetFooterBlock "::page::pgGetFooterBlock"
#define page_pgGetFooterBlock(somSelf) \
    (SOM_Resolve(somSelf, page, pgGetFooterBlock) \
	(somSelf))
#ifndef SOMGD_pgGetFooterBlock
    #if (defined(_pgGetFooterBlock) || defined(__pgGetFooterBlock))
        #undef _pgGetFooterBlock
        #undef __pgGetFooterBlock
        #define SOMGD_pgGetFooterBlock 1
    #else
        #define _pgGetFooterBlock page_pgGetFooterBlock
    #endif /* _pgGetFooterBlock */
#endif /* SOMGD_pgGetFooterBlock */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define page_somInit SOMObject_somInit
#define page_somUninit SOMObject_somUninit
#define page_somDumpSelfInt SOMObject_somDumpSelfInt

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define page_somDefaultInit SOMObject_somDefaultInit
#define page_somDestruct SOMObject_somDestruct
#define page_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define page_somDefaultAssign SOMObject_somDefaultAssign
#define page_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define page_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define page_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define page_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define page_somDefaultVAssign SOMObject_somDefaultVAssign
#define page_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define page_somFree SOMObject_somFree
#define page_somGetClass SOMObject_somGetClass
#define page_somGetClassName SOMObject_somGetClassName
#define page_somGetSize SOMObject_somGetSize
#define page_somIsA SOMObject_somIsA
#define page_somIsInstanceOf SOMObject_somIsInstanceOf
#define page_somRespondsTo SOMObject_somRespondsTo
#define page_somDispatch SOMObject_somDispatch
#define page_somClassDispatch SOMObject_somClassDispatch
#define page_somCastObj SOMObject_somCastObj
#define page_somResetObj SOMObject_somResetObj
#define page_somPrintSelf SOMObject_somPrintSelf
#define page_somDumpSelf SOMObject_somDumpSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_page_h */
