home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sompar.zip
/
SOM
/
PART.XH
< prev
next >
Wrap
Text File
|
1993-12-19
|
4KB
|
213 lines
/*
* This file was generated by the SOM Compiler.
* FileName: part.xh.
* Generated using:
* SOM Precompiler somipc: somc/smemit.c
* SOM Emitter emitxh: somc/smmain.c
*/
/*
*
* Project: Digitalk Parts like Toolbar and SOMObjects Containers Demo
* File: part.idl
* Author: Stewart Hyde
* Created: Dec 18, 1993
* Updated: Dec 18, 1993
*
* Description:
*
*/
#ifndef SOM_Part_xh
#define SOM_Part_xh
class Part;
#define Part_MajorVersion 0
#define Part_MinorVersion 0
/* C++ som defs */
#include <somcls.xh>
/* Include C++ parent defs */
#ifndef SOM_SOMObject_xh
#include <somobj.xh>
#endif
#ifndef Part_API
#define Part_API
/*
* -- The Class API
*/
/*
* Start of user-defined types:
*/
class SOMClass;
#define Part_stackSize 100 /* 100 */
#define Part_setSize 4 /* 4 */
#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_stackSize
#ifdef stackSize
#undef stackSize
#define SOMTGD_stackSize 1
#else
#define stackSize Part_stackSize
#endif /* stackSize */
#endif /* SOMTGD_stackSize */
#ifndef SOMTGD_setSize
#ifdef setSize
#undef setSize
#define SOMTGD_setSize 1
#else
#define setSize Part_setSize
#endif /* setSize */
#endif /* SOMTGD_setSize */
#endif /* SOM_DONT_USE_SHORT_NAMES */
/*
* End of user-defined types.
*/
/* A procedure to create the Part Class */
SOMEXTERN SOMClass * SOMLINK PartNewClass(
integer4 majorVersion,
integer4 minorVersion);
/* The API to the Part class object, and the methods it introduces. */
SOMEXTERN struct PartClassDataStructure {
SOMClass *classObject;
somMToken Search;
somMToken Add;
somMToken Update;
somMToken Size;
somMToken Debug;
} PartClassData;
#define _Part PartClassData.classObject
/* The API to parentMtabs for Part, and the instance data it introduces. */
SOMEXTERN struct PartCClassDataStructure {
somMethodTabs parentMtab;
somDToken instanceDataToken;
} PartCClassData;
/*
* -- Typedefs for Procedures that support Methods introduced by Part
*/
SOMEXTERN {
typedef boolean (* SOMLINK somTD_Part_Search)(Part *somSelf, Environment *ev,
long lSet,
long lAction,
long* ID,
long* Count);
typedef boolean (* SOMLINK somTD_Part_Add)(Part *somSelf, Environment *ev,
long lSet,
long LAction,
long* ID,
long* Count);
typedef boolean (* SOMLINK somTD_Part_Update)(Part *somSelf, Environment *ev,
long lSet,
long LAction,
long* ID,
long* Count);
typedef boolean (* SOMLINK somTD_Part_Debug)(Part *somSelf, Environment *ev,
boolean NewState);
typedef long (* SOMLINK somTD_Part_Size)(Part *somSelf, Environment *ev);
}
#endif /* Part_API */
/*
* -- Method Tokens are Thunks
*/
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
/*
* -- The C++ Wrapper Class for Part
*/
class Part : public SOMObject
{
public:
void *operator new(size_t size)
{
SOM_IgnoreWarning(size);
if (!PartClassData.classObject)
PartNewClass(Part_MajorVersion,Part_MinorVersion);
return (void *)
((somTD_SOMClass_somNew)
somresolve_((SOMObject *)((void*)(PartClassData.classObject)),
SOMClassClassData.somNew))
((SOMClass *)((void*)(PartClassData.classObject)));
}
void operator delete(void * obj)
{
((SOMObject *)obj)->somFree();
}
/* public method: Search */
boolean Search(Environment *ev,
long lSet,
long lAction,
long* ID,
long* Count)
{
return SOM_Resolve(this,Part,Search)
(this,ev,lSet,lAction,ID,Count);
}
/* public method: Add */
boolean Add(Environment *ev,
long lSet,
long LAction,
long* ID,
long* Count)
{
return SOM_Resolve(this,Part,Add)
(this,ev,lSet,LAction,ID,Count);
}
/* public method: Update */
boolean Update(Environment *ev,
long lSet,
long LAction,
long* ID,
long* Count)
{
return SOM_Resolve(this,Part,Update)
(this,ev,lSet,LAction,ID,Count);
}
/* public method: Debug */
boolean Debug(Environment *ev,
boolean NewState)
{
return SOM_Resolve(this,Part,Debug)
(this,ev,NewState);
}
/* public method: Size */
long Size(Environment *ev)
{
return SOM_Resolve(this,Part,Size)
(this,ev);
}
}; /* Part */
#endif /* SOM_Part_xh */