/*#io
docCopyright("Steve Dekorte", 2002)
docLicense("BSD revised")
*/

#ifndef OBJECT_STRUCT_DEFINED 
#define OBJECT_STRUCT_DEFINED 1

#include "Common.h"
#include "PHash.h"
#include "BStream.h"
#include "IoTag.h"
#include "IoMark.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct IoObject IoObject;

struct IoObject
{
	void *data; 
	void *extraData; // here to add an extra bytes so data can hold a double 
	IoTag *tag; 
	void *state;
	PHash *slots;
	IoObject **protos; 
	PID_TYPE persistentId; 
	IoMark mark; 
};

typedef IoObject *(IoMethodFunc)(IoObject *, IoObject *, IoObject *);

typedef struct  
{
    char *name;
    IoMethodFunc *func;
} IoMethodTable;

typedef struct
{
    char *name;
    char *newName;
} IoDeprecatedMethodTable;

typedef struct  
{
    char *name;
    IoMethodFunc *func;
    char *doc;
} IoMethodDocTable;

#ifdef __cplusplus
}
#endif
#endif
