Commit bd5532e5 authored by Francois Keith's avatar Francois Keith
Browse files

Remove deprecated method commanline.

parent 12e73bc1
......@@ -493,33 +493,7 @@ namespace dynamicgraph
os <<"control = "<<controlSOUT.accessCopy() <<std::endl << std::endl;
} catch (dynamicgraph::ExceptionSignal e) {}
stack_t::display(os);
}
void SolverKine::
commandLine( const std::string& cmdLine,
std::istringstream& cmdArgs,
std::ostream& os )
{
if( cmdLine == "help" )
{
os << "SolverKine:\n"
<< "\t- debugOnce: open trace-file for next iteration of the solver." << std::endl;
stackCommandLine( cmdLine,cmdArgs,os );
Entity::commandLine( cmdLine,cmdArgs,os );
}
else if( cmdLine == "debugOnce" )
{
debugOnce();
}
/* TODO: add controlFreeFloating g/setter. */
else if( stackCommandLine( cmdLine,cmdArgs,os ) );
else
{
Entity::commandLine( cmdLine,cmdArgs,os );
}
}
} // namespace dyninv
} // namespace sot
} // namespace dynamicgraph
......
......@@ -77,10 +77,6 @@ namespace dynamicgraph {
virtual void display( std::ostream& os ) const;
virtual void commandLine( const std::string& cmdLine,
std::istringstream& cmdArgs,
std::ostream& os );
public: /* --- SIGNALS --- */
DECLARE_SIGNAL_IN(damping,double);
......
......@@ -755,67 +755,6 @@ namespace dynamicgraph
stack_t::display(os);
dispContacts(os);
}
void SolverOpSpace::
commandLine( const std::string& cmdLine,
std::istringstream& cmdArgs,
std::ostream& os )
{
if( cmdLine == "help" )
{
os << "SolverOpSpace:\n"
<< "\t- debugOnce: open trace-file for next iteration of the solver." << std::endl
<< "\t- addContact: create the contact signals, unpluged." << std::endl
<< "\t- addContactFromTask <taskName>: Add a contact from the named task." << std::endl
<< "\t- rmContact <name>: remove a contact." << std::endl
<< "\t- dispContacts: guess what?." << std::endl;
stackCommandLine( cmdLine,cmdArgs,os );
Entity::commandLine( cmdLine,cmdArgs,os );
}
else if( cmdLine == "debugOnce" )
{
debugOnce();
}
else if( cmdLine == "addContact" )
{
if( cmdArgs.good() )
{
std::string name; cmdArgs >> name;
addContact( name,NULL,NULL,NULL,NULL );
}
else { os << "!! A name must be specified. " << std::endl; }
}
else if( cmdLine == "addContactFromTask" )
{
if( cmdArgs.good() )
{
std::string name; cmdArgs >> name;
addContactFromTask( name,name );
}
else { os << "!! A name must be specified. " << std::endl; }
}
else if( cmdLine == "rmContact" )
{
cmdArgs >> std::ws;
if( cmdArgs.good() )
{
std::string name; cmdArgs >> name;
removeContact( name );
}
else { os << "!! A name must be specified. " << std::endl; }
}
else if( cmdLine == "dispContacts" ) { dispContacts( os ); }
// TODO: cf sot-v1: else if( cmdLine == "listen" )
// {
// hsolver->notifiorRegistration( sotOpSpaceH::hsolverListener );
// }
else if( stackCommandLine( cmdLine,cmdArgs,os ) );
else
{
Entity::commandLine( cmdLine,cmdArgs,os );
}
}
} // namespace dyninv
} // namespace sot
} // namespace dynamicgraph
......
......@@ -77,10 +77,6 @@ namespace dynamicgraph {
virtual void display( std::ostream& os ) const;
virtual void commandLine( const std::string& cmdLine,
std::istringstream& cmdArgs,
std::ostream& os );
public: /* --- SIGNALS --- */
DECLARE_SIGNAL_IN(matrixInertia,ml::Matrix);
......
......@@ -145,30 +145,6 @@ namespace dynamicgraph {
/*! @{ */
/* To use the macro, the typedef sot::Stack<TaskSpec> stack_t has to be set,
* as well as the EntityClassName. */
//#define ADD_COMMANDS_FOR_THE_STACK /// Code in the .t.cpp
/*! \brief This method deals with the command line.
The command given in argument is send to the stack of tasks by the shell.
The command understood by sot are:
<ul>
<li> Tasks
<ul>
<li> push <task> : Push a task in the stack (FILO).
<li> pop : Remove the task push in the stack.
<li> down <task> : Make the task have a higher priority, i.e.
swap with the task immediatly superior in priority.
<li> up <task> : Make the task have a lowest priority, i.e.
swap with the task immediatly inferior in priority.
<li> rm <task> : Remove the task from the stack.
</ul>
*/
virtual bool stackCommandLine( const std::string& cmdLine,
std::istringstream& cmdArgs,
std::ostream& os );
void pushByTaskName( const std::string& taskName );
void removeByTaskName( const std::string& taskName );
void upByTaskName( const std::string& taskName );
......
......@@ -209,78 +209,6 @@ namespace dynamicgraph
ACT_BY_TASK_NAME(up)
ACT_BY_TASK_NAME(down)
template< typename TaskGeneric >
bool Stack<TaskGeneric>::
stackCommandLine( const std::string& cmdLine,
std::istringstream& cmdArgs,
std::ostream& os )
{
sotDEBUGIN(15);
if( cmdLine == "help")
{
os << "Stack of Tasks: "<<std::endl
<< " - push <task>"<< std::endl
<< " - pop"<< std::endl
<< " - down <task>"<< std::endl
<< " - up <task>"<< std::endl
<< " - rm <task>"<< std::endl
<< " - clear"<< std::endl
<< " - display"<< std::endl
<< " - nbDofs <nb> "<<std::endl;
}
else if( cmdLine == "clear")
{
clear();
}
else if( cmdLine == "push")
{
std::string tname; cmdArgs >> tname;
pushByTaskName(tname);
}
else if( cmdLine == "up")
{
std::string tname; cmdArgs >> tname;
upByTaskName(tname);
}
else if( cmdLine == "down")
{
std::string tname; cmdArgs >> tname;
downByTaskName(tname);
}
else if( cmdLine == "rm")
{
std::string tname; cmdArgs >> tname;
removeByTaskName(tname);
}
else if( cmdLine == "pop")
{
TaskGeneric& task = pop();
os << "Remove : "<< task << std::endl;
}
else if( cmdLine == "nbDofs")
{
cmdArgs>>std::ws;
if( cmdArgs.good() )
{
unsigned int nbDof;
cmdArgs >> nbDof;
defineNbDof(nbDof);
} else { os << "nbDofs = "<< nbDofs <<std::endl; }
}
else if( cmdLine == "display")
{
display(os);
}
else return false;
return true;
sotDEBUGOUT(15);
}
template< typename TaskGeneric >
std::ostream& Stack<TaskGeneric>::
writeGraph( const std::string & name, std::ostream& os ) const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment