PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | Public Attributes | Private Attributes | List of all members
CBudgetProposal Class Reference

#include <masternode-budget.h>

Inheritance diagram for CBudgetProposal:
[legend]
Collaboration diagram for CBudgetProposal:
[legend]

Public Member Functions

 CBudgetProposal ()
 
 CBudgetProposal (const CBudgetProposal &other)
 
 CBudgetProposal (std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn)
 
void Calculate ()
 
bool AddOrUpdateVote (CBudgetVote &vote, std::string &strError)
 
bool HasMinimumRequiredSupport ()
 
std::pair< std::string, std::string > GetVotes ()
 
bool IsValid (std::string &strError, bool fCheckCollateral=true)
 
bool IsEstablished ()
 
std::string GetName ()
 
std::string GetURL ()
 
int GetBlockStart ()
 
int GetBlockEnd ()
 
CScript GetPayee ()
 
int GetTotalPaymentCount ()
 
int GetRemainingPaymentCount ()
 
int GetBlockStartCycle ()
 
int GetBlockCurrentCycle ()
 
int GetBlockEndCycle ()
 
double GetRatio ()
 
int GetYeas ()
 
int GetNays ()
 
int GetAbstains ()
 
CAmount GetAmount ()
 
void SetAllotted (CAmount nAllotedIn)
 
CAmount GetAllotted ()
 
void CleanAndRemove (bool fSignatureCheck)
 
uint256 GetHash ()
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 

Public Attributes

bool fValid
 
std::string strProposalName
 
std::string strURL
 
int nBlockStart
 
int nBlockEnd
 
CAmount nAmount
 
CScript address
 
int64_t nTime
 
uint256 nFeeTXHash
 
std::map< uint256, CBudgetVotemapVotes
 
 ADD_SERIALIZE_METHODS
 

Private Attributes

RecursiveMutex cs
 
CAmount nAlloted
 

Detailed Description

Definition at line 451 of file masternode-budget.h.

Constructor & Destructor Documentation

◆ CBudgetProposal() [1/3]

CBudgetProposal::CBudgetProposal ( )

Definition at line 1373 of file masternode-budget.cpp.

◆ CBudgetProposal() [2/3]

CBudgetProposal::CBudgetProposal ( const CBudgetProposal other)

Definition at line 1395 of file masternode-budget.cpp.

◆ CBudgetProposal() [3/3]

CBudgetProposal::CBudgetProposal ( std::string  strProposalNameIn,
std::string  strURLIn,
int  nBlockStartIn,
int  nBlockEndIn,
CScript  addressIn,
CAmount  nAmountIn,
uint256  nFeeTXHashIn 
)

Definition at line 1383 of file masternode-budget.cpp.

Member Function Documentation

◆ AddOrUpdateVote()

bool CBudgetProposal::AddOrUpdateVote ( CBudgetVote vote,
std::string &  strError 
)

Definition at line 1486 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ Calculate()

void CBudgetProposal::Calculate ( )

◆ CleanAndRemove()

void CBudgetProposal::CleanAndRemove ( bool  fSignatureCheck)

Definition at line 1520 of file masternode-budget.cpp.

◆ GetAbstains()

int CBudgetProposal::GetAbstains ( )

Definition at line 1574 of file masternode-budget.cpp.

◆ GetAllotted()

CAmount CBudgetProposal::GetAllotted ( )
inline

Definition at line 513 of file masternode-budget.h.

◆ GetAmount()

CAmount CBudgetProposal::GetAmount ( )
inline

Definition at line 511 of file masternode-budget.h.

Here is the caller graph for this function:

◆ GetBlockCurrentCycle()

int CBudgetProposal::GetBlockCurrentCycle ( )

Definition at line 1594 of file masternode-budget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBlockEnd()

int CBudgetProposal::GetBlockEnd ( )
inline

Definition at line 500 of file masternode-budget.h.

◆ GetBlockEndCycle()

int CBudgetProposal::GetBlockEndCycle ( )

Definition at line 1604 of file masternode-budget.cpp.

Here is the caller graph for this function:

◆ GetBlockStart()

int CBudgetProposal::GetBlockStart ( )
inline

Definition at line 499 of file masternode-budget.h.

◆ GetBlockStartCycle()

int CBudgetProposal::GetBlockStartCycle ( )

Definition at line 1587 of file masternode-budget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHash()

uint256 CBudgetProposal::GetHash ( )
inline

Definition at line 517 of file masternode-budget.h.

Here is the caller graph for this function:

◆ GetName()

std::string CBudgetProposal::GetName ( )
inline

Definition at line 497 of file masternode-budget.h.

Here is the caller graph for this function:

◆ GetNays()

int CBudgetProposal::GetNays ( )

Definition at line 1561 of file masternode-budget.cpp.

Here is the caller graph for this function:

◆ GetPayee()

CScript CBudgetProposal::GetPayee ( )
inline

Definition at line 501 of file masternode-budget.h.

Here is the caller graph for this function:

◆ GetRatio()

double CBudgetProposal::GetRatio ( )

Definition at line 1530 of file masternode-budget.cpp.

◆ GetRemainingPaymentCount()

int CBudgetProposal::GetRemainingPaymentCount ( )

Definition at line 1621 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ GetTotalPaymentCount()

int CBudgetProposal::GetTotalPaymentCount ( )

Definition at line 1616 of file masternode-budget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetURL()

std::string CBudgetProposal::GetURL ( )
inline

Definition at line 498 of file masternode-budget.h.

◆ GetVotes()

std::pair<std::string, std::string> CBudgetProposal::GetVotes ( )

◆ GetYeas()

int CBudgetProposal::GetYeas ( )

Definition at line 1548 of file masternode-budget.cpp.

Here is the caller graph for this function:

◆ HasMinimumRequiredSupport()

bool CBudgetProposal::HasMinimumRequiredSupport ( )

◆ IsEstablished()

bool CBudgetProposal::IsEstablished ( )
inline

Definition at line 488 of file masternode-budget.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsValid()

bool CBudgetProposal::IsValid ( std::string &  strError,
bool  fCheckCollateral = true 
)
Todo:
: We should keep track of the last time the proposal was valid, if it's invalid for 2 weeks, erase it

Definition at line 1409 of file masternode-budget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SerializationOp()

template<typename Stream , typename Operation >
void CBudgetProposal::SerializationOp ( Stream &  s,
Operation  ser_action,
int  nType,
int  nVersion 
)
inline

Definition at line 534 of file masternode-budget.h.

◆ SetAllotted()

void CBudgetProposal::SetAllotted ( CAmount  nAllotedIn)
inline

Definition at line 512 of file masternode-budget.h.

Here is the caller graph for this function:

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CBudgetProposal::ADD_SERIALIZE_METHODS

Definition at line 531 of file masternode-budget.h.

◆ address

CScript CBudgetProposal::address

Definition at line 470 of file masternode-budget.h.

◆ cs

RecursiveMutex CBudgetProposal::cs
mutableprivate

Definition at line 455 of file masternode-budget.h.

◆ fValid

bool CBudgetProposal::fValid

Definition at line 459 of file masternode-budget.h.

◆ mapVotes

std::map<uint256, CBudgetVote> CBudgetProposal::mapVotes

Definition at line 474 of file masternode-budget.h.

◆ nAlloted

CAmount CBudgetProposal::nAlloted
private

Definition at line 456 of file masternode-budget.h.

◆ nAmount

CAmount CBudgetProposal::nAmount

Definition at line 469 of file masternode-budget.h.

◆ nBlockEnd

int CBudgetProposal::nBlockEnd

Definition at line 468 of file masternode-budget.h.

◆ nBlockStart

int CBudgetProposal::nBlockStart

Definition at line 467 of file masternode-budget.h.

◆ nFeeTXHash

uint256 CBudgetProposal::nFeeTXHash

Definition at line 472 of file masternode-budget.h.

◆ nTime

int64_t CBudgetProposal::nTime

Definition at line 471 of file masternode-budget.h.

◆ strProposalName

std::string CBudgetProposal::strProposalName

Definition at line 460 of file masternode-budget.h.

◆ strURL

std::string CBudgetProposal::strURL

Definition at line 466 of file masternode-budget.h.


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