3 #pragma GCC diagnostic push
4 #pragma GCC diagnostic ignored "-Wold-style-cast"
5 #include "stg/OBJECT_IDENTIFIER.h"
6 #pragma GCC diagnostic pop
15 explicit OID(const std::string & str);
16 OID(const char * str, size_t length);
17 explicit OID(const std::vector<unsigned> & arcs);
18 OID(const unsigned * arcs, size_t length);
19 explicit OID(OBJECT_IDENTIFIER_t * oid);
20 OID(const OID & rvalue);
23 bool addSuffix(const char * suffix, size_t length);
24 bool addSuffix(const std::string & suffix);
25 bool addSuffix(const unsigned * suffix, size_t length);
26 bool addSuffix(const std::vector<unsigned> & suffix);
27 bool addSuffix(unsigned a, unsigned b);
29 OID copyWithSuffix(const char * suffix, size_t length) const;
30 OID copyWithSuffix(const std::string & suffix) const;
31 OID copyWithSuffix(const unsigned * suffix, size_t length) const;
32 OID copyWithSuffix(const std::vector<unsigned> & suffix) const;
33 OID copyWithSuffix(unsigned a, unsigned b) const;
35 std::string ToString() const;
36 const std::vector<unsigned> & ToVector() const { return arcs; }
37 void ToOID(OBJECT_IDENTIFIER_t * oid) const;
39 OID & operator=(const OID & rvalue);
40 bool operator==(const OID & rvalue) const;
41 bool operator!=(const OID & rvalue) const { return !operator==(rvalue); }
42 bool operator<(const OID & rvalue) const;
43 bool operator>(const OID & rvalue) const
44 { return !operator==(rvalue) && !operator<(rvalue); }
46 bool PrefixLess(const OID & rvalue) const;
48 friend std::ostream & operator<<(std::ostream & stream, const OID & oid);
51 std::vector<unsigned> arcs;
55 bool PrefixLess(const OID & a, const OID & b)
57 return a.PrefixLess(b);