mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 10:09:36 +02:00
Add missing relational operators to VarIterator (#4714)
* Add missing relational operators to VarIterator * Add tests for relational operators of VarIterator
This commit is contained in:
@@ -69,6 +69,18 @@ public:
|
||||
bool operator != (const VarIterator& other) const;
|
||||
/// Inequality operator.
|
||||
|
||||
bool operator < (const VarIterator& other) const;
|
||||
/// Less than operator.
|
||||
|
||||
bool operator > (const VarIterator& other) const;
|
||||
/// Greater than operator.
|
||||
|
||||
bool operator <= (const VarIterator& other) const;
|
||||
/// Less than or equal to operator.
|
||||
|
||||
bool operator >= (const VarIterator& other) const;
|
||||
/// Greater than or equal to operator.
|
||||
|
||||
Var& operator * () const;
|
||||
/// Returns value at the current position.
|
||||
|
||||
@@ -138,6 +150,30 @@ inline bool VarIterator::operator != (const VarIterator& other) const
|
||||
}
|
||||
|
||||
|
||||
inline bool VarIterator::operator < (const VarIterator& other) const
|
||||
{
|
||||
return _position < other._position;
|
||||
}
|
||||
|
||||
|
||||
inline bool VarIterator::operator > (const VarIterator& other) const
|
||||
{
|
||||
return _position > other._position;
|
||||
}
|
||||
|
||||
|
||||
inline bool VarIterator::operator <= (const VarIterator& other) const
|
||||
{
|
||||
return _position <= other._position;
|
||||
}
|
||||
|
||||
|
||||
inline bool VarIterator::operator >= (const VarIterator& other) const
|
||||
{
|
||||
return _position >= other._position;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Dynamic
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user