X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FInsetList.h;h=13beeb0b9cc6218c94561d90257c7a980149ffc9;hb=5286634d170045792fd5b32f5d8888e4ffc7494b;hp=5baa9087944364e98f0a2430dc9da0ce75acff1c;hpb=1eaa3eb913b16f4e6f5991b9c53b0b9ab3f84948;p=lyx.git diff --git a/src/InsetList.h b/src/InsetList.h index 5baa908794..13beeb0b9c 100644 --- a/src/InsetList.h +++ b/src/InsetList.h @@ -16,7 +16,10 @@ #include -class InsetBase; + +namespace lyx { + +class Inset; class Buffer; @@ -24,13 +27,14 @@ class Buffer; class InsetList { public: /// - struct InsetTable { + class InsetTable { + public: /// - lyx::pos_type pos; + InsetTable(pos_type p, Inset * i) : pos(p), inset(i) {} /// - InsetBase * inset; + pos_type pos; /// - InsetTable(lyx::pos_type p, InsetBase * i) : pos(p), inset(i) {} + Inset * inset; }; /// typedef std::vector List; @@ -42,37 +46,38 @@ public: /// ~InsetList(); /// - iterator begin() { return list.begin(); } - /// - iterator end() { return list.end(); } + iterator begin() { return list_.begin(); } /// - const_iterator begin() const { return list.begin(); } + iterator end() { return list_.end(); } /// - const_iterator end() const { return list.end(); } + const_iterator begin() const { return list_.begin(); } /// - bool empty() const { return list.empty(); } + const_iterator end() const { return list_.end(); } /// - iterator insetIterator(lyx::pos_type pos); + bool empty() const { return list_.empty(); } /// - const_iterator insetIterator(lyx::pos_type pos) const; + iterator insetIterator(pos_type pos); /// - void insert(InsetBase * inset, lyx::pos_type pos); + const_iterator insetIterator(pos_type pos) const; /// - void erase(lyx::pos_type pos); + void insert(Inset * inset, pos_type pos); /// - InsetBase * release(lyx::pos_type); + void erase(pos_type pos); /// - InsetBase * get(lyx::pos_type pos) const; + Inset * release(pos_type); /// - void increasePosAfterPos(lyx::pos_type pos); + Inset * get(pos_type pos) const; /// - void decreasePosAfterPos(lyx::pos_type pos); + void increasePosAfterPos(pos_type pos); /// - void insetsOpenCloseBranch(Buffer const & buf); + void decreasePosAfterPos(pos_type pos); private: /// - List list; + List list_; }; + +} // namespace lyx + #endif