Initial revision
This commit is contained in:
55
obdes.h
Normal file
55
obdes.h
Normal file
@ -0,0 +1,55 @@
|
||||
|
||||
#line 339 "interface.w"
|
||||
|
||||
|
||||
#line 29 "interface.w"
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
In SICS there is the to find out what an
|
||||
object is capable of at runtime. If this has been done a general
|
||||
way to access those capabilities is needed. In order to do all
|
||||
this each SICS-object is required to carry an object descriptor
|
||||
struct as first parameter in its class/object struct. Additionslly
|
||||
it is required to initialize this struct to something sensible.
|
||||
|
||||
This file defines this struct. Additionally a few functions of
|
||||
general use are prototyped.
|
||||
|
||||
Mark Koennecke, June, 1997
|
||||
|
||||
copyrigth: see implementation file
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef SICSDESCRIPTOR
|
||||
#define SICSDESCRIPTOR
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
int (*SaveStatus)(void *self, char *name,FILE *fd);
|
||||
void *(*GetInterface)(void *self, int iInterfaceID);
|
||||
} ObjectDescriptor, *pObjectDescriptor;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
pObjectDescriptor CreateDescriptor(char *name);
|
||||
void DeleteDescriptor(pObjectDescriptor self);
|
||||
|
||||
/*============================================================================
|
||||
Objects which do not carry data need a dummy descriptor. Otherwise
|
||||
drive or scan will protection fault when trying to drive something
|
||||
which should not be driven. This is defined below.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
pObjectDescriptor pDescriptor;
|
||||
}Dummy, *pDummy;
|
||||
|
||||
|
||||
pDummy CreateDummy(char *name);
|
||||
void KillDummy(void *pData);
|
||||
|
||||
int iHasType(void *pData, char *Type);
|
||||
|
||||
#endif
|
||||
|
||||
#line 340 "interface.w"
|
||||
|
Reference in New Issue
Block a user