Skip to content
Snippets Groups Projects
Commit 9fa0b89f authored by Francois Keith's avatar Francois Keith
Browse files

Passing and returning elmt by const reference.

parent 271ca7dc
No related branches found
No related tags found
No related merge requests found
......@@ -51,11 +51,11 @@ namespace dynamicgraph {
Command(Entity& entity, const std::vector<Value::Type>& valueTypes,
const std::string& docstring);
/// Return the value type of all parameters
const std::vector<Value::Type> valueTypes() const;
const std::vector<Value::Type>& valueTypes() const;
/// Set parameter values
void setParameterValues(const std::vector<Value>& values);
/// Get parameter values
const std::vector<Value> getParameterValues() const;
const std::vector<Value>& getParameterValues() const;
/// Execute the command after checking parameters
Value execute();
/// Get a reference to the Entity owning this command
......
......@@ -54,7 +54,7 @@ namespace dynamicgraph
{
DYNAMIC_GRAPH_ENTITY_DECL ();
public:
TracerRealTime (const std::string n);
TracerRealTime (const std::string & n);
virtual ~TracerRealTime ()
{}
......
......@@ -33,7 +33,7 @@ namespace dynamicgraph {
{
}
const std::vector<Value::Type> Command::valueTypes() const
const std::vector<Value::Type>& Command::valueTypes() const
{
return valueTypeVector_;
}
......@@ -60,7 +60,7 @@ namespace dynamicgraph {
valueVector_ = values;
}
const std::vector<Value> Command::getParameterValues() const
const std::vector<Value>& Command::getParameterValues() const
{
return valueVector_;
}
......
......@@ -112,7 +112,7 @@ empty ()
/* --------------------------------------------------------------------- */
TracerRealTime::TracerRealTime( const std::string n )
TracerRealTime::TracerRealTime( const std::string & n )
:Tracer(n)
,bufferSize( BUFFER_SIZE_DEFAULT )
{
......
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