home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
prgramer
/
info
/
redbook4
/
recflder.ih
< prev
next >
Wrap
Text File
|
1992-06-28
|
15KB
|
490 lines
/*
* This file was generated by the SOM Compiler.
* FileName: recflder.ih.
* Generated using:
* SOM Precompiler spc: 1.21
* SOM Emitter emitih: 1.42
*/
#ifndef recflder_ih
#define recflder_ih
#include "recflder.h"
/*
* Set the scope of methods functions
*/
#ifndef SOM_Scope
#ifdef __cplusplus
#define SOM_Scope extern "C"
#else
#define SOM_Scope extern
#endif
#endif
#ifndef SOM_CurrentClass
#define SOM_CurrentClass RecordFolderCClassData.parentMtab
#endif
#define RecordFolder_MaxNoMethods 1
/*
* Instance data
*/
typedef struct {
CHAR szLastQuery[200];
} RecordFolderData;
/*
* Instance variable access macros
*/
#define _szLastQuery (somThis->szLastQuery)
/*
* Getdata macro
*/
#define RecordFolderGetData(somSelf) \
((RecordFolderData *) \
SOM_DataResolve(somSelf, RecordFolderCClassData.instanceDataToken))
/*
* Trace/Debug macro
*/
#ifndef RecordFolderMethodDebug
#define RecordFolderMethodDebug(c,m) SOMMethodDebug(c,m)
#endif
/*
* Begin stuff that only goes in the primary file
*/
#ifdef RecordFolder_Class_Source
/*
* Current class macros for Instance and Meta classes.
*/
#undef SOMMeta
#define SOMMeta M_RecordFolderCClassData.parentMtab
#undef SOMInstance
#define SOMInstance RecordFolderCClassData.parentMtab
#ifndef M_RecordFolder_Class_Source
#define M_RecordFolder_Class_Source
#endif /* M_RecordFolder_Class_Source */
/*
* Overridden method: wpInitData
*/
#pragma linkage(recflder_wpInitData, system)
SOM_Scope void SOMLINK recflder_wpInitData(RecordFolder *somSelf);
#ifndef parent_wpInitData
static char *somMN_wpInitData = "wpInitData";
static somId somId_wpInitData = &somMN_wpInitData;
#define parent_wpInitData(somSelf) \
((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpInitData)) \
(somSelf))
#endif
#define RecordFolderParent_wpInitData parent_wpInitData
/*
* Overridden method: wpModifyPopupMenu
*/
#pragma linkage(recflder_wpModifyPopupMenu, system)
SOM_Scope BOOL SOMLINK recflder_wpModifyPopupMenu(RecordFolder *somSelf,
HWND hwndMenu,
HWND hwndCnr,
ULONG iPosition);
#ifndef parent_wpModifyPopupMenu
static char *somMN_wpModifyPopupMenu = "wpModifyPopupMenu";
static somId somId_wpModifyPopupMenu = &somMN_wpModifyPopupMenu;
#define parent_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpModifyPopupMenu)) \
(somSelf,hwndMenu,hwndCnr,iPosition))
#endif
#define RecordFolderParent_wpModifyPopupMenu parent_wpModifyPopupMenu
/*
* Overridden method: wpMenuItemSelected
*/
#pragma linkage(recflder_wpMenuItemSelected, system)
SOM_Scope void SOMLINK recflder_wpMenuItemSelected(RecordFolder *somSelf,
HWND hwndFrame,
ULONG MenuId);
#ifndef parent_wpMenuItemSelected
static char *somMN_wpMenuItemSelected = "wpMenuItemSelected";
static somId somId_wpMenuItemSelected = &somMN_wpMenuItemSelected;
#define parent_wpMenuItemSelected(somSelf,hwndFrame,MenuId) \
((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpMenuItemSelected)) \
(somSelf,hwndFrame,MenuId))
#endif
#define RecordFolderParent_wpMenuItemSelected parent_wpMenuItemSelected
/*
* Overridden method: wpSaveState
*/
#pragma linkage(recflder_wpSaveState, system)
SOM_Scope BOOL SOMLINK recflder_wpSaveState(RecordFolder *somSelf);
#ifndef parent_wpSaveState
static char *somMN_wpSaveState = "wpSaveState";
static somId somId_wpSaveState = &somMN_wpSaveState;
#define parent_wpSaveState(somSelf) \
((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpSaveState)) \
(somSelf))
#endif
#define RecordFolderParent_wpSaveState parent_wpSaveState
/*
* Overridden method: wpRestoreState
*/
#pragma linkage(recflder_wpRestoreState, system)
SOM_Scope BOOL SOMLINK recflder_wpRestoreState(RecordFolder *somSelf,
ULONG ulReserved);
#ifndef parent_wpRestoreState
static char *somMN_wpRestoreState = "wpRestoreState";
static somId somId_wpRestoreState = &somMN_wpRestoreState;
#define parent_wpRestoreState(somSelf,ulReserved) \
((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpRestoreState)) \
(somSelf,ulReserved))
#endif
#define RecordFolderParent_wpRestoreState parent_wpRestoreState
/*
* Temporary class data structure used only in class creation
*/
static somClassDataStructure RecordFoldertempClassData;
/*
* Initialize the class data structure
*/
struct RecordFolderClassDataStructure RecordFolderClassData = {(SOMAny *) NULL};
/*
* Define the C class data structure
*/
struct RecordFolderCClassDataStructure RecordFolderCClassData = {(somMethodTab *) NULL};
/*
* New Method: UpdateLastQuery
*/
#pragma linkage(recflder_UpdateLastQuery, system)
SOM_Scope BOOL SOMLINK recflder_UpdateLastQuery(RecordFolder *somSelf,
PSZ szQuery);
static char *somMN_UpdateLastQuery = "UpdateLastQuery";
static somId somId_UpdateLastQuery = &somMN_UpdateLastQuery;
static char *somDS_UpdateLastQuery = somMD_RecordFolder_UpdateLastQuery;
static somId somDI_UpdateLastQuery = &somDS_UpdateLastQuery;
#pragma linkage(somRD_UpdateLastQuery, system)
static BOOL SOMLINK somRD_UpdateLastQuery(RecordFolder *somSelf,
PSZ szQuery)
{
return ((BOOL) va_somDispatchL(somSelf, somId_UpdateLastQuery,
somDI_UpdateLastQuery,szQuery));
}
#pragma linkage(somAP_UpdateLastQuery, system)
static BOOL SOMLINK somAP_UpdateLastQuery(RecordFolder *somSelf,
somId __id,
somId __desc,
va_list __ap)
{
PSZ szQuery = va_arg(__ap, PSZ);
__ap; __id; __desc; /* Referenced to prevent warning msg */
return (RecordFolder_UpdateLastQuery(somSelf,szQuery));
}
/*
* Routines to create the class object
*/
static void RecordFoldersomInitializeClass ()
{
RecordFolderClassData.UpdateLastQuery =
_somAddStaticMethod (RecordFoldertempClassData.classObject,
somId_UpdateLastQuery,
somDI_UpdateLastQuery,
(somMethodProc *) recflder_UpdateLastQuery,
(somMethodProc *) somRD_UpdateLastQuery,
(somMethodProc *) somAP_UpdateLastQuery);
_somOverrideSMethod (RecordFoldertempClassData.classObject,
somId_wpInitData,
(somMethodProc *) recflder_wpInitData);
_somOverrideSMethod (RecordFoldertempClassData.classObject,
somId_wpModifyPopupMenu,
(somMethodProc *) recflder_wpModifyPopupMenu);
_somOverrideSMethod (RecordFoldertempClassData.classObject,
somId_wpMenuItemSelected,
(somMethodProc *) recflder_wpMenuItemSelected);
_somOverrideSMethod (RecordFoldertempClassData.classObject,
somId_wpSaveState,
(somMethodProc *) recflder_wpSaveState);
_somOverrideSMethod (RecordFoldertempClassData.classObject,
somId_wpRestoreState,
(somMethodProc *) recflder_wpRestoreState);
}
#pragma linkage(RecordFoldersomCreateClass, system)
static void SOMLINK RecordFoldersomCreateClass(SOMClass *pClsObj,
SOMClass *mClsObj)
{
RecordFoldertempClassData.classObject = _somNew (mClsObj);
_somInitClass (RecordFoldertempClassData.classObject,
"RecordFolder",
pClsObj,
sizeof(RecordFolderData),
RecordFolder_MaxNoMethods,
RecordFolder_MajorVersion,
RecordFolder_MinorVersion);
RecordFolderCClassData.instanceDataToken =
_somGetInstanceToken(RecordFoldertempClassData.classObject);
RecordFoldersomInitializeClass();
RecordFolderCClassData.parentMtab =
_somGetPClsMtab(RecordFoldertempClassData.classObject);
_somSetClassData(RecordFoldertempClassData.classObject, (somClassDataStructure *)&RecordFolderClassData);
_somClassReady(RecordFoldertempClassData.classObject);
/* make newly created class object visible */
RecordFolderClassData.classObject = RecordFoldertempClassData.classObject;
}
RecordFolder * SOMLINK RecordFolderNewClass (integer4 scemajorVersion,
integer4 sceminorVersion)
{
SOMClass *pClsObj;
SOMClass *mClsObj;
/* Check the version numbers */
if (((scemajorVersion != 0) &&
(scemajorVersion != RecordFolder_MajorVersion)) ||
((sceminorVersion != 0) &&
(sceminorVersion < RecordFolder_MinorVersion))) {
somPrintf("RecordFolderNewClass: Error, bad version numbers.\n");
SOM_Error(SOMERROR_BadVersion);
}
/* Don't do anything if class object is already created. */
if (RecordFolderClassData.classObject != (SOMAny *) NULL)
return(RecordFolderClassData.classObject);
/* Make sure the environment is initialized. */
if (SOMClassMgrObject == (SOMAny *) NULL) somEnvironmentNew();
if (SOMClassMgrObject == (SOMAny *) NULL)
SOM_Error(SOMERROR_CouldNotStartup);
/* Get the parent class object. */
WPFolderNewClass(1,1); /* static reference */
pClsObj = _somFindClass(SOMClassMgrObject,
SOM_IdFromString("WPFolder"), 1, 1);
if (pClsObj == (SOMClass *) NULL)
SOM_Error(SOMERROR_NoParentClass);
/* Explicit metaclass, so get it */
M_RecordFolderNewClass(0,0); /* static reference */
mClsObj = _somFindClass(SOMClassMgrObject,
SOM_IdFromString("M_RecordFolder"), 0, 0);
if (mClsObj == (SOMClass *) NULL)
SOM_Error(SOMERROR_NoMetaClass);
somConstructClass(RecordFoldersomCreateClass, pClsObj, mClsObj,
&RecordFoldertempClassData);
return (RecordFolderClassData.classObject);
}
#endif /* RecordFolder_Class_Source */
#endif /* recflder_ih */
/*
* This file was generated by the SOM Compiler.
* FileName: recflder.ih.
* Generated using:
* SOM Precompiler spc: 1.21
* SOM Emitter emitih: 1.42
*/
#ifndef recflder_mih
#define recflder_mih
/*
* Set the scope of methods functions
*/
#ifndef SOM_Scope
#ifdef __cplusplus
#define SOM_Scope extern "C"
#else
#define SOM_Scope extern
#endif
#endif
#ifndef SOM_CurrentClass
#define SOM_CurrentClass M_RecordFolderCClassData.parentMtab
#endif
#define M_RecordFolder_MaxNoMethods 0
/*
* Instance data
*/
typedef void M_RecordFolderData;
/*
* Trace/Debug macro
*/
#ifndef M_RecordFolderMethodDebug
#define M_RecordFolderMethodDebug(c,m) SOMMethodDebug(c,m)
#endif
/*
* Begin stuff that only goes in the primary file
*/
#ifdef M_RecordFolder_Class_Source
/*
* Current class macros for Instance and Meta classes.
*/
/*
* Overridden method: wpclsQueryTitle
*/
#pragma linkage(recfldercls_wpclsQueryTitle, system)
SOM_Scope PSZ SOMLINK recfldercls_wpclsQueryTitle(M_RecordFolder *somSelf);
#ifndef parent_wpclsQueryTitle
static char *somMN_wpclsQueryTitle = "wpclsQueryTitle";
static somId somId_wpclsQueryTitle = &somMN_wpclsQueryTitle;
#define parent_wpclsQueryTitle(somSelf) \
((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsQueryTitle)) \
(somSelf))
#endif
#define M_RecordFolderParent_wpclsQueryTitle parent_wpclsQueryTitle
/*
* Overridden method: wpclsInitData
*/
#pragma linkage(recfldercls_wpclsInitData, system)
SOM_Scope void SOMLINK recfldercls_wpclsInitData(M_RecordFolder *somSelf);
#ifndef parent_wpclsInitData
static char *somMN_wpclsInitData = "wpclsInitData";
static somId somId_wpclsInitData = &somMN_wpclsInitData;
#define parent_wpclsInitData(somSelf) \
((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsInitData)) \
(somSelf))
#endif
#define M_RecordFolderParent_wpclsInitData parent_wpclsInitData
/*
* Overridden method: wpclsUnInitData
*/
#pragma linkage(recfldercls_wpclsUnInitData, system)
SOM_Scope void SOMLINK recfldercls_wpclsUnInitData(M_RecordFolder *somSelf);
#ifndef parent_wpclsUnInitData
static char *somMN_wpclsUnInitData = "wpclsUnInitData";
static somId somId_wpclsUnInitData = &somMN_wpclsUnInitData;
#define parent_wpclsUnInitData(somSelf) \
((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsUnInitData)) \
(somSelf))
#endif
#define M_RecordFolderParent_wpclsUnInitData parent_wpclsUnInitData
/*
* Temporary class data structure used only in class creation
*/
static somClassDataStructure M_RecordFoldertempClassData;
/*
* Initialize the class data structure
*/
struct M_RecordFolderClassDataStructure M_RecordFolderClassData = {(SOMAny *) NULL};
/*
* Define the C class data structure
*/
struct M_RecordFolderCClassDataStructure M_RecordFolderCClassData = {(somMethodTab *) NULL};
/*
* Routines to create the class object
*/
static void M_RecordFoldersomInitializeClass ()
{
_somOverrideSMethod (M_RecordFoldertempClassData.classObject,
somId_wpclsQueryTitle,
(somMethodProc *) recfldercls_wpclsQueryTitle);
_somOverrideSMethod (M_RecordFoldertempClassData.classObject,
somId_wpclsInitData,
(somMethodProc *) recfldercls_wpclsInitData);
_somOverrideSMethod (M_RecordFoldertempClassData.classObject,
somId_wpclsUnInitData,
(somMethodProc *) recfldercls_wpclsUnInitData);
}
#pragma linkage(M_RecordFoldersomCreateClass, system)
static void SOMLINK M_RecordFoldersomCreateClass(SOMClass *pClsObj,
SOMClass *mClsObj)
{
M_RecordFoldertempClassData.classObject = _somNew (mClsObj);
_somInitClass (M_RecordFoldertempClassData.classObject,
"M_RecordFolder",
pClsObj,
0,
M_RecordFolder_MaxNoMethods,
M_RecordFolder_MajorVersion,
M_RecordFolder_MinorVersion);
M_RecordFolderCClassData.instanceDataToken =
_somGetInstanceToken(M_RecordFoldertempClassData.classObject);
M_RecordFoldersomInitializeClass();
M_RecordFolderCClassData.parentMtab =
_somGetPClsMtab(M_RecordFoldertempClassData.classObject);
_somSetClassData(M_RecordFoldertempClassData.classObject, (somClassDataStructure *)&M_RecordFolderClassData);
_somClassReady(M_RecordFoldertempClassData.classObject);
/* make newly created class object visible */
M_RecordFolderClassData.classObject = M_RecordFoldertempClassData.classObject;
}
M_RecordFolder * SOMLINK M_RecordFolderNewClass (integer4 scemajorVersion,
integer4 sceminorVersion)
{
SOMClass *pClsObj;
SOMClass *mClsObj;
/* Check the version numbers */
if (((scemajorVersion != 0) &&
(scemajorVersion != M_RecordFolder_MajorVersion)) ||
((sceminorVersion != 0) &&
(sceminorVersion < M_RecordFolder_MinorVersion))) {
somPrintf("M_RecordFolderNewClass: Error, bad version numbers.\n");
SOM_Error(SOMERROR_BadVersion);
}
/* Don't do anything if class object is already created. */
if (M_RecordFolderClassData.classObject != (SOMAny *) NULL)
return(M_RecordFolderClassData.classObject);
/* Make sure the environment is initialized. */
if (SOMClassMgrObject == (SOMAny *) NULL) somEnvironmentNew();
if (SOMClassMgrObject == (SOMAny *) NULL)
SOM_Error(SOMERROR_CouldNotStartup);
/* Get the parent class object. */
M_WPFolderNewClass(1,1); /* static reference */
pClsObj = _somFindClass(SOMClassMgrObject,
SOM_IdFromString("M_WPFolder"), 1, 1);
if (pClsObj == (SOMClass *) NULL)
SOM_Error(SOMERROR_NoParentClass);
/* Use parent's metaclass */
mClsObj = SOM_GetClass(pClsObj);
somConstructClass(M_RecordFoldersomCreateClass, pClsObj, mClsObj,
&M_RecordFoldertempClassData);
return (M_RecordFolderClassData.classObject);
}
#endif /* M_RecordFolder_Class_Source */
#endif /* recflder_ih */