20 #include <yarp/os/Value.h> 21 #include <yarp/os/LogStream.h> 22 #include <yarp/os/Vocab.h> 33 if (reply.get(0).asVocab()==Vocab::encode(
"ack"))
34 if (Bottle *idProp=reply.get(1).asList())
35 if (Bottle *idList=idProp->get(1).asList())
44 std::string::size_type n = 0;
45 const std::string::size_type l = plain.length();
47 n = in.find(plain, n);
48 if(n != std::string::npos){
49 in.replace(n, l, tok);
60 std::string sOutput =
"";
61 std::ifstream isGrammar(sPath.c_str());
63 yDebug() <<
"Path is:" << sPath;
67 yError() <<
"grammarToString. Couldn't open file :" << sPath;
68 return "Error in grammarToString. Couldn't open file";
72 while (getline(isGrammar, sLine))
void replace_all(std::string &in, const std::string &plain, const std::string &tok)
Simple search and replace function for strings;.
std::string grammarToString(const std::string &sPath)
Get the context path of a .grxml grammar, and return it as a string.
yarp::os::Bottle opcGetIdsFromAsk(const yarp::os::Bottle &reply)
Allow retrieving the list of unique identifiers of those items verifying the set of conditions querie...