X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Flimited_stack.h;h=b17eeae19dbca92efecaedff761a8f40d73d8744;hb=5608f6fdb67b86b4cf3d9215d24d7734239ad05a;hp=319a05c2d5df8316772c0fd0e94c6fa2c98ebb94;hpb=e412a2a53ea60a327d6ea8b8b802cb1b169a7108;p=lyx.git diff --git a/src/support/limited_stack.h b/src/support/limited_stack.h index 319a05c2d5..b17eeae19d 100644 --- a/src/support/limited_stack.h +++ b/src/support/limited_stack.h @@ -6,7 +6,7 @@ * * \author John Levon * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #ifndef LIMITED_STACK_H @@ -14,6 +14,9 @@ #include + +namespace lyx { + /** * limited_stack - A stack of limited size. * @@ -26,6 +29,7 @@ public: typedef std::deque container_type; typedef typename container_type::value_type value_type; typedef typename container_type::size_type size_type; + typedef typename container_type::const_iterator const_iterator; /// limit is the maximum size of the stack limited_stack(size_type limit = 100) { @@ -70,6 +74,15 @@ public: size_type size() const { return c_.size(); } + + const_iterator begin() const { + return c_.begin(); + } + + const_iterator end() const { + return c_.end(); + } + private: /// Internal contents. container_type c_; @@ -81,4 +94,7 @@ private: template class limited_stack; + +} // namespace lyx + #endif // LIMITED_STACK_H