#include <OTStashItem.hpp>
Definition at line 141 of file OTStashItem.hpp.
opentxs::OTStashItem::OTStashItem |
( |
| ) |
|
opentxs::OTStashItem::OTStashItem |
( |
const OTString & |
strAssetTypeID, |
|
|
int64_t |
lAmount = 0 |
|
) |
| |
opentxs::OTStashItem::OTStashItem |
( |
const OTIdentifier & |
theAssetTypeID, |
|
|
int64_t |
lAmount = 0 |
|
) |
| |
opentxs::OTStashItem::~OTStashItem |
( |
| ) |
|
|
virtual |
bool opentxs::OTStashItem::CreditStash |
( |
const int64_t & |
lAmount | ) |
|
Definition at line 191 of file OTStashItem.cpp.
194 otOut <<
"OTStashItem::CreditStash: Failed attempt to credit a "
195 "negative amount (" << lAmount
196 <<
"). Asset Type: " << m_strAssetTypeID <<
" \n";
200 m_lAmount += lAmount;
OTLOG_IMPORT OTLogStream otOut
bool opentxs::OTStashItem::DebitStash |
( |
const int64_t & |
lAmount | ) |
|
Definition at line 205 of file OTStashItem.cpp.
208 otOut <<
"OTStashItem::DebitStash: Failed attempt to debit a negative "
209 "amount (" << lAmount <<
"). Asset Type: " << m_strAssetTypeID
214 const int64_t lTentativeNewBalance = (m_lAmount - lAmount);
216 if (lTentativeNewBalance < 0) {
217 otOut <<
"OTStashItem::DebitStash: Failed attempt to debit (amount of) "
218 << lAmount <<
": New stash balance would have been a negative "
219 "amount (" << lTentativeNewBalance
220 <<
"). Asset Type: " << m_strAssetTypeID <<
" \n";
224 m_lAmount = lTentativeNewBalance;
OTLOG_IMPORT OTLogStream otOut
int64_t opentxs::OTStashItem::GetAmount |
( |
| ) |
const |
|
inline |
const OTString& opentxs::OTStashItem::GetAssetTypeID |
( |
| ) |
|
|
inline |
void opentxs::OTStashItem::SetAmount |
( |
int64_t |
lAmount | ) |
|
|
inline |
The documentation for this class was generated from the following files: