iota.lib.cpp
IOTA C++ Library
Public Member Functions | List of all members
IOTA::Models::Neighbor Class Reference

#include <neighbor.hpp>

Public Member Functions

 Neighbor ()=default
 
 Neighbor (const Types::Trytes &address, const int64_t &numberOfAllTransactions, const int64_t &numberOfInvalidTransactions, const int64_t &numberOfNewTransactions)
 
 ~Neighbor ()=default
 
const Types::Trytes & getAddress () const
 
void setAddress (const Types::Trytes &addr)
 
const int64_t & getNumberOfAllTransactions () const
 
void setNumberOfAllTransactions (const int64_t &nbTrx)
 
const int64_t & getNumberOfInvalidTransactions () const
 
void setNumberOfInvalidTransactions (const int64_t &nbTrx)
 
const int64_t & getNumberOfNewTransactions () const
 
void setNumberOfNewTransactions (const int64_t &nbTrx)
 
bool operator== (const Neighbor &rhs) const
 
bool operator!= (const Neighbor &rhs) const
 

Detailed Description

Neighbor model.

Constructor & Destructor Documentation

◆ Neighbor() [1/2]

IOTA::Models::Neighbor::Neighbor ( )
default

Default ctor.

◆ Neighbor() [2/2]

IOTA::Models::Neighbor::Neighbor ( const Types::Trytes &  address,
const int64_t &  numberOfAllTransactions,
const int64_t &  numberOfInvalidTransactions,
const int64_t &  numberOfNewTransactions 
)

Full init ctor.

Parameters
addressAddress of your peer.
numberOfAllTransactionsNumber of all transactions sent (invalid, valid, already-seen).
numberOfInvalidTransactionsNumber of invalid transactions your peer has sent you.
numberOfNewTransactionsNumber of newly transmitted transactions.

◆ ~Neighbor()

IOTA::Models::Neighbor::~Neighbor ( )
default

Default dtor.

Member Function Documentation

◆ getAddress()

const Types::Trytes& IOTA::Models::Neighbor::getAddress ( ) const
Returns
Address of your peer.

◆ getNumberOfAllTransactions()

const int64_t& IOTA::Models::Neighbor::getNumberOfAllTransactions ( ) const
Returns
Number of all transactions sent (invalid, valid, already-seen).

◆ getNumberOfInvalidTransactions()

const int64_t& IOTA::Models::Neighbor::getNumberOfInvalidTransactions ( ) const
Returns
Invalid transactions your peer has sent you. These are transactions with invalid signatures or overall schema.

◆ getNumberOfNewTransactions()

const int64_t& IOTA::Models::Neighbor::getNumberOfNewTransactions ( ) const
Returns
New transactions which were transmitted.

◆ operator!=()

bool IOTA::Models::Neighbor::operator!= ( const Neighbor rhs) const
Parameters
rhsAn object to compare with this object.
Returns
Whether the current neighbor is different from the given one.

◆ operator==()

bool IOTA::Models::Neighbor::operator== ( const Neighbor rhs) const
Parameters
rhsAn object to compare with this object.
Returns
Whether the current neighbor is the same as the given one.

◆ setAddress()

void IOTA::Models::Neighbor::setAddress ( const Types::Trytes &  addr)
Parameters
addrSet address of your peer.

◆ setNumberOfAllTransactions()

void IOTA::Models::Neighbor::setNumberOfAllTransactions ( const int64_t &  nbTrx)
Parameters
nbTrxSet number of all transactions sent (invalid, valid, already seen).

◆ setNumberOfInvalidTransactions()

void IOTA::Models::Neighbor::setNumberOfInvalidTransactions ( const int64_t &  nbTrx)
Parameters
nbTrxSet number of invalid transactions sent your peer.

◆ setNumberOfNewTransactions()

void IOTA::Models::Neighbor::setNumberOfNewTransactions ( const int64_t &  nbTrx)
Parameters
nbTrxSet number of newly transmitted transactions.

The documentation for this class was generated from the following file: