[gephex-devel] gephex--main--0.5--patch-12

gephex at sonnenland.kexbox.org gephex at sonnenland.kexbox.org
Mon Feb 7 21:10:11 CET 2005


Archive: gephex at gephex.org--2004
New revision: gephex--main--0.5--patch-12

--
Revision: gephex--main--0.5--patch-12
Archive: gephex at gephex.org--2004
Creator: The Gephex Source Archive <gephex at gephex.org>
Date: Mon Feb  7 21:07:32 CET 2005
Standard-date: 2005-02-07 20:07:32 GMT
New-files: gphxsdk/.arch-ids/=id
    gphxsdk/.arch-ids/Makefile.am.id gphxsdk/Makefile.am
    gphxsdk/include/.arch-ids/=id
    gphxsdk/include/.arch-ids/Makefile.am.id
    gphxsdk/include/.arch-ids/link.h.id
    gphxsdk/include/.arch-ids/logger.h.id
    gphxsdk/include/.arch-ids/unit.h.id
    gphxsdk/include/Makefile.am gphxsdk/include/link.h
    gphxsdk/include/logger.h gphxsdk/include/unit.h
    gphxsdk/src/.arch-ids/=id
    gphxsdk/src/.arch-ids/Makefile.am.id
    gphxsdk/src/.arch-ids/link.cpp.id
    gphxsdk/src/.arch-ids/logger.cpp.id
    gphxsdk/src/.arch-ids/unit.cpp.id
    gphxsdk/src/Makefile.am gphxsdk/src/link.cpp
    gphxsdk/src/logger.cpp gphxsdk/src/unit.cpp
    plugins/src/core/.arch-ids/=id
    plugins/src/core/.arch-ids/Makefile.am.id
    plugins/src/core/.arch-ids/core.cpp.id
    plugins/src/core/.arch-ids/kalkulon.cpp.id
    plugins/src/core/.arch-ids/kalkulon.h.id
    plugins/src/core/.arch-ids/number.cpp.id
    plugins/src/core/.arch-ids/number.h.id
    plugins/src/core/Makefile.am plugins/src/core/core.cpp
    plugins/src/core/kalkulon.cpp
    plugins/src/core/kalkulon.h plugins/src/core/number.cpp
    plugins/src/core/number.h
New-directories: gphxsdk gphxsdk/.arch-ids gphxsdk/include
    gphxsdk/include/.arch-ids gphxsdk/src
    gphxsdk/src/.arch-ids plugins/src/core
Removed-files: gidlc/.arch-ids/=id
    gidlc/.arch-ids/Makefile.am.id gidlc/Makefile.am
    gidlc/src/.arch-ids/=id
    gidlc/src/.arch-ids/Makefile.am.id
    gidlc/src/.arch-ids/cppautovisitors.cpp.id
    gidlc/src/.arch-ids/cppautovisitors.h.id
    gidlc/src/.arch-ids/cvisitors.cpp.id
    gidlc/src/.arch-ids/cvisitors.h.id
    gidlc/src/.arch-ids/declarationnode.cpp.id
    gidlc/src/.arch-ids/declarationnode.h.id
    gidlc/src/.arch-ids/declarationtypes.h.id
    gidlc/src/.arch-ids/gidl_parser.h.id
    gidlc/src/.arch-ids/gidl_parser.tab.cpp.id
    gidlc/src/.arch-ids/gidl_parser.tab.hpp.id
    gidlc/src/.arch-ids/gidl_parser.ypp.id
    gidlc/src/.arch-ids/gidl_scanner.cpp.id
    gidlc/src/.arch-ids/gidl_scanner.flex.id
    gidlc/src/.arch-ids/main.cpp.id
    gidlc/src/.arch-ids/treevisitor.cpp.id
    gidlc/src/.arch-ids/treevisitor.h.id
    gidlc/src/.arch-ids/visitor_helpers.h.id
    gidlc/src/Makefile.am gidlc/src/cppautovisitors.cpp
    gidlc/src/cppautovisitors.h gidlc/src/cvisitors.cpp
    gidlc/src/cvisitors.h gidlc/src/declarationnode.cpp
    gidlc/src/declarationnode.h
    gidlc/src/declarationtypes.h gidlc/src/gidl_parser.h
    gidlc/src/gidl_parser.tab.cpp
    gidlc/src/gidl_parser.tab.hpp gidlc/src/gidl_parser.ypp
    gidlc/src/gidl_scanner.cpp gidlc/src/gidl_scanner.flex
    gidlc/src/main.cpp gidlc/src/treevisitor.cpp
    gidlc/src/treevisitor.h gidlc/src/visitor_helpers.h
    gphxcore/interfaces/.arch-ids/=id
    gphxcore/interfaces/.arch-ids/link.if.id
    gphxcore/interfaces/.arch-ids/linkfactory.if.id
    gphxcore/interfaces/.arch-ids/logger.if.id
    gphxcore/interfaces/.arch-ids/unit.if.id
    gphxcore/interfaces/.arch-ids/unitfactory.if.id
    gphxcore/interfaces/link.if
    gphxcore/interfaces/linkfactory.if
    gphxcore/interfaces/logger.if
    gphxcore/interfaces/unit.if
    gphxcore/interfaces/unitfactory.if
    plugins/ifaces/.arch-ids/=id
    plugins/src/core/.arch-ids/=id
    plugins/src/core/.arch-ids/Makefile.am.id
    plugins/src/core/.arch-ids/bgraimage.lsp.id
    plugins/src/core/.arch-ids/bgraimage_1.c.id
    plugins/src/core/.arch-ids/bgraimage_1.h.id
    plugins/src/core/.arch-ids/color.lsp.id
    plugins/src/core/.arch-ids/color_1.c.id
    plugins/src/core/.arch-ids/color_1.h.id
    plugins/src/core/.arch-ids/core.psp.id
    plugins/src/core/.arch-ids/kalkulon.usp.id
    plugins/src/core/.arch-ids/kalkulon_1.cpp.id
    plugins/src/core/.arch-ids/kalkulon_1.h.id
    plugins/src/core/.arch-ids/number.lsp.id
    plugins/src/core/.arch-ids/number_1.cpp.id
    plugins/src/core/.arch-ids/number_1.h.id
    plugins/src/core/.arch-ids/random.usp.id
    plugins/src/core/.arch-ids/random_1.c.id
    plugins/src/core/.arch-ids/random_1.h.id
    plugins/src/core/.arch-ids/string.lsp.id
    plugins/src/core/.arch-ids/string_1.c.id
    plugins/src/core/.arch-ids/string_1.h.id
    plugins/src/core/Makefile.am
    plugins/src/core/bgraimage.lsp
    plugins/src/core/bgraimage_1.c
    plugins/src/core/bgraimage_1.h
    plugins/src/core/color.lsp plugins/src/core/color_1.c
    plugins/src/core/color_1.h plugins/src/core/core.psp
    plugins/src/core/kalkulon.usp
    plugins/src/core/kalkulon_1.cpp
    plugins/src/core/kalkulon_1.h
    plugins/src/core/number.lsp
    plugins/src/core/number_1.cpp
    plugins/src/core/number_1.h plugins/src/core/random.usp
    plugins/src/core/random_1.c plugins/src/core/random_1.h
    plugins/src/core/string.lsp plugins/src/core/string_1.c
    plugins/src/core/string_1.h
Removed-directories: gidlc gidlc/.arch-ids gidlc/src
    gidlc/src/.arch-ids gphxcore/interfaces
    gphxcore/interfaces/.arch-ids plugins/ifaces
    plugins/ifaces/.arch-ids plugins/src/core
Renamed-files: gphxcore/include/.arch-ids/coreexceptions.h.id gphxcore/src/.arch-ids/coreexceptions.h.id
    gphxcore/include/coreexceptions.h gphxcore/src/coreexceptions.h
    gphxcore/src/.arch-ids/logger.cpp.id gphxcore/src/.arch-ids/streamlogger.cpp.id
    gphxcore/src/.arch-ids/logger.h.id gphxcore/src/.arch-ids/streamlogger.h.id
    gphxcore/src/logger.cpp gphxcore/src/streamlogger.cpp
    gphxcore/src/logger.h gphxcore/src/streamlogger.h
Renamed-directories: plugins/src/core/.arch-ids plugins/src/core/.arch-ids
Modified-files: Makefile.am configure.ac
    gphxcore/include/Makefile.am
    gphxcore/include/connectionhandle.h
    gphxcore/include/core.h
    gphxcore/include/linkfactoryhandle.h
    gphxcore/include/linkhandle.h
    gphxcore/include/pluginhandle.h
    gphxcore/include/portio.h
    gphxcore/include/unitfactoryhandle.h
    gphxcore/include/unithandle.h gphxcore/src/Makefile.am
    gphxcore/src/connectionhandleimpl.cpp
    gphxcore/src/connectionhandleimpl.h
    gphxcore/src/core.cpp
    gphxcore/src/linkfactoryhandleimpl.cpp
    gphxcore/src/linkfactoryhandleimpl.h
    gphxcore/src/linkhandleimpl.cpp
    gphxcore/src/linkhandleimpl.h gphxcore/src/plugin.cpp
    gphxcore/src/plugin.h gphxcore/src/pluginhandleimpl.cpp
    gphxcore/src/pluginhandleimpl.h
    gphxcore/src/renderer.cpp gphxcore/src/renderer.h
    gphxcore/src/streamlogger.cpp
    gphxcore/src/streamlogger.h
    gphxcore/src/unitfactoryhandleimpl.cpp
    gphxcore/src/unitfactoryhandleimpl.h
    gphxcore/src/unithandleimpl.cpp
    gphxcore/src/unithandleimpl.h
    konsolenphex/scripts/plus.phex
    konsolenphex/src/Makefile.am konsolenphex/src/main.cpp
    pluc/src/main.cpp pluc/src/pluc_parser.tab.cpp
    pluc/src/pluc_parser.ypp pluc/src/spec.cpp
    pluc/src/spec.h plugins/src/Makefile.am
New-patches: georg at gephex.org--2004-home/gephex--georg--0.5--patch-28
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--base-0
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-1
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-2
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-3
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-4
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-5
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-6
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-7
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-8
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-9
    georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-10
    gephex at gephex.org--2004/gephex--main--0.5--patch-12
Summary: [MERGE-REQUEST] first step towards stateless units
Keywords: 

Patches applied:

 * georg at gephex.org--2004-home/gephex--georg--0.5--patch-28
   Merged in the refactor-stateless branch

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--base-0
   tag of georg at gephex.org--2004-home/gephex--georg--0.5--patch-27

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-1
   First step in refactoring towards stateless units

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-2
   Fixed some serialization bugs

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-3
   Implemented new update

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-4
   Added core Makefile.am

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-5
   Added more missing files

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-6
   Removed gidlc and old core plugin

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-7
   First step in transforming core to a c-like interface

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-8
   adapted konsolenphex to c-like core iface, removed gidlc from configure.ac

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-9
   Started to adapt pluc to new stateless c++ plugin api

 * georg at gephex.org--2004-home/gephex--georg-refactor-stateless--0.5--patch-10
   Pluc compiles

* removed directories

    gidlc
    gidlc/.arch-ids
    gidlc/src
    gidlc/src/.arch-ids
    gphxcore/interfaces
    gphxcore/interfaces/.arch-ids
    plugins/ifaces
    plugins/ifaces/.arch-ids
    plugins/src/core

* added directories

    gphxsdk
    gphxsdk/.arch-ids
    gphxsdk/include
    gphxsdk/include/.arch-ids
    gphxsdk/src
    gphxsdk/src/.arch-ids
    plugins/src/core
    {arch}/gephex/gephex--georg-refactor-stateless
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log

* removed files

    gidlc/.arch-ids/=id
    gidlc/.arch-ids/Makefile.am.id
    gidlc/Makefile.am
    gidlc/src/.arch-ids/=id
    gidlc/src/.arch-ids/Makefile.am.id
    gidlc/src/.arch-ids/cppautovisitors.cpp.id
    gidlc/src/.arch-ids/cppautovisitors.h.id
    gidlc/src/.arch-ids/cvisitors.cpp.id
    gidlc/src/.arch-ids/cvisitors.h.id
    gidlc/src/.arch-ids/declarationnode.cpp.id
    gidlc/src/.arch-ids/declarationnode.h.id
    gidlc/src/.arch-ids/declarationtypes.h.id
    gidlc/src/.arch-ids/gidl_parser.h.id
    gidlc/src/.arch-ids/gidl_parser.tab.cpp.id
    gidlc/src/.arch-ids/gidl_parser.tab.hpp.id
    gidlc/src/.arch-ids/gidl_parser.ypp.id
    gidlc/src/.arch-ids/gidl_scanner.cpp.id
    gidlc/src/.arch-ids/gidl_scanner.flex.id
    gidlc/src/.arch-ids/main.cpp.id
    gidlc/src/.arch-ids/treevisitor.cpp.id
    gidlc/src/.arch-ids/treevisitor.h.id
    gidlc/src/.arch-ids/visitor_helpers.h.id
    gidlc/src/Makefile.am
    gidlc/src/cppautovisitors.cpp
    gidlc/src/cppautovisitors.h
    gidlc/src/cvisitors.cpp
    gidlc/src/cvisitors.h
    gidlc/src/declarationnode.cpp
    gidlc/src/declarationnode.h
    gidlc/src/declarationtypes.h
    gidlc/src/gidl_parser.h
    gidlc/src/gidl_parser.tab.cpp
    gidlc/src/gidl_parser.tab.hpp
    gidlc/src/gidl_parser.ypp
    gidlc/src/gidl_scanner.cpp
    gidlc/src/gidl_scanner.flex
    gidlc/src/main.cpp
    gidlc/src/treevisitor.cpp
    gidlc/src/treevisitor.h
    gidlc/src/visitor_helpers.h
    gphxcore/interfaces/.arch-ids/=id
    gphxcore/interfaces/.arch-ids/link.if.id
    gphxcore/interfaces/.arch-ids/linkfactory.if.id
    gphxcore/interfaces/.arch-ids/logger.if.id
    gphxcore/interfaces/.arch-ids/unit.if.id
    gphxcore/interfaces/.arch-ids/unitfactory.if.id
    gphxcore/interfaces/link.if
    gphxcore/interfaces/linkfactory.if
    gphxcore/interfaces/logger.if
    gphxcore/interfaces/unit.if
    gphxcore/interfaces/unitfactory.if
    plugins/ifaces/.arch-ids/=id
    plugins/src/core/.arch-ids/=id
    plugins/src/core/.arch-ids/Makefile.am.id
    plugins/src/core/.arch-ids/bgraimage.lsp.id
    plugins/src/core/.arch-ids/bgraimage_1.c.id
    plugins/src/core/.arch-ids/bgraimage_1.h.id
    plugins/src/core/.arch-ids/color.lsp.id
    plugins/src/core/.arch-ids/color_1.c.id
    plugins/src/core/.arch-ids/color_1.h.id
    plugins/src/core/.arch-ids/core.psp.id
    plugins/src/core/.arch-ids/kalkulon.usp.id
    plugins/src/core/.arch-ids/kalkulon_1.cpp.id
    plugins/src/core/.arch-ids/kalkulon_1.h.id
    plugins/src/core/.arch-ids/number.lsp.id
    plugins/src/core/.arch-ids/number_1.cpp.id
    plugins/src/core/.arch-ids/number_1.h.id
    plugins/src/core/.arch-ids/random.usp.id
    plugins/src/core/.arch-ids/random_1.c.id
    plugins/src/core/.arch-ids/random_1.h.id
    plugins/src/core/.arch-ids/string.lsp.id
    plugins/src/core/.arch-ids/string_1.c.id
    plugins/src/core/.arch-ids/string_1.h.id
    plugins/src/core/Makefile.am
    plugins/src/core/bgraimage.lsp
    plugins/src/core/bgraimage_1.c
    plugins/src/core/bgraimage_1.h
    plugins/src/core/color.lsp
    plugins/src/core/color_1.c
    plugins/src/core/color_1.h
    plugins/src/core/core.psp
    plugins/src/core/kalkulon.usp
    plugins/src/core/kalkulon_1.cpp
    plugins/src/core/kalkulon_1.h
    plugins/src/core/number.lsp
    plugins/src/core/number_1.cpp
    plugins/src/core/number_1.h
    plugins/src/core/random.usp
    plugins/src/core/random_1.c
    plugins/src/core/random_1.h
    plugins/src/core/string.lsp
    plugins/src/core/string_1.c
    plugins/src/core/string_1.h

* added files

    gphxsdk/.arch-ids/=id
    gphxsdk/.arch-ids/Makefile.am.id
    gphxsdk/Makefile.am
    gphxsdk/include/.arch-ids/=id
    gphxsdk/include/.arch-ids/Makefile.am.id
    gphxsdk/include/.arch-ids/link.h.id
    gphxsdk/include/.arch-ids/logger.h.id
    gphxsdk/include/.arch-ids/unit.h.id
    gphxsdk/include/Makefile.am
    gphxsdk/include/link.h
    gphxsdk/include/logger.h
    gphxsdk/include/unit.h
    gphxsdk/src/.arch-ids/=id
    gphxsdk/src/.arch-ids/Makefile.am.id
    gphxsdk/src/.arch-ids/link.cpp.id
    gphxsdk/src/.arch-ids/logger.cpp.id
    gphxsdk/src/.arch-ids/unit.cpp.id
    gphxsdk/src/Makefile.am
    gphxsdk/src/link.cpp
    gphxsdk/src/logger.cpp
    gphxsdk/src/unit.cpp
    plugins/src/core/.arch-ids/=id
    plugins/src/core/.arch-ids/Makefile.am.id
    plugins/src/core/.arch-ids/core.cpp.id
    plugins/src/core/.arch-ids/kalkulon.cpp.id
    plugins/src/core/.arch-ids/kalkulon.h.id
    plugins/src/core/.arch-ids/number.cpp.id
    plugins/src/core/.arch-ids/number.h.id
    plugins/src/core/Makefile.am
    plugins/src/core/core.cpp
    plugins/src/core/kalkulon.cpp
    plugins/src/core/kalkulon.h
    plugins/src/core/number.cpp
    plugins/src/core/number.h
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/base-0
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-1
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-10
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-2
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-3
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-4
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-5
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-6
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-7
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-8
    {arch}/gephex/gephex--georg-refactor-stateless/gephex--georg-refactor-stateless--0.5/georg at gephex.org--2004-home/patch-log/patch-9
    {arch}/gephex/gephex--georg/gephex--georg--0.5/georg at gephex.org--2004-home/patch-log/patch-28
    {arch}/gephex/gephex--main/gephex--main--0.5/gephex at gephex.org--2004/patch-log/patch-12

* renamed files and symlinks

    gphxcore/include/.arch-ids/coreexceptions.h.id
     => gphxcore/src/.arch-ids/coreexceptions.h.id

    gphxcore/include/coreexceptions.h
     => gphxcore/src/coreexceptions.h

    gphxcore/src/.arch-ids/logger.cpp.id
     => gphxcore/src/.arch-ids/streamlogger.cpp.id

    gphxcore/src/.arch-ids/logger.h.id
     => gphxcore/src/.arch-ids/streamlogger.h.id

    gphxcore/src/logger.cpp
     => gphxcore/src/streamlogger.cpp

    gphxcore/src/logger.h
     => gphxcore/src/streamlogger.h

* renamed directories

    plugins/src/core/.arch-ids
     => plugins/src/core/.arch-ids

* modified files

--- orig/Makefile.am
+++ mod/Makefile.am
@@ -1,2 +1,2 @@
-SUBDIRS = tester gidlc pluc gphxutils gphxcore konsolenphex misc plugins
+SUBDIRS = gphxutils gphxsdk gphxcore konsolenphex misc plugins
 EXTRA_DIST = NEWS README COPYING


--- orig/configure.ac
+++ mod/configure.ac
@@ -112,14 +112,15 @@
 AC_CONFIG_FILES([Makefile
 tester/Makefile
 tester/src/Makefile
-gidlc/Makefile
-gidlc/src/Makefile
 pluc/Makefile
 pluc/src/Makefile
 gphxutils/Makefile
 gphxutils/include/Makefile
 gphxutils/src/Makefile
 gphxutils/src/tests/Makefile
+gphxsdk/Makefile
+gphxsdk/include/Makefile
+gphxsdk/src/Makefile
 gphxcore/Makefile
 gphxcore/include/Makefile
 gphxcore/src/Makefile


--- orig/gphxcore/include/Makefile.am
+++ mod/gphxcore/include/Makefile.am
@@ -1,7 +1,6 @@
 noinst_HEADERS= \
 	connectionhandle.h \
 	core.h \
-	coreexceptions.h \
 	linkhandle.h \
 	linkfactoryhandle.h \
 	pluginhandle.h \


--- orig/gphxcore/include/connectionhandle.h
+++ mod/gphxcore/include/connectionhandle.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -27,17 +27,6 @@
 
 namespace core
 {
-  class ConnectionHandle
-  {
-  public:
-    virtual ~ConnectionHandle();
-
-  protected:
-    ConnectionHandle();
-
-  private:
-    ConnectionHandle(const ConnectionHandle&);
-    virtual ConnectionHandle& operator=(const ConnectionHandle&);
-  };
+  struct ConnectionHandle;
 }
 #endif


--- orig/gphxcore/include/core.h
+++ mod/gphxcore/include/core.h
@@ -1,34 +1,31 @@
 /* This source file is a part of the GePhex Project.
 
- Copyright (C) 2001-2003 
+Copyright (C) 2001-2003 
 
- Georg Seidel <georg at gephex.org> 
- Martin Bayer <martin at gephex.org> 
- Phillip Promesberger <coma at gephex.org>
+Georg Seidel <georg at gephex.org> 
+Martin Bayer <martin at gephex.org> 
+Phillip Promesberger <coma at gephex.org>
  
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
  
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
  
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/
 
 #ifndef INCLUDED_CORE_H
 #define INCLUDED_CORE_H
 
 #include <string>
-#include <memory>
 #include <list>
 
-#include "coreexceptions.h"
-
 namespace utils
 {
   class ILibrary;
@@ -40,258 +37,256 @@
 namespace core
 {
 
-  class PluginHandle;
-  class UnitFactoryID;
-  class LinkFactoryID;
-  class UnitFactoryHandle;
-  class LinkFactoryHandle;
-  class UnitHandle;
-  class PortHandle;
-  class LinkHandle;
-  class LinkHandleImpl;
-  class ConnectionHandle;
-
-  class Renderer;
-
-  /**
-   * Hui pfui
-   *
-   * Note on error handling:
-   * All functions return errors with exceptions.
-   * All exceptions are derived from std::exception.
-   * All exceptions that can be thrown by a function
-   * are documented.
-   *
-   * Warnings can be retrieved with the getWarnings function.
-   */
-  class Core
-  {
-
-  public:
-    /**
-     * List of warning strings
-     */
-    typedef std::list<std::string> WarningList;
+  struct PluginHandle;
+  struct UnitFactoryID;
+  struct LinkFactoryID;
+  struct UnitFactoryHandle;
+  struct LinkFactoryHandle;
+  struct UnitHandle;
+  struct PortHandle;
+  struct LinkHandle;
+  struct LinkHandleImpl;
+  struct ConnectionHandle;
+
+  //---------------------------------------------------------------------------
+
+  enum CoreError {IN_USE_ERROR,
+                  TYPE_ERROR,
+                  GENERAL_ERROR,
+                  INVALID_ARG,
+                  TIME_ERROR};
 
+  struct Core;
     
-    /**
-     * Creates a new core object. Note that it is not safe to
-     * create more than one core.
-     *
-     */
-    Core() throw();
-    ~Core();
-
-    /**
-     * Get pending warnings. Each warning is added to the list only once 
-     * Only the warnings of the last function called are garuanteed to be
-     * added.
-     *
-     * \param warnlist List where the of recent warnings are added
-     */
-    void get_warnings(WarningList& warnlist) throw();
-
-    /**
-     * Loads a plugin. The returned handle can be queried for exported
-     * types of the plugin.
-     * The handle is valid until unload_plugin is called.
-     * 
-     * \param lib a library that exports the needed plugin functions
-     * 
eturn A PluginHandle that encapsulates the plugin
-     *
-     * 	hrows std::invalid_argument if lib is not a valid plugin
-     * 	hrows std::runtime_error if loading the plugin fails
-     */
-    PluginHandle& load_plugin(std::auto_ptr<utils::ILibrary>& lib)
-      throw(std::invalid_argument, std::runtime_error);
-
-    /**
-     * Unloads a plugin.
-     * After the call, the plugin handle is invalid.
-     *
-     * \param plugin the handle of the plugin that is to be unloaded
-     * 	hrows std::runtime_error if unloading of the plugin fails
-     * 	hrows core::in_use_error if entities (UnitFactoryIDs, LinkFactoryIDs) 
-     *                            of the plugin are still in use
-     */
-    void unload_plugin(PluginHandle& plugin)
-      throw (std::runtime_error, core::in_use_error);
-
-    /**
-     * Loads a link factory.
-     * The returned handle is valid until unimport_lf is called.
-     *
-     * \param id the identifier of the link factory (as returned from
-     *   the PluginHandle object)
-     * 
eturns the handle of the imported link factory
-     *
-     * 	hrows std::invalid_argument if the linkfactory has already been
-     *                               loaded
-     * 	hrows std::runtime_error if loading the link factory fails
-     */
-    LinkFactoryHandle& import_lf(LinkFactoryID& id)
-      throw(std::runtime_error, std::invalid_argument);
-
-    /**
-     * Loads a unit factory.
-     *
-     * \param id the identifier of the unit factory (as returned from
-     *   the PluginHandle object)
-     * 
eturns the handle of the imported unit factory
-     *
-     * 	hrows std::invalid_argument if the unit factory has already been
-     *                               loaded
-     * 	hrows std::runtime_error if loading the unit factory fails
-     */
-    UnitFactoryHandle& import_uf(UnitFactoryID& id)
-      throw(std::runtime_error, std::invalid_argument);
-
-    /**
-     * Unloads a link factory. After this call the handle is invalid.
-     *
-     * \param lt the handle of the link factory
-     * 	hrows core::in_use_error if links of that factory are still in use
-     */
-    void unimport_lf(LinkFactoryHandle& lt)
-      throw(core::in_use_error);
-
-    /**
-     * Unloads a unit factory. After this call the handle is invalid.
-     *
-     * 	hrows core::in_use_error if units of that factory are still in use
-     */
-    void unimport_uf(UnitFactoryHandle& lt)
-      throw(core::in_use_error);
-
-    /**
-     * Creates a unit.
-     * 
-     * \param factory the handle of the unit factory from which the unit
-     *             is instantiated.
-     * 
eturns a handle to the new unit
-     *
-     * 	hrows std::runtime_error if instantiation of the unit fails
-     */
-    UnitHandle& create_unit(UnitFactoryHandle& factory)
-      throw(std::runtime_error);
-
-    /**
-     * Creates a link.
-     *
-     * \param factory the handle of the link factory from which the link
-     *             is instantiated.
-     * 
eturns a handle to the new link
-     *
-     * 	hrows std::runtime_error if instantiation of the link fails
-     */
-    LinkHandle& create_link(LinkFactoryHandle& factory)
-      throw(std::runtime_error);
-
-    /**
-     * Destroys a unit.
-     *
-     * \param handle the unit handle
-     *
-     * 	hrows core::in_use_error if the unit is connected to one or more links
-     *                            or if the core is running and id is a sink
-     * 	hrows std::runtime_error if deinstantiate fails
-     */
-    void destroy_unit(UnitHandle& handle)
-      throw(core::in_use_error, std::runtime_error);
-
-    /**
-     * Destroys a link.
-     * Also removes all subscriptions on this link (see subscribe_link_value)
-     *
-     * \param handle the unit handle
-     *
-     * 	hrows core::in_use_error if the link is connected to one or more units
-     * 	hrows std::runtime_error if deinstantiate fails
-     */
-    void destroy_link(LinkHandle& id)
-      throw(core::in_use_error, std::runtime_error);
-
-    /**
-     * Updates the specified units.
-     *
-     * \param sinks The handles of the units that will be updated.
-     * \param time The time at which all units are updated.
-     *    Note that this should be the system time in ms as
-     *    some units might use it to determine what to do.
-     *
-     * 	hrows std::invalid_argument if one of the sinks does not exist,
-     *                               or if time is less then the time of the
-     *                               last call
-     * 	hrows std::runtime_error if something bad happens
-     */
-    void update(const std::list<UnitHandle*>& sinks, double time)
-      throw (std::runtime_error, std::invalid_argument);
-
-    /**
-     * Tells a unit from which link a port reads or writes it's data. 
-     * Note: all ports have to be attached to a link before update
-     * can be called.
-     *
-     * At most one link may be attached to an output port.
-     * A link may be connected to any number of input ports.
-     *
-     * \param lid the handle the link
-     * \param pid the handle of the port as returned by
-     *            UnitHandle::port_handle()
-     * 
eturns a handle for the connection between the link and the unit
-     *
-     * 	hrows std::in_use_error if this port already is connected
-     * 	hrows std::invalid_argument if this link already is connected
-     *                                 to an output
-     * 	hrow std::domain_error if the link factory of pid is not the same
-     *                              as the factory of lid
-     */
-    ConnectionHandle& attach(LinkHandle& lid,
-                             PortHandle& pid)
-      throw (std::domain_error, std::invalid_argument, core::in_use_error);
-
-    /**
-     * Removes the connection between a link and a port.
-     * After the call, the connection handle is invalid.
-     *
-     * \param connection the handle of the connection
-     */
-    void detach(ConnectionHandle& connection) throw ();
-
-
-    /** 
-     * Creates a subscription on a link.
-     * This means that the value of this link will be returned by
-     * the fetch_subscription() method.
-     *
-     * \param lid the link whose value is of interest
-     * 	hrows std::invalid_argument if here is already a
-     *                               subscription on lid
-     */
-    void subscribe_link_value(LinkHandle& lid) throw(std::invalid_argument);
-
-    /**
-     * Removes a subscription from a link.
-     *
-     * \param lid the link whose value is no longer of interest
-     * 	hrows std::invalid_argument if there is no subscription on lid
-     */
-    void unsubscribe_link_value(LinkHandle& lid) throw(std::invalid_argument);
-
-    /**
-     * Pushes the values of subscribed links onto the stream.
-     * Pushes only those values that have changed since time.
-     *
-     * \param time the time starting from which all changes are sent
-     */
-    void fetch_subscription(double time /*TODO: some kind of stream*/)
-      const throw();
-
-  private:
-    std::auto_ptr<Renderer> m_renderer;
-    typedef std::list<LinkHandleImpl*> SubscriptionList;
-    SubscriptionList m_subscriptions;
-  };
+  /**
+   * Creates a new core object. Note that it is not safe to
+   * create more than one core.
+   */
+
+  Core* core_create();
+  void core_destroy(Core* c);
+
+
+  /**
+   * List of warning strings
+   */
+  typedef std::list<std::string> WarningList;
+
+
+  /**
+   * Get pending warnings. Each warning is added to the list only once 
+   * Only the warnings of the last function called are garuanteed to be
+   * added.
+   *
+   * \param warnlist List where the of recent warnings are added
+   */
+  void core_get_warnings(Core&, WarningList& warnlist);
+
+  /**
+   * Loads a plugin. The returned handle can be queried for exported
+   * types of the plugin.
+   * The handle is valid until unload_plugin is called.
+   * 
+   * \param lib a library that exports the needed plugin functions
+   * 
eturn A PluginHandle that encapsulates the plugin or 0
+   *   on failure
+   *
+   * error is INVALID_ARG   if lib is not a valid plugin, or
+   *          GENERAL_ERROR if loading the plugin fails
+   */
+  PluginHandle* core_load_plugin(Core& c, utils::ILibrary* lib,
+                                 CoreError& error);
+
+  /**
+   * Unloads a plugin.
+   * After the call, the plugin handle is invalid.
+   *
+   * \param plugin the handle of the plugin that is to be unloaded
+   * 
eturn true on success, false on error
+   *
+   * error is GENERAL_ERROR if unloading fails, or
+   *          IN_USE_ERROR  if entities (UnitFactorys, LinkFactorys) 
+   *                        of the plugin are still in use
+   */
+  bool core_unload_plugin(Core& c, PluginHandle* plugin,
+                          CoreError& error);
+
+  /**
+   * Loads a link factory.
+   * The returned handle is valid until unimport_lf is called.
+   *
+   * \param id the identifier of the link factory (as returned from
+   *   the PluginHandle object)
+   * 
eturns the handle of the imported link factory, or 0 on failure
+   *
+   * error is IN_USE_ERROR  if the link factory has already been loaded, or
+   *          GENERAL_ERROR if loading the link factory fails
+   */
+  LinkFactoryHandle* core_import_lf(Core& c, LinkFactoryID* id,
+                                    CoreError& error);
+
+  /**
+   * Loads a unit factory.
+   *
+   * \param id the identifier of the unit factory (as returned from
+   *   the PluginHandle object)
+   * 
eturns the handle of the imported unit factory, or 0 on failure
+   *
+   * error is IN_USE_ERROR  if the unit factory has already been loaded, or
+   *          GENERAL_ERROR if loading the unit factory fails
+   */
+  UnitFactoryHandle* core_import_uf(Core& c, UnitFactoryID* id,
+                                    CoreError& error);
+
+  /**
+   * Unloads a link factory. After this call the handle is invalid.
+   *
+   * \param lt the handle of the link factory
+   * 
eturns whether unimport was successful
+   *
+   * error is IN_USE_ERROR iff links of that factory are still in use
+   */
+  bool core_unimport_lf(Core& c, LinkFactoryHandle* lt, CoreError& error);
+
+  /**
+   * Unloads a unit factory. After this call the handle is invalid.
+   *
+   * \param ut the handle of the unit factory
+   *
+   * 
eturns whether unimport was successful
+   *
+   * error is IN_USE_ERROR iff units of that factory are still in use
+   */
+  bool core_unimport_uf(Core& c, UnitFactoryHandle* lt, CoreError& error);
+
+  /**
+   * Creates a unit.
+   * 
+   * \param factory the handle of the unit factory from which the unit
+   *             is instantiated.
+   * 
eturns a handle to the new unit or 0 if instantiation of
+   *          the unit fails
+   */
+  UnitHandle* core_create_unit(Core& c, UnitFactoryHandle* factory);
+
+  /**
+   * Creates a link.
+   *
+   * \param factory the handle of the link factory from which the link
+   *             is instantiated.
+   * 
eturns a handle to the new link or 0 if instantiation of the
+   *          link fails
+   */
+  LinkHandle* core_create_link(Core& c, LinkFactoryHandle* factory);
+
+  /**
+   * Destroys a unit.
+   *
+   * \param handle the unit handle
+   *
+   * 
eturn whether destruction was successful
+   *
+   * error is IN_USE_ERROR  if the unit is connected to one or more links, or
+   *                        if the core is running and id is a sink, or
+   *          GENERAL_ERROR if deinstantiate fails
+   */
+  bool core_destroy_unit(Core& c, UnitHandle* handle, CoreError& error);
+
+  /**
+   * Destroys a link.
+   * Also removes all subscriptions on this link (see subscribe_link_value)
+   *
+   * \param handle the unit handle
+   *
+   * 
eturn whether destruction was successful
+   *
+   * error is IN_USE_ERROR  if the link is connected to one or more units, or
+   *          GENERAL_ERROR if deinstantiate fails
+   */
+  bool core_destroy_link(Core& c, LinkHandle* id, CoreError& error);
+
+  /**
+   * Updates the specified units.
+   *
+   * \param sinks The handles of the units that will be updated.
+   * \param time The time at which all units are updated.
+   *    Note that this should be the system time in ms as
+   *    some units might use it to determine what to do.
+   *
+   * 
eturns whether update was successful
+   *
+   * error is INVALID_ARG   if one of the sinks does not exist, or
+   *          TIME_ERROR    if time is less then the time of the last call, or
+   *          GENERAL_ERROR if something bad happens
+   */
+  bool core_update(Core& c,
+                   const std::list<UnitHandle*>& sinks,
+                   double time, CoreError& error);
+
+  /**
+   * Tells a unit from which link a port reads or writes it's data. 
+   * Note: all ports have to be attached to a link before update
+   * can be called.
+   *
+   * At most one link may be attached to an output port.
+   * A link may be connected to any number of input ports.
+   *
+   * \param lid the handle the link
+   * \param pid the handle of the port as returned by
+   *            UnitHandle::port_handle()
+   * 
eturns a handle for the connection between the link and the unit,
+   *          or 0 on failure
+   *
+   * error is IN_USE_ERROR if this port already is connected
+   *          INVALID_ARG  if this link already is connected to an output
+   *          TYPE_ERROR   if the link factory of pid is not the same
+   *                       as the factory of lid
+   */
+  ConnectionHandle* core_attach(Core& c, LinkHandle* lid,
+                                PortHandle* pid, CoreError& error);
+
+  /**
+   * Removes the connection between a link and a port.
+   * After the call, the connection handle is invalid.
+   *
+   * \param connection the handle of the connection
+   */
+  void core_detach(Core& c, ConnectionHandle* connection);
+
+
+#if 0
+  /** 
+   * Creates a subscription on a link.
+   * This means that the value of this link will be returned by
+   * the fetch_subscription() method.
+   *
+   * \param lid the link whose value is of interest
+   * 	hrows std::invalid_argument if here is already a
+   *                               subscription on lid
+   */
+  void subscribe_link_value(LinkHandle& lid) throw(std::invalid_argument);
+
+  /**
+   * Removes a subscription from a link.
+   *
+   * \param lid the link whose value is no longer of interest
+   * 	hrows std::invalid_argument if there is no subscription on lid
+   */
+  void unsubscribe_link_value(LinkHandle& lid) throw(std::invalid_argument);
+
+  /**
+   * Pushes the values of subscribed links onto the stream.
+   * Pushes only those values that have changed since time.
+   *
+   * \param time the time starting from which all changes are sent
+   */
+  void fetch_subscription(double time /*TODO: some kind of stream*/)
+    const throw();
+#endif
+
+  //---------------------------------------------------------------------------
+
 }
 
+
 #endif


--- orig/gphxcore/include/linkfactoryhandle.h
+++ mod/gphxcore/include/linkfactoryhandle.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -23,24 +23,8 @@
 #ifndef INCLUDED_LINK_FACTORY_HANDLE_H
 #define INCLUDED_LINK_FACTORY_HANDLE_H
 
-#include <memory>
-#include <string>
-#include <map>
-
 namespace core
 {
-
-  class LinkFactoryHandle
-    {
-    public:
-      virtual ~LinkFactoryHandle();
-
-    protected:
-      LinkFactoryHandle();
-
-    private:
-      LinkFactoryHandle(const LinkFactoryHandle&);
-      virtual LinkFactoryHandle& operator=(const LinkFactoryHandle&);
-    };
+  struct LinkFactoryHandle;
 }
 #endif


--- orig/gphxcore/include/linkhandle.h
+++ mod/gphxcore/include/linkhandle.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -27,10 +27,9 @@
 
 namespace core
 {
-  class LinkHandle
-  {
-  public:
-    virtual ~LinkHandle();
+
+  struct LinkHandle;
+
     /**
      * Set the value of a link.
      *
@@ -40,8 +39,9 @@
      *                  valid for the LinkFactory,
      * 	hrow std::runtime_error if something bad happens
      */
-    virtual void set_value(const std::string& value,
-                           double time) = 0;
+    void linkhandle_set_value(LinkHandle* l,
+                              const std::string& value,
+                              double time);
 
     /**
      * Query and return the serialised value of a link.
@@ -51,10 +51,7 @@
      * 
eturn the serialised value
      * 	hrows std::runtime_error if something bad happens
      */
-    virtual std::string get_value() const = 0;
+    std::string linkhandle_get_value(const LinkHandle* l);
 
-  private:
-    LinkHandle& operator=(const LinkHandle&);
-  };
 }
 #endif


--- orig/gphxcore/include/pluginhandle.h
+++ mod/gphxcore/include/pluginhandle.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -23,42 +23,29 @@
 #ifndef INCLUDED_PLUGIN_HANDLE_H
 #define INCLUDED_PLUGIN_HANDLE_H
 
-#include <memory>
 #include <list>
 #include <string>
 
 namespace core
 {
 
-class LinkFactoryID
-{
- public:
-  virtual std::string name() const = 0;
-  virtual std::string version() const = 0;
-};
+  struct LinkFactoryID;
 
-class UnitFactoryID
-{
- public:
-  virtual std::string name() const = 0;
-  virtual std::string version() const = 0;
-};
+  std::string lfid_name(const LinkFactoryID& lfid);
+  std::string lfid_version(const LinkFactoryID& lfid);
 
-class PluginHandle
-{
- public:
-  virtual ~PluginHandle();
+  struct UnitFactoryID;
+
+  std::string ufid_name(const UnitFactoryID& lfid);
+  std::string ufid_version(const UnitFactoryID& lfid);
+
+  struct PluginHandle;
 
   typedef std::list<LinkFactoryID*> LinkFactoryIDList;
   typedef std::list<UnitFactoryID*> UnitFactoryIDList;
 
-  virtual LinkFactoryIDList list_lfs() = 0;
-  virtual UnitFactoryIDList list_ufs() = 0;
-
- private:
-  /*  PluginHandle(const PluginHandle&);*/
-  virtual PluginHandle& operator=(const PluginHandle&);
-};
+  LinkFactoryIDList plugin_list_lfs(PluginHandle&);
+  UnitFactoryIDList plugin_list_ufs(PluginHandle&);
 
 }
 #endif


--- orig/gphxcore/include/portio.h
+++ mod/gphxcore/include/portio.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 


--- orig/gphxcore/include/unitfactoryhandle.h
+++ mod/gphxcore/include/unitfactoryhandle.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -31,32 +31,21 @@
 
 namespace core
 {
-
-class PortID
-{
- public:
   typedef std::map<std::string, std::string> PropertyMap;
-  virtual PropertyMap spec() const = 0;
-  virtual std::string id() const = 0;
-  virtual unsigned int index() const = 0;
-  
-  virtual port_io::IO io() const = 0;
-};
 
-class UnitFactoryHandle
-{
-public:
-  typedef std::map<std::string, std::string> PropertyMap;
+  struct PortID;
 
-  virtual ~UnitFactoryHandle();
+  PropertyMap portid_spec(const PortID*);
+  std::string portid_id(const PortID*);
+  unsigned int portid_index(const PortID*);
+  
+  port_io::IO portid_io(const PortID*);
 
-  virtual PropertyMap spec() const = 0;
+  struct UnitFactoryHandle;
 
-  virtual std::vector<PortID*> ports() const = 0;
+  PropertyMap unitfactory_spec(const UnitFactoryHandle*);
 
- private:
-  virtual UnitFactoryHandle& operator=(const UnitFactoryHandle&);
-};
+  std::vector<PortID*> unitfactory_ports(const UnitFactoryHandle*);
 
 }
 #endif


--- orig/gphxcore/include/unithandle.h
+++ mod/gphxcore/include/unithandle.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -27,26 +27,14 @@
 
 namespace core
 {
-  class PortID;
-  class PortHandle
-  {
-  public:
-    virtual ~PortHandle() {};
-    virtual PortID& id() const = 0;
-  };
-
-  class UnitFactoryHandle;
-  class UnitHandle
-  {
-  public:
-    virtual ~UnitHandle();
-
-    virtual UnitFactoryHandle& factory_handle() const = 0;
-
-    virtual PortHandle& port_handle(unsigned int index) const = 0;
-
-  private:
-    UnitHandle& operator=(const UnitHandle&);
-  };
+  struct PortID;
+  struct PortHandle;
+  struct UnitHandle;
+  struct UnitFactoryHandle;
+
+  PortID* porthandle_id(const PortHandle*);
+
+  UnitFactoryHandle* unithandle_factory_handle(const UnitHandle*);
+  PortHandle* unithandle_port_handle(const UnitHandle*, unsigned int index);
 }
 #endif


--- orig/gphxcore/src/Makefile.am
+++ mod/gphxcore/src/Makefile.am
@@ -22,68 +22,13 @@
 	safe_cast.h \
 	unithandleimpl.h \
 	unitfactoryhandleimpl.h \
-	logger.h \
-	logger.cpp \
-	../interfaces/link.if \
-	../interfaces/unit.if \
-	../interfaces/linkfactory.if \
-	../interfaces/unitfactory.if \
-	../interfaces/logger.if $(BUILT_SOURCES)
-
-BUILT_SOURCES= \
-	loggerwrapper.h \
-	loggerglue.h \
-	linkwrapper.h \
-	linkfactorywrapper.h \
-	unitwrapper.h \
-	unitfactorywrapper.h \
-	loggerwrapper.cpp \
-	loggerglue.cpp \
-	linkwrapper.cpp \
-	linkfactorywrapper.cpp \
-	unitwrapper.cpp \
-	unitfactorywrapper.cpp 
-
-loggerwrapper.h: ../interfaces/logger.if
-	$(GIDLC) cpp-wrapper-header ../interfaces/logger.if > loggerwrapper.h
-
-loggerwrapper.cpp: ../interfaces/logger.if
-	$(GIDLC) cpp-wrapper-code ../interfaces/logger.if > loggerwrapper.cpp
-
-loggerglue.h: ../interfaces/logger.if
-	$(GIDLC) cpp-glue-header ../interfaces/logger.if > loggerglue.h
-
-loggerglue.cpp: ../interfaces/logger.if
-	$(GIDLC) cpp-glue-code ../interfaces/logger.if > loggerglue.cpp
-
-linkwrapper.h: ../interfaces/link.if
-	$(GIDLC) cpp-wrapper-header ../interfaces/link.if > linkwrapper.h
-
-linkwrapper.cpp: ../interfaces/link.if
-	$(GIDLC) cpp-wrapper-code ../interfaces/link.if > linkwrapper.cpp
-
-linkfactorywrapper.h: ../interfaces/linkfactory.if
-	$(GIDLC) cpp-wrapper-header ../interfaces/linkfactory.if > linkfactorywrapper.h
-
-linkfactorywrapper.cpp: ../interfaces/link.if
-	$(GIDLC) cpp-wrapper-code ../interfaces/linkfactory.if > linkfactorywrapper.cpp
-
-
-unitwrapper.h: ../interfaces/unit.if
-	$(GIDLC) cpp-wrapper-header ../interfaces/unit.if > unitwrapper.h
-
-unitwrapper.cpp: ../interfaces/unit.if
-	$(GIDLC) cpp-wrapper-code ../interfaces/unit.if > unitwrapper.cpp
-
-unitfactorywrapper.h: ../interfaces/unitfactory.if
-	$(GIDLC) cpp-wrapper-header ../interfaces/unitfactory.if > unitfactorywrapper.h
-
-unitfactorywrapper.cpp: ../interfaces/unit.if
-	$(GIDLC) cpp-wrapper-code ../interfaces/unitfactory.if > unitfactorywrapper.cpp
+	streamlogger.h \
+	streamlogger.cpp \
+	coreexceptions.h
 
 
 INCLUDES = \
 	-I @srcdir@/../include \
-	-I @top_srcdir@/gphxutils/include
+	-I @top_srcdir@/gphxutils/include \
+	-I @top_srcdir@/gphxsdk/include
 
-CLEANFILES=$(BUILT_SOURCES)


--- orig/gphxcore/src/connectionhandleimpl.cpp
+++ mod/gphxcore/src/connectionhandleimpl.cpp
@@ -25,16 +25,6 @@
 namespace core
 {
 
-  ConnectionHandleImpl::ConnectionHandleImpl(LinkHandleImpl& l,
-                                             PortHandleImpl& p)
-    : link(l), port(p) 
-    {
-    }
-
-  ConnectionHandleImpl::~ConnectionHandleImpl() {}
-
-  ConnectionHandle::ConnectionHandle() {}
-  ConnectionHandle::~ConnectionHandle() {}
-  ConnectionHandle& ConnectionHandle::operator=(const ConnectionHandle&)
-  { return *this; }
+  ConnectionHandle::ConnectionHandle(LinkHandle& l, PortHandle& p)
+    : link(l), port(p) {}
 }


--- orig/gphxcore/src/connectionhandleimpl.h
+++ mod/gphxcore/src/connectionhandleimpl.h
@@ -27,18 +27,15 @@
 
 namespace core
 {
-  class LinkHandleImpl;
-  class PortHandleImpl;
+  struct LinkHandle;
+  struct PortHandle;
 
-  class ConnectionHandleImpl : public ConnectionHandle
+  struct ConnectionHandle
   {
-  public:
-    ConnectionHandleImpl(LinkHandleImpl& l, PortHandleImpl& p);
+    ConnectionHandle(LinkHandle& l, PortHandle& p);
 
-    virtual ~ConnectionHandleImpl();
-
-    LinkHandleImpl& link;
-    PortHandleImpl& port;
+    LinkHandle& link;
+    PortHandle& port;
   };
 
 }


--- orig/gphxcore/src/core.cpp
+++ mod/gphxcore/src/core.cpp
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -27,18 +27,17 @@
 
 #include "core.h"
 
-#include <cassert>
+#include <memory>
 #include <iostream>
-#include <sstream>
+#include <stdexcept>
+#include <cassert>
 
 #include "renderer.h"
 
 #include "plugin.h"
 
-#include "unitfactorywrapper.h"
-#include "linkfactorywrapper.h"
-#include "unitwrapper.h"
-#include "linkwrapper.h"
+#include "unit.h"
+#include "link.h"
 
 #include "pluginhandleimpl.h"
 #include "linkfactoryhandleimpl.h"
@@ -51,25 +50,37 @@
 
 #include "safe_cast.h"
 
-#include "logger.h"
-#include "loggerwrapper.h"
-#include "loggerglue.h"
+#include "streamlogger.h"
+
+#include "coreexceptions.h"
 
 namespace core
 {
 
+  struct Core
+  {
+    Core::Core()
+      : m_renderer(new Renderer())  {}
+
+    std::auto_ptr<Renderer> m_renderer;
+    //typedef std::list<LinkHandleImpl*> SubscriptionList;
+    //SubscriptionList m_subscriptions;
+  };
+
   //-------------------------------------------------------------------------
 
-  Core::Core() throw ()
-    : m_renderer(new Renderer())
+
+  Core* core_create()
   {
+    return new Core();
   }
 
-  Core::~Core() 
+  void core_destroy(Core* c)
   {
+    delete c;
   }
 
-  void Core::get_warnings(WarningList& warnlist) throw()
+  void core_get_warnings(WarningList& /*warnlist*/)
   {
     // move the queued warnings to the caller
     //warnlist.splice(warnlist.end(),warnings);
@@ -77,304 +88,349 @@
 
   //------------------------------------------------------------------------
 
-  PluginHandle& Core::load_plugin(std::auto_ptr<utils::ILibrary>& lib)
-    throw(std::invalid_argument, std::runtime_error)
+  PluginHandle* core_load_plugin(Core& c, utils::ILibrary* lib,
+                                 CoreError& error)
   {
-    Plugin* p = new Plugin(lib);
+    try
+      {
+        Plugin* p = new Plugin(lib);
+
+        return new PluginHandle(p);
+      }
+    catch (std::invalid_argument&)
+      {
+        error = INVALID_ARG;
+      }
+    catch (std::runtime_error&)
+      {
+        error = GENERAL_ERROR;
+      }
 
-    return *(new PluginHandleImpl(p));
+    return 0;
   }
   
-  void Core::unload_plugin(PluginHandle& handle)
-    throw(std::runtime_error, core::in_use_error)
+  bool core_unload_plugin(Core& c, PluginHandle* handle, CoreError& error)
   {
-    PluginHandleImpl* phi = safe_cast<PluginHandleImpl*>(&handle);
- 
-    if (phi->refcount != 0)
-      throw core::in_use_error("Plugin is still in use");
+    if (handle->refcount != 0)
+      {
+        error = IN_USE_ERROR;
+        return false;
+      }
     else
-      delete phi;
+      {
+        delete handle;
+        return true;
+      }
   }
 
-  LinkFactoryHandle& Core::import_lf(LinkFactoryID& id)
-    throw(std::runtime_error, std::invalid_argument)
+  LinkFactoryHandle* core_import_lf(Core& c, LinkFactoryID* id,
+                                    CoreError& error)
   {
-    LinkFactoryIDImpl* lfi = safe_cast<LinkFactoryIDImpl*>(&id);
-
-    if (lfi->imported)
-      throw std::invalid_argument("link factory already imported");
+    if (id->imported)
+      {
+        error = IN_USE_ERROR;
+        return 0;
+      }
 
-    PluginHandleImpl* p = lfi->plugin_handle;
+    PluginHandle* p = id->plugin_handle;
     try
       {
-        void** vtable = p->plugin->board(IfaceDescriptor("LinkFactory",
-                                                         lfi->name(),
-                                                         lfi->version()));
+        void* obj = p->plugin->board(IfaceDescriptor("LinkFactory",
+                                                     id->m_name,
+                                                     id->m_version));
         
-        if (vtable == 0)
-          throw std::runtime_error("Vtable was 0");
+        if (obj == 0)
+          {
+            std::cerr << "LinkFactory was 0";
+            error = GENERAL_ERROR;
+            return 0;
+          }
 
-        Logger* log = new Logger();
-        LoggerWrapper logger(logger_create_vtable(), log);
-        std::string name = lfi->name() + ":" + lfi->version();
-        LinkFactoryWrapper* lf = new LinkFactoryWrapper(vtable,
-                                                        name.c_str(),
-                                                        &logger);
+        gsdk::LinkFactory* lf = reinterpret_cast<gsdk::LinkFactory*>(obj);
 
         assert(lf);
 
-        lf->ownership(true);// makes it destroy the wrapped object when deleted
         p->refcount += 1;
-        lfi->imported = true;
-        return *(new LinkFactoryHandleImpl(lf, *lfi));
+        id->imported = true;
+        return new LinkFactoryHandle(lf, *id, new StreamLogger());
       }
     catch (std::exception& e)
       {
-        throw std::runtime_error(std::string("LinkFactory import failed: ")
-                                 + e.what());
+        std::cerr << "LinkFactory import failed: " << e.what() << "
";
+        error = GENERAL_ERROR;
+        return 0;
       }
   }
 
-  UnitFactoryHandle& Core::import_uf(UnitFactoryID& id)
-    throw(std::runtime_error, std::invalid_argument)
+  UnitFactoryHandle* core_import_uf(Core& c, UnitFactoryID* id,
+                                    CoreError& error)
   {
-    UnitFactoryIDImpl* ufi = safe_cast<UnitFactoryIDImpl*>(&id);
-
-    if (ufi->imported)
-      throw std::invalid_argument("unit factory already imported");
+    if (id->imported)
+      {
+        error = IN_USE_ERROR;
+        return 0;
+      }
 
-    PluginHandleImpl* p = ufi->plugin_handle;
+    PluginHandle* p = id->plugin_handle;
 
     try {
-      void** vtable = p->plugin->board(IfaceDescriptor("UnitFactory",
-                                                       ufi->name(),
-                                                       ufi->version()));
+      void* obj = p->plugin->board(IfaceDescriptor("Unit",
+                                                   id->m_name,
+                                                   id->m_version));
       
-      if (vtable == 0)
-        throw std::runtime_error("Vtable was 0");
-
+      if (obj == 0)
+        {
+          std::cerr << "UnitFactory was 0
";
+          error = GENERAL_ERROR;
+          return 0;
+        }
 
-      Logger* log = new Logger();
-      LoggerWrapper logger(logger_create_vtable(), log);
+      gsdk::Unit* uf = reinterpret_cast<gsdk::Unit*>(obj);
 
-      std::string name = ufi->name() + ":" + ufi->version();
-      UnitFactoryWrapper* uf = new UnitFactoryWrapper(vtable,
-                                                      name.c_str(),
-                                                      &logger);
       assert(uf);
 
-      uf->ownership(true); // makes it destroy the wrapped object when deleted
       p->refcount += 1;
-      ufi->imported = true;
-      return *(new UnitFactoryHandleImpl(uf, *ufi));
+      id->imported = true;
+      return new UnitFactoryHandle(uf, *id);
     }
     catch (std::exception& e)
       {
-        throw std::runtime_error(std::string("UnitFactory import failed: ")
-                                 + e.what());
+        std::cerr << "UnitFactory import failed: " << e.what() << "
";
+        error = GENERAL_ERROR;
+        return 0;
       }
   }
 
-  void Core::unimport_lf(LinkFactoryHandle& h)
-    throw (core::in_use_error)
+  bool core_unimport_lf(Core& c, LinkFactoryHandle* h, CoreError& error)
   {
-    LinkFactoryHandleImpl* hi = safe_cast<LinkFactoryHandleImpl*>(&h);
-
-    if (hi->refcount != 0)
-      throw core::in_use_error("LinkFactory still used by links");
+    if (h->refcount != 0)
+      {
+        error = IN_USE_ERROR;
+        return false;
+      }
 
-    LinkFactoryIDImpl& id = hi->id;
+    LinkFactoryID& id = h->id;
     assert(id.imported);
-    PluginHandleImpl* p = hi->plugin_handle;
+    PluginHandle* p = h->plugin_handle;
 
     // commit
-    p->plugin->unboard(IfaceDescriptor("LinkFactory",id.name(),id.version()),
-                       hi->lf->vtable());
+    p->plugin->unboard(IfaceDescriptor("LinkFactory",id.m_name,id.m_version),
+                       h->lf);
 
     id.imported = false;
     p->refcount -= 1;
     assert(p->refcount >= 0);
 
-    delete hi;
+    delete h;
+
+    return true;
   }
 
-  void Core::unimport_uf(UnitFactoryHandle& h)
-    throw (core::in_use_error)
+  bool core_unimport_uf(Core& c, UnitFactoryHandle* h, CoreError& error)
   {
-    UnitFactoryHandleImpl* hi = safe_cast<UnitFactoryHandleImpl*>(&h);
-
-    if (hi->refcount != 0)
-      throw core::in_use_error("UnitFactory still used by units");
+    if (h->refcount != 0)
+      {
+        error = IN_USE_ERROR;
+        return false;
+      }
 
-    UnitFactoryIDImpl& id = hi->id;
+    UnitFactoryID& id = h->id;
     assert(id.imported);
-    PluginHandleImpl* p = hi->plugin_handle;
+    PluginHandle* p = h->plugin_handle;
 
-    
     // commit
-    p->plugin->unboard(IfaceDescriptor("UnitFactory", id.name(), id.version()),
-                       hi->uf->vtable());
+    p->plugin->unboard(IfaceDescriptor("UnitFactory", id.m_name, id.m_version),
+                       h->uf);
 
     id.imported = false;
     p->refcount -= 1;
     assert(p->refcount >= 0);
 
-    delete hi;
+    delete h;
   }
 
-  UnitHandle& Core::create_unit(UnitFactoryHandle& h)
-    throw (std::runtime_error)
+  UnitHandle* core_create_unit(Core& c, UnitFactoryHandle* h)
   {
-    UnitFactoryHandleImpl* hi = safe_cast<UnitFactoryHandleImpl*>(&h);
-
-    UnitFactoryWrapper* uf = hi->uf;
-
-    UnitWrapper* unit = 0;
     try
       {
-        unit = uf->create();    
-
-        // make unit delete the wrapped object in the dtor
-        unit->ownership(true);
+        std::auto_ptr<UnitHandle> uh (new UnitHandle(*h->uf, 0, *h));
 
+        c.m_renderer->addUnitNode(*uh);
 
-        std::auto_ptr<UnitHandleImpl> uh(new UnitHandleImpl(unit, 0, *hi));
-        m_renderer->addUnitNode(*uh);
-        hi->refcount += 1;
+        h->refcount += 1;
 
-        return *uh.release();
+        return uh.release();
       }
-    catch(std::exception& e)
+    catch (std::exception& e)
       {
-        //undo everything and throw
-        if (unit)
-          delete unit;
-        throw e;
+        std::cerr << e.what() << "
";
+        return 0;
       }
   }
 
-  LinkHandle& Core::create_link(LinkFactoryHandle& h)
-    throw (std::runtime_error)
+  LinkHandle* core_create_link(Core& c, LinkFactoryHandle* h)
   {
-    LinkFactoryHandleImpl* hi = safe_cast<LinkFactoryHandleImpl*>(&h);
+    gsdk::LinkFactory* lf = h->lf;
 
-    LinkFactoryWrapper* lf = hi->lf;
-
-    LinkWrapper* link = 0;
     try
       {
-        link = lf->create((int*) malloc, (int*) free);
+        std::auto_ptr<gsdk::Link> link (lf->create(*h->log));
+
+        std::auto_ptr<LinkHandle> lh (new LinkHandle(&*link, 0, *h));
 
-        // make link delete the wrapped object in the dtor
-        link->ownership(true);
+        c.m_renderer->addLinkNode(*lh);
 
-        std::auto_ptr<LinkHandleImpl> lh (new LinkHandleImpl(link, 0, *hi));
-        m_renderer->addLinkNode(*lh);
-        hi->refcount += 1;
+        h->refcount += 1;
+        link.release();
 
-        return *lh.release();
+        return lh.release();
       }
     catch(std::exception& e)
       {
-        //undo everything and throw
-        if (link)
-          delete link;
-        throw e;
+        std::cerr << e.what() << "
";
+        return 0;
       }
   }
 
-  void Core::destroy_unit(UnitHandle& h)
-    throw (core::in_use_error, std::runtime_error)
+  bool core_destroy_unit(Core& c, UnitHandle* h, CoreError& error)
   {
-    UnitHandleImpl* hi = safe_cast<UnitHandleImpl*>(&h);
+    try
+      {
+        // tell the renderer, could throw
+        c.m_renderer->delUnitNode(*h);
 
-    // tell the renderer, could throw
-    m_renderer->delUnitNode(*hi);
+        // decrease refcount of UnitFactory
+        h->unit_factory.refcount -= 1;
+        assert(h->unit_factory.refcount >= 0);
 
-    // decrease refcount of UnitFactory
-    hi->unit_factory.refcount -= 1;
-    assert(hi->unit_factory.refcount >= 0);
+        delete h;
+        return true;
+      }
+    catch (core::in_use_error& e)
+      {
+        std::cerr << e.what() << "
";
+        error = IN_USE_ERROR;
+      }
+    catch (std::exception& e)
+      {
+        std::cerr << e.what() << "
";
+        error = GENERAL_ERROR;
+      }
 
-    delete hi;
+    return false;
   }
 
-  void Core::destroy_link(LinkHandle& h)
-    throw (core::in_use_error, std::runtime_error)
+  bool core_destroy_link(Core& c, LinkHandle* h, CoreError& error)
   {
-    LinkHandleImpl* hi = safe_cast<LinkHandleImpl*>(&h);
+    try
+      {
+        // tell the renderer, could throw
+        c.m_renderer->delLinkNode(*h);
 
-    // tell the renderer, could throw
-    m_renderer->delLinkNode(*hi);
+        // decrease refcount of LinkFactory
+        h->link_factory.refcount -= 1;
+        assert(h->link_factory.refcount >= 0);
 
-    // decrease refcount of LinkFactory
-    hi->link_factory.refcount -= 1;
-    assert(hi->link_factory.refcount >= 0);
+        delete h;
+        return true;
+      }
+    catch (core::in_use_error& e)
+      {
+        std::cerr << e.what() << "
";
+        error = IN_USE_ERROR;
+      }
+    catch (std::runtime_error& e)
+      {
+        std::cerr << e.what() << "
";
+        error = GENERAL_ERROR;
+      }
 
-    delete hi;
+    return false;
   }
 
-  void Core::update(const std::list<UnitHandle*>& sinks, double time)
-    throw (std::runtime_error, std::invalid_argument)
+  bool core_update(Core& c, const std::list<UnitHandle*>& sinks, double time,
+                   CoreError& error)
   {
-    // create a list of UnitNode pointer out of sink
-    std::list<UnitHandleImpl*> sink_nodes;
-    for (std::list<UnitHandle*>::const_iterator it = sinks.begin();
-         it != sinks.end(); ++it)
+    try
       {
-        UnitHandleImpl* uhi = safe_cast<UnitHandleImpl*>(*it);
-        sink_nodes.push_back(uhi);
-      }
+        // pass this to the renderer
+        c.m_renderer->update(sinks.begin(),
+                           sinks.end(),
+                           time);
 
-    // pass this to the renderer
-    m_renderer->update(sink_nodes.begin(),
-                       sink_nodes.end(),
-                       time);
+        return true;
+      }
+    catch (std::invalid_argument&)
+      {
+        error = INVALID_ARG;
+        return false;
+      }
+    catch (std::exception& e)
+      {
+        std::cerr << e.what() << "
";
+        error = GENERAL_ERROR;
+        return false;
+      }
   }
 
-  ConnectionHandle& Core::attach(LinkHandle& lh, PortHandle& ph)
-    throw (std::domain_error, std::invalid_argument, core::in_use_error)
+  ConnectionHandle* core_attach(Core& c, LinkHandle* lh, PortHandle* ph,
+                                CoreError& error)
   {
-    LinkHandleImpl* lhi = safe_cast<LinkHandleImpl*>(&lh);
-    PortHandleImpl* phi = safe_cast<PortHandleImpl*>(&ph);
- 
-    UnitHandleImpl& uhi = phi->unit_handle;
+    UnitHandle& uh = ph->unit_handle;
 
-    LinkWrapper* link = lhi->link;
-    UnitWrapper* unit = uhi.unit;
+    gsdk::Link* link = lh->link;
+    gsdk::Unit* unit = &uh.unit;
 
     // check wether the LinkFactory of the link and the port are the same
-    const LinkFactoryIDImpl& lfid = lhi->link_factory.id;
-    std::string factory_name = lfid.name();
+    const LinkFactoryID& lfid = lh->link_factory.id;
+    std::string factory_name = lfid.m_name;
 
     //TODO: it is a hack to just strip the "Factory" off the name
     const std::string lf_id = factory_name.substr(0, factory_name.length()-7)
-      + ":" + lfid.version();
-    if (lf_id != phi->m_id.type())
+      + ":" + lfid.m_version;
+    if (lf_id != ph->m_id.type())
       {
-        std::ostringstream os;
-        os << "Link and Port have different link-type: '" << lf_id
-           << "' cannot connect to '" << phi->id().type() << "'";
-        throw std::domain_error(os.str().c_str());
+        std::cerr << "Link and Port have different link-type: '" << lf_id
+           << "' cannot connect to '" << ph->id().type() << "'";
+
+        error = TYPE_ERROR;
+        return 0;
       }
 
-    ConnectionHandleImpl& c = m_renderer->attach(*lhi, *phi);
+    try
+      {
+        ConnectionHandle& co = c.m_renderer->attach(*lh, *ph);
+        //    unit->set_port(phi->id().index(), link);
+        return &co;
+      }
+    catch (core::in_use_error&)
+      {
+        error = IN_USE_ERROR;
+      }
+    catch (std::invalid_argument&)
+      {
+        error = INVALID_ARG;
+      }
+    catch (std::exception& e)
+      {
+        std::cerr << e.what() << "
";
+        error = GENERAL_ERROR;
+      }
 
-    unit->set_port(phi->id().index(), link);
 
-    return c;
+    return 0;
   }
 
-  void Core::detach(ConnectionHandle& ch) throw ()
+  void core_detach(Core& c, ConnectionHandle* ch)
   {
-    ConnectionHandleImpl* chi = safe_cast<ConnectionHandleImpl*>(&ch);
-
     // could throw?
-    m_renderer->detach(*chi);
+    c.m_renderer->detach(*ch);
   }
 
-  void Core::subscribe_link_value(LinkHandle& lid) throw(std::invalid_argument)
+#if 0
+  void core_subscribe_link_value(LinkHandle& lid) throw(std::invalid_argument)
   {
-    LinkHandleImpl* lhi = safe_cast<LinkHandleImpl*>(&lid);
+    LinkHandle* lhi = safe_cast<LinkHandle*>(&lid);
 
     if (std::find(m_subscriptions.begin(),
                   m_subscriptions.end(),
@@ -387,7 +443,7 @@
   void Core::unsubscribe_link_value(LinkHandle& lid)
     throw(std::invalid_argument)
   {
-    LinkHandleImpl* lhi = safe_cast<LinkHandleImpl*>(&lid);
+    LinkHandle* lhi = safe_cast<LinkHandle*>(&lid);
 
     SubscriptionList::iterator 
       it = std::find(m_subscriptions.begin(),
@@ -405,7 +461,7 @@
     for (SubscriptionList::const_iterator it = m_subscriptions.begin();
          it != m_subscriptions.end(); ++it)
       {
-        LinkHandleImpl* lhi = *it;
+        LinkHandle* lhi = *it;
         //Link* l = lhi->link;
         if (lhi->timestamp() < time)
           continue;
@@ -414,6 +470,7 @@
       }
   }
 
+#endif
 }
 
 //----------------------------------------------------------------------------


--- orig/gphxcore/src/linkfactoryhandleimpl.cpp
+++ mod/gphxcore/src/linkfactoryhandleimpl.cpp
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -23,24 +23,20 @@
 #include "linkfactoryhandleimpl.h"
 
 #include "pluginhandleimpl.h"
-#include "linkfactorywrapper.h"
+
+#include "link.h"
 
 namespace core
 {
 
-  LinkFactoryHandleImpl::LinkFactoryHandleImpl(LinkFactoryWrapper* l,
-                                               LinkFactoryIDImpl& id_)
+  LinkFactoryHandle::LinkFactoryHandle(gsdk::LinkFactory* l,
+                                       LinkFactoryID& id_,
+                                       gsdk::Logger* log)
     : refcount(0), lf(l), plugin_handle(id_.plugin_handle),
-      id(id_) {}
+      id(id_), log(log) {}
 
-  LinkFactoryHandleImpl::~LinkFactoryHandleImpl()
+  LinkFactoryHandle::~LinkFactoryHandle()
   { 
-    delete lf;
-  }
-
-  LinkFactoryHandle::LinkFactoryHandle() {}
-  LinkFactoryHandle::~LinkFactoryHandle() {}
-  LinkFactoryHandle& LinkFactoryHandle::operator=(const LinkFactoryHandle&)
-  { return *this; }
-  
+    delete log;
+  }  
 }


--- orig/gphxcore/src/linkfactoryhandleimpl.h
+++ mod/gphxcore/src/linkfactoryhandleimpl.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -25,26 +25,30 @@
 
 #include "linkfactoryhandle.h"
 
-class LinkFactoryWrapper;
+namespace gsdk
+{
+  class LinkFactory;
+  class Logger;
+}
 
 namespace core
 {
-  class LinkFactoryIDImpl;
-  class PluginHandleImpl;
+  struct LinkFactoryID;
+  struct PluginHandle;
 
-  class LinkFactoryHandleImpl : public LinkFactoryHandle
+  struct LinkFactoryHandle
   {
-  public:
-    LinkFactoryHandleImpl(LinkFactoryWrapper* l,
-                          LinkFactoryIDImpl& id_);
+    LinkFactoryHandle(gsdk::LinkFactory* l,
+                      LinkFactoryID& id_,
+                      gsdk::Logger* log);
 
-    virtual ~LinkFactoryHandleImpl();
+    ~LinkFactoryHandle();
 
     int refcount;
-    LinkFactoryWrapper* lf;
-    PluginHandleImpl* plugin_handle;
-    LinkFactoryIDImpl& id;
-
+    gsdk::LinkFactory* lf;
+    PluginHandle* plugin_handle;
+    LinkFactoryID& id;
+    gsdk::Logger* log;
   };
 
 }


--- orig/gphxcore/src/linkhandleimpl.cpp
+++ mod/gphxcore/src/linkhandleimpl.cpp
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -21,7 +21,9 @@
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/
 
 #include "linkhandleimpl.h"
-#include "linkwrapper.h"
+#include "link.h"
+
+#include <vector>
 
 namespace core
 {
@@ -34,39 +36,57 @@
 
   //------------------------------------------------------------------------
 
-  LinkHandleImpl::LinkHandleImpl(LinkWrapper* u,
-                                 LinkNode* n,
-                                 LinkFactoryHandleImpl& lfi)
+  LinkHandle::LinkHandle(gsdk::Link* u,
+                         LinkNode* n,
+                         LinkFactoryHandle& lfi)
     : link(u), node(n), link_factory(lfi), m_timestamp(0) {}
 
-  LinkHandleImpl::~LinkHandleImpl()
+  LinkHandle::~LinkHandle()
   { 
-    delete link;
     delete node;
   }
 
-  void LinkHandleImpl::set_value(const std::string& value, double time)
+  void LinkHandle::set_value(const std::string& value, double time)
   {
-    link->deserialize(value.c_str());
+    link->deserialize_utf8(value.c_str(), value.length());
     this->set_timestamp(time);
   }
 
-  std::string LinkHandleImpl::get_value() const
+  std::string LinkHandle::get_value() const
   {
-    return link->serialize();
+    int size = link->serialize_utf8(0, 0);
+
+    std::vector<char> buf(size); //TODO: optimieren
+
+    int s = link->serialize_utf8(&buf[0], size);
+
+    if (s <= 0 || s > size)
+      return "";
+    else
+      return std::string(&buf[0], s);
   }
 
-  double LinkHandleImpl::timestamp() const
+  double LinkHandle::timestamp() const
   {
     return m_timestamp;
   }
 
-  void LinkHandleImpl::set_timestamp(double t)
+  void LinkHandle::set_timestamp(double t)
   {
     m_timestamp = t;
   }
 
-  LinkHandle::~LinkHandle() {}
-  LinkHandle& LinkHandle::operator=(const LinkHandle&)
-  { return *this; }
+  void linkhandle_set_value(LinkHandle* l,
+                            const std::string& value,
+                            double time)
+  {
+    l->set_value(value, time);
+  }
+
+
+  std::string linkhandle_get_value(const LinkHandle* l)
+  {
+    return l->get_value();
+  }
+
 }


--- orig/gphxcore/src/linkhandleimpl.h
+++ mod/gphxcore/src/linkhandleimpl.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -27,12 +27,15 @@
 
 #include "linkhandle.h"
 
-class LinkWrapper;
+namespace gsdk
+{
+  class Link;
+}
 
 namespace core
 {
-  class LinkFactoryHandleImpl;
-  class ConnectionHandleImpl;
+  class LinkFactoryHandle;
+  class ConnectionHandle;
 
   //------------------------------------------------------------------
   // needed by the renderer
@@ -41,18 +44,17 @@
   {
     LinkNode();
 
-    std::list<ConnectionHandleImpl*> adj; // connection to inputs
-    ConnectionHandleImpl* out; // connection to output
+    std::list<ConnectionHandle*> adj; // connection to inputs
+    ConnectionHandle* out; // connection to output
   };
 
   //------------------------------------------------------------------
 
-  class LinkHandleImpl : public LinkHandle
+  struct LinkHandle
   {
-  public:
-    LinkHandleImpl(LinkWrapper* u, LinkNode* n, LinkFactoryHandleImpl& lfi);
+    LinkHandle(gsdk::Link* u, LinkNode* n, LinkFactoryHandle& lfi);
 
-    virtual ~LinkHandleImpl();
+    ~LinkHandle();
 
     void set_value(const std::string& value, double time);
 
@@ -61,9 +63,9 @@
     double timestamp() const;
     void set_timestamp(double t);
 
-    LinkWrapper* link;
+    gsdk::Link* link;
     LinkNode* node;
-    LinkFactoryHandleImpl& link_factory;
+    LinkFactoryHandle& link_factory;
     
   private:
     double m_timestamp;


--- orig/gphxcore/src/plugin.cpp
+++ mod/gphxcore/src/plugin.cpp
@@ -26,8 +26,6 @@
 #include <sstream>
 #include <iostream>
 
-#include "unitfactorywrapper.h"
-#include "linkfactorywrapper.h"
 #include "ilibrary.h"
 
 #include "stringtokenizer.h"
@@ -70,8 +68,8 @@
   struct PluginFunctions
   {
     typedef const char* (*dock_t)(void);
-    typedef void**      (*board_t)(const char*);
-    typedef void        (*unboard_t)(const char*, void**);
+    typedef void*       (*board_t)(const char*);
+    typedef void        (*unboard_t)(const char*, void*);
     typedef void        (*undock_t)(void);
 
     dock_t    dock;
@@ -84,7 +82,7 @@
 
   };
 
-  Plugin::Plugin(std::auto_ptr<utils::ILibrary>& so) 
+  Plugin::Plugin(utils::ILibrary* so) 
     : m_so(so), m_funs(new PluginFunctions())
   {
     m_funs->dock 
@@ -139,7 +137,7 @@
     return m_exported_ifaces;
   }
         
-  void** Plugin::board(const IfaceDescriptor& id)
+  void* Plugin::board(const IfaceDescriptor& id)
   {
     if (std::find(m_exported_ifaces.begin(),
                   m_exported_ifaces.end(), id) == m_exported_ifaces.end())
@@ -147,15 +145,15 @@
         throw std::invalid_argument("Invalid Iface Description");
       }
 
-    void** vtable = m_funs->board((id.name() + ":" + id.version()).c_str());
-    if (vtable == 0)
+    void* obj = m_funs->board((id.name() + ":" + id.version()).c_str());
+    if (obj == 0)
       throw std::runtime_error("Could not board Interface");
 
-    return vtable;
+    return obj;
   }
 
-  void Plugin::unboard(const IfaceDescriptor& id, void** vtable)
+  void Plugin::unboard(const IfaceDescriptor& id, void* obj)
   {
-    m_funs->unboard((id.name() + ":" + id.version()).c_str(), vtable);
+    m_funs->unboard((id.name() + ":" + id.version()).c_str(), obj);
   }
 }


--- orig/gphxcore/src/plugin.h
+++ mod/gphxcore/src/plugin.h
@@ -68,7 +68,7 @@
   public:
     typedef std::list<IfaceDescriptor> IfaceDescriptorList;
 
-    Plugin(std::auto_ptr<utils::ILibrary>& so); 
+    Plugin(utils::ILibrary* so); 
     virtual ~Plugin();
 
     /**
@@ -89,13 +89,13 @@
      * 	hrows std::invalid_argument if no such type exists
      * 	hrows std::runtime_error if boarding fails
      */
-    virtual void** board(const IfaceDescriptor& id);
+    virtual void* board(const IfaceDescriptor& id);
 
     /**
      * No error checking - you better make sure that you
      * unboard every vtable exactly once.
      */
-    virtual void unboard(const IfaceDescriptor& id, void** vtable);
+    virtual void unboard(const IfaceDescriptor& id, void* obj);
 
   private:
     std::auto_ptr<utils::ILibrary> m_so;


--- orig/gphxcore/src/pluginhandleimpl.cpp
+++ mod/gphxcore/src/pluginhandleimpl.cpp
@@ -1,24 +1,24 @@
 /* This source file is a part of the GePhex Project.
 
-   Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
-   Georg Seidel <georg at gephex.org> 
-   Martin Bayer <martin at gephex.org> 
-   Phillip Promesberger <coma at gephex.org>
+  Georg Seidel <georg at gephex.org> 
+  Martin Bayer <martin at gephex.org> 
+  Phillip Promesberger <coma at gephex.org>
  
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   as published by the Free Software Foundation; either version 2
-   of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
  
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
  
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/
 
 #include "pluginhandleimpl.h"
 
@@ -28,48 +28,44 @@
 {
   //-------------------------------------------------------------------------
 
-  class PluginHandleImpl;
-
-  LinkFactoryIDImpl::LinkFactoryIDImpl(const std::string& name,
-                                 const std::string& version,
-                                 PluginHandleImpl* p)
+  LinkFactoryID::LinkFactoryID(const std::string& name,
+                               const std::string& version,
+                               PluginHandle* p)
     : plugin_handle(p), imported(false),
       m_name(name), m_version(version) {}
 
-  LinkFactoryIDImpl::~LinkFactoryIDImpl() {}
 
-  std::string LinkFactoryIDImpl::name() const
+  std::string lfid_name(const LinkFactoryID& lfid)
   {
-    return m_name;
+    return lfid.m_name;
   }
 
-  std::string LinkFactoryIDImpl::version() const
+  std::string lfid_version(const LinkFactoryID& lfid)
   {
-    return m_version;
+    return lfid.m_version;
   }
 
   //-------------------------------------------------------------------------
 
-  UnitFactoryIDImpl::UnitFactoryIDImpl(const std::string& name,
-                                 const std::string& version,
-                                 PluginHandleImpl* p)
+  UnitFactoryID::UnitFactoryID(const std::string& name,
+                               const std::string& version,
+                               PluginHandle* p)
     : plugin_handle(p), imported(false), m_name(name), m_version(version) {}
 
-  UnitFactoryIDImpl::~UnitFactoryIDImpl() {};
 
-  std::string UnitFactoryIDImpl::name() const
+  std::string ufid_name(const UnitFactoryID& ufid)
   {
-    return m_name;
+    return ufid.m_name;
   }
 
-  std::string UnitFactoryIDImpl::version() const
+  std::string ufid_version(const UnitFactoryID& ufid)
   {
-    return m_version;
+    return ufid.m_version;
   }
 
   //-------------------------------------------------------------------------
 
-  PluginHandleImpl::PluginHandleImpl(Plugin* p)
+  PluginHandle::PluginHandle(Plugin* p)
     : plugin(p), refcount(0)
   {
     Plugin::IfaceDescriptorList ifaces = p->list_exports();
@@ -77,17 +73,17 @@
     for (Plugin::IfaceDescriptorList::const_iterator it = ifaces.begin();
          it != ifaces.end(); ++it)
       {
-        if (it->type() == "UnitFactory")
-          m_ufs.push_back(new UnitFactoryIDImpl(it->name(),
-                                                it->version(), this));
+        if (it->type() == "Unit")
+          m_ufs.push_back(new UnitFactoryID(it->name(),
+                                            it->version(), this));
         else if (it->type() == "LinkFactory")
-          m_lfs.push_back(new LinkFactoryIDImpl(it->name(),
-                                                it->version(), this));
+          m_lfs.push_back(new LinkFactoryID(it->name(),
+                                            it->version(), this));
         //TODO: is it ok to simply ignore the other exported types?
       }
   }
 
-  PluginHandleImpl::~PluginHandleImpl()
+  PluginHandle::~PluginHandle()
   {
     for (LinkFactoryIDList::const_iterator it = m_lfs.begin();
          it != m_lfs.end(); ++it)
@@ -103,17 +99,14 @@
     delete plugin;
   }
 
-  PluginHandleImpl::LinkFactoryIDList PluginHandleImpl::list_lfs()
+  LinkFactoryIDList plugin_list_lfs(PluginHandle& p)
   {
-    return m_lfs;
+    return p.m_lfs;
   }
 
-  PluginHandleImpl::UnitFactoryIDList PluginHandleImpl::list_ufs()
+  UnitFactoryIDList plugin_list_ufs(PluginHandle& p)
   {
-    return m_ufs;
+    return p.m_ufs;
   }
 
-  PluginHandle::~PluginHandle() {}
-  PluginHandle& PluginHandle::operator=(const PluginHandle&)
-  { return *this; }
 }


--- orig/gphxcore/src/pluginhandleimpl.h
+++ mod/gphxcore/src/pluginhandleimpl.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -30,45 +30,30 @@
 
   //-------------------------------------------------------------------------
 
-  class PluginHandleImpl;
-  class LinkFactoryIDImpl : public LinkFactoryID
+  struct LinkFactoryID
   {
-  public:
-    LinkFactoryIDImpl(const std::string& name,
-                   const std::string& version,
-                   PluginHandleImpl* p);
-
-    virtual ~LinkFactoryIDImpl();
-
-    std::string name() const;
-
-    std::string version() const;
-
-    PluginHandleImpl* plugin_handle;
+    LinkFactoryID(const std::string& name,
+                  const std::string& version,
+                  PluginHandle* p);
+    
+    PluginHandle* plugin_handle;
     bool imported;
 
-  private:
     std::string m_name;
     std::string m_version;
   };
 
   //-------------------------------------------------------------------------
 
-  class UnitFactoryIDImpl : public UnitFactoryID
+  struct UnitFactoryID
   {
-  public:
-    UnitFactoryIDImpl(const std::string& name,
-                   const std::string& version,
-                   PluginHandleImpl* p);
+    UnitFactoryID(const std::string& name,
+                  const std::string& version,
+                  PluginHandle* p);
 
-    virtual ~UnitFactoryIDImpl();
-
-    std::string name() const;
-    std::string version() const;
-
-    PluginHandleImpl* plugin_handle;
+    PluginHandle* plugin_handle;
     bool imported;
-  private:
+
     std::string m_name;
     std::string m_version;
   };
@@ -76,23 +61,16 @@
   //-------------------------------------------------------------------------
 
   class Plugin;
-  class PluginHandleImpl : public PluginHandle
+  struct PluginHandle
   {
   public:
-    PluginHandleImpl(Plugin* p);
-
-    virtual ~PluginHandleImpl();
-
-    // from the pluginhandle iface
-
-    LinkFactoryIDList list_lfs();
-    UnitFactoryIDList list_ufs();
+    PluginHandle(Plugin* p);
 
+    virtual ~PluginHandle();
 
     Plugin* plugin;
     int refcount;
 
-  private:
     LinkFactoryIDList m_lfs;
     UnitFactoryIDList m_ufs;
   };


--- orig/gphxcore/src/renderer.cpp
+++ mod/gphxcore/src/renderer.cpp
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -29,9 +29,8 @@
 #include <iostream>
 
 #include "coreexceptions.h"
-#include "unitfactorywrapper.h"
-#include "unitwrapper.h"
-#include "linkwrapper.h"
+#include "unit.h"
+#include "link.h"
 
 #include "unithandleimpl.h"
 #include "linkhandleimpl.h"
@@ -39,6 +38,8 @@
 
 #include "safe_cast.h"
 
+#include "streamlogger.h"
+
 namespace core
 {
 
@@ -53,7 +54,7 @@
   {
   }
 
-  void Renderer::addUnitNode(UnitHandleImpl& u)
+  void Renderer::addUnitNode(UnitHandle& u)
   {
     assert(u.node == 0);
 
@@ -61,13 +62,13 @@
   }
 
 
-  void Renderer::delUnitNode(UnitHandleImpl& uhandle)
+  void Renderer::delUnitNode(UnitHandle& uhandle)
   {
     UnitNode* n = uhandle.node;
     assert(n);
 
-    std::vector<ConnectionHandleImpl*>& pv = n->adj;
-    for (std::vector<ConnectionHandleImpl*>::const_iterator it = pv.begin();
+    std::vector<ConnectionHandle*>& pv = n->adj;
+    for (std::vector<ConnectionHandle*>::const_iterator it = pv.begin();
          it != pv.end(); ++it)
       {
         if (*it != 0)
@@ -78,14 +79,14 @@
     uhandle.node = 0;
   }
 
-  void Renderer::addLinkNode(LinkHandleImpl& lh)
+  void Renderer::addLinkNode(LinkHandle& lh)
   {
     assert(lh.node == 0);
     lh.node = new LinkNode();
   }
 
 
-  void Renderer::delLinkNode(LinkHandleImpl& lh)
+  void Renderer::delLinkNode(LinkHandle& lh)
   {
     LinkNode* ln = lh.node;
     if (!ln->adj.empty() || ln->out != 0)
@@ -96,10 +97,10 @@
   }
 
 
-  ConnectionHandleImpl& Renderer::attach(LinkHandleImpl& link,
-                                         PortHandleImpl& port)
+  ConnectionHandle& Renderer::attach(LinkHandle& link,
+                                         PortHandle& port)
   {
-    UnitHandleImpl& unith = port.unit_handle;
+    UnitHandle& unith = port.unit_handle;
     PortID& pid = port.id();
     assert(unith.node);
     UnitNode& n = *unith.node;
@@ -116,7 +117,7 @@
     if (pid.io() == port_io::OUT && l.out != 0)
       throw std::invalid_argument("Already connected to one output");
 
-    ConnectionHandleImpl* c = new ConnectionHandleImpl(link, port);
+    ConnectionHandle* c = new ConnectionHandle(link, port);
 
     if (pid.io() == port_io::OUT)
       l.out = c;
@@ -127,7 +128,7 @@
     return *c;
   }
 
-  void Renderer::detach(ConnectionHandleImpl& c)
+  void Renderer::detach(ConnectionHandle& c)
   {
     UnitNode& un = *c.port.unit_handle.node;
     LinkNode& ln = *c.link.node;
@@ -156,26 +157,26 @@
 
   //------------------------------------------------------------------------
 
-  bool Renderer::update_input(PortHandleImpl& port,
+  bool Renderer::update_input(PortHandle& port,
                               double time)
   {
     bool input_changed = false;
 
-    UnitHandleImpl& uh = port.unit_handle;
+    UnitHandle& uh = port.unit_handle;
     unsigned int port_index = port.id().index();
 
     assert(uh.node);
     UnitNode& node = *uh.node;
 
     // get all nodes that are connected to port i
-    ConnectionHandleImpl* c = node.adj[port_index];
+    ConnectionHandle* c = node.adj[port_index];
     assert(c);
 
     
     if (c->link.node->out) // is the link connected to an output node?
       {
         // yes, indeed!
-        UnitHandleImpl& n2 = c->link.node->out->port.unit_handle;
+        UnitHandle& n2 = c->link.node->out->port.unit_handle;
         
         bool changed = update(n2, time);
         input_changed = input_changed || changed;
@@ -191,15 +192,15 @@
     return input_changed;
   }
 
-  static void set_link_timestamp(PortHandleImpl& port,
+  static void set_link_timestamp(PortHandle& port,
                                  double time)
   {
     unsigned int port_index = port.id().index();
-    UnitHandleImpl& uh = port.unit_handle;
+    UnitHandle& uh = port.unit_handle;
     UnitNode& node = *uh.node;
 
     assert(port_index < node.adj.size());
-    ConnectionHandleImpl* c = node.adj[port_index];
+    ConnectionHandle* c = node.adj[port_index];
     assert(c);
     c->link.set_timestamp(time);
   }
@@ -215,6 +216,39 @@
     return true;
   }
 
+  static void update_unit(double start_time, double end_time,
+                          UnitHandle& uh)
+  {
+    gsdk::Unit& unit = uh.unit;
+    std::vector<const gsdk::Link*> ins;
+    std::vector<gsdk::Link*> outs;
+
+    for (unsigned int i = 0; i < uh.num_ports(); ++i)
+      {
+        PortHandle* port 
+          = safe_cast<PortHandle*>(&uh.port_handle(i));
+
+        unsigned int port_index = port->id().index();
+
+        assert(uh.node);
+        UnitNode& node = *uh.node;
+
+        ConnectionHandle* c = node.adj[port_index];
+        assert(c);
+        
+        gsdk::Link* l = c->link.link;
+
+        if (port->id().io() == port_io::OUT)
+          outs.push_back(l);
+        else
+          ins.push_back(l);
+      }
+
+    StreamLogger* l = new StreamLogger();
+    unit.update(&ins[0], &outs[0], *l);
+    delete l;
+  }
+
   /**
    *
    * Simple recursive implementation to update one node.
@@ -224,12 +258,12 @@
    *
    * 
    */
-  bool Renderer::update(UnitHandleImpl& uh, double time)
+  bool Renderer::update(UnitHandle& uh, double time)
   {
     assert(uh.node);
     UnitNode& node = *uh.node;
 
-    UnitWrapper& unit = *uh.unit;
+    gsdk::Unit& unit = uh.unit;
 
     //TODO: default outputs?
     if (!ports_connected(node))
@@ -242,8 +276,8 @@
 
         for (unsigned int i = 0; i < uh.num_ports(); ++i)
           {
-            PortHandleImpl* port 
-              = safe_cast<PortHandleImpl*>(&uh.port_handle(i));
+            PortHandle* port 
+              = safe_cast<PortHandle*>(&uh.port_handle(i));
             if (port->id().io() == port_io::OUT)
               set_link_timestamp(*port, time);
           }
@@ -266,46 +300,41 @@
         // go through all input ports that are strong dependencies
         for (unsigned int i = 0; i < uh.num_ports(); ++i)
           {
-            PortHandleImpl& port 
-              = *safe_cast<PortHandleImpl*>(&uh.port_handle(i));
-            PortIDImpl& pid = port.id();
-            if (pid.io() != port_io::IN || !pid.strong_dep())
+            PortHandle& port 
+              = *safe_cast<PortHandle*>(&uh.port_handle(i));
+            PortID& pid = port.id();
+            if (pid.io() != port_io::IN)
               continue;
 
             bool changed = update_input(port, time);
             input_changed = input_changed || changed;
           }
 
-        int *neededChildren;
-        unit.strong_deps_done(&neededChildren);
-
         // go through all needed children
         for (unsigned int i = 0; i < uh.num_ports(); ++i)
           {
-            PortHandleImpl& port 
-              = *safe_cast<PortHandleImpl*>(&uh.port_handle(i));
-            PortIDImpl& pid = port.id();
-            if (neededChildren[i] == 0 || pid.io() != port_io::IN ||
-                pid.strong_dep())
+            PortHandle& port 
+              = *safe_cast<PortHandle*>(&uh.port_handle(i));
+            PortID& pid = port.id();
+            if (pid.io() != port_io::IN)
               continue;
 
             bool changed = update_input(port, time);
             input_changed = input_changed || changed;
           }
         
-        int* patch_layout;
-        if (input_changed == true || !uh.unit_factory.deterministic())
-          output_changed = unit.update(time, &patch_layout);
+        if (input_changed == true)
+          update_unit(time, time+(1/25.), uh); //TODO
 
         node.timestamp      = time;                // mark as done
-        node.output_changed = output_changed;
+        node.output_changed = true; //TODO
 
         // set timestamp of output links
         for (unsigned int i = 0; i < uh.num_ports(); ++i)
           {
-            PortHandleImpl& 
-              port = *safe_cast<PortHandleImpl*>(&uh.port_handle(i));
-            PortIDImpl& pid = port.id();
+            PortHandle& 
+              port = *safe_cast<PortHandle*>(&uh.port_handle(i));
+            PortID& pid = port.id();
             if (pid.io() != port_io::OUT)
               continue;
 


--- orig/gphxcore/src/renderer.h
+++ mod/gphxcore/src/renderer.h
@@ -30,10 +30,10 @@
 
 namespace core
 {
-  class ConnectionHandleImpl;
-  class UnitHandleImpl;
-  class LinkHandleImpl;
-  class PortHandleImpl;
+  class ConnectionHandle;
+  class UnitHandle;
+  class LinkHandle;
+  class PortHandle;
 
   /**
    *
@@ -56,7 +56,7 @@
   class Renderer
   {
   public:
-    typedef std::list<UnitHandleImpl*>::const_iterator unit_iterator;
+    typedef std::list<UnitHandle*>::const_iterator unit_iterator;
 
     Renderer();
     ~Renderer();
@@ -72,7 +72,7 @@
      * 
      * \param u the Unit to be added
      */
-    void addUnitNode(UnitHandleImpl& u);
+    void addUnitNode(UnitHandle& u);
 
     /**
      * Removes n from the graph
@@ -85,7 +85,7 @@
      *
      * 	hrows core::in_use_error if n is still attached to a link
      */
-    void delUnitNode(UnitHandleImpl& n);
+    void delUnitNode(UnitHandle& n);
 
 
     /**
@@ -102,7 +102,7 @@
      * \param l the Link to be added
      * 
eturns a LinkNode object representing u in the graph
      */
-    void addLinkNode(LinkHandleImpl& l);
+    void addLinkNode(LinkHandle& l);
 
     /**
      * Removes n from the graph
@@ -115,7 +115,7 @@
      *
      * 	hrows core::in_use_error if n is still attached to a node
      */
-    void delLinkNode(LinkHandleImpl& n);
+    void delLinkNode(LinkHandle& n);
 
     /**
      * Tells the renderer to attach the Link l to a certain port
@@ -133,14 +133,14 @@
      *                                an output
      *
      */
-    ConnectionHandleImpl& attach(LinkHandleImpl& l, PortHandleImpl& p);
+    ConnectionHandle& attach(LinkHandle& l, PortHandle& p);
 
     /**
      * Removes a connection again.
      * No error checking here, be sure to remove each connection exactly once.
      * \param c the connection that will be removed
      */
-    void detach(ConnectionHandleImpl& c);
+    void detach(ConnectionHandle& c);
 
     /**
      * Updates the output ports of several units.
@@ -163,8 +163,8 @@
     // maps the inputs to their dependencys
     //    std::map<std::pair<Module*,unsigned int>, Module* > dependencys;
 
-    bool update_input(PortHandleImpl& port, double time);
-    bool update(UnitHandleImpl&, double);
+    bool update_input(PortHandle& port, double time);
+    bool update(UnitHandle&, double);
 
     Renderer(const Renderer&);              // not implemented
     Renderer& operator=(const Renderer&);  // not implemented    


--- orig/gphxcore/src/logger.cpp
+++ mod/gphxcore/src/streamlogger.cpp
@@ -1,8 +1,30 @@
-#include "logger.h"
+/* This source file is a part of the GePhex Project.
+
+  Copyright (C) 2001-2003 
+
+  Georg Seidel <georg at gephex.org> 
+  Martin Bayer <martin at gephex.org> 
+  Phillip Promesberger <coma at gephex.org>
+ 
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+ 
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/
+
+#include "streamlogger.h"
 
 #include <iostream>
 
-void Logger::log(int level, const char* msg)
+void StreamLogger::operator()(log_level_t level, const char* msg)
 {
   std::cout << "Level = " << level << " - msg = " << msg << "
";
 }


--- orig/gphxcore/src/logger.h
+++ mod/gphxcore/src/streamlogger.h
@@ -1,9 +1,33 @@
-#ifndef INCLUDED_LOGGER_H
-#define INCLUDED_LOGGER_H
+/* This source file is a part of the GePhex Project.
 
-class Logger
+  Copyright (C) 2001-2005
+
+  Georg Seidel <georg at gephex.org> 
+  Martin Bayer <martin at gephex.org> 
+  Phillip Promesberger <coma at gephex.org>
+ 
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+ 
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/
+
+#ifndef INCLUDED_STREAM_LOGGER_H
+#define INCLUDED_STREAM_LOGGER_H
+
+#include "logger.h"
+
+class StreamLogger : public gsdk::Logger
 {
  public:
-  void log(int level, const char* msg);
+  void operator()(log_level_t level, const char* msg);
 };
 #endif


--- orig/gphxcore/src/unitfactoryhandleimpl.cpp
+++ mod/gphxcore/src/unitfactoryhandleimpl.cpp
@@ -26,7 +26,7 @@
 #include <sstream>
 
 #include "pluginhandleimpl.h"
-#include "unitfactorywrapper.h"
+#include "unit.h"
 
 #include "stringtokenizer.h"
 #include "structreader.h"
@@ -35,59 +35,62 @@
 {
   //-------------------------------------------------------------------------
 
-  PortIDImpl::PortIDImpl(UnitFactoryHandleImpl& uhi,
+  PortID::PortID(UnitFactoryHandle& uhi,
                          const PropertyMap& spec,
                          const std::string& id,
                          const std::string& type,
                          unsigned int index,
-                         port_io::IO io,
-                         bool strong_dep)
+                         port_io::IO io)
     : m_unit_factory_handle(uhi), m_type(type), m_spec(spec),
       m_index(index), m_id(id),
-      m_io(io), m_strong_dep(strong_dep)
+      m_io(io)
   {
   }
 
-  PortIDImpl::~PortIDImpl() {}
 
-  PortIDImpl::PropertyMap PortIDImpl::spec() const
+  PropertyMap PortID::spec() const
   {
     return m_spec;
   }
 
-  std::string PortIDImpl::id() const
+  std::string PortID::id() const
   {
     return m_id;
   }
 
-  unsigned int PortIDImpl::index() const
+  unsigned int PortID::index() const
   {
     return m_index;
   }
 
-  port_io::IO PortIDImpl::io() const
+  port_io::IO PortID::io() const
   {
     return m_io;
   }
 
-  bool PortIDImpl::strong_dep() const
-  {
-    return m_strong_dep;
-  }
-
-  std::string PortIDImpl::type() const
+  std::string PortID::type() const
   {
     return m_type;
   }
 
+  PropertyMap portid_spec(const PortID* pid) { return pid->spec(); }
+
+  std::string portid_id(const PortID* pid) { return pid->id(); }
+
+  unsigned int portid_index(const PortID* pid) { return pid->index(); }
+
+  port_io::IO portid_io(const PortID* pid) { return pid->io(); }
+
+  std::string portid_type(const PortID* pid) { return pid->type(); }
+  
   //-------------------------------------------------------------------------
 
-  UnitFactoryHandleImpl::UnitFactoryHandleImpl(UnitFactoryWrapper* u,
-                                               UnitFactoryIDImpl& id_)
+  UnitFactoryHandle::UnitFactoryHandle(gsdk::Unit* u,
+                                               UnitFactoryID& id_)
     : refcount(0), uf(u), plugin_handle(id_.plugin_handle),
       id(id_), m_num_ports(0)
   {
-    const char* specc = uf->get_spec();
+    const char* specc = uf->spec();
     if (specc == 0)
       throw std::invalid_argument("could not create unittype "
                                   "(get_spec failed)");
@@ -103,12 +106,6 @@
     if (!sr.hasKey("ports"))
       throw std::invalid_argument("Spec error: 'ports' not specified");
 
-    if (!sr.hasKey("deterministic"))
-      throw std::invalid_argument("Spec error: 'deterministic' "
-                                  "not specified");
-
-    m_deterministic = sr.getBoolValue("deterministic");
-
     try {
       // get port id's and remember the index for each portID
       std::string ports = sr.getStringValue("ports");
@@ -124,7 +121,7 @@
                 throw std::invalid_argument(msg.c_str());
               }
 
-            const char* port_spec = uf->get_port_spec(m_num_ports);
+            const char* port_spec = uf->port_spec(m_num_ports);
             if (port_spec == 0)
               throw std::invalid_argument("could not get port spec");
 
@@ -158,13 +155,9 @@
                                                        "value: ") +
                                           sio).c_str());
 
-            bool strong_dep = false;
-            if (io == port_io::IN)
-              strong_dep = psr.getBoolValue("strong_dep");
-
-            PortID* ph = new PortIDImpl(*this, psr.getMap(), portID,
+            PortID* ph = new PortID(*this, psr.getMap(), portID,
                                         link_type_id, m_num_ports,
-                                        io, strong_dep);
+                                        io);
 
             m_port_handles.push_back(ph);
 
@@ -178,35 +171,34 @@
         }
   }
 
-  UnitFactoryHandleImpl::~UnitFactoryHandleImpl()
+  UnitFactoryHandle::~UnitFactoryHandle()
   { 
     for (std::vector<PortID*>::const_iterator 
            it = m_port_handles.begin(); it != m_port_handles.end(); ++it)
       {
         delete *it;
       }
-
-    delete uf;
   }
 
-  UnitFactoryHandleImpl::PropertyMap UnitFactoryHandleImpl::spec() const
+  UnitFactoryHandle::PropertyMap UnitFactoryHandle::spec() const
   {
     return m_spec;
   }
 
-  std::vector<PortID*> UnitFactoryHandleImpl::ports() const
+  std::vector<PortID*> UnitFactoryHandle::ports() const
   {
     return m_port_handles;
   }
 
-  bool UnitFactoryHandleImpl::deterministic() const
+
+  PropertyMap unitfactory_spec(const UnitFactoryHandle* ufh)
   {
-    return m_deterministic;
+    return ufh->spec();
   }
 
-  // TODO: stuff popuff
-  UnitFactoryHandle::~UnitFactoryHandle() {}
-  UnitFactoryHandle& UnitFactoryHandle::operator=(const UnitFactoryHandle&)
-  { return *this; }
+  std::vector<PortID*> unitfactory_ports(const UnitFactoryHandle* ufh)
+  {
+    return ufh->ports();
+  }
   //-------------------------------------------------------------------------
 }


--- orig/gphxcore/src/unitfactoryhandleimpl.h
+++ mod/gphxcore/src/unitfactoryhandleimpl.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -25,28 +25,27 @@
 
 #include "unitfactoryhandle.h"
 
-class UnitFactoryWrapper;
+namespace gsdk
+{
+  class Unit;
+}
 
 namespace core
 {
   //-------------------------------------------------------------------------
-  class UnitFactoryHandleImpl;
-  class UnitFactoryIDImpl;
-  class PluginHandleImpl;
+  class UnitFactoryHandle;
+  class UnitFactoryID;
+  class PluginHandle;
 
-  class PortIDImpl : public PortID
+  struct PortID
   {
-  public:
-    PortIDImpl(UnitFactoryHandleImpl& uhi,
-               const PropertyMap& spec,
-               const std::string& id,
-               const std::string& type,
-               unsigned int index,
-               port_io::IO io,
-               bool strong_dep);
-
+    PortID(UnitFactoryHandle& uhi,
+           const PropertyMap& spec,
+           const std::string& id,
+           const std::string& type,
+           unsigned int index,
+           port_io::IO io);
 
-    virtual ~PortIDImpl();
 
     PropertyMap spec() const;
 
@@ -56,11 +55,9 @@
 
     port_io::IO io() const;
 
-    bool strong_dep() const;
-
     std::string type() const;
 
-    UnitFactoryHandleImpl& m_unit_factory_handle;
+    UnitFactoryHandle& m_unit_factory_handle;
 
   private:
     std::string m_type;
@@ -76,15 +73,14 @@
 
   //-------------------------------------------------------------------------
 
-  class UnitFactoryHandleImpl : public UnitFactoryHandle
+  struct UnitFactoryHandle
   {
-  public:
     typedef std::map<std::string, std::string> PropertyMap;
 
-    UnitFactoryHandleImpl(UnitFactoryWrapper* u,
-                          UnitFactoryIDImpl& id_);
+    UnitFactoryHandle(gsdk::Unit* u,
+                      UnitFactoryID& id_);
 
-    virtual ~UnitFactoryHandleImpl();
+    ~UnitFactoryHandle();
 
     /**
      * Returns the spec of the unit type
@@ -115,12 +111,10 @@
 
     std::vector<PortID*> ports() const;
 
-    bool deterministic() const;
-
     int refcount;
-    UnitFactoryWrapper* uf;
-    PluginHandleImpl* plugin_handle;
-    UnitFactoryIDImpl& id;
+    gsdk::Unit* uf;
+    PluginHandle* plugin_handle;
+    UnitFactoryID& id;
 
   private:
     PropertyMap m_spec;
@@ -129,8 +123,8 @@
     bool m_deterministic;
     int m_num_ports;
 
-    UnitFactoryHandleImpl(const UnitFactoryHandleImpl&);            // not impl
-    UnitFactoryHandleImpl& operator=(const UnitFactoryHandleImpl&); // not impl
+    UnitFactoryHandle(const UnitFactoryHandle&);            // not impl
+    UnitFactoryHandle& operator=(const UnitFactoryHandle&); // not impl
   };
 
   //-------------------------------------------------------------------------


--- orig/gphxcore/src/unithandleimpl.cpp
+++ mod/gphxcore/src/unithandleimpl.cpp
@@ -26,7 +26,7 @@
 
 #include "unithandleimpl.h"
 #include "unitfactoryhandleimpl.h"
-#include "unitwrapper.h"
+#include "unit.h"
 
 namespace core
 {
@@ -41,64 +41,73 @@
 
   //-------------------------------------------------------------------------
 
-  PortHandleImpl::PortHandleImpl(UnitHandleImpl& uh,
-                                 PortIDImpl& id)
+  PortHandle::PortHandle(UnitHandle& uh, PortID& id)
     : unit_handle(uh), m_id(id) {}
 
-  PortIDImpl& PortHandleImpl::id() const
+  PortID& PortHandle::id() const
   {
     return m_id;
   }
 
+  PortID* porthandle_id(const PortHandle* ph)
+  {
+    return &ph->id();
+  }
+
   //-------------------------------------------------------------------------
 
-  UnitHandleImpl::UnitHandleImpl(UnitWrapper* u, UnitNode* n,
-                                 UnitFactoryHandleImpl& ufi)
+  UnitHandle::UnitHandle(gsdk::Unit& u, UnitNode* n,
+                                 UnitFactoryHandle& ufi)
     : unit(u), node(n), unit_factory(ufi) 
   {
     std::vector<PortID*> ids = ufi.ports();
     for (std::vector<PortID*>::const_iterator it = ids.begin();
          it != ids.end(); ++it)
         {
-          PortHandleImpl* 
-            phi = new PortHandleImpl(*this,
-                                     *safe_cast<PortIDImpl*>(*it));
+          PortHandle* phi = new PortHandle(*this,
+                                           *safe_cast<PortID*>(*it));
           m_port_handles.push_back(phi);
         }
     }
 
-    UnitHandleImpl::~UnitHandleImpl()
+    UnitHandle::~UnitHandle()
     {
-      for (std::vector<PortHandleImpl*>::iterator it = m_port_handles.begin();
+      for (std::vector<PortHandle*>::iterator it = m_port_handles.begin();
            it != m_port_handles.end(); ++it)
         {
           delete *it;
         }
 
-      delete unit;
       delete node;
     }
 
-    UnitFactoryHandle& UnitHandleImpl::factory_handle() const
+    UnitFactoryHandle& UnitHandle::factory_handle() const
     {
       return unit_factory;
     }
 
-    PortHandle& UnitHandleImpl::port_handle(unsigned int index) const
+    PortHandle& UnitHandle::port_handle(unsigned int index) const
     {
       if (index >= m_port_handles.size())
         throw std::invalid_argument("Index out of range at "
-                                    "UnitHandleImpl::port_handle()");
+                                    "UnitHandle::port_handle()");
       return *m_port_handles[index];
     };
 
-  unsigned int UnitHandleImpl::num_ports() const
+  unsigned int UnitHandle::num_ports() const
   {
     return m_port_handles.size();
   }
 
 
-  UnitHandle::~UnitHandle() {}
-  UnitHandle& UnitHandle::operator=(const UnitHandle&)
-  { return *this; }
+  UnitFactoryHandle* unithandle_factory_handle(const UnitHandle* uh)
+  {
+    return &uh->factory_handle();
+  }
+
+  PortHandle* unithandle_port_handle(const UnitHandle* uh,
+                                     unsigned int index)
+  {
+    return &uh->port_handle(index);
+  }
 }


--- orig/gphxcore/src/unithandleimpl.h
+++ mod/gphxcore/src/unithandleimpl.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -30,25 +30,28 @@
 
 #include "unitfactoryhandleimpl.h"
 
-class UnitWrapper;
+namespace gsdk
+{
+  class Unit;
+}
 
 namespace core
 {
-  class PortIDImpl;
+  struct PortID;
 
-  class UnitHandleImpl;
-  class UnitFactoryHandleImpl;
+  struct UnitHandle;
+  struct UnitFactoryHandle;
 
   //------------------------------------------------------------------------
   // Used by the renderer
 
-  class ConnectionHandleImpl;
+  struct ConnectionHandle;
   struct UnitNode
   {
     UnitNode(int num_ports);
 
     // connection for every port of the unit
-    std::vector<ConnectionHandleImpl*> adj;
+    std::vector<ConnectionHandle*> adj;
 
     double timestamp; // TODO: replace with some sort of color or state
                       //   (if update is called with time==0 there is a
@@ -58,26 +61,24 @@
 
   //-------------------------------------------------------------------------
 
-  class PortHandleImpl : public PortHandle
+  struct PortHandle
   {
-  public:
-    PortHandleImpl(UnitHandleImpl& uh,
-                   PortIDImpl& id);
+    PortHandle(UnitHandle& uh,
+               PortID& id);
 
-    PortIDImpl& id() const;
+    PortID& id() const;
 
-    UnitHandleImpl& unit_handle;
-    PortIDImpl& m_id;
+    UnitHandle& unit_handle;
+    PortID& m_id;
   };
 
   //-------------------------------------------------------------------------
 
-  class UnitHandleImpl : public UnitHandle
+  struct UnitHandle
   {
-  public:
-    UnitHandleImpl(UnitWrapper* u, UnitNode* n, UnitFactoryHandleImpl& uti);
+    UnitHandle(gsdk::Unit& u, UnitNode* n, UnitFactoryHandle& uti);
 
-    virtual ~UnitHandleImpl();
+    virtual ~UnitHandle();
 
     UnitFactoryHandle& factory_handle() const;
 
@@ -85,12 +86,12 @@
 
     unsigned int num_ports() const;
 
-    UnitWrapper* unit;
+    gsdk::Unit& unit;
     UnitNode* node;
-    UnitFactoryHandleImpl& unit_factory;
+    UnitFactoryHandle& unit_factory;
 
   private:
-    std::vector<PortHandleImpl*> m_port_handles;
+    std::vector<PortHandle*> m_port_handles;
   };
 }
 


--- orig/konsolenphex/scripts/plus.phex
+++ mod/konsolenphex/scripts/plus.phex
@@ -1,35 +1,31 @@
 ls
-load("numbers")
-uf_import(KalkulonFactory,1)
-uf_import(RandomFactory,1)
-u_create(p, KalkulonFactory:1)
+load(core)
+uf_import(Kalkulon,1)
+u_create(p, Kalkulon:1)
 lf_import(NumberFactory,1)
 l_create(x, NumberFactory:1)
 l_create(y, NumberFactory:1)
 l_create(z, NumberFactory:1)
-attach(x,p,in_x,c1)
-attach(y,p,in_y,c2)
-attach(z,p,out_z,c3)
+attach(x,p,in_lhs,c1)
+attach(y,p,in_rhs,c2)
+attach(z,p,out_dst,c3)
 set(x,1)
 set(y,2)
 update(p)
 get(z)
-u_create(gen, RandomFactory:1)
-attach(x, gen, out_rand, c4)
 
 
 //-------- Simple Rekursion ---------------
 ls
-load("numbers.so")
-uf_import(KalkulonFactory,1)
-uf_import(RandomFactory,1)
-u_create(p, KalkulonFactory:1)
-lf_import(Number,1)
+load(core)
+uf_import(Kalkulon,1)
+u_create(p, Kalkulon:1)
+lf_import(NumberFactory,1)
 l_create(x, NumberFactory:1)
 l_create(z, NumberFactory:1)
-attach(x,p,in_x, c1)
-attach(z,p,in_y, c2)
-attach(z,p,out_z,c3)
+attach(x,p,in_lhs, c1)
+attach(z,p,in_rhs, c2)
+attach(z,p,out_dst,c3)
 set(x,1)
 update(p)
 get(z)


--- orig/konsolenphex/src/Makefile.am
+++ mod/konsolenphex/src/Makefile.am
@@ -9,12 +9,13 @@
 konsolenphex_LDFLAGS =
 
 konsolenphex_LDADD = \
-	-ldl -lboost_filesystem \
-	-lgphxutils -lgphxcore \
+	-lgphxcore -lgphxutils -lgphxsdk -ldl -lboost_filesystem \
 	-L at top_builddir@/gphxutils/src \
+	-L at top_builddir@/gphxsdk/src \
 	-L at top_builddir@/gphxcore/src
 
 konsolenphex_DEPENDENCIES = \
 	@top_builddir@/gphxutils/src/libgphxutils.a \
+	@top_builddir@/gphxsdk/src/libgphxsdk.a \
 	@top_builddir@/gphxcore/src/libgphxcore.a
 


--- orig/konsolenphex/src/main.cpp
+++ mod/konsolenphex/src/main.cpp
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
-  Copyright (C) 2001-2003 
+  Copyright (C) 2001-2005
 
   Georg Seidel <georg at gephex.org> 
   Martin Bayer <martin at gephex.org> 
@@ -398,7 +398,7 @@
   void operator()(const std::pair<std::string, core::ConnectionHandle*>& p)
   {
     std::cout << "Cleaning connection '" << p.first << "'
";
-    m_core.detach(*p.second);
+    core::core_detach(m_core, p.second);
   }
 private:
   core::Core& m_core;
@@ -412,7 +412,9 @@
   void operator()(const std::pair<std::string, core::LinkHandle*>& p)
   {
     std::cout << "Cleaning link '" << p.first << "'
";
-    m_core.destroy_link(*p.second);
+    core::CoreError err;
+    if (!core::core_destroy_link(m_core, p.second, err))
+      throw std::runtime_error("Could not destroy link");
   }
 private:
   core::Core& m_core;
@@ -426,7 +428,9 @@
   void operator()(const std::pair<std::string, core::UnitHandle*>& p)
   {
     std::cout << "Cleaning unit '" << p.first << "'
";
-    m_core.destroy_unit(*p.second);
+    core::CoreError err;
+    if (!core::core_destroy_unit(m_core, p.second, err))
+      throw std::runtime_error("Could not destroy unit");
   }
 private:
   core::Core& m_core;
@@ -440,7 +444,9 @@
   void operator()(const std::pair<std::string, core::LinkFactoryHandle*>& p)
   {
     std::cout << "Cleaning link factory '" << p.first << "'
";
-    m_core.unimport_lf(*p.second);
+    core::CoreError err;
+    if (!core_unimport_lf(m_core, p.second, err))
+      throw std::runtime_error("Could not unimport linkfactory");
   }
 private:
   core::Core& m_core;
@@ -455,7 +461,9 @@
   void operator()(const std::pair<std::string, core::UnitFactoryHandle*>& p)
   {
     std::cout << "Cleaning unit factory '" << p.first << "'
";
-    m_core.unimport_uf(*p.second);
+    core::CoreError err;
+    if (!core::core_unimport_uf(m_core, p.second, err))
+      throw std::runtime_error("Could not unimport unitfactory");
   }
 private:
   core::Core& m_core;
@@ -470,7 +478,9 @@
   void operator()(const std::pair<std::string, core::PluginHandle*>& p)
   {
     std::cout << "Cleaning plugin '" << p.first << "'
";
-    m_core.unload_plugin(*p.second);
+    core::CoreError err;
+    if (!core::core_unload_plugin(m_core, p.second, err))
+      throw std::runtime_error("Could not unload plugin");
   }
 private:
   core::Core& m_core;
@@ -493,7 +503,8 @@
   std::string plugin_path = argv[1];
   std::string plugin_extensions = "so";
 
-  core::Core core;
+  core::CoreError err;
+  core::Core* core = core::core_create();
   
   bool stop = false;
   double system_time = 1;
@@ -583,36 +594,44 @@
                 throw std::runtime_error("No such plugin registered (try ls)");
 
               std::string fname = it->second;
-              std::auto_ptr<utils::ILibrary> 
-                lib(new utils::SharedLibrary(fname));
-              core::PluginHandle* plg = &core.load_plugin(lib);
+              utils::ILibrary* lib(new utils::SharedLibrary(fname));
+              core::PluginHandle* plg = core::core_load_plugin(*core,
+                                                               lib, err);
 
-              core::PluginHandle::UnitFactoryIDList unitfactories = plg->list_ufs();
+              if (!plg)
+                {
+                  delete lib;
+                  throw std::runtime_error("Could not load plugin");
+                }
+
+              core::UnitFactoryIDList unitfactories = plugin_list_ufs(*plg);
               std::cout << "UnitFactories: (";
-              for (core::PluginHandle::UnitFactoryIDList::const_iterator 
-                     it = unitfactories.begin(); it != unitfactories.end(); ++it)
+              for (core::UnitFactoryIDList::const_iterator 
+                     it = unitfactories.begin();
+                   it != unitfactories.end(); ++it)
                 {
-                  std::cout << (*it)->name() << "," << (*it)->version() << ";";
-                  uf_ids[std::make_pair((*it)->name(),
-                                        (*it)->version())] = 
+                std::string name    = ufid_name(**it);
+                std::string version = ufid_version(**it);
+                  std::cout << name << "," << version << ";";
+                  uf_ids[std::make_pair(name, version)] = 
                     std::make_pair(*it, plg);
                 }
               std::cout << ") - ";              
 
-              core::PluginHandle::LinkFactoryIDList linkfactories = plg->list_lfs();
+              core::LinkFactoryIDList linkfactories = plugin_list_lfs(*plg);
               std::cout << "LinkFactories: (";
-              for (core::PluginHandle::LinkFactoryIDList::const_iterator 
+              for (core::LinkFactoryIDList::const_iterator 
                    it = linkfactories.begin(); it != linkfactories.end(); ++it)
               {
-                std::cout << (*it)->name() << "," << (*it)->version() << ";";
-                lf_ids[std::make_pair((*it)->name(),
-                                      (*it)->version())] = 
+                std::string name    = l