Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
QH::WorkState Class Reference

The WorkState class is simple class with data of work state of node. More...

#include <workstate.h>

Collaboration diagram for QH::WorkState:
Collaboration graph

Public Member Functions

 WorkState ()
 WorkState.
 
QString toString () const
 toString This method convert state of work to string value.
 
int getMaxConnectionCount () const
 getMaxConnectionCount This method return of limit of connections.
 
void setMaxConnectionCount (int value)
 setMaxConnectionCount this method set a new value of limit of connections.
 
QList< HostAddressgetBanedList () const
 getBanedList This method return banned list of server.
 
void setBanedList (const QList< HostAddress > &banedList)
 setBanedList -this method set banned list for this object.
 
bool IsRun () const
 getIsRun This method return true if server is runed.
 
void setIsRun (bool value)
 setIsRun This method set new value for run flag.
 
const QList< HostAddress > & getConnections () const
 getConnections This method return list of the current server connections.
 
void setConnections (const QList< HostAddress > &connections)
 setConnections This method sets connections list.
 
const QList< HostAddress > & activeConnections () const
 activeConnections This method return list of actived connections.
 
void setActiveConnections (const QList< HostAddress > &newActiveConnections)
 setActiveConnections this method sets new list of active connections.
 

Detailed Description

The WorkState class is simple class with data of work state of node.

Definition at line 19 of file workstate.h.

Constructor & Destructor Documentation

◆ WorkState()

QH::WorkState::WorkState ( )

WorkState.

Definition at line 50 of file workstate.cpp.

Member Function Documentation

◆ activeConnections()

const QList< HostAddress > & QH::WorkState::activeConnections ( ) const

activeConnections This method return list of actived connections.

Returns
list of active connections.

Definition at line 30 of file workstate.cpp.

◆ getBanedList()

QList< HostAddress > QH::WorkState::getBanedList ( ) const

getBanedList This method return banned list of server.

Returns
list of id's of banned nodes.

Definition at line 91 of file workstate.cpp.

◆ getConnections()

const QList< HostAddress > & QH::WorkState::getConnections ( ) const

getConnections This method return list of the current server connections.

Returns
list of the connections addresses

Definition at line 22 of file workstate.cpp.

◆ getMaxConnectionCount()

int QH::WorkState::getMaxConnectionCount ( ) const

getMaxConnectionCount This method return of limit of connections.

Returns
return maximum connection count.

Definition at line 83 of file workstate.cpp.

◆ IsRun()

bool QH::WorkState::IsRun ( ) const

getIsRun This method return true if server is runed.

Returns
true if node work like server.

Definition at line 14 of file workstate.cpp.

◆ setActiveConnections()

void QH::WorkState::setActiveConnections ( const QList< HostAddress > &  newActiveConnections)

setActiveConnections this method sets new list of active connections.

Parameters
newActiveConnectionsThis is new list of active connections

Definition at line 34 of file workstate.cpp.

Here is the caller graph for this function:

◆ setBanedList()

void QH::WorkState::setBanedList ( const QList< HostAddress > &  banedList)

setBanedList -this method set banned list for this object.

Parameters
banedListset new banned list.

Definition at line 95 of file workstate.cpp.

Here is the caller graph for this function:

◆ setConnections()

void QH::WorkState::setConnections ( const QList< HostAddress > &  connections)

setConnections This method sets connections list.

Parameters
connectionsThis is a new value of the connections list.

Definition at line 26 of file workstate.cpp.

Here is the caller graph for this function:

◆ setIsRun()

void QH::WorkState::setIsRun ( bool  value)

setIsRun This method set new value for run flag.

Parameters
valuechange node state.

Definition at line 18 of file workstate.cpp.

Here is the caller graph for this function:

◆ setMaxConnectionCount()

void QH::WorkState::setMaxConnectionCount ( int  value)

setMaxConnectionCount this method set a new value of limit of connections.

Parameters
valueThis is a new limit of connection value.

Definition at line 87 of file workstate.cpp.

Here is the caller graph for this function:

◆ toString()

QString QH::WorkState::toString ( ) const

toString This method convert state of work to string value.

Returns
string value of state node.

Definition at line 52 of file workstate.cpp.


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