From d5565b319f7754993825d67388ad4112f5190239 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Sat, 25 Feb 2006 12:40:24 +0000 Subject: [PATCH] - Add placeholder for a plugin interface to implement. Will need to be finished with next milestones. git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@460 3ecf2c5c-341e-0410-92b4-d18e462d057c --- Makefile.am | 1 + src/backend/plugin.hh | 36 ++++++++++++++++++++++++++++++++++++ src/backend/pyloader/hook.cc | 1 + 3 files changed, 38 insertions(+) create mode 100644 src/backend/plugin.hh diff --git a/Makefile.am b/Makefile.am index af6f35e..4b5a5fd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -160,6 +160,7 @@ pkginclude_HEADERS = \ config.h \ src/backend/history.hh \ src/backend/observed_subject.hh \ + src/backend/plugin.hh \ src/backend/policy.hh \ src/backend/policy_manager.hh \ src/backend/policy_parameters.hh \ diff --git a/src/backend/plugin.hh b/src/backend/plugin.hh new file mode 100644 index 0000000..17313a6 --- /dev/null +++ b/src/backend/plugin.hh @@ -0,0 +1,36 @@ +// src/backend/plugin.hh - Copyright 2005, 2006, University +// of Padova, dept. of Pure and Applied +// Mathematics +// +// This file is part of SGPEMv2. +// +// This 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. +// +// SGPEMv2 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 SGPEMv2; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +#ifndef SGPEMV2__PLUGIN_HH +#define SGPEMV2__PLUGIN_HH 1 + +#include "config.h" + +/** \file plugin.hh + * All loadable modules that want to act as plugins + * for SGPEMv2 should implement this interface. */ + +// FIXME Add Singleton LoadPlugin class. +/* + class LoadPlugin { + }; +*/ + +#endif diff --git a/src/backend/pyloader/hook.cc b/src/backend/pyloader/hook.cc index b2ed528..6426360 100644 --- a/src/backend/pyloader/hook.cc +++ b/src/backend/pyloader/hook.cc @@ -36,6 +36,7 @@ extern "C" { #define SG_CONSTRUCTOR __attribute__ ((constructor)) #define SG_DESTRUCTOR __attribute__ ((destructor)) +#define _libpyloader_LTX__global_pm (_global_pm); PolicyManager* _global_pm = NULL;