diff --git a/README b/README index 4818b748141f7df167bc31744f5901432d918afd..8088615b8df0911bd86f84092de1049f1c3b41e5 100644 --- a/README +++ b/README @@ -1 +1,7 @@ -See INSTALL for installation instruction. +See INSTALL for installation instructions. + +The dynamic-graph library is a framework to create dynamic +graphs of generic entities connected together by signals, +with helper facilities such as signal casters, an object +factory and an object pool. It is a spin-off and was +originally part of the StackOfTasks library. diff --git a/doc/additionalDoc/package.h b/doc/additionalDoc/package.h index 4182e8235c59ae8beeb2ee23be4cff439c2b4033..5ff74320d890ee1449a0cd20e4914622fd370664 100644 --- a/doc/additionalDoc/package.h +++ b/doc/additionalDoc/package.h @@ -3,14 +3,14 @@ \section intro_dynamicGraph Introduction -This code implements the g_factory design pattern, making creation of entities +This code implements the factory design pattern, making creation of entities available to packages depending on the dynamic-graph API. Objects, which are derived from Entities, can be declared within the code and compiled to shared libraries (.so/.dll files). These libraries can be loaded at run-time using the PluginLoader methods, and at the same time register their class names to the Factory (see the -examples in the DYNAMIC-GRAPH documentation to learn how). +examples in the SOT documentation to learn how). The Factory can then create instances of these objects and subsequently register them in the Pool, where they can be listed, accessed, and acted upon diff --git a/unitTesting/CMakeLists.txt b/unitTesting/CMakeLists.txt index b59119d6943fd324e62685c21283f0c2023a6eab..acdedd9b5b29a7b2e54fe02a928e3b7de2ad4598 100644 --- a/unitTesting/CMakeLists.txt +++ b/unitTesting/CMakeLists.txt @@ -7,7 +7,6 @@ SET(tests test_shell test_pool test_depend - test_factory test_signalcast) FOREACH(test_name ${tests}) diff --git a/unitTesting/test_factory.cpp b/unitTesting/test_factory.cpp deleted file mode 100644 index ef4b3f386cad63c18c2bedad47f6c42180e51376..0000000000000000000000000000000000000000 --- a/unitTesting/test_factory.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - * Copyright Projet JRL-JAPAN, Tsukuba, 2007 - *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - * - * File: test_factory.cc - * Project: DYNAMIC-GRAPH - * Author: Nicolas Mansard - * - * Version control - * =============== - * - * $Id$ - * - * Description - * ============ - * - * - * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ - -/* -------------------------------------------------------------------------- */ -/* --- INCLUDES ------------------------------------------------------------- */ -/* -------------------------------------------------------------------------- */ - - -#include <string> -#include <iostream> -#include <cstdlib> -#include <sstream> - -#include <dynamic-graph/factory.h> -#include <dynamic-graph/entity.h> -#include <dynamic-graph/debug.h> - - -using namespace std; -using namespace dynamicgraph; - -#ifdef WIN32 -#include <Windows.h> -#else -#include <dlfcn.h> -#endif - -#ifdef WIN32 - typedef HMODULE sotPluginKey; -#else - typedef void* sotPluginKey; -#endif - -int main() -{ - - dgDEBUG(0) << "# In {"<<endl; -// Entity test(""); -// sotExceptionFeature t2(sotExceptionFeature::BAD_INIT); -// sotExceptionSignal t4(sotExceptionSignal::COPY_NOT_INITIALIZED); -// sotFlags t3; -// TestFeature t5; - -#ifndef WIN32 - sotPluginKey dlib = dlopen("lib/plugin/sotFeatureVisualPoint.so", RTLD_NOW); -#else - sotPluginKey dlib = LoadLibrary ( "lib/plugin/sotFeatureVisualPoint.lib"); -#endif -if( NULL==dlib ) - { - cerr << " Error dl"<<endl; -#ifndef WIN32 - cerr << dlerror() <<endl; -#else - // Retrieve the system error message for the last-error code - LPTSTR pszMessage; - DWORD dwLastError = GetLastError(); - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - dwLastError, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&pszMessage, - 0, NULL ); - - - cerr << pszMessage <<endl; - LocalFree(pszMessage); -#endif - - exit(0); - } - - -#ifndef WIN32 - dlib = dlopen("lib/plugin/sotGainAdaptative.so", RTLD_NOW); -#else - dlib = LoadLibrary ("lib/plugin/sotGainAdaptative.lib"); -#endif - if( NULL==dlib ) - { - cout << "This test can only be run after the package StackOfTasks has been installed\n" - "Could not find sotGainAdaptive shared library" << endl; -#ifndef WIN32 - cerr << dlerror() <<endl; -#else - // Retrieve the system error message for the last-error code - LPTSTR pszMessage; - DWORD dwLastError = GetLastError(); - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - dwLastError, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&pszMessage, - 0, NULL ); - - - cerr << pszMessage <<endl; - LocalFree(pszMessage); -#endif - exit(0); - } - - Entity* gain = 0; - if ( !g_factory.existEntity("GainAdaptative") ) { - cout << "Could not find entity class 'GainAdaptative'" << endl; - exit(0); - } - else - gain = g_factory.newEntity("GainAdaptative","Gain"); - - - gain->display(cout); cout << endl; - cout <<gain->getClassName(); cout << endl; - - - dgDEBUG(0) << "# Out }"<<endl; -} -