hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
peer.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PEER_HPP
7 #define IROHA_SHARED_MODEL_PEER_HPP
8 
11 
12 #include <boost/optional/optional_fwd.hpp>
13 
14 namespace shared_model {
15  namespace interface {
16 
20  class Peer : public ModelPrimitive<Peer> {
21  public:
25  virtual const interface::types::AddressType &address() const = 0;
26 
30  virtual const boost::optional<interface::types::TLSCertificateType>
31  &tlsCertificate() const = 0;
32 
36  virtual const interface::types::PubkeyType &pubkey() const = 0;
37 
38  std::string toString() const override;
39 
40  bool operator==(const ModelType &rhs) const override;
41  };
42  } // namespace interface
43 } // namespace shared_model
44 
45 #endif // IROHA_SHARED_MODEL_PEER_HPP
std::string AddressType
Type of peer address.
Definition: types.hpp:45
Definition: peer.hpp:20
bool operator==(const ModelType &rhs) const override
Definition: peer.cpp:23
virtual const boost::optional< interface::types::TLSCertificateType > & tlsCertificate() const =0
virtual const interface::types::AddressType & address() const =0
Definition: public_key.hpp:16
std::string toString() const override
Definition: peer.cpp:14
Definition: model_primitive.hpp:22
virtual const interface::types::PubkeyType & pubkey() const =0
Definition: command_executor.hpp:12