NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
key-container.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NDN_SECURITY_KEY_CONTAINER_HPP
23 #define NDN_SECURITY_KEY_CONTAINER_HPP
24 
25 #include <set>
26 #include "key.hpp"
27 
28 namespace ndn {
29 namespace security {
30 
31 class PibImpl;
32 
35 {
36 public:
38  {
39  public:
40  friend class KeyContainer;
41 
42  public:
43  Key
44  operator*();
45 
47  operator++();
48 
50  operator++(int);
51 
52  bool
53  operator==(const const_iterator& other);
54 
55  bool
56  operator!=(const const_iterator& other);
57 
58  private:
59  const_iterator(const Name& identity,
60  std::set<name::Component>::const_iterator it,
61  shared_ptr<PibImpl> impl);
62 
63  private:
64  Name m_identity;
65  std::set<name::Component>::const_iterator m_it;
66  shared_ptr<PibImpl> m_impl;
67  };
68 
70 
71 public:
72  KeyContainer();
73 
74  KeyContainer(const Name& identity,
75  std::set<name::Component>&& keyIds,
76  shared_ptr<PibImpl> impl);
77 
79  begin() const;
80 
82  end() const;
83 
85  find(const name::Component& keyId) const;
86 
87  size_t
88  size() const;
89 
90 private:
91  Name m_identity;
92  std::set<name::Component> m_keyIds;
93  shared_ptr<PibImpl> m_impl;
94 };
95 
96 } // namespace security
97 } // namespace ndn
98 
99 #endif // NDN_SECURITY_KEY_CONTAINER_HPP
Copyright (c) 2011-2015 Regents of the University of California.
bool operator==(const const_iterator &other)
represents a key
Definition: key.hpp:45
A handler to search or enumerate keys of an identity.
const_iterator end() const
const_iterator begin() const
Name abstraction to represent an absolute name.
Definition: name.hpp:46
const_iterator find(const name::Component &keyId) const
Component holds a read-only name component value.
bool operator!=(const const_iterator &other)