Ejemplo n.º 1
0
static TagPtr TagFromRef(char *tagName, int tagLen)
{
  int refidx = ExtractID(tagName, tagLen);
  TagPtr rval = NULL;

  if (refidx <= lastid)
    rval = idtags[refidx];

  return rval;
}
Ejemplo n.º 2
0
  /*
   * Extract the job id and the first event and event id from the specified uri.
   *
   * @param uri - The input uri.
   * @param urlInfo - The info object used to store the information.
   */
  static inline void parseURI(const std::string& uri, info& urlInfo)
  {
    urlInfo.id = ExtractID(uri);
    urlInfo.event = "";
    urlInfo.eventId = -1;

    if (urlInfo.id >= 0)
    {
      urlInfo.event = ExtractEvent(uri);

      if (urlInfo.event != "")
      {
        urlInfo.eventId = ExtractEventID(uri, urlInfo.event);
      }
    }
  }