mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Introduce NFT support (XLS020)
This commit is contained in:
committed by
manojsdoshi
parent
525aaecbca
commit
70779f6850
@@ -33,12 +33,28 @@ private:
|
||||
list_type v_;
|
||||
|
||||
public:
|
||||
using value_type = STObject;
|
||||
using size_type = list_type::size_type;
|
||||
using iterator = list_type::iterator;
|
||||
using const_iterator = list_type::const_iterator;
|
||||
|
||||
STArray() = default;
|
||||
STArray(STArray const&) = default;
|
||||
|
||||
template <
|
||||
class Iter,
|
||||
class = std::enable_if_t<std::is_convertible_v<
|
||||
typename std::iterator_traits<Iter>::reference,
|
||||
STObject>>>
|
||||
explicit STArray(Iter first, Iter last);
|
||||
|
||||
template <
|
||||
class Iter,
|
||||
class = std::enable_if_t<std::is_convertible_v<
|
||||
typename std::iterator_traits<Iter>::reference,
|
||||
STObject>>>
|
||||
STArray(SField const& f, Iter first, Iter last);
|
||||
|
||||
STArray&
|
||||
operator=(STArray const&) = default;
|
||||
STArray(STArray&&);
|
||||
@@ -120,6 +136,18 @@ public:
|
||||
bool
|
||||
operator!=(const STArray& s) const;
|
||||
|
||||
iterator
|
||||
erase(iterator pos);
|
||||
|
||||
iterator
|
||||
erase(const_iterator pos);
|
||||
|
||||
iterator
|
||||
erase(iterator first, iterator last);
|
||||
|
||||
iterator
|
||||
erase(const_iterator first, const_iterator last);
|
||||
|
||||
SerializedTypeID
|
||||
getSType() const override;
|
||||
|
||||
@@ -138,6 +166,17 @@ private:
|
||||
friend class detail::STVar;
|
||||
};
|
||||
|
||||
template <class Iter, class>
|
||||
STArray::STArray(Iter first, Iter last) : v_(first, last)
|
||||
{
|
||||
}
|
||||
|
||||
template <class Iter, class>
|
||||
STArray::STArray(SField const& f, Iter first, Iter last)
|
||||
: STBase(f), v_(first, last)
|
||||
{
|
||||
}
|
||||
|
||||
inline STObject&
|
||||
STArray::operator[](std::size_t j)
|
||||
{
|
||||
@@ -247,6 +286,30 @@ STArray::operator!=(const STArray& s) const
|
||||
return v_ != s.v_;
|
||||
}
|
||||
|
||||
inline STArray::iterator
|
||||
STArray::erase(iterator pos)
|
||||
{
|
||||
return v_.erase(pos);
|
||||
}
|
||||
|
||||
inline STArray::iterator
|
||||
STArray::erase(const_iterator pos)
|
||||
{
|
||||
return v_.erase(pos);
|
||||
}
|
||||
|
||||
inline STArray::iterator
|
||||
STArray::erase(iterator first, iterator last)
|
||||
{
|
||||
return v_.erase(first, last);
|
||||
}
|
||||
|
||||
inline STArray::iterator
|
||||
STArray::erase(const_iterator first, const_iterator last)
|
||||
{
|
||||
return v_.erase(first, last);
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user