blob: bc0dd257861c9c4c30b33d2e036c9137f2a79a31 [file] [log] [blame]
Jeff Thompsonc0573432013-09-19 17:41:36 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Yingdi Yu <yingdi@cs.ucla.edu>
5 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
6 * See COPYING for copyright and distribution information.
7 */
8
9#ifndef NDN_OID_HPP
Jeff Thompsone589c3f2013-10-12 17:30:50 -070010#define NDN_OID_HPP
Jeff Thompsonc0573432013-09-19 17:41:36 -070011
12#include <vector>
13#include <string>
14
15namespace ndn {
16
17class OID {
18public:
19 OID ()
20 {
21 }
22
23 OID(const std::string& oid);
24
25 OID(const std::vector<int>& oid)
26 : oid_(oid)
27 {
28 }
29
30 const std::vector<int> &
31 getIntegerList() const
32 {
33 return oid_;
34 }
35
36 void
37 setIntegerList(const std::vector<int>& value){
38 oid_ = value;
39 }
40
41 std::string
42 toString();
43
44 bool operator == (const OID& oid)
45 {
46 return equal(oid);
47 }
48
49 bool operator != (const OID& oid)
50 {
51 return !equal(oid);
52 }
53
54private:
55 bool equal(const OID& oid);
56
57 std::vector<int> oid_;
58};
59
60}
61
62#endif