Improve the readability of STBase-derived types

* Increase the visibility of each type's API.
* No functional changes.
This commit is contained in:
Howard Hinnant
2021-10-07 16:12:31 -04:00
committed by Nik Bougalis
parent 72377e7bf2
commit 74e6ed1af3
24 changed files with 2145 additions and 1425 deletions

View File

@@ -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]