
/*
 * This file was generated by the SOM Compiler.
 * FileName: record.ih.
 * Generated using:
 *     SOM Precompiler spc: 1.22
 *     SOM Emitter emitih: 1.59
 */

#ifndef record_ih
#define record_ih


#include "record.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 RecordCClassData.parentMtab
#endif

#define Record_MaxNoMethods 2

/*
 * Instance data
 */
typedef struct {
	PSZ pRecordData;
} RecordData;

/*
 * Instance variable access macros
 */
#define _pRecordData (somThis->pRecordData)

/*
 * Getdata macro
 */
#define RecordGetData(somSelf) \
    ((RecordData *) \
        SOM_DataResolve(somSelf, RecordCClassData.instanceDataToken))

/*
 * Trace/Debug macro
 */
#ifndef RecordMethodDebug
#define RecordMethodDebug(c,m) SOMMethodDebug(c,m)
#endif

/*
 * Begin stuff that only goes in the primary file
 */
#ifdef Record_Class_Source

/*
 * Current class macros for Instance and Meta classes.
 */
#undef SOMMeta
#define SOMMeta M_RecordCClassData.parentMtab
#undef SOMInstance
#define SOMInstance RecordCClassData.parentMtab

#ifndef M_Record_Class_Source
#define M_Record_Class_Source
#endif    /* M_Record_Class_Source */

/*
 * Generate the Apply Stubs.
 */
#pragma linkage(somAP_SetRecordInfo, system)
static BOOL   SOMLINK somAP_SetRecordInfo(Record *somSelf,
		somId __id,
		somId __desc,
		va_list __ap)
{
	PSZ szData = va_arg(__ap, PSZ);
	__ap; __id; __desc;           /* Referenced to prevent warning msg */

	return (Record_SetRecordInfo(somSelf,szData));
}

#pragma linkage(somAP_GetRecordInfo, system)
static BOOL   SOMLINK somAP_GetRecordInfo(Record *somSelf,
		somId __id,
		somId __desc,
		va_list __ap)
{
	PSZ szData = va_arg(__ap, PSZ);
	__ap; __id; __desc;           /* Referenced to prevent warning msg */

	return (Record_GetRecordInfo(somSelf,szData));
}


/*
 * Overridden method: wpInitData
 */
#pragma linkage(record_wpInitData, system)
SOM_Scope void   SOMLINK record_wpInitData(Record *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 RecordParent_wpInitData parent_wpInitData

/*
 * Overridden method: wpUnInitData
 */
#pragma linkage(record_wpUnInitData, system)
SOM_Scope void   SOMLINK record_wpUnInitData(Record *somSelf);
#ifndef parent_wpUnInitData
static char *somMN_wpUnInitData = "wpUnInitData";
static somId somId_wpUnInitData = &somMN_wpUnInitData;
#define parent_wpUnInitData(somSelf) \
	((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpUnInitData)) \
	 (somSelf))
#endif
#define RecordParent_wpUnInitData parent_wpUnInitData

/*
 * Overridden method: wpModifyPopupMenu
 */
#pragma linkage(record_wpModifyPopupMenu, system)
SOM_Scope BOOL   SOMLINK record_wpModifyPopupMenu(Record *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 RecordParent_wpModifyPopupMenu parent_wpModifyPopupMenu

/*
 * Overridden method: wpMenuItemSelected
 */
#pragma linkage(record_wpMenuItemSelected, system)
SOM_Scope BOOL   SOMLINK record_wpMenuItemSelected(Record *somSelf,
		HWND hwndFrame,
		ULONG ulMenuId);
#ifndef parent_wpMenuItemSelected
static char *somMN_wpMenuItemSelected = "wpMenuItemSelected";
static somId somId_wpMenuItemSelected = &somMN_wpMenuItemSelected;
#define parent_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
	((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpMenuItemSelected)) \
	 (somSelf,hwndFrame,ulMenuId))
#endif
#define RecordParent_wpMenuItemSelected parent_wpMenuItemSelected

/*
 * Overridden method: wpOpen
 */
#pragma linkage(record_wpOpen, system)
SOM_Scope HWND   SOMLINK record_wpOpen(Record *somSelf,
		HWND hwndCnr,
		ULONG ulView,
		ULONG param);
#ifndef parent_wpOpen
static char *somMN_wpOpen = "wpOpen";
static somId somId_wpOpen = &somMN_wpOpen;
#define parent_wpOpen(somSelf,hwndCnr,ulView,param) \
	((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpOpen)) \
	 (somSelf,hwndCnr,ulView,param))
#endif
#define RecordParent_wpOpen parent_wpOpen

/*
 * Overridden method: wpSetup
 */
#pragma linkage(record_wpSetup, system)
SOM_Scope BOOL   SOMLINK record_wpSetup(Record *somSelf,
		PSZ pszSetupString);
#ifndef parent_wpSetup
static char *somMN_wpSetup = "wpSetup";
static somId somId_wpSetup = &somMN_wpSetup;
#define parent_wpSetup(somSelf,pszSetupString) \
	((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpSetup)) \
	 (somSelf,pszSetupString))
#endif
#define RecordParent_wpSetup parent_wpSetup

/*
 * Temporary class data structure used only in class creation
 */
static somClassDataStructure RecordtempClassData;

/*
 * Initialize the class data structure
 */
struct RecordClassDataStructure RecordClassData = {(SOMAny *) NULL};

/*
 * Define the C class data structure
 */
struct RecordCClassDataStructure RecordCClassData = {(somMethodTab *) NULL};

/*
 * New Method: SetRecordInfo
 */
#pragma linkage(record_SetRecordInfo, system)
SOM_Scope BOOL   SOMLINK record_SetRecordInfo(Record *somSelf,
		PSZ szData);
static char *somMN_SetRecordInfo = "SetRecordInfo";
static somId somId_SetRecordInfo = &somMN_SetRecordInfo;
static char *somDS_SetRecordInfo = somMD_Record_SetRecordInfo;
static somId somDI_SetRecordInfo = &somDS_SetRecordInfo;
#pragma linkage(somRD_SetRecordInfo, system)
static BOOL   SOMLINK somRD_SetRecordInfo(Record *somSelf,
		PSZ szData)
{
	return ((BOOL) va_somDispatchL(somSelf, somId_SetRecordInfo,
		_somGetMethodDescriptor(SOM_GetClass(somSelf),somId_SetRecordInfo),szData));
}

/*
 * New Method: GetRecordInfo
 */
#pragma linkage(record_GetRecordInfo, system)
SOM_Scope BOOL   SOMLINK record_GetRecordInfo(Record *somSelf,
		PSZ szData);
static char *somMN_GetRecordInfo = "GetRecordInfo";
static somId somId_GetRecordInfo = &somMN_GetRecordInfo;
static char *somDS_GetRecordInfo = somMD_Record_GetRecordInfo;
static somId somDI_GetRecordInfo = &somDS_GetRecordInfo;
#pragma linkage(somRD_GetRecordInfo, system)
static BOOL   SOMLINK somRD_GetRecordInfo(Record *somSelf,
		PSZ szData)
{
	return ((BOOL) va_somDispatchL(somSelf, somId_GetRecordInfo,
		_somGetMethodDescriptor(SOM_GetClass(somSelf),somId_GetRecordInfo),szData));
}

/*
 * Routines to create the class object
 */

/*
 * Declare the Static Methods table.
 */
static somStaticMethod_t RecordSM[] = {
    {    &RecordClassData.SetRecordInfo,
         &somId_SetRecordInfo,
         &somDI_SetRecordInfo,
         (somMethodProc *) record_SetRecordInfo,
         (somMethodProc *) somRD_SetRecordInfo,
         (somMethodProc *) somAP_SetRecordInfo    },
    {    &RecordClassData.GetRecordInfo,
         &somId_GetRecordInfo,
         &somDI_GetRecordInfo,
         (somMethodProc *) record_GetRecordInfo,
         (somMethodProc *) somRD_GetRecordInfo,
         (somMethodProc *) somAP_GetRecordInfo    },
};


/*
 * Declare the Override Methods table.
 */
static somOverrideMethod_t RecordOM[] = {
    {    &somId_wpInitData,
         (somMethodProc *) record_wpInitData    },
    {    &somId_wpUnInitData,
         (somMethodProc *) record_wpUnInitData    },
    {    &somId_wpModifyPopupMenu,
         (somMethodProc *) record_wpModifyPopupMenu    },
    {    &somId_wpMenuItemSelected,
         (somMethodProc *) record_wpMenuItemSelected    },
    {    &somId_wpOpen,
         (somMethodProc *) record_wpOpen    },
    {    &somId_wpSetup,
         (somMethodProc *) record_wpSetup    },
};

static void RecordsomInitializeClass ()
{
	int i;
	somStaticMethod_t *smp;
	somOverrideMethod_t *omp;

/*
 * Add the Static Methods.
 */
	for (smp = RecordSM, i = 0; i < 2; smp++, i++)
	    *(smp->classData) =
	        _somAddStaticMethod (RecordtempClassData.classObject,
	            *(smp->methodId), *(smp->methodDescriptor),
	            smp->method, smp->redispatchStub,
	            smp->applyStub);


/*
 * Override methods.
 */
	for (omp = RecordOM, i = 0; i < 6; omp++, i++)
	    _somOverrideSMethod (RecordtempClassData.classObject,
	        *(omp->methodId), omp->method);

}

#pragma linkage(RecordsomCreateClass, system)
static void SOMLINK RecordsomCreateClass(SOMClass *pClsObj,
                           SOMClass *mClsObj)
{
    RecordtempClassData.classObject = _somNew (mClsObj);
    _somInitClass (RecordtempClassData.classObject,
		"Record",
		pClsObj,
		sizeof(RecordData),
		Record_MaxNoMethods,
		Record_MajorVersion,
		Record_MinorVersion);
    RecordCClassData.instanceDataToken = 
	_somGetInstanceToken(RecordtempClassData.classObject);
    RecordsomInitializeClass();
    RecordCClassData.parentMtab =
	_somGetPClsMtab(RecordtempClassData.classObject);
    _somSetClassData(RecordtempClassData.classObject, (somClassDataStructure *)&RecordClassData);
    _somClassReady(RecordtempClassData.classObject);
    /* make newly created class object visible */
    RecordClassData.classObject = RecordtempClassData.classObject;
}

Record * SOMLINK RecordNewClass (integer4 scemajorVersion,
		integer4 sceminorVersion)
{
    SOMClass *pClsObj;
    SOMClass *mClsObj;

    /* Check the version numbers */
    if (((scemajorVersion != 0) && 
         (scemajorVersion != Record_MajorVersion)) ||
        ((sceminorVersion != 0) && 
         (sceminorVersion > Record_MinorVersion))) {
	somPrintf("RecordNewClass: Error, bad version numbers.\n");
	SOM_Error(SOMERROR_BadVersion);
    }
    /* Don't do anything if class object is already created. */
    if (RecordClassData.classObject != (SOMAny *) NULL)
	return(RecordClassData.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. */
    WPTransientNewClass(1,2);	/* static reference */
    pClsObj = _somFindClass(SOMClassMgrObject,
		SOM_IdFromString("WPTransient"), 1, 2);
    if (pClsObj == (SOMClass *) NULL)
	SOM_Error(SOMERROR_NoParentClass);

    /* Explicit metaclass, so get it */ 
    M_RecordNewClass(0,0);	/* static reference */
    mClsObj = _somFindClass(SOMClassMgrObject,
		SOM_IdFromString("M_Record"), 0, 0);
    if (mClsObj == (SOMClass *) NULL)
	SOM_Error(SOMERROR_NoMetaClass);

    somConstructClass(RecordsomCreateClass, pClsObj, mClsObj,
		     &RecordtempClassData);
    return (RecordClassData.classObject);
}

#endif                   /* Record_Class_Source */

#endif       /* record_ih */

/*
 * This file was generated by the SOM Compiler.
 * FileName: record.ih.
 * Generated using:
 *     SOM Precompiler spc: 1.22
 *     SOM Emitter emitih: 1.59
 */

#ifndef record_mih
#define record_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_RecordCClassData.parentMtab
#endif

#define M_Record_MaxNoMethods 2

/*
 * Instance data
 */
typedef void M_RecordData;

/*
 * Trace/Debug macro
 */
#ifndef M_RecordMethodDebug
#define M_RecordMethodDebug(c,m) SOMMethodDebug(c,m)
#endif

/*
 * Begin stuff that only goes in the primary file
 */
#ifdef M_Record_Class_Source

/*
 * Current class macros for Instance and Meta classes.
 */

/*
 * Generate the Apply Stubs.
 */
#pragma linkage(somAP_clsQueryDatabase, system)
static BOOL   SOMLINK somAP_clsQueryDatabase(M_Record *somSelf,
		somId __id,
		somId __desc,
		va_list __ap)
{
	PSZ szSearch = va_arg(__ap, PSZ);
	WPObject *Folder = va_arg(__ap, WPObject*);
	__ap; __id; __desc;           /* Referenced to prevent warning msg */

	return (M_Record_clsQueryDatabase(somSelf,szSearch,Folder));
}

#pragma linkage(somAP_clsRestartServer, system)
static BOOL   SOMLINK somAP_clsRestartServer(M_Record *somSelf,
		somId __id,
		somId __desc,
		va_list __ap)
{
	__ap; __id; __desc;           /* Referenced to prevent warning msg */

	return (M_Record_clsRestartServer(somSelf));
}


/*
 * Overridden method: wpclsInitData
 */
#pragma linkage(recordcls_wpclsInitData, system)
SOM_Scope void   SOMLINK recordcls_wpclsInitData(M_Record *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_RecordParent_wpclsInitData parent_wpclsInitData

/*
 * Overridden method: wpclsUnInitData
 */
#pragma linkage(recordcls_wpclsUnInitData, system)
SOM_Scope void   SOMLINK recordcls_wpclsUnInitData(M_Record *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_RecordParent_wpclsUnInitData parent_wpclsUnInitData

/*
 * Overridden method: wpclsQueryTitle
 */
#pragma linkage(recordcls_wpclsQueryTitle, system)
SOM_Scope PSZ   SOMLINK recordcls_wpclsQueryTitle(M_Record *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_RecordParent_wpclsQueryTitle parent_wpclsQueryTitle

/*
 * Overridden method: wpclsQueryIcon
 */
#pragma linkage(recordcls_wpclsQueryIcon, system)
SOM_Scope HPOINTER   SOMLINK recordcls_wpclsQueryIcon(M_Record *somSelf);
#ifndef parent_wpclsQueryIcon
static char *somMN_wpclsQueryIcon = "wpclsQueryIcon";
static somId somId_wpclsQueryIcon = &somMN_wpclsQueryIcon;
#define parent_wpclsQueryIcon(somSelf) \
	((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsQueryIcon)) \
	 (somSelf))
#endif
#define M_RecordParent_wpclsQueryIcon parent_wpclsQueryIcon

/*
 * Overridden method: wpclsQueryDefaultView
 */
#pragma linkage(recordcls_wpclsQueryDefaultView, system)
SOM_Scope ULONG   SOMLINK recordcls_wpclsQueryDefaultView(M_Record *somSelf);
#ifndef parent_wpclsQueryDefaultView
static char *somMN_wpclsQueryDefaultView = "wpclsQueryDefaultView";
static somId somId_wpclsQueryDefaultView = &somMN_wpclsQueryDefaultView;
#define parent_wpclsQueryDefaultView(somSelf) \
	((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsQueryDefaultView)) \
	 (somSelf))
#endif
#define M_RecordParent_wpclsQueryDefaultView parent_wpclsQueryDefaultView

/*
 * Overridden method: wpclsFindObjectFirst
 */
#pragma linkage(recordcls_wpclsFindObjectFirst, system)
SOM_Scope BOOL   SOMLINK recordcls_wpclsFindObjectFirst(M_Record *somSelf,
		PCLASS pClassList,
		PHFIND phFind,
		PSZ pszTitle,
		WPFolder *Folder,
		BOOL fSubfolders,
		PVOID pExtendedCriteria,
		POBJECT pBuffer,
		PULONG pCount);
#ifndef parent_wpclsFindObjectFirst
static char *somMN_wpclsFindObjectFirst = "wpclsFindObjectFirst";
static somId somId_wpclsFindObjectFirst = &somMN_wpclsFindObjectFirst;
#define parent_wpclsFindObjectFirst(somSelf,pClassList,phFind,pszTitle,Folder,fSubfolders,pExtendedCriteria,pBuffer,pCount) \
	((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsFindObjectFirst)) \
	 (somSelf,pClassList,phFind,pszTitle,Folder,fSubfolders,pExtendedCriteria,pBuffer,pCount))
#endif
#define M_RecordParent_wpclsFindObjectFirst parent_wpclsFindObjectFirst

/*
 * Temporary class data structure used only in class creation
 */
static somClassDataStructure M_RecordtempClassData;

/*
 * Initialize the class data structure
 */
struct M_RecordClassDataStructure M_RecordClassData = {(SOMAny *) NULL};

/*
 * Define the C class data structure
 */
struct M_RecordCClassDataStructure M_RecordCClassData = {(somMethodTab *) NULL};

/*
 * New Method: clsQueryDatabase
 */
#pragma linkage(recordcls_clsQueryDatabase, system)
SOM_Scope BOOL   SOMLINK recordcls_clsQueryDatabase(M_Record *somSelf,
		PSZ szSearch,
		WPObject *Folder);
static char *somMN_clsQueryDatabase = "clsQueryDatabase";
static somId somId_clsQueryDatabase = &somMN_clsQueryDatabase;
static char *somDS_clsQueryDatabase = somMD_M_Record_clsQueryDatabase;
static somId somDI_clsQueryDatabase = &somDS_clsQueryDatabase;
#pragma linkage(somRD_clsQueryDatabase, system)
static BOOL   SOMLINK somRD_clsQueryDatabase(M_Record *somSelf,
		PSZ szSearch,
		WPObject *Folder)
{
	return ((BOOL) va_somDispatchL(somSelf, somId_clsQueryDatabase,
		_somGetMethodDescriptor(SOM_GetClass(somSelf),somId_clsQueryDatabase),szSearch,Folder));
}

/*
 * New Method: clsRestartServer
 */
#pragma linkage(recordcls_clsRestartServer, system)
SOM_Scope BOOL   SOMLINK recordcls_clsRestartServer(M_Record *somSelf);
static char *somMN_clsRestartServer = "clsRestartServer";
static somId somId_clsRestartServer = &somMN_clsRestartServer;
static char *somDS_clsRestartServer = somMD_M_Record_clsRestartServer;
static somId somDI_clsRestartServer = &somDS_clsRestartServer;
#pragma linkage(somRD_clsRestartServer, system)
static BOOL   SOMLINK somRD_clsRestartServer(M_Record *somSelf)
{
	return ((BOOL) va_somDispatchL(somSelf, somId_clsRestartServer,
		_somGetMethodDescriptor(SOM_GetClass(somSelf),somId_clsRestartServer)));
}

/*
 * Routines to create the class object
 */

/*
 * Declare the Static Methods table.
 */
static somStaticMethod_t M_RecordSM[] = {
    {    &M_RecordClassData.clsQueryDatabase,
         &somId_clsQueryDatabase,
         &somDI_clsQueryDatabase,
         (somMethodProc *) recordcls_clsQueryDatabase,
         (somMethodProc *) somRD_clsQueryDatabase,
         (somMethodProc *) somAP_clsQueryDatabase    },
    {    &M_RecordClassData.clsRestartServer,
         &somId_clsRestartServer,
         &somDI_clsRestartServer,
         (somMethodProc *) recordcls_clsRestartServer,
         (somMethodProc *) somRD_clsRestartServer,
         (somMethodProc *) somAP_clsRestartServer    },
};


/*
 * Declare the Override Methods table.
 */
static somOverrideMethod_t M_RecordOM[] = {
    {    &somId_wpclsInitData,
         (somMethodProc *) recordcls_wpclsInitData    },
    {    &somId_wpclsUnInitData,
         (somMethodProc *) recordcls_wpclsUnInitData    },
    {    &somId_wpclsQueryTitle,
         (somMethodProc *) recordcls_wpclsQueryTitle    },
    {    &somId_wpclsQueryIcon,
         (somMethodProc *) recordcls_wpclsQueryIcon    },
    {    &somId_wpclsQueryDefaultView,
         (somMethodProc *) recordcls_wpclsQueryDefaultView    },
    {    &somId_wpclsFindObjectFirst,
         (somMethodProc *) recordcls_wpclsFindObjectFirst    },
};

static void M_RecordsomInitializeClass ()
{
	int i;
	somStaticMethod_t *smp;
	somOverrideMethod_t *omp;

/*
 * Add the Static Methods.
 */
	for (smp = M_RecordSM, i = 0; i < 2; smp++, i++)
	    *(smp->classData) =
	        _somAddStaticMethod (M_RecordtempClassData.classObject,
	            *(smp->methodId), *(smp->methodDescriptor),
	            smp->method, smp->redispatchStub,
	            smp->applyStub);


/*
 * Override methods.
 */
	for (omp = M_RecordOM, i = 0; i < 6; omp++, i++)
	    _somOverrideSMethod (M_RecordtempClassData.classObject,
	        *(omp->methodId), omp->method);

}

#pragma linkage(M_RecordsomCreateClass, system)
static void SOMLINK M_RecordsomCreateClass(SOMClass *pClsObj,
                           SOMClass *mClsObj)
{
    M_RecordtempClassData.classObject = _somNew (mClsObj);
    _somInitClass (M_RecordtempClassData.classObject,
		"M_Record",
		pClsObj,
		0,
		M_Record_MaxNoMethods,
		M_Record_MajorVersion,
		M_Record_MinorVersion);
    M_RecordCClassData.instanceDataToken = 
	_somGetInstanceToken(M_RecordtempClassData.classObject);
    M_RecordsomInitializeClass();
    M_RecordCClassData.parentMtab =
	_somGetPClsMtab(M_RecordtempClassData.classObject);
    _somSetClassData(M_RecordtempClassData.classObject, (somClassDataStructure *)&M_RecordClassData);
    _somClassReady(M_RecordtempClassData.classObject);
    /* make newly created class object visible */
    M_RecordClassData.classObject = M_RecordtempClassData.classObject;
}

M_Record * SOMLINK M_RecordNewClass (integer4 scemajorVersion,
		integer4 sceminorVersion)
{
    SOMClass *pClsObj;
    SOMClass *mClsObj;

    /* Check the version numbers */
    if (((scemajorVersion != 0) && 
         (scemajorVersion != M_Record_MajorVersion)) ||
        ((sceminorVersion != 0) && 
         (sceminorVersion > M_Record_MinorVersion))) {
	somPrintf("M_RecordNewClass: Error, bad version numbers.\n");
	SOM_Error(SOMERROR_BadVersion);
    }
    /* Don't do anything if class object is already created. */
    if (M_RecordClassData.classObject != (SOMAny *) NULL)
	return(M_RecordClassData.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_WPTransientNewClass(1,2);	/* static reference */
    pClsObj = _somFindClass(SOMClassMgrObject,
		SOM_IdFromString("M_WPTransient"), 1, 2);
    if (pClsObj == (SOMClass *) NULL)
	SOM_Error(SOMERROR_NoParentClass);

    /* Use parent's metaclass */ 
    mClsObj = SOM_GetClass(pClsObj);

    somConstructClass(M_RecordsomCreateClass, pClsObj, mClsObj,
		     &M_RecordtempClassData);
    return (M_RecordClassData.classObject);
}

#endif                   /* M_Record_Class_Source */

#endif       /* record_ih */
