diff options
Diffstat (limited to 'src/mongo/db/auth/role_name.cpp')
-rw-r--r-- | src/mongo/db/auth/role_name.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mongo/db/auth/role_name.cpp b/src/mongo/db/auth/role_name.cpp index d691e826f77..8c66232abb7 100644 --- a/src/mongo/db/auth/role_name.cpp +++ b/src/mongo/db/auth/role_name.cpp @@ -36,4 +36,28 @@ namespace mongo { _splitPoint = role.size(); } + RoleNameSetIterator::RoleNameSetIterator(const unordered_set<RoleName>::const_iterator& begin, + const unordered_set<RoleName>::const_iterator& end) : + _begin(begin), _end(end) {} + + RoleNameSetIterator::~RoleNameSetIterator() {}; + + bool RoleNameSetIterator::more() const { + return _begin != _end; + } + + const RoleName& RoleNameSetIterator::next() { + const RoleName& toReturn = get(); + ++_begin; + return toReturn; + } + + const RoleName& RoleNameSetIterator::get() const { + return *_begin; + } + + RoleNameIterator::Impl* RoleNameSetIterator::doClone() const { + return new RoleNameSetIterator(_begin, _end); + } + } // namespace mongo |