src/common/trace-resolver.cc
changeset 1328 03f1081c21a7
parent 1325 f3be9eed2d90
child 1329 fc842b2faece
equal deleted inserted replaced
1327:798c425d3b1f 1328:03f1081c21a7
    78       delete resolver;
    78       delete resolver;
    79     }
    79     }
    80   resolverList.erase (resolverList.begin (), resolverList.end ());
    80   resolverList.erase (resolverList.begin (), resolverList.end ());
    81 }
    81 }
    82 
    82 
       
    83 std::string 
       
    84 TraceResolver::GetElement (std::string path)
       
    85 {
       
    86   std::string::size_type cur = 1;
       
    87   // check that first char is "/"
       
    88   std::string::size_type next = path.find ("/", cur);
       
    89   std::string id = std::string (path, cur, next-1);
       
    90   return id;
       
    91 }
       
    92 std::string 
       
    93 TraceResolver::GetSubpath (std::string path)
       
    94 {
       
    95   std::string::size_type cur = 1;
       
    96   // check that first char is "/"
       
    97   std::string::size_type next = path.find ("/", cur);
       
    98   std::string subpath;
       
    99   if (next != std::string::npos)
       
   100     {
       
   101       subpath = std::string (path, next, std::string::npos);
       
   102     }
       
   103   else
       
   104     {
       
   105       subpath = "";
       
   106     }
       
   107   return subpath;
       
   108 }
       
   109 
       
   110 
    83 TraceResolver::TraceResolverList 
   111 TraceResolver::TraceResolverList 
    84 TraceResolver::DoLookup (std::string id) const
   112 TraceResolver::DoLookup (std::string id) const
    85 {
   113 {
    86   return TraceResolverList ();
   114   return TraceResolverList ();
    87 }
   115 }