Skip to content

Commit

Permalink
Merge issue-47-OpenraveYarpPluginLoader to develop for #47
Browse files Browse the repository at this point in the history
  • Loading branch information
jgvictores committed Dec 23, 2017
2 parents 28ce5e9 + 164c23f commit d5cfee2
Showing 1 changed file with 38 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,46 @@ class OpenraveYarpPluginLoader : public OpenRAVE::ModuleBase
RAVELOG_INFO("module unloaded from environment\n");
}

/*int main(const string& cmd)
int main(const std::string& cmd)
{
RAVELOG_INFO("module initialized cmd; %s\n", cmd.c_str());
CD_DEBUG("[%s]\n", cmd.c_str());
std::stringstream ss(cmd);

//-- Fill openStrings
std::vector<std::string> openStrings;
while( ! ss.eof() )
{
std::string tmp;
ss >> tmp;
if(tmp == "open")
{
std::string openString;;
openStrings.push_back(openString);
}
else
{
if(openStrings.size() == 0)
{
CD_ERROR("args must start with open, sorry! Bye!\n");
return 1;
}
openStrings[openStrings.size()-1].append(tmp);
openStrings[openStrings.size()-1].append(" ");
}
}

//-- Open each openString
for(int i=0;i<openStrings.size();i++)
{
CD_DEBUG("open[%d]: [%s]\n",i,openStrings[i].c_str());

std::istringstream sinput( openStrings[i] );
std::ostringstream sout;
if( ! Open(sout,sinput) )
return 1;
}
return 0;
}*/
}

bool Open(std::ostream& sout, std::istream& sinput)
{
Expand Down

0 comments on commit d5cfee2

Please sign in to comment.