A Discrete-Event Network Simulator
API
qkd-encryptor-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2020 DOTFEESA www.tk.etf.unsa.ba
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Miralem Mehic <miralem.mehic@ieee.org>
19  */
20 
21 #ifndef QKD_ENCRYPTOR_MANAGER_H
22 #define QKD_ENCRYPTOR_MANAGER_H
23 
24 #include <fstream>
25 #include <sstream>
26 #include <vector>
27 #include "ns3/object.h"
28 #include "ns3/core-module.h"
29 #include "ns3/node-list.h"
30 #include "qkd-encryptor.h"
31 
32 namespace ns3 {
33 
44 class QKDEncryptor;
45 
46 class QKDEncryptorManager : public Object
47 {
48 public:
49 
54  static TypeId GetTypeId (void);
55 
60 
64  virtual ~QKDEncryptorManager();
65 
73  uint32_t AddQKDEncryptor (Ptr<QKDEncryptor> device);
74 
81  Ptr<QKDEncryptor> GetQKDEncryptor (uint32_t index) const;
82 
88  uint32_t GetNQKDEncryptors (void) const;
89 
90 
91 private:
92 
93  std::vector<Ptr<QKDEncryptor> > m_qkdencryptors;
94 
95 };
96 }
97 #endif /* QKD_ENCRYPTOR_MANAGER_H */
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
uint32_t GetNQKDEncryptors(void) const
Get a number of the associated QKDEncryptors.
virtual ~QKDEncryptorManager()
Destructor.
uint32_t AddQKDEncryptor(Ptr< QKDEncryptor > device)
Associate a QKDEncryptor to this node.
std::vector< Ptr< QKDEncryptor > > m_qkdencryptors
QKDEncryptors associated to this node.
Ptr< QKDEncryptor > GetQKDEncryptor(uint32_t index) const
Retrieve the index-th QKDEncryptor associated to this node.
static TypeId GetTypeId(void)
Get the type ID.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.