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

@@ -89,6 +89,18 @@ STArray::STArray(SerialIter& sit, SField const& f, int depth) : STBase(f)
}
}
STBase*
STArray::copy(std::size_t n, void* buf) const
{
return emplace(n, buf, *this);
}
STBase*
STArray::move(std::size_t n, void* buf)
{
return emplace(n, buf, std::move(*this));
}
std::string
STArray::getFullText() const
{
@@ -153,6 +165,12 @@ STArray::add(Serializer& s) const
}
}
SerializedTypeID
STArray::getSType() const
{
return STI_ARRAY;
}
bool
STArray::isEquivalent(const STBase& t) const
{
@@ -160,6 +178,12 @@ STArray::isEquivalent(const STBase& t) const
return v != nullptr && v_ == v->v_;
}
bool
STArray::isDefault() const
{
return v_.empty();
}
void
STArray::sort(bool (*compare)(const STObject&, const STObject&))
{