/* This file was autogenerated by cloop - Cross Language Object Oriented Programming */

#ifndef CALC_C_API_H
#define CALC_C_API_H

#include <stdint.h>

#ifndef CLOOP_EXTERN_C
#ifdef __cplusplus
#define CLOOP_EXTERN_C extern "C"
#else
#define CLOOP_EXTERN_C
#endif
#endif


struct CALC_IDisposable;
struct CALC_IStatus;
struct CALC_IFactory;
struct CALC_ICalculator;
struct CALC_ICalculator2;


#define CALC_IDisposable_VERSION 1

struct CALC_IDisposable;

struct CALC_IDisposableVTable
{
	void* cloopDummy[1];
	uintptr_t version;
	void (*dispose)(struct CALC_IDisposable* self);
};

struct CALC_IDisposable
{
	void* cloopDummy[1];
	struct CALC_IDisposableVTable* vtable;
};

CLOOP_EXTERN_C void CALC_IDisposable_dispose(struct CALC_IDisposable* self);

#define CALC_IStatus_VERSION 2

#define CALC_IStatus_ERROR_1 ((int) (1))
#define CALC_IStatus_ERROR_2 ((int) (0x2))
#define CALC_IStatus_ERROR_12 ((int) (CALC_IStatus_ERROR_1 | CALC_IStatus_ERROR_2))

struct CALC_IStatus;

struct CALC_IStatusVTable
{
	void* cloopDummy[1];
	uintptr_t version;
	void (*dispose)(struct CALC_IStatus* self);
	int (*getCode)(const struct CALC_IStatus* self);
	void (*setCode)(struct CALC_IStatus* self, int code);
};

struct CALC_IStatus
{
	void* cloopDummy[1];
	struct CALC_IStatusVTable* vtable;
};

CLOOP_EXTERN_C void CALC_IStatus_dispose(struct CALC_IStatus* self);
CLOOP_EXTERN_C int CALC_IStatus_getCode(const struct CALC_IStatus* self);
CLOOP_EXTERN_C void CALC_IStatus_setCode(struct CALC_IStatus* self, int code);

#define CALC_IFactory_VERSION 2

struct CALC_IFactory;

struct CALC_IFactoryVTable
{
	void* cloopDummy[1];
	uintptr_t version;
	void (*dispose)(struct CALC_IFactory* self);
	struct CALC_IStatus* (*createStatus)(struct CALC_IFactory* self);
	struct CALC_ICalculator* (*createCalculator)(struct CALC_IFactory* self, struct CALC_IStatus* status);
	struct CALC_ICalculator2* (*createCalculator2)(struct CALC_IFactory* self, struct CALC_IStatus* status);
	struct CALC_ICalculator* (*createBrokenCalculator)(struct CALC_IFactory* self, struct CALC_IStatus* status);
};

struct CALC_IFactory
{
	void* cloopDummy[1];
	struct CALC_IFactoryVTable* vtable;
};

CLOOP_EXTERN_C void CALC_IFactory_dispose(struct CALC_IFactory* self);
CLOOP_EXTERN_C struct CALC_IStatus* CALC_IFactory_createStatus(struct CALC_IFactory* self);
CLOOP_EXTERN_C struct CALC_ICalculator* CALC_IFactory_createCalculator(struct CALC_IFactory* self, struct CALC_IStatus* status);
CLOOP_EXTERN_C struct CALC_ICalculator2* CALC_IFactory_createCalculator2(struct CALC_IFactory* self, struct CALC_IStatus* status);
CLOOP_EXTERN_C struct CALC_ICalculator* CALC_IFactory_createBrokenCalculator(struct CALC_IFactory* self, struct CALC_IStatus* status);

#define CALC_ICalculator_VERSION 4

struct CALC_ICalculator;

struct CALC_ICalculatorVTable
{
	void* cloopDummy[1];
	uintptr_t version;
	void (*dispose)(struct CALC_ICalculator* self);
	int (*sum)(const struct CALC_ICalculator* self, struct CALC_IStatus* status, int n1, int n2);
	int (*getMemory)(const struct CALC_ICalculator* self);
	void (*setMemory)(struct CALC_ICalculator* self, int n);
	void (*sumAndStore)(struct CALC_ICalculator* self, struct CALC_IStatus* status, int n1, int n2);
};

struct CALC_ICalculator
{
	void* cloopDummy[1];
	struct CALC_ICalculatorVTable* vtable;
};

CLOOP_EXTERN_C void CALC_ICalculator_dispose(struct CALC_ICalculator* self);
CLOOP_EXTERN_C int CALC_ICalculator_sum(const struct CALC_ICalculator* self, struct CALC_IStatus* status, int n1, int n2);
CLOOP_EXTERN_C int CALC_ICalculator_getMemory(const struct CALC_ICalculator* self);
CLOOP_EXTERN_C void CALC_ICalculator_setMemory(struct CALC_ICalculator* self, int n);
CLOOP_EXTERN_C void CALC_ICalculator_sumAndStore(struct CALC_ICalculator* self, struct CALC_IStatus* status, int n1, int n2);

#define CALC_ICalculator2_VERSION 6

struct CALC_ICalculator2;

struct CALC_ICalculator2VTable
{
	void* cloopDummy[1];
	uintptr_t version;
	void (*dispose)(struct CALC_ICalculator2* self);
	int (*sum)(const struct CALC_ICalculator2* self, struct CALC_IStatus* status, int n1, int n2);
	int (*getMemory)(const struct CALC_ICalculator2* self);
	void (*setMemory)(struct CALC_ICalculator2* self, int n);
	void (*sumAndStore)(struct CALC_ICalculator2* self, struct CALC_IStatus* status, int n1, int n2);
	int (*multiply)(const struct CALC_ICalculator2* self, struct CALC_IStatus* status, int n1, int n2);
	void (*copyMemory)(struct CALC_ICalculator2* self, const struct CALC_ICalculator* calculator);
	void (*copyMemory2)(struct CALC_ICalculator2* self, const int* address);
};

struct CALC_ICalculator2
{
	void* cloopDummy[1];
	struct CALC_ICalculator2VTable* vtable;
};

CLOOP_EXTERN_C void CALC_ICalculator2_dispose(struct CALC_ICalculator2* self);
CLOOP_EXTERN_C int CALC_ICalculator2_sum(const struct CALC_ICalculator2* self, struct CALC_IStatus* status, int n1, int n2);
CLOOP_EXTERN_C int CALC_ICalculator2_getMemory(const struct CALC_ICalculator2* self);
CLOOP_EXTERN_C void CALC_ICalculator2_setMemory(struct CALC_ICalculator2* self, int n);
CLOOP_EXTERN_C void CALC_ICalculator2_sumAndStore(struct CALC_ICalculator2* self, struct CALC_IStatus* status, int n1, int n2);
CLOOP_EXTERN_C int CALC_ICalculator2_multiply(const struct CALC_ICalculator2* self, struct CALC_IStatus* status, int n1, int n2);
CLOOP_EXTERN_C void CALC_ICalculator2_copyMemory(struct CALC_ICalculator2* self, const struct CALC_ICalculator* calculator);
CLOOP_EXTERN_C void CALC_ICalculator2_copyMemory2(struct CALC_ICalculator2* self, const int* address);


#endif	// CALC_C_API_H
