Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph
Commits
4d4eb36c
Commit
4d4eb36c
authored
Oct 11, 2010
by
Thomas Moulard
Browse files
Remove trailing whitespaces.
parent
e54d2532
Changes
30
Hide whitespace changes
Inline
Side-by-side
include/dynamic-graph/debug.h
View file @
4d4eb36c
...
...
@@ -49,7 +49,7 @@
#include
<stdarg.h>
#include
<dynamic-graph/dynamic-graph-api.h>
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
...
...
@@ -58,7 +58,7 @@
#ifndef VP_DEBUG_MODE
#define VP_DEBUG_MODE 0
#endif
#endif
#ifndef VP_TEMPLATE_DEBUG_MODE
#define VP_TEMPLATE_DEBUG_MODE 0
#endif
...
...
@@ -82,14 +82,14 @@ class DYNAMICGRAPH_EXPORT DebugTrace
std
::
ostream
&
outputbuffer
;
char
charbuffer
[
SIZE
+
1
];
int
traceLevel
;
int
traceLevelTemplate
;
int
traceLevelTemplate
;
DebugTrace
(
std
::
ostream
&
os
)
:
outputbuffer
(
os
)
{}
inline
void
trace
(
const
int
level
,
const
char
*
format
,...)
{
if
(
level
<=
traceLevel
)
DG_COMMON_TRACES
;
tmpbuffer
.
str
(
""
);
}
inline
void
trace
(
const
char
*
format
,...){
DG_COMMON_TRACES
;
tmpbuffer
.
str
(
""
);
}
inline
void
trace
(
const
int
level
=-
1
)
inline
void
trace
(
const
int
level
=-
1
)
{
if
(
level
<=
traceLevel
)
outputbuffer
<<
tmpbuffer
.
str
();
tmpbuffer
.
str
(
""
);
}
inline
void
traceTemplate
(
const
int
level
,
const
char
*
format
,...)
...
...
@@ -117,9 +117,9 @@ DYNAMICGRAPH_EXPORT extern DebugTrace dgERRORFLOW;
#ifdef VP_DEBUG
#define dgPREDEBUG __FILE__ << ": " <<__FUNCTION__ \
<< "(#" << __LINE__ << ") :"
<< "(#" << __LINE__ << ") :"
#define dgPREERROR "\t!! "<<__FILE__ << ": " <<__FUNCTION__ \
<< "(#" << __LINE__ << ") :"
<< "(#" << __LINE__ << ") :"
# define dgDEBUG(level) if( (level>VP_DEBUG_MODE)||(!dgDEBUGFLOW.outputbuffer.good()) ) ;\
else dgDEBUGFLOW.outputbuffer << dgPREDEBUG
...
...
@@ -138,7 +138,7 @@ inline bool dgTDEBUG_ENABLE( const int & level ) { return level<=VP_TEMPLATE_DEB
/* -------------------------------------------------------------------------- */
#else // #ifdef VP_DEBUG
#define dgPREERROR "\t!! "<<__FILE__ << ": " <<__FUNCTION__ \
<< "(#" << __LINE__ << ") :"
<< "(#" << __LINE__ << ") :"
# define dgDEBUG(level) if( 1 ) ; else std::cout
# define dgDEBUGMUTE(level) if( 1 ) ; else std::cout
# define dgERROR dgERRORFLOW.outputbuffer << dgPREERROR
...
...
include/dynamic-graph/entity.h
View file @
4d4eb36c
...
...
@@ -87,7 +87,7 @@ class DYNAMICGRAPH_EXPORT Entity
virtual
std
::
ostream
&
writeCompletionList
(
std
::
ostream
&
os
)
const
;
public:
/* --- DISPLAY --- */
virtual
void
display
(
std
::
ostream
&
os
)
const
;
virtual
void
display
(
std
::
ostream
&
os
)
const
;
public:
/* --- PARAMS --- */
virtual
void
commandLine
(
const
std
::
string
&
cmdLine
,
std
::
istringstream
&
cmdArgs
,
...
...
include/dynamic-graph/exception-abstract.h
View file @
4d4eb36c
...
...
@@ -33,7 +33,7 @@
// Uncomment this macros to have lines parameter on the throw display
// #define DYNAMIC-GRAPH_EXCEPTION_PASSING_PARAM
// #define DYNAMIC-GRAPH_EXCEPTION_PASSING_PARAM
/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
...
...
@@ -92,12 +92,12 @@ public:
{
return
getStringMessage
().
c_str
();
}
/** Print the error structure. */
DYNAMICGRAPH_EXPORT
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
ExceptionAbstract
&
err
);
#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
public:
class
Param
{
...
...
@@ -114,7 +114,7 @@ public:
Param
(
const
int
&
_line
,
const
char
*
_function
,
const
char
*
_file
);
Param
(
void
)
:
pointersSet
(
false
),
set
(
false
)
{}
Param
&
initCopy
(
const
Param
&
p
);
};
protected:
...
...
@@ -126,7 +126,7 @@ public:
template
<
class
Exc
>
friend
Exc
&
operator
+
(
const
ExceptionAbstract
::
Param
&
p
,
Exc
&
e
)
{
e
.
p
.
initCopy
(
p
);
return
e
;
}
#endif //#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
#endif //#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
};
}
// namespace dynamicgraph
...
...
@@ -137,9 +137,9 @@ public:
#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
# define DG_THROW throw ExceptionAbstract::Param(__LINE__,__FUNCTION__,__FILE__) +
#else //#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
#else //#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
# define DG_THROW throw
#endif //#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
#endif //#ifdef DYNAMICGRAPH_EXCEPTION_PASSING_PARAM
#endif
/* #ifndef __ABSTRACT_EXCEPTION_H */
...
...
include/dynamic-graph/interpreter-helper.h
View file @
4d4eb36c
...
...
@@ -90,7 +90,7 @@ class DYNAMICGRAPH_EXPORT InterpreterHelper
/*! \brief Destroy the object.
Destroy the object objName.
*/
void
cmdDestroy
(
const
std
::
string
&
objName
,
void
cmdDestroy
(
const
std
::
string
&
objName
,
std
::
ostream
&
os
);
/*! \brief Connect two signals.
...
...
@@ -107,20 +107,20 @@ class DYNAMICGRAPH_EXPORT InterpreterHelper
Extracts the name first and the directory in second from cmdArg
to load the dynamic library.
*/
void
cmdLoadPlugin
(
const
std
::
string
&
directory
,
const
std
::
string
&
pluginName
,
void
cmdLoadPlugin
(
const
std
::
string
&
directory
,
const
std
::
string
&
pluginName
,
std
::
ostream
&
os
);
/*! \brief Unload a dynamic library which includes a plugin.
Extracts the name to unload the dynamic library.
*/
void
cmdUnloadPlugin
(
const
std
::
string
&
pluginName
,
void
cmdUnloadPlugin
(
const
std
::
string
&
pluginName
,
std
::
ostream
&
os
);
/*! \brief Set a signal <obj.signal> to a value <value>
with cmdArg = "<obj.signal> <value>"
*/
void
cmdSetSignal
(
const
std
::
string
&
objname
,
void
cmdSetSignal
(
const
std
::
string
&
objname
,
const
std
::
string
&
signame
,
const
std
::
string
&
cmdArg
,
std
::
ostream
&
os
);
...
...
@@ -128,15 +128,15 @@ class DYNAMICGRAPH_EXPORT InterpreterHelper
/*! \brief Display the value of the signal <obj.signal>
with cmdArg = "<obj.signal>"
*/
void
cmdGetSignal
(
const
std
::
string
&
objname
,
const
std
::
string
&
signame
,
void
cmdGetSignal
(
const
std
::
string
&
objname
,
const
std
::
string
&
signame
,
std
::
ostream
&
os
);
/*! \brief Compute the value of the signal <obj.signal> at time <time>
with cmdArg = "<obj.signal> <time>"
*/
void
cmdComputeSignal
(
const
std
::
string
&
objname
,
const
std
::
string
&
signame
,
const
std
::
string
&
signame
,
const
int
&
time
,
std
::
ostream
&
os
);
...
...
include/dynamic-graph/plugin-loader.h
View file @
4d4eb36c
...
...
@@ -50,7 +50,7 @@ class PluginRefMap;
Once loaded, the plugins register themselves to the sotFactory and the
related objects can subsequently be instantiated by the sotInterpretor for
example.
*/
class
DYNAMICGRAPH_EXPORT
PluginLoader
{
...
...
@@ -63,12 +63,12 @@ class DYNAMICGRAPH_EXPORT PluginLoader
std
::
list
<
std
::
string
>
pluginNames
;
/*! \brief If a plugin has been loaded then this map contains
the name of the plugin.
the name of the plugin.
\note This field looks useless.
*/
std
::
map
<
std
::
string
,
std
::
string
>
loadedPluginNames
;
/*! \brief Keeps a reference to the library according to the name of the
/*! \brief Keeps a reference to the library according to the name of the
plugin. */
PluginRefMap
*
pluginRefs
;
...
...
@@ -77,7 +77,7 @@ class DYNAMICGRAPH_EXPORT PluginLoader
/*! \brief Default constructor. */
PluginLoader
(
void
);
~
PluginLoader
(
void
);
/*! \brief Set the directory from which to load the dynamic libraries
containing the plugins. */
const
std
::
string
&
setDirectory
(
const
std
::
string
&
n
);
...
...
@@ -87,7 +87,7 @@ class DYNAMICGRAPH_EXPORT PluginLoader
/*! \brief Adds a list of plugins
It is done by reading the file configFile which contains for each line
a plugin name.
a plugin name.
\par[in] configFile: The name of the file which contains the plugins name.
\par[in] dir: The name of the directory which contains the dynamic libraries.
*/
...
...
@@ -103,7 +103,7 @@ class DYNAMICGRAPH_EXPORT PluginLoader
void
unloadAllPlugins
();
const
std
::
map
<
std
::
string
,
std
::
string
>
getLoadedPluginNames
(
void
)
const
std
::
map
<
std
::
string
,
std
::
string
>
getLoadedPluginNames
(
void
)
{
return
loadedPluginNames
;
}
const
std
::
string
&
searchPlugin
(
const
std
::
string
&
plugname
);
...
...
include/dynamic-graph/shell-procedure.h
View file @
4d4eb36c
...
...
@@ -44,12 +44,12 @@
/* --- API ------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#if defined (WIN32)
#if defined (WIN32)
# if defined (shell_procedure_EXPORTS)
# define ShellProcedure_EXPORT __declspec(dllexport)
# else
# else
# define ShellProcedure_EXPORT __declspec(dllimport)
# endif
# endif
#else
# define ShellProcedure_EXPORT
#endif
...
...
@@ -87,7 +87,7 @@ class ShellProcedure_EXPORT ShellProcedure
Procedure
currentProc
;
public:
void
cmdStartProcedure
(
const
std
::
string
&
cmd
,
std
::
istringstream
&
args
,
std
::
ostream
&
os
);
void
cmdContinueProcedure
(
const
std
::
string
&
cmd
,
std
::
istringstream
&
args
,
std
::
ostream
&
os
);
void
cmdEndProcedure
(
const
std
::
string
&
cmd
,
std
::
istringstream
&
args
,
std
::
ostream
&
os
);
...
...
include/dynamic-graph/signal-array.h
View file @
4d4eb36c
...
...
@@ -31,20 +31,20 @@ class SignalArray;
template
<
class
Time
>
class
SignalArray_const
{
{
public:
static
const
int
DEFAULT_SIZE
=
20
;
static
const
int
DEFAULT_SIZE
=
20
;
protected:
const
SignalBase
<
Time
>
**
const_array
;
unsigned
int
size
,
rank
;
unsigned
int
size
,
rank
;
public:
SignalArray_const
<
Time
>
(
const
unsigned
int
&
sizeARG
=
DEFAULT_SIZE
)
SignalArray_const
<
Time
>
(
const
unsigned
int
&
sizeARG
=
DEFAULT_SIZE
)
:
const_array
(
NULL
),
size
(
sizeARG
),
rank
(
0
)
{
createArray
();
}
SignalArray_const
<
Time
>
(
const
SignalBase
<
Time
>&
sig
)
SignalArray_const
<
Time
>
(
const
SignalBase
<
Time
>&
sig
)
:
const_array
(
NULL
),
size
(
1
),
rank
(
0
)
{
createArray
();
addElmt
(
&
sig
);
}
...
...
@@ -72,10 +72,10 @@ class SignalArray_const
{
if
(
0
<
size
)
{
const_array
=
new
const
SignalBase
<
Time
>*
[
size
];
}
}
void
addElmt
(
const
SignalBase
<
Time
>*
el
)
void
addElmt
(
const
SignalBase
<
Time
>*
el
)
{
if
(
rank
<
size
)
const_array
[
rank
++
]
=
el
;
}
public:
public:
virtual
SignalArray_const
<
Time
>&
operator
<<
(
const
SignalBase
<
Time
>&
sig
)
{
addElmt
(
&
sig
);
return
*
this
;
}
...
...
@@ -98,7 +98,7 @@ SignalArray_const<Time> operator<<( const SignalBase<Time>& sig1,
template
<
class
Time
>
class
SignalArray
:
public
SignalArray_const
<
Time
>
{
{
public:
using
SignalArray_const
<
Time
>::
DEFAULT_SIZE
;
using
SignalArray_const
<
Time
>::
size
;
...
...
@@ -107,11 +107,11 @@ class SignalArray
mutable
SignalBase
<
Time
>
**
array
;
public:
SignalArray
<
Time
>
(
const
unsigned
int
&
sizeARG
=
DEFAULT_SIZE
)
SignalArray
<
Time
>
(
const
unsigned
int
&
sizeARG
=
DEFAULT_SIZE
)
:
SignalArray_const
<
Time
>
(
0
)
{
size
=
sizeARG
;
createArray
();
}
SignalArray
<
Time
>
(
SignalBase
<
Time
>&
sig
)
SignalArray
<
Time
>
(
SignalBase
<
Time
>&
sig
)
:
SignalArray_const
<
Time
>
(
0
)
{
size
=
1
;
createArray
();
addElmt
(
&
sig
);
}
...
...
@@ -133,7 +133,7 @@ class SignalArray
{
if
(
0
<
size
)
{
array
=
new
SignalBase
<
Time
>*
[
size
];
}
}
void
addElmt
(
SignalBase
<
Time
>*
el
)
void
addElmt
(
SignalBase
<
Time
>*
el
)
{
if
(
rank
<
size
)
array
[
rank
++
]
=
el
;
}
public:
//protected:
...
...
@@ -142,16 +142,16 @@ class SignalArray
virtual
SignalArray_const
<
Time
>
operator
<<
(
const
SignalBase
<
Time
>&
sig
)
const
{
SignalArray_const
<
Time
>
res
(
size
);
res
=*
this
;
res
<<
sig
;
return
res
;
SignalArray_const
<
Time
>
res
(
size
);
res
=*
this
;
res
<<
sig
;
return
res
;
}
public:
virtual
SignalBase
<
Time
>&
operator
[]
(
const
unsigned
int
&
idx
)
const
{
{
return
*
array
[
idx
];
}
};
...
...
include/dynamic-graph/signal-base.h
View file @
4d4eb36c
...
...
@@ -40,7 +40,7 @@ class SignalBase : public boost::noncopyable
bool
ready
;
public:
virtual
const
Time
&
getTime
(
void
)
const
{
return
signalTime
;
}
virtual
void
setTime
(
const
Time
&
t
)
{
signalTime
=
t
;
}
const
bool
&
getReady
(
void
)
const
{
return
ready
;
}
...
...
@@ -52,8 +52,8 @@ class SignalBase : public boost::noncopyable
public:
/* --- CONSTRUCTORS ------------------------------------------------------- */
SignalBase
(
std
::
string
name
=
""
)
SignalBase
(
std
::
string
name
=
""
)
:
name
(
name
),
signalTime
(
0
),
ready
(
false
)
{}
virtual
~
SignalBase
(
void
)
{}
...
...
@@ -67,39 +67,39 @@ class SignalBase : public boost::noncopyable
virtual
bool
needUpdate
(
const
Time
&
t
)
const
{
return
ready
;}
inline
void
setReady
(
const
bool
sready
=
true
)
{
ready
=
sready
;
}
virtual
std
::
ostream
&
virtual
std
::
ostream
&
writeGraph
(
std
::
ostream
&
os
)
const
{
return
os
;
}
virtual
std
::
ostream
&
virtual
std
::
ostream
&
displayDependencies
(
std
::
ostream
&
os
,
const
int
depth
=-
1
,
std
::
string
space
=
""
,
std
::
string
next1
=
""
,
std
::
string
next2
=
""
)
const
{
os
<<
space
<<
next1
<<
"-- "
;
display
(
os
);
return
os
;
os
<<
space
<<
next1
<<
"-- "
;
display
(
os
);
return
os
;
}
/* --- PLUG --------------------------------------------------------------- */
/* Plug the arg-signal on the <this> object. Plug-in is always
/* Plug the arg-signal on the <this> object. Plug-in is always
* a descending operation (the actual <this> object will call the arg-signal
* and not the opposite).
* and not the opposite).
*/
virtual
void
plug
(
SignalBase
<
Time
>*
sigarg
)
{
DG_THROW
ExceptionSignal
(
ExceptionSignal
::
PLUG_IMPOSSIBLE
,
"Plug-in operation not possible with this signal. "
,
"(while trying to plug %s on %s)."
,
sigarg
->
getName
().
c_str
(),
this
->
getName
().
c_str
()
);
}
virtual
void
unplug
(
void
)
virtual
void
unplug
(
void
)
{
DG_THROW
ExceptionSignal
(
ExceptionSignal
::
PLUG_IMPOSSIBLE
,
"Plug-in operation not possible with this signal. "
,
"(while trying to unplug %s)."
,
this
->
getName
().
c_str
()
);
}
virtual
bool
isPluged
(
void
)
const
{
return
false
;
}
virtual
SignalBase
<
Time
>*
getPluged
(
void
)
const
{
return
NULL
;
}
virtual
bool
isPluged
(
void
)
const
{
return
false
;
}
virtual
SignalBase
<
Time
>*
getPluged
(
void
)
const
{
return
NULL
;
}
virtual
void
setConstantDefault
(
void
)
{
DG_THROW
ExceptionSignal
(
ExceptionSignal
::
PLUG_IMPOSSIBLE
,
"Plug-in operation not possible with this signal. "
,
...
...
@@ -109,7 +109,7 @@ class SignalBase : public boost::noncopyable
/* Generic set function. Should be reimplemented by the specific Signal.
*/
virtual
void
set
(
std
::
istringstream
&
value
)
virtual
void
set
(
std
::
istringstream
&
value
)
{
DG_THROW
ExceptionSignal
(
ExceptionSignal
::
SET_IMPOSSIBLE
,
"Set operation not possible with this signal. "
,
"(while trying to set %s)."
,
this
->
getName
().
c_str
()
);
...
...
@@ -119,7 +119,7 @@ class SignalBase : public boost::noncopyable
"Get operation not possible with this signal. "
,
"(while trying to get %s)."
,
this
->
getName
().
c_str
()
);
}
virtual
inline
void
recompute
(
const
Time
&
t
)
virtual
inline
void
recompute
(
const
Time
&
t
)
{
DG_THROW
ExceptionSignal
(
ExceptionSignal
::
SET_IMPOSSIBLE
,
"Recompute operation not possible with this signal. "
,
"(while trying to recompute %s)."
,
this
->
getName
().
c_str
()
);
...
...
@@ -132,7 +132,7 @@ class SignalBase : public boost::noncopyable
/* --- DISPLAY ------------------------------------------------------------ */
virtual
std
::
ostream
&
display
(
std
::
ostream
&
os
)
const
virtual
std
::
ostream
&
display
(
std
::
ostream
&
os
)
const
{
os
<<
"Sig:"
<<
name
;
return
os
;}
std
::
string
shortName
(
void
)
const
...
...
@@ -149,7 +149,7 @@ class SignalBase : public boost::noncopyable
virtual
void
ExtractNodeAndLocalNames
(
std
::
string
&
LocalName
,
std
::
string
&
NodeName
)
const
{
std
::
string
fullname
=
this
->
getName
();
size_t
IdxPosLocalName
=
fullname
.
rfind
(
":"
);
LocalName
=
fullname
.
substr
(
IdxPosLocalName
+
1
,
fullname
.
length
()
-
IdxPosLocalName
+
1
);
size_t
IdxPosNodeNameStart
=
fullname
.
find
(
"("
);
...
...
@@ -158,12 +158,12 @@ class SignalBase : public boost::noncopyable
/* std::cout << "Finally " << std:: endl
<< "\tLocalName: " << LocalName << std::endl
<< "\tNodeName: " << NodeName << std::endl; */
}
/* --- TEST TEST TEST TEST TEST TEST --- */
public:
virtual
void
checkCompatibility
(
void
)
virtual
void
checkCompatibility
(
void
)
{
DG_THROW
ExceptionSignal
(
ExceptionSignal
::
PLUG_IMPOSSIBLE
,
"Abstract signal not compatible with anything."
,
"(while trying to plug <%s>)."
,
...
...
@@ -171,10 +171,10 @@ class SignalBase : public boost::noncopyable
};
/** Forward to a virtual fonction.
/** Forward to a virtual fonction.
*/
template
<
class
Time
>
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
SignalBase
<
Time
>&
sig
)
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
SignalBase
<
Time
>&
sig
)
{
return
sig
.
display
(
os
);
}
}
// namespace dynamicgraph
...
...
include/dynamic-graph/signal-caster.h
View file @
4d4eb36c
...
...
@@ -115,7 +115,7 @@ template<typename T> void signal_disp(const T& value, std::ostream& os)
{
g_caster
.
disp
(
value
,
os
);
}
template
<
typename
T
>
T
signal_cast
(
std
::
istringstream
&
iss
)
{
{
return
boost
::
any_cast
<
T
>
(
g_caster
.
cast
(
typeid
(
T
),
iss
));
}
...
...
include/dynamic-graph/signal-ptr.h
View file @
4d4eb36c
...
...
@@ -29,16 +29,16 @@
namespace
dynamicgraph
{
template
<
class
T
,
class
Time
>
class
SignalPtr
class
SignalPtr
:
public
virtual
Signal
<
T
,
Time
>
{
public:
using
SignalBase
<
Time
>::
getName
;
protected:
protected:
Signal
<
T
,
Time
>*
signalPtr
;
bool
modeNoThrow
;
bool
transmitAbstract
;
bool
transmitAbstract
;
SignalBase
<
Time
>
*
abstractTransmitter
;
T
*
transmitAbstractData
;
...
...
@@ -52,7 +52,7 @@ class SignalPtr
,
transmitAbstract
(
false
)
,
abstractTransmitter
(
NULL
)
{}
virtual
~
SignalPtr
(
void
)
{
signalPtr
=
NULL
;
}
public:
/* --- PLUG-IN OPERATION --- */
Signal
<
T
,
Time
>*
getPtr
(
void
);
// throw
...
...
@@ -61,11 +61,11 @@ class SignalPtr
const
SignalBase
<
Time
>*
getAbstractPtr
(
void
)
const
;
// throw
virtual
void
plug
(
SignalBase
<
Time
>*
ref
);
virtual
void
unplug
(
void
)
{
plug
(
NULL
);
}
virtual
bool
isPluged
(
void
)
const
{
return
(
NULL
!=
signalPtr
);
}
virtual
SignalBase
<
Time
>*
getPluged
(
void
)
const
{
return
signalPtr
;
}
virtual
bool
isAbstractPluged
(
void
)
const
;
virtual
bool
isPluged
(
void
)
const
{
return
(
NULL
!=
signalPtr
);
}
virtual
SignalBase
<
Time
>*
getPluged
(
void
)
const
{
return
signalPtr
;
}
virtual
bool
isAbstractPluged
(
void
)
const
;
virtual
const
Time
&
getTime
(
void
)
const
;
/* Equivalent operator-like definitions. */
inline
Signal
<
T
,
Time
>*
operator
->
()
{
return
getPtr
();
}
inline
const
Signal
<
T
,
Time
>*
operator
->
()
const
{
return
getPtr
();
}
...
...
@@ -81,10 +81,10 @@ class SignalPtr
/* For compatibility, .access() is equivalent to ->access(). For explicite
* pointer dereference :
* Prefere ->() to ()
* Prefere ->() to ()
*/
virtual
const
T
&
operator
()(
const
Time
&
t
);
/* Similarly, Prefere ->access to .access
/* Similarly, Prefere ->access to .access
*/
virtual
const
T
&
access
(
const
Time
&
t
);
virtual
const
T
&
accessCopy
(
void
)
const
;
...
...
@@ -97,7 +97,7 @@ class SignalPtr
public:
/* --- INHERITANCE --- */
/* SignalPtr could be used as a classical signal, through the normal
* setting functions. The behavior is to plugged the signalPtr on
* the classical mother Signal layer of the object.
...
...
@@ -122,13 +122,13 @@ class SignalPtr
std
::
string
space
=
""
,
std
::
string
next1
=
""
,
std
::
string
next2
=
""
)
const
;
protected:
// Interdiction of the rest of the heritage
virtual
void
addDependency
(
const
SignalBase
<
Time
>&
signal
)
{}
virtual
void
removeDependency
(
const
SignalBase
<
Time
>&
signal
)
{}
virtual
void
clearDependencies
(
void
)
{}
};
}
// namespace dynamicgraph
...
...
include/dynamic-graph/signal-ptr.t.cpp
View file @
4d4eb36c
...
...
@@ -25,7 +25,7 @@
*
* CNRS/AIST
*
* This file is part of dynamic-graph.
* This file is part of dynamic-graph.
* dynamic-graph is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of
...
...
@@ -73,15 +73,15 @@ namespace dynamicgraph {
template
<
class
T
,
class
Time
>
bool
SignalPtr
<
T
,
Time
>::
isAbstractPluged
(
void
)
const
isAbstractPluged
(
void
)
const
{
return
(
(
NULL
!=
signalPtr
)
||
(
abstractTransmitter
)
);
}
return
(
(
NULL
!=
signalPtr
)
||
(
abstractTransmitter
)
);
}
template
<
class
T
,
class
Time
>
Signal
<
T
,
Time
>*
SignalPtr
<
T
,
Time
>::
getPtr
(
void
)
getPtr
(
void
)
{
dgTDEBUGIN
(
25
);
if
(
!
isPluged
()
)
...
...
@@ -89,7 +89,7 @@ getPtr ( void )
"In SignalPtr: SIN ptr not set."
,
" (in signal <%s>)"
,
getName
().
c_str
());
dgTDEBUGOUT
(
25
);
return
signalPtr
;
return
signalPtr
;
}
template
<
class
T
,
class
Time
>
...
...
@@ -104,12 +104,12 @@ getPtr ( void ) const
"In SignalPtr: SIN ptr not set."
,
" (in signal <%s>)"
,
getName
().
c_str
());
}
dgTDEBUGOUT
(
25
);
return
signalPtr
;
return
signalPtr
;
}
template
<
class
T
,
class
Time
>
SignalBase
<
Time
>*
SignalPtr
<
T
,
Time
>::
getAbstractPtr
(
void
)
getAbstractPtr
(
void
)
{
if
(
!
isAbstractPluged
()
)
{
DG_THROW
ExceptionSignal
(
ExceptionSignal
::
NOT_INITIALIZED
,
...
...
@@ -133,11 +133,11 @@ getAbstractPtr ( void ) const
template
<
class
T
,
class
Time
>