本文整理汇总了C++中OTIdentifier::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ OTIdentifier::Release方法的具体用法?C++ OTIdentifier::Release怎么用?C++ OTIdentifier::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OTIdentifier
的用法示例。
在下文中一共展示了OTIdentifier::Release方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetOutboxHash
bool OTAccount::GetOutboxHash(OTIdentifier & theOutput)
{
theOutput.Release();
if (!m_OutboxHash.IsEmpty())
{
theOutput = m_OutboxHash;
return true;
}
else if (!GetUserID().IsEmpty() &&
!GetRealAccountID().IsEmpty() &&
!GetRealServerID().IsEmpty()
)
{
OTLedger theOutbox(GetUserID(), GetRealAccountID(), GetRealServerID());
if (theOutbox.LoadOutbox() && theOutbox.CalculateOutboxHash(theOutput))
{
SetOutboxHash(theOutput);
return true;
}
}
return false;
}
示例2: GetNymID
bool OTPurse::GetNymID(OTIdentifier & theOutput) const
{
bool bSuccess = false;
theOutput.Release();
// --------------------------------------
if (this->IsNymIDIncluded() && !m_UserID.IsEmpty())
{
bSuccess = true;
theOutput = m_UserID;
}
// --------------------------------------
else if (this->IsUsingATempNym() && (NULL != m_pTempNym))
{
bSuccess = true;
m_pTempNym->GetIdentifier(theOutput);
}
// --------------------------------------
else if (!m_UserID.IsEmpty())
{
bSuccess = true;
theOutput = m_UserID;
}
// --------------------------------------
return bSuccess;
}
示例3: GetSenderAcctID
bool OTPayment::GetSenderAcctID(OTIdentifier & theOutput) const
{
theOutput.Release();
// ----------------------
if (!m_bAreTempValuesSet)
return false;
bool bSuccess = false;
switch (m_Type)
{
case OTPayment::CHEQUE:
case OTPayment::VOUCHER:
case OTPayment::INVOICE:
case OTPayment::PAYMENT_PLAN:
theOutput = m_SenderAcctID;
bSuccess = true;
break;
case OTPayment::SMART_CONTRACT:
case OTPayment::PURSE:
bSuccess = false;
break;
default:
OTLog::Error("OTPayment::GetSenderAcctID: Bad payment type!\n");
break;
}
return bSuccess;
}
示例4: GetRecipientAcctID
bool OTPayment::GetRecipientAcctID(OTIdentifier & theOutput) const
{
// NOTE:
// A cheque HAS NO "Recipient Asset Acct ID", since the recipient's account (where he deposits
// the cheque) is not known UNTIL the time of the deposit. It's certain not known at the time
// that the cheque is written...
theOutput.Release();
// ----------------------
if (!m_bAreTempValuesSet)
return false;
bool bSuccess = false;
switch (m_Type)
{
case OTPayment::PAYMENT_PLAN:
if (m_bHasRecipient)
{
theOutput = m_RecipientAcctID;
bSuccess = true;
}
else
bSuccess = false;
break;
case OTPayment::CHEQUE:
case OTPayment::VOUCHER:
case OTPayment::INVOICE:
case OTPayment::SMART_CONTRACT:
case OTPayment::PURSE: // A purse might have a recipient USER, but never a recipient ACCOUNT.
bSuccess = false;
break;
default:
OTLog::Error("OTPayment::GetRecipientAcctID: Bad payment type!\n");
break;
}
return bSuccess;
}
示例5: GetRemitterUserID
// With a voucher (cashier's cheque) the "bank" is the "sender",
// whereas the actual Nym who purchased it is the "remitter."
//
bool OTPayment::GetRemitterUserID(OTIdentifier & theOutput) const
{
theOutput.Release();
// ----------------------
if (!m_bAreTempValuesSet)
return false;
bool bSuccess = false;
switch (m_Type)
{
case OTPayment::VOUCHER:
theOutput = m_RemitterUserID;
bSuccess = true;
break;
default:
OTLog::Error("OTPayment::GetRemitterUserID: Bad payment type! Expected a voucher cheque.\n");
break;
}
return bSuccess;
}