Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olivier Stasse
dynamic-graph
Commits
092b8bc6
Commit
092b8bc6
authored
14 years ago
by
Florent Lamiraux
Browse files
Options
Downloads
Patches
Plain Diff
Put back mistakenly removed method pool::getSignal.
parent
6d3b7943
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/dynamic-graph/pool.h
+6
-0
6 additions, 0 deletions
include/dynamic-graph/pool.h
src/dgraph/pool.cpp
+38
-3
38 additions, 3 deletions
src/dgraph/pool.cpp
with
44 additions
and
3 deletions
include/dynamic-graph/pool.h
+
6
−
0
View file @
092b8bc6
...
...
@@ -88,6 +88,12 @@ namespace dynamicgraph
void
clearPlugin
(
const
std
::
string
&
name
);
/*! @} */
///
/// \brief Get a signal by name
///
/// \param sigpath stream containing a string of the form "entity.signal"
SignalBase
<
int
>&
getSignal
(
std
::
istringstream
&
sigpath
);
/*! \brief This method looks for the object named objectName,
and ask to provide the function functionName with the arguments cmdArg.
If the method of the object displays some information this will
...
...
This diff is collapsed.
Click to expand it.
src/dgraph/pool.cpp
+
38
−
3
View file @
092b8bc6
...
...
@@ -23,11 +23,14 @@
/* --------------------------------------------------------------------- */
/* --- DYNAMIC-GRAPH --- */
#include
<dynamic-graph/pool.h>
#include
<dynamic-graph/debug.h>
#include
<dynamic-graph/entity.h>
#include
<list>
#include
<typeinfo>
#include
<iostream>
#include
<sstream>
#include
<string>
#include
"dynamic-graph/pool.h"
#include
"dynamic-graph/debug.h"
#include
"dynamic-graph/entity.h"
using
namespace
dynamicgraph
;
...
...
@@ -240,6 +243,38 @@ commandLine( const std::string& objectName,const std::string& functionName,
}
}
static
bool
objectNameParser
(
std
::
istringstream
&
cmdparse
,
std
::
string
&
objName
,
std
::
string
&
funName
)
{
const
int
SIZE
=
128
;
char
buffer
[
SIZE
];
cmdparse
>>
std
::
ws
;
cmdparse
.
getline
(
buffer
,
SIZE
,
'.'
);
if
(
!
cmdparse
.
good
()
)
// The callback is not an object method
return
false
;
objName
=
buffer
;
//cmdparse.getline( buffer,SIZE );
//funName = buffer;
cmdparse
>>
funName
;
return
true
;
}
SignalBase
<
int
>&
PoolStorage
::
getSignal
(
std
::
istringstream
&
sigpath
)
{
std
::
string
objname
,
signame
;
if
(
!
objectNameParser
(
sigpath
,
objname
,
signame
)
)
{
DG_THROW
ExceptionFactory
(
ExceptionFactory
::
UNREFERED_SIGNAL
,
"Parse error in signal name"
);
}
Entity
&
ent
=
getEntity
(
objname
);
return
ent
.
getSignal
(
signame
);
}
namespace
dynamicgraph
{
//! The global g_pool object.
PoolStorage
g_pool
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment