]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/other/smux/types.h
26d6e24fbc6c665ebf194f25b0891105b8f3a508
[stg.git] / projects / stargazer / plugins / other / smux / types.h
1 #ifndef __TYPES_H__
2 #define __TYPES_H__
3
4 #include <string>
5 #include <vector>
6 #include <istream>
7
8 #include "asn1/OBJECT_IDENTIFIER.h"
9
10 class OID {
11     public:
12         OID(const std::string & str);
13         OID(const char * str, size_t length);
14         OID(const std::vector<unsigned> & arcs);
15         OID(const unsigned * arcs, size_t length);
16         OID(OBJECT_IDENTIFIER_t * oid);
17         OID(const OID & rvalue);
18         ~OID();
19
20         std::string ToString() const;
21         const std::vector<unsigned> & ToVector() const { return arcs; }
22         void ToOID(OBJECT_IDENTIFIER_t * oid) const;
23
24         OID & operator=(const OID & rvalue);
25         bool operator==(const OID & rvalue) const;
26         bool operator<(const OID & rvalue) const;
27
28         std::ostream & operator<<(std::ostream & stream) const;
29
30     private:
31         std::vector<unsigned> arcs;
32 };
33
34 #endif