29 void decomposePath(
const std::string& path, std::vector< std::string >& v) {
32 size_t idx_1 = path.find(
".");
35 if (idx_2 == std::string::npos) {
39 while (idx != std::string::npos) {
41 v.push_back(path.substr(prev, length));
43 idx = path.find(
".", prev);
48 while (idx_1 != std::string::npos) {
50 length = idx_1 - prev;
51 v.push_back(path.substr(prev, length));
53 idx_1 = path.find(
".", prev);
54 }
else if (idx_2 < idx_1) {
56 idx_1 = path.find(
".", tmp);
62 v.push_back(path.substr(prev, std::string::npos));
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
NodeId nextNodeId()
Returns the next value of an unique counter for PRM's node id.
static std::string LEFT_CAST()
Enumeration of the different types of objects handled by a PRM.
void decomposePath(const std::string &path, std::vector< std::string > &v)
Decompose a string in a vector of strings using "." as separators.
static std::string RIGHT_CAST()
Enumeration of the different types of objects handled by a PRM.
Size NodeId
Type for node ids.