mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-05 17:56:37 +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
@@ -27,12 +27,40 @@ STBlob::STBlob(SerialIter& st, SField const& name)
|
||||
{
|
||||
}
|
||||
|
||||
STBase*
|
||||
STBlob::copy(std::size_t n, void* buf) const
|
||||
{
|
||||
return emplace(n, buf, *this);
|
||||
}
|
||||
|
||||
STBase*
|
||||
STBlob::move(std::size_t n, void* buf)
|
||||
{
|
||||
return emplace(n, buf, std::move(*this));
|
||||
}
|
||||
|
||||
SerializedTypeID
|
||||
STBlob::getSType() const
|
||||
{
|
||||
return STI_VL;
|
||||
}
|
||||
|
||||
std::string
|
||||
STBlob::getText() const
|
||||
{
|
||||
return strHex(value_);
|
||||
}
|
||||
|
||||
void
|
||||
STBlob::add(Serializer& s) const
|
||||
{
|
||||
assert(getFName().isBinary());
|
||||
assert(
|
||||
(getFName().fieldType == STI_VL) ||
|
||||
(getFName().fieldType == STI_ACCOUNT));
|
||||
s.addVL(value_.data(), value_.size());
|
||||
}
|
||||
|
||||
bool
|
||||
STBlob::isEquivalent(const STBase& t) const
|
||||
{
|
||||
@@ -40,4 +68,10 @@ STBlob::isEquivalent(const STBase& t) const
|
||||
return v && (value_ == v->value_);
|
||||
}
|
||||
|
||||
bool
|
||||
STBlob::isDefault() const
|
||||
{
|
||||
return value_.empty();
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
Reference in New Issue
Block a user