
/*
 * This file was generated by the SOM Compiler.
 * FileName: fm.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_fileMgr_h
#define SOM_fileMgr_h


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


#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 fileMgr
#define fileMgr 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 */
#define fileMgr_BUFF_SIZE 20 /* 20 */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_BUFF_SIZE
    #ifdef BUFF_SIZE
        #undef BUFF_SIZE
        #define SOMTGD_BUFF_SIZE 1
    #else
        #define BUFF_SIZE fileMgr_BUFF_SIZE
    #endif /* BUFF_SIZE */
#endif /* SOMTGD_BUFF_SIZE */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

#define fileMgr_MajorVersion 0
#define fileMgr_MinorVersion 0

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

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct fileMgrClassDataStructure {
	SOMClass classObject;
	somMToken fmInit;
	somMToken fmGetChar;
	somMToken fmPeekChar;
	somMToken fmSize;
	somMToken fmIncr;
	somMToken fmAdd;
} 
#if defined(SOM_Module_fm_Source)
        SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMDLINK fileMgrClassData;

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

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_fileMgr (fileMgrClassData.classObject)
#ifndef SOMGD_fileMgr
    #if (defined(_fileMgr) || defined(__fileMgr))
        #undef _fileMgr
        #undef __fileMgr
        #define SOMGD_fileMgr 1
    #else
        #define _fileMgr _SOMCLASS_fileMgr
    #endif /* _fileMgr */
#endif /* SOMGD_fileMgr */
#define fileMgr_classObj _SOMCLASS_fileMgr
#define _SOMMTOKEN_fileMgr(method) ((somMToken)fileMgrClassData.method)

/*
 * New and Renew macros for fileMgr
 */
#define fileMgrNew() \
   ( _fileMgr ? \
	_somNew(_fileMgr) \
	: ( fileMgrNewClass(\
		fileMgr_MajorVersion, \
		fileMgr_MinorVersion),\
	   _somNew(_fileMgr)))
#define fileMgrRenew(buf) \
   ( _fileMgr ? \
	_somRenew(_fileMgr, buf) \
	: ( fileMgrNewClass(\
		fileMgr_MajorVersion, \
		fileMgr_MinorVersion),\
	   _somRenew(_fileMgr, buf)))

/*
 * New Method: fmInit
 */
typedef void   SOMLINK somTP_fileMgr_fmInit(fileMgr somSelf, 
		string newFile);
typedef somTP_fileMgr_fmInit *somTD_fileMgr_fmInit;
/*
 *  Initialize and open a new file.
 */
#define somMD_fileMgr_fmInit "::fileMgr::fmInit"
#define fileMgr_fmInit(somSelf,newFile) \
    (SOM_Resolve(somSelf, fileMgr, fmInit) \
	(somSelf,newFile))
#ifndef SOMGD_fmInit
    #if (defined(_fmInit) || defined(__fmInit))
        #undef _fmInit
        #undef __fmInit
        #define SOMGD_fmInit 1
    #else
        #define _fmInit fileMgr_fmInit
    #endif /* _fmInit */
#endif /* SOMGD_fmInit */

/*
 * New Method: fmGetChar
 */
typedef long   SOMLINK somTP_fileMgr_fmGetChar(fileMgr somSelf);
typedef somTP_fileMgr_fmGetChar *somTD_fileMgr_fmGetChar;
/*
 *  Get the next character in the file.
 */
#define somMD_fileMgr_fmGetChar "::fileMgr::fmGetChar"
#define fileMgr_fmGetChar(somSelf) \
    (SOM_Resolve(somSelf, fileMgr, fmGetChar) \
	(somSelf))
#ifndef SOMGD_fmGetChar
    #if (defined(_fmGetChar) || defined(__fmGetChar))
        #undef _fmGetChar
        #undef __fmGetChar
        #define SOMGD_fmGetChar 1
    #else
        #define _fmGetChar fileMgr_fmGetChar
    #endif /* _fmGetChar */
#endif /* SOMGD_fmGetChar */

/*
 * New Method: fmPeekChar
 */
typedef long   SOMLINK somTP_fileMgr_fmPeekChar(fileMgr somSelf, 
		long offset);
typedef somTP_fileMgr_fmPeekChar *somTD_fileMgr_fmPeekChar;
/*
 *  Peek ahead in the file.
 */
#define somMD_fileMgr_fmPeekChar "::fileMgr::fmPeekChar"
#define fileMgr_fmPeekChar(somSelf,offset) \
    (SOM_Resolve(somSelf, fileMgr, fmPeekChar) \
	(somSelf,offset))
#ifndef SOMGD_fmPeekChar
    #if (defined(_fmPeekChar) || defined(__fmPeekChar))
        #undef _fmPeekChar
        #undef __fmPeekChar
        #define SOMGD_fmPeekChar 1
    #else
        #define _fmPeekChar fileMgr_fmPeekChar
    #endif /* _fmPeekChar */
#endif /* SOMGD_fmPeekChar */

/*
 * New Method: fmSize
 */
typedef long   SOMLINK somTP_fileMgr_fmSize(fileMgr somSelf);
typedef somTP_fileMgr_fmSize *somTD_fileMgr_fmSize;
#define somMD_fileMgr_fmSize "::fileMgr::fmSize"
#define fileMgr_fmSize(somSelf) \
    (SOM_Resolve(somSelf, fileMgr, fmSize) \
	(somSelf))
#ifndef SOMGD_fmSize
    #if (defined(_fmSize) || defined(__fmSize))
        #undef _fmSize
        #undef __fmSize
        #define SOMGD_fmSize 1
    #else
        #define _fmSize fileMgr_fmSize
    #endif /* _fmSize */
#endif /* SOMGD_fmSize */

/*
 * New Method: fmIncr
 */
typedef long   SOMLINK somTP_fileMgr_fmIncr(fileMgr somSelf, 
		long oldNum);
typedef somTP_fileMgr_fmIncr *somTD_fileMgr_fmIncr;
#define somMD_fileMgr_fmIncr "::fileMgr::fmIncr"
#define fileMgr_fmIncr(somSelf,oldNum) \
    (SOM_Resolve(somSelf, fileMgr, fmIncr) \
	(somSelf,oldNum))
#ifndef SOMGD_fmIncr
    #if (defined(_fmIncr) || defined(__fmIncr))
        #undef _fmIncr
        #undef __fmIncr
        #define SOMGD_fmIncr 1
    #else
        #define _fmIncr fileMgr_fmIncr
    #endif /* _fmIncr */
#endif /* SOMGD_fmIncr */

/*
 * New Method: fmAdd
 */
typedef long   SOMLINK somTP_fileMgr_fmAdd(fileMgr somSelf, 
		long oldNum, 
		long addNum);
typedef somTP_fileMgr_fmAdd *somTD_fileMgr_fmAdd;
#define somMD_fileMgr_fmAdd "::fileMgr::fmAdd"
#define fileMgr_fmAdd(somSelf,oldNum,addNum) \
    (SOM_Resolve(somSelf, fileMgr, fmAdd) \
	(somSelf,oldNum,addNum))
#ifndef SOMGD_fmAdd
    #if (defined(_fmAdd) || defined(__fmAdd))
        #undef _fmAdd
        #undef __fmAdd
        #define SOMGD_fmAdd 1
    #else
        #define _fmAdd fileMgr_fmAdd
    #endif /* _fmAdd */
#endif /* SOMGD_fmAdd */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define fileMgr_somInit SOMObject_somInit
#define fileMgr_somUninit SOMObject_somUninit
#define fileMgr_somDumpSelfInt SOMObject_somDumpSelfInt

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define fileMgr_somDefaultInit SOMObject_somDefaultInit
#define fileMgr_somDestruct SOMObject_somDestruct
#define fileMgr_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define fileMgr_somDefaultAssign SOMObject_somDefaultAssign
#define fileMgr_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define fileMgr_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define fileMgr_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define fileMgr_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define fileMgr_somDefaultVAssign SOMObject_somDefaultVAssign
#define fileMgr_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define fileMgr_somFree SOMObject_somFree
#define fileMgr_somGetClass SOMObject_somGetClass
#define fileMgr_somGetClassName SOMObject_somGetClassName
#define fileMgr_somGetSize SOMObject_somGetSize
#define fileMgr_somIsA SOMObject_somIsA
#define fileMgr_somIsInstanceOf SOMObject_somIsInstanceOf
#define fileMgr_somRespondsTo SOMObject_somRespondsTo
#define fileMgr_somDispatch SOMObject_somDispatch
#define fileMgr_somClassDispatch SOMObject_somClassDispatch
#define fileMgr_somCastObj SOMObject_somCastObj
#define fileMgr_somResetObj SOMObject_somResetObj
#define fileMgr_somPrintSelf SOMObject_somPrintSelf
#define fileMgr_somDumpSelf SOMObject_somDumpSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_fileMgr_h */
