8 #include "stg/OBJECT_IDENTIFIER.h"
12 explicit OID(const std::string & str);
13 OID(const char * str, size_t length);
14 explicit OID(const std::vector<unsigned> & arcs);
15 OID(const unsigned * arcs, size_t length);
16 explicit OID(OBJECT_IDENTIFIER_t * oid);
17 OID(const OID & rvalue);
20 bool addSuffix(const char * suffix, size_t length);
21 bool addSuffix(const std::string & suffix);
22 bool addSuffix(const unsigned * suffix, size_t length);
23 bool addSuffix(const std::vector<unsigned> & suffix);
24 bool addSuffix(unsigned a, unsigned b);
26 OID copyWithSuffix(const char * suffix, size_t length) const;
27 OID copyWithSuffix(const std::string & suffix) const;
28 OID copyWithSuffix(const unsigned * suffix, size_t length) const;
29 OID copyWithSuffix(const std::vector<unsigned> & suffix) const;
30 OID copyWithSuffix(unsigned a, unsigned b) const;
32 std::string ToString() const;
33 const std::vector<unsigned> & ToVector() const { return arcs; }
34 void ToOID(OBJECT_IDENTIFIER_t * oid) const;
36 OID & operator=(const OID & rvalue);
37 bool operator==(const OID & rvalue) const;
38 bool operator!=(const OID & rvalue) const { return !operator==(rvalue); }
39 bool operator<(const OID & rvalue) const;
40 bool operator>(const OID & rvalue) const
41 { return !operator==(rvalue) && !operator<(rvalue); }
43 bool PrefixLess(const OID & rvalue) const;
45 friend std::ostream & operator<<(std::ostream & stream, const OID & oid);
48 std::vector<unsigned> arcs;
52 bool PrefixLess(const OID & a, const OID & b)
54 return a.PrefixLess(b);