rippled
ClusterNode.h
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012, 2013 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #ifndef RIPPLE_APP_PEERS_CLUSTERNODESTATUS_H_INCLUDED
21 #define RIPPLE_APP_PEERS_CLUSTERNODESTATUS_H_INCLUDED
22 
23 #include <ripple/basics/chrono.h>
24 #include <ripple/protocol/PublicKey.h>
25 #include <cstdint>
26 #include <string>
27 
28 namespace ripple {
29 
31 {
32 public:
33  ClusterNode() = delete;
34 
36  PublicKey const& identity,
37  std::string const& name,
38  std::uint32_t fee = 0,
40  : identity_(identity), name_(name), mLoadFee(fee), mReportTime(rtime)
41  {
42  }
43 
44  std::string const&
45  name() const
46  {
47  return name_;
48  }
49 
51  getLoadFee() const
52  {
53  return mLoadFee;
54  }
55 
57  getReportTime() const
58  {
59  return mReportTime;
60  }
61 
62  PublicKey const&
63  identity() const
64  {
65  return identity_;
66  }
67 
68 private:
73 };
74 
75 } // namespace ripple
76 
77 #endif
ripple::ClusterNode
Definition: ClusterNode.h:30
std::string
STL class.
ripple::ClusterNode::name
std::string const & name() const
Definition: ClusterNode.h:45
ripple::ClusterNode::mReportTime
NetClock::time_point mReportTime
Definition: ClusterNode.h:72
ripple::PublicKey
A public key.
Definition: PublicKey.h:59
std::chrono::time_point
cstdint
std::uint32_t
ripple::ClusterNode::mLoadFee
std::uint32_t mLoadFee
Definition: ClusterNode.h:71
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::ClusterNode::ClusterNode
ClusterNode(PublicKey const &identity, std::string const &name, std::uint32_t fee=0, NetClock::time_point rtime=NetClock::time_point{})
Definition: ClusterNode.h:35
ripple::ClusterNode::name_
std::string name_
Definition: ClusterNode.h:70
ripple::ClusterNode::ClusterNode
ClusterNode()=delete
ripple::ClusterNode::identity_
const PublicKey identity_
Definition: ClusterNode.h:69
ripple::ClusterNode::getReportTime
NetClock::time_point getReportTime() const
Definition: ClusterNode.h:57
ripple::ClusterNode::identity
PublicKey const & identity() const
Definition: ClusterNode.h:63
ripple::ClusterNode::getLoadFee
std::uint32_t getLoadFee() const
Definition: ClusterNode.h:51
string