From: Richard Heck Date: Thu, 14 Feb 2008 05:14:22 +0000 (+0000) Subject: Do not inherit from std::map here either. X-Git-Tag: 1.6.10~6275 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=71c1bd5b2ec22db4ec174862d13f71c1dfbc5f54;p=features.git Do not inherit from std::map here either. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22994 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BiblioInfo.h b/src/BiblioInfo.h index 525cab50fd..837681fa38 100644 --- a/src/BiblioInfo.h +++ b/src/BiblioInfo.h @@ -112,14 +112,14 @@ public: /// docstring entryType() const { return entryType_; } private: + /// true if from BibTeX; false if from bibliography environment + bool isBibTeX_; /// the BibTeX key for this entry docstring bibKey_; /// a single string containing all BibTeX data associated with this key docstring allData_; /// the BibTeX entry type (article, book, incollection, ...) docstring entryType_; - /// true if from BibTeX; false if from bibliography environment - bool isBibTeX_; /// our map: std::map bimap_; }; @@ -129,8 +129,10 @@ private: /// from BibTeX or from bibliography environments. /// BiblioInfo.first is the bibliography key /// BiblioInfo.second is the data for that key -class BiblioInfo : public std::map { +class BiblioInfo { public: + /// + typedef std::map::const_iterator const_iterator; /// Returns a sorted vector of bibliography keys std::vector const getKeys() const; /// Returns a sorted vector of present BibTeX fields @@ -149,7 +151,7 @@ public: docstring const getInfo(docstring const & key) const; /** - * "Translates the available Citation Styles into strings for a given key, + * "Translates" the available Citation Styles into strings for a given key, * either numerical or author-year depending upon the active engine. (See * below for those methods.) */ @@ -177,9 +179,24 @@ public: */ std::vector const getAuthorYearStrings(docstring const & key, Buffer const & buf) const; - + /// + const_iterator begin() const { return bimap_.begin(); } + /// + void clear() { bimap_.clear(); } + /// + bool empty() const { return bimap_.empty(); } + /// + const_iterator end() const { return bimap_.end(); } + /// + const_iterator find(docstring const & f) const { return bimap_.find(f); } + /// + BibTeXInfo & operator[](docstring const & f) { return bimap_[f]; } + /// std::set fieldNames; + /// std::set entryTypes; +private: + std::map bimap_; }; } // namespace lyx