Skip to content
Snippets Groups Projects
Commit dbfd5c84 authored by Francois Bleibel's avatar Francois Bleibel
Browse files

Type in symbol dgDEBUGFLOW resulted in not being able to load shared...

Type in symbol dgDEBUGFLOW resulted in not being able to load shared libraries. Fixed. Preliminary documentation changes. Re-added INSTALL file.
parent 9b95bcc5
No related branches found
No related tags found
No related merge requests found
INSTALL 0 → 100644
#
# Copyright
#
Installation instructions for library dynamicGraph
----------------------------------------------
It is recommended to create a specific directory to install this package.
mkdir build
cd build
cmake [Options] ..
make
make install
Options:
-DCMAKE_INSTALL_PREFIX=...
specifies the directory where to install the package.
-DCMAKE_BUILD_TYPE=[none|debug|release|relwithdebinfo|MinSizeRel]
specifies to type of compilation (release, debug, ...)
......@@ -5,4 +5,41 @@
This package implements ...
@defgroup factory Plugin management modules.
@ingroup factory
This code implements the factory design pattern, making creation of features,
tasks and objects available.
Objects, which are derived from Entities, Tasks, or Features, can be
declared within the code and compiled to shared librairies (.so/.dll files).
These librairies can be loaded at run-time using the sotPluginLoader methods,
and at the same time register their class names to the Factory (see the
sotFactory 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
(see sotPoolStorage documentation). Basic commands defined by entities include
signal connection graph file generation, help and name print, and signals.
Finally, a shell (command-line) interface is made available thanks to the
sotInterpretor class (see the file test_shell.cpp). Objects deriving from
Entity can expose their own commands by overriding the Entity's default
commandLine() method. It is possible to load a plugin to register custom
shell commands; see sotShellFunctions and sotShellProcedure for an example.
The public static objects (singletons) made available by including the
corresponding headers in this module are:
\li factory: FactoryStorage
\li pool: PoolStorage
\li Shell: Interpreter
\image html schema_plugin.png
@defgroup signals Signals
@ingroup softwaresupport
This part provides the mechanism to transfer information
from one feature to another.
*/
doc/pictures/schema_plugin.png

134 KiB

......@@ -63,9 +63,10 @@ std::ofstream dg_debugfile; //( "/dev/null", std::ios::trunc&std::ios::out );
#endif
DebugTrace dgDebugFLOW(dg_debugfile);
DebugTrace dgERRORFLOW(dg_debugfile);
namespace dynamicgraph {
DebugTrace dgDEBUGFLOW(dg_debugfile);
DebugTrace dgERRORFLOW(dg_debugfile);
}
void DebugTrace::openFile( const char * filename )
{
......
......@@ -22,6 +22,12 @@ SET(libdg_${SOT_MODULE_NAME}_plugins_src
dgraph/shell-procedure.cpp
)
# Specify the compile flags for source file.
SET_SOURCE_FILES_PROPERTIES(${SOT_MODULE_NAME}/shell-functions.cpp
${SOT_MODULE_NAME}/shell-procedure.cpp
PROPERTIES
COMPILE_FLAGS "${MatrixAbstractLayer_cflags}" )
# ---------------------------------------------------------------
# --- GENERIC RULES ---------------------------------------------
# ---------------------------------------------------------------
......
......@@ -400,6 +400,7 @@ cmdComputeSignal( const std::string& cmdLine, std::istringstream& cmdArg, std::o
void Interpreter::
cmd( const std::string& cmdLine, istringstream& cmdArg, std::ostream& os )
{
cout << "#HACK cmd(" << cmdArg.str() << ")" << endl;
istringstream cmdparse(cmdLine.c_str());
string obj,fun;
if (cmdLine.find_first_not_of(" ") == string::npos)
......@@ -486,6 +487,7 @@ ShellFunctionRegisterer( const std::string& funName,
const Interpreter::ShellBasicFunction& f)
{
dgDEBUGIN(25);
cout << "#HACK registering " << funName << endl;
Shell.registerFunction(funName,f);
dgDEBUGOUT(25);
}
......@@ -504,5 +506,8 @@ void Interpreter::writeCompletionList(std::ostream& os)
}
namespace dynamicgraph {
//! The global Shell object.
Interpreter dynamicgraph::Shell;
Interpreter Shell;
}
......@@ -180,9 +180,6 @@ class DYNAMICGRAPH_EXPORT Interpreter
};
DYNAMICGRAPH_EXPORT extern Interpreter Shell;
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
......@@ -204,9 +201,12 @@ public:
ShellFunctionRegisterer reg( name,boost::bind(fun,_1,_2,_3) );\
}
DYNAMICGRAPH_EXPORT extern Interpreter Shell;
} // namespace dynamicgraph
#endif /* #ifndef */
......
......@@ -488,9 +488,9 @@ cmdCompletionList( const std::string cmdLine, istringstream& cmdArg, std::ostrea
extern "C" {
ShellFunctionRegisterer regFun2
( "try",boost::bind(ShellFunctions::cmdTry,_1,_2,_3) );
ShellFunctionRegisterer regFun1
( "try",boost::bind(ShellFunctions::cmdTry,_1,_2,_3) );
ShellFunctionRegisterer regFun2
( "loadPlugins",boost::bind(ShellFunctions::cmdLoadPlugins,_1,_2,_3) );
ShellFunctionRegisterer regFun3
( "displayPlugins",boost::bind(ShellFunctions::cmdDisplayPlugins,_1,_2,_3) );
......
......@@ -60,6 +60,7 @@
#define STATIC_SHELL_FUNCTION( name ) \
static void name( const std::string cmd,std::istringstream& args, \
std::ostream& os )
/*! @ingroup dgraph
\brief This plugin implements a bunch of useful shell commands.
......@@ -93,6 +94,4 @@ class SHELLFUNCTIONS_EXPORT ShellFunctions
};
#endif //#ifndef __SOT_SHELL_FUNCTIONS_HH__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment