| /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| * Copyright (C) 2013 Regents of the University of California. |
| * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| * See COPYING for copyright and distribution information. |
| #include <ndn-cpp/encoding/oid.hpp> |
| OID::OID(const string& oid) |
| while(string::npos != pos){ |
| pos = str.find_first_of('.', pos); |
| oid_.push_back(atoi(str.substr(ppos, pos - ppos).c_str())); |
| vector<int>::iterator it = oid_.begin(); |
| for(; it < oid_.end(); it++){ |
| bool OID::equal(const OID& oid) |
| vector<int>::const_iterator i = oid_.begin(); |
| vector<int>::const_iterator j = oid.oid_.begin(); |
| for (; i != oid_.end () && j != oid.oid_.end (); i++, j++) { |
| if (i == oid_.end () && j == oid.oid_.end ()) |