本文整理汇总了C++中sle::pointer::getFieldV256方法的典型用法代码示例。如果您正苦于以下问题:C++ pointer::getFieldV256方法的具体用法?C++ pointer::getFieldV256怎么用?C++ pointer::getFieldV256使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sle::pointer
的用法示例。
在下文中一共展示了pointer::getFieldV256方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyFeature
TER ChangeTransactor::applyFeature ()
{
uint256 feature = mTxn.getFieldH256 (sfFeature);
SLE::pointer featureObject = mEngine->entryCache (ltFEATURES, Ledger::getLedgerFeatureIndex ());
if (!featureObject)
featureObject = mEngine->entryCreate (ltFEATURES, Ledger::getLedgerFeatureIndex ());
STVector256 features = featureObject->getFieldV256 (sfFeatures);
if (features.hasValue (feature))
return tefALREADY;
features.addValue (feature);
featureObject->setFieldV256 (sfFeatures, features);
mEngine->entryModify (featureObject);
getApp().getFeatureTable ().enableFeature (feature);
if (!getApp().getFeatureTable ().isFeatureSupported (feature))
getApp().getOPs ().setFeatureBlocked ();
return tesSUCCESS;
}
示例2: applyAmendment
TER Change::applyAmendment ()
{
uint256 amendment (mTxn.getFieldH256 (sfAmendment));
SLE::pointer amendmentObject (mEngine->entryCache (
ltAMENDMENTS, Ledger::getLedgerAmendmentIndex ()));
if (!amendmentObject)
{
amendmentObject = mEngine->entryCreate(
ltAMENDMENTS, Ledger::getLedgerAmendmentIndex());
}
STVector256 amendments (amendmentObject->getFieldV256 (sfAmendments));
if (amendments.hasValue (amendment))
return tefALREADY;
amendments.addValue (amendment);
amendmentObject->setFieldV256 (sfAmendments, amendments);
mEngine->entryModify (amendmentObject);
getApp().getAmendmentTable ().enable (amendment);
if (!getApp().getAmendmentTable ().isSupported (amendment))
getApp().getOPs ().setAmendmentBlocked ();
return tesSUCCESS;
}
示例3: fillItems
void AccountItems::fillItems (Account const& accountID, Ledger::ref ledger)
{
uint256 const rootIndex = Ledger::getOwnerDirIndex (accountID);
uint256 currentIndex = rootIndex;
// VFALCO TODO Rewrite all infinite loops to have clear terminating
// conditions defined in one location.
//
while (1)
{
SLE::pointer ownerDir = ledger->getDirNode (currentIndex);
// VFALCO TODO Rewrite to not return from the middle of the function
if (!ownerDir)
return;
for (auto const& uNode: ownerDir->getFieldV256 (sfIndexes).peekValue ())
{
// VFALCO TODO rename getSLEi() to something legible.
SLE::pointer sleCur = ledger->getSLEi (uNode);
if (sleCur)
{
// The item in the directory is in ledger
auto item = mOfType->makeItem (accountID, sleCur);
// makeItem() returns nullptr if the item wasn't one this
// particular AccountItems was interested in - for example, if
// the owner is only interested in ripple lines and this is an
// offer.
if (item)
mItems.push_back (item);
}
}
std::uint64_t uNodeNext = ownerDir->getFieldU64 (sfIndexNext);
if (!uNodeNext)
return;
currentIndex = Ledger::getDirNodeIndex (rootIndex, uNodeNext);
}
}