mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-05 01:36:38 +00:00
Improve the readability of STBase-derived types
* Increase the visibility of each type's API. * No functional changes.
This commit is contained in:
committed by
Nik Bougalis
parent
72377e7bf2
commit
74e6ed1af3
@@ -292,6 +292,18 @@ STAmount::construct(SerialIter& sit, SField const& name)
|
||||
return std::make_unique<STAmount>(sit, name);
|
||||
}
|
||||
|
||||
STBase*
|
||||
STAmount::copy(std::size_t n, void* buf) const
|
||||
{
|
||||
return emplace(n, buf, *this);
|
||||
}
|
||||
|
||||
STBase*
|
||||
STAmount::move(std::size_t n, void* buf)
|
||||
{
|
||||
return emplace(n, buf, std::move(*this));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Conversion
|
||||
@@ -485,6 +497,12 @@ STAmount::setJson(Json::Value& elem) const
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
SerializedTypeID
|
||||
STAmount::getSType() const
|
||||
{
|
||||
return STI_AMOUNT;
|
||||
}
|
||||
|
||||
std::string
|
||||
STAmount::getFullText() const
|
||||
{
|
||||
@@ -638,6 +656,12 @@ STAmount::isEquivalent(const STBase& t) const
|
||||
return v && (*v == *this);
|
||||
}
|
||||
|
||||
bool
|
||||
STAmount::isDefault() const
|
||||
{
|
||||
return (mValue == 0) && mIsNative;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// amount = mValue * [10 ^ mOffset]
|
||||
|
||||
Reference in New Issue
Block a user