Source

cy-cxxfwk / lib / lib.h

Full commit
// -*- c++ -*-
#ifndef FWK_LIB_H
#define FWK_LIB_H 1

struct _object;
typedef _object PyObject;

class IAlg 
{
 public:
  IAlg();
  virtual ~IAlg();

  virtual void run();
  virtual void run_impl() =0;

};

IAlg *create_alg(int algid);

typedef void (*RunFct)(void *instance);

struct IAlgWrapper
{
  void *obj;
  RunFct    run;
};

class CyAlgBase : public IAlg
{
public:
  PyObject *obj;
  RunFct fct;

  CyAlgBase(PyObject *obj, RunFct fct);
  virtual ~CyAlgBase();
  virtual void run_impl();
};

#endif // !FWK_LIB_H