home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
OS2
/
LNVREM.ZIP
/
LNREMSRC.EXE
/
LNREMLCH.IH
< prev
next >
Wrap
Text File
|
1993-11-08
|
11KB
|
372 lines
/*
* This file was generated by the SOM Compiler.
* FileName: lnremlch.ih.
* Generated using:
* SOM Precompiler spc: 1.22
* SOM Emitter emitih: 1.59
*/
/*
* lnremlch.csc
* Copyright (c) International Business Machines Corporation
* 1993
*/
#ifndef lnremlch_ih
#define lnremlch_ih
#include <lnremlch.h>
/*
* Set the scope of methods functions
*/
#ifndef SOM_Scope
#define SOM_Scope static
#endif
#ifndef SOM_CurrentClass
#define SOM_CurrentClass LNRemoteLaunchCClassData.parentMtab
#endif
#define LNRemoteLaunch_MaxNoMethods 3
/*
* Instance data
*/
typedef struct {
HMODULE ModHandle;
} LNRemoteLaunchData;
/*
* Instance variable access macros
*/
#define _ModHandle (somThis->ModHandle)
/*
* Getdata macro
*/
#define LNRemoteLaunchGetData(somSelf) \
((LNRemoteLaunchData *) \
SOM_DataResolve(somSelf, LNRemoteLaunchCClassData.instanceDataToken))
/*
* Trace/Debug macro
*/
#ifndef LNRemoteLaunchMethodDebug
#define LNRemoteLaunchMethodDebug(c,m) SOMMethodDebug(c,m)
#endif
/*
* Begin stuff that only goes in the primary file
*/
#ifdef LNRemoteLaunch_Class_Source
/*
* Current class macros for Instance and Meta classes.
*/
#undef SOMMeta
#define SOMMeta M_LNRemoteLaunchCClassData.parentMtab
#undef SOMInstance
#define SOMInstance LNRemoteLaunchCClassData.parentMtab
#ifndef M_LNRemoteLaunch_Class_Source
#define M_LNRemoteLaunch_Class_Source
#endif /* M_LNRemoteLaunch_Class_Source */
/*
* Generate the Apply Stubs.
*/
#pragma linkage(somAP_RemoteExecPgm, system)
static int SOMLINK somAP_RemoteExecPgm(LNRemoteLaunch *somSelf,
somId __id,
somId __desc,
va_list __ap)
{
STRING_ARRAY_OBJ *pHier = va_arg(__ap, STRING_ARRAY_OBJ*);
SOMAny *pModel = va_arg(__ap, SOMAny*);
PVOID pAppParm = va_arg(__ap, PVOID);
SOMAny *pSelected = va_arg(__ap, SOMAny*);
__ap; __id; __desc; /* Referenced to prevent warning msg */
return (LNRemoteLaunch_RemoteExecPgm(somSelf,pHier,pModel,pAppParm,pSelected));
}
#pragma linkage(somAP_RemoteCall, system)
static int SOMLINK somAP_RemoteCall(LNRemoteLaunch *somSelf,
somId __id,
somId __desc,
va_list __ap)
{
PSZ LongName = va_arg(__ap, PSZ);
PSZ CmdBuf = va_arg(__ap, PSZ);
PSZ CmdTail = va_arg(__ap, PSZ);
STARTDATA *pStartData = va_arg(__ap, STARTDATA*);
BOOL32 VerboseSwitch = va_arg(__ap, BOOL32);
__ap; __id; __desc; /* Referenced to prevent warning msg */
return (LNRemoteLaunch_RemoteCall(somSelf,LongName,CmdBuf,CmdTail,pStartData,VerboseSwitch));
}
#pragma linkage(somAP_ErrorMessage, system)
static VOID SOMLINK somAP_ErrorMessage(LNRemoteLaunch *somSelf,
somId __id,
somId __desc,
va_list __ap)
{
ULONG ErrorCode = va_arg(__ap, ULONG);
PSZ LongName = va_arg(__ap, PSZ);
BOOL32 VerboseSwitch = va_arg(__ap, BOOL32);
__ap; __id; __desc; /* Referenced to prevent warning msg */
LNRemoteLaunch_ErrorMessage(somSelf,ErrorCode,LongName,VerboseSwitch);
}
/*
* Overridden method: somInit
*/
#pragma linkage(somInit, system)
SOM_Scope void SOMLINK somInit(LNRemoteLaunch *somSelf);
#ifndef parent_somInit
static char *somMN_somInit = "somInit";
static somId somId_somInit = &somMN_somInit;
#define parent_somInit(somSelf) \
((SOM_ParentResolveE(SOMObject, SOM_CurrentClass, somInit)) \
(somSelf))
#endif
#define LNRemoteLaunchParent_somInit parent_somInit
/*
* Overridden method: somUninit
*/
#pragma linkage(somUninit, system)
SOM_Scope void SOMLINK somUninit(LNRemoteLaunch *somSelf);
#ifndef parent_somUninit
static char *somMN_somUninit = "somUninit";
static somId somId_somUninit = &somMN_somUninit;
#define parent_somUninit(somSelf) \
((SOM_ParentResolveE(SOMObject, SOM_CurrentClass, somUninit)) \
(somSelf))
#endif
#define LNRemoteLaunchParent_somUninit parent_somUninit
/*
* Temporary class data structure used only in class creation
*/
static somClassDataStructure LNRemoteLaunchtempClassData;
/*
* Initialize the class data structure
*/
struct LNRemoteLaunchClassDataStructure LNRemoteLaunchClassData = {(SOMAny *) NULL};
/*
* Define the C class data structure
*/
struct LNRemoteLaunchCClassDataStructure LNRemoteLaunchCClassData = {(somMethodTab *) NULL};
/*
* New Method: RemoteExecPgm
*/
#pragma linkage(RemoteExecPgm, system)
SOM_Scope int SOMLINK RemoteExecPgm(LNRemoteLaunch *somSelf,
STRING_ARRAY_OBJ *pHier,
SOMAny *pModel,
PVOID pAppParm,
SOMAny *pSelected);
static char *somMN_RemoteExecPgm = "RemoteExecPgm";
static somId somId_RemoteExecPgm = &somMN_RemoteExecPgm;
static char *somDS_RemoteExecPgm = somMD_LNRemoteLaunch_RemoteExecPgm;
static somId somDI_RemoteExecPgm = &somDS_RemoteExecPgm;
#pragma linkage(somRD_RemoteExecPgm, system)
static int SOMLINK somRD_RemoteExecPgm(LNRemoteLaunch *somSelf,
STRING_ARRAY_OBJ *pHier,
SOMAny *pModel,
PVOID pAppParm,
SOMAny *pSelected)
{
return ((int) va_somDispatchL(somSelf, somId_RemoteExecPgm,
_somGetMethodDescriptor(SOM_GetClass(somSelf),somId_RemoteExecPgm),pHier,pModel,pAppParm,pSelected));
}
/*
* New Method: RemoteCall
*/
#pragma linkage(RemoteCall, system)
SOM_Scope int SOMLINK RemoteCall(LNRemoteLaunch *somSelf,
PSZ LongName,
PSZ CmdBuf,
PSZ CmdTail,
STARTDATA *pStartData,
BOOL32 VerboseSwitch);
static char *somMN_RemoteCall = "RemoteCall";
static somId somId_RemoteCall = &somMN_RemoteCall;
static char *somDS_RemoteCall = somMD_LNRemoteLaunch_RemoteCall;
static somId somDI_RemoteCall = &somDS_RemoteCall;
#pragma linkage(somRD_RemoteCall, system)
static int SOMLINK somRD_RemoteCall(LNRemoteLaunch *somSelf,
PSZ LongName,
PSZ CmdBuf,
PSZ CmdTail,
STARTDATA *pStartData,
BOOL32 VerboseSwitch)
{
return ((int) va_somDispatchL(somSelf, somId_RemoteCall,
_somGetMethodDescriptor(SOM_GetClass(somSelf),somId_RemoteCall),LongName,CmdBuf,CmdTail,pStartData,VerboseSwitch));
}
/*
* New Method: ErrorMessage
*/
#pragma linkage(ErrorMessage, system)
SOM_Scope VOID SOMLINK ErrorMessage(LNRemoteLaunch *somSelf,
ULONG ErrorCode,
PSZ LongName,
BOOL32 VerboseSwitch);
static char *somMN_ErrorMessage = "ErrorMessage";
static somId somId_ErrorMessage = &somMN_ErrorMessage;
static char *somDS_ErrorMessage = somMD_LNRemoteLaunch_ErrorMessage;
static somId somDI_ErrorMessage = &somDS_ErrorMessage;
#pragma linkage(somRD_ErrorMessage, system)
static VOID SOMLINK somRD_ErrorMessage(LNRemoteLaunch *somSelf,
ULONG ErrorCode,
PSZ LongName,
BOOL32 VerboseSwitch)
{
va_somDispatchV(somSelf, somId_ErrorMessage,
_somGetMethodDescriptor(SOM_GetClass(somSelf),somId_ErrorMessage),ErrorCode,LongName,VerboseSwitch);
}
/*
* Routines to create the class object
*/
/*
* Declare the Static Methods table.
*/
static somStaticMethod_t LNRemoteLaunchSM[] = {
{ &LNRemoteLaunchClassData.RemoteExecPgm,
&somId_RemoteExecPgm,
&somDI_RemoteExecPgm,
(somMethodProc *) RemoteExecPgm,
(somMethodProc *) somRD_RemoteExecPgm,
(somMethodProc *) somAP_RemoteExecPgm },
{ &LNRemoteLaunchClassData.RemoteCall,
&somId_RemoteCall,
&somDI_RemoteCall,
(somMethodProc *) RemoteCall,
(somMethodProc *) somRD_RemoteCall,
(somMethodProc *) somAP_RemoteCall },
{ &LNRemoteLaunchClassData.ErrorMessage,
&somId_ErrorMessage,
&somDI_ErrorMessage,
(somMethodProc *) ErrorMessage,
(somMethodProc *) somRD_ErrorMessage,
(somMethodProc *) somAP_ErrorMessage },
};
/*
* Declare the Override Methods table.
*/
static somOverrideMethod_t LNRemoteLaunchOM[] = {
{ &somId_somInit,
(somMethodProc *) somInit },
{ &somId_somUninit,
(somMethodProc *) somUninit },
};
static void LNRemoteLaunchsomInitializeClass ()
{
int i;
somStaticMethod_t *smp;
somOverrideMethod_t *omp;
/*
* Add the Static Methods.
*/
for (smp = LNRemoteLaunchSM, i = 0; i < 3; smp++, i++)
*(smp->classData) =
_somAddStaticMethod (LNRemoteLaunchtempClassData.classObject,
*(smp->methodId), *(smp->methodDescriptor),
smp->method, smp->redispatchStub,
smp->applyStub);
/*
* Override methods.
*/
for (omp = LNRemoteLaunchOM, i = 0; i < 2; omp++, i++)
_somOverrideSMethod (LNRemoteLaunchtempClassData.classObject,
*(omp->methodId), omp->method);
}
#pragma linkage(LNRemoteLaunchsomCreateClass, system)
static void SOMLINK LNRemoteLaunchsomCreateClass(SOMClass *pClsObj,
SOMClass *mClsObj)
{
LNRemoteLaunchtempClassData.classObject = _somNew (mClsObj);
_somInitClass (LNRemoteLaunchtempClassData.classObject,
"LNRemoteLaunch",
pClsObj,
sizeof(LNRemoteLaunchData),
LNRemoteLaunch_MaxNoMethods,
LNRemoteLaunch_MajorVersion,
LNRemoteLaunch_MinorVersion);
LNRemoteLaunchCClassData.instanceDataToken =
_somGetInstanceToken(LNRemoteLaunchtempClassData.classObject);
LNRemoteLaunchsomInitializeClass();
LNRemoteLaunchCClassData.parentMtab =
_somGetPClsMtab(LNRemoteLaunchtempClassData.classObject);
_somSetClassData(LNRemoteLaunchtempClassData.classObject, (somClassDataStructure *)&LNRemoteLaunchClassData);
_somClassReady(LNRemoteLaunchtempClassData.classObject);
/* make newly created class object visible */
LNRemoteLaunchClassData.classObject = LNRemoteLaunchtempClassData.classObject;
}
LNRemoteLaunch * SOMLINK LNRemoteLaunchNewClass (integer4 scemajorVersion,
integer4 sceminorVersion)
{
SOMClass *pClsObj;
SOMClass *mClsObj;
/* Check the version numbers */
if (((scemajorVersion != 0) &&
(scemajorVersion != LNRemoteLaunch_MajorVersion)) ||
((sceminorVersion != 0) &&
(sceminorVersion > LNRemoteLaunch_MinorVersion))) {
somPrintf("LNRemoteLaunchNewClass: Error, bad version numbers.\n");
SOM_Error(SOMERROR_BadVersion);
}
/* Don't do anything if class object is already created. */
if (LNRemoteLaunchClassData.classObject != (SOMAny *) NULL)
return(LNRemoteLaunchClassData.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. */
DLSAppNewClass(0,0); /* static reference */
pClsObj = _somFindClass(SOMClassMgrObject,
SOM_IdFromString("DLSApp"), 0, 0);
if (pClsObj == (SOMClass *) NULL)
SOM_Error(SOMERROR_NoParentClass);
/* Use parent's metaclass */
mClsObj = SOM_GetClass(pClsObj);
somConstructClass(LNRemoteLaunchsomCreateClass, pClsObj, mClsObj,
&LNRemoteLaunchtempClassData);
return (LNRemoteLaunchClassData.classObject);
}
#endif /* LNRemoteLaunch_Class_Source */
#endif /* lnremlch_ih */