From: Richard Heck Date: Thu, 14 Feb 2008 17:00:40 +0000 (+0000) Subject: Code rules. X-Git-Tag: 1.6.10~6266 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b1306a979a92fead3878bc2a01cf8adba0e3918e;p=features.git Code rules. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23005 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index cd30909052..2c21aa9d44 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -43,12 +43,12 @@ namespace lyx { ////////////////////////////////////////////////////////////////////// BibTeXInfo::BibTeXInfo(bool ib) - : isBibTeX_(ib) + : is_bibtex_(ib) {} BibTeXInfo::BibTeXInfo(docstring const & key, docstring const & type) - : isBibTeX_(true), bibKey_(key), entryType_(type) + : is_bibtex_(true), bib_key_(key), entry_type_(type) {} @@ -102,7 +102,7 @@ static docstring familyName(docstring const & name) docstring const BibTeXInfo::getAbbreviatedAuthor() const { - if (!isBibTeX_) + if (!is_bibtex_) return docstring(); docstring author = getValueForField("author"); @@ -110,7 +110,7 @@ docstring const BibTeXInfo::getAbbreviatedAuthor() const if (author.empty()) { author = getValueForField("editor"); if (author.empty()) - return bibKey_; + return bib_key_; } // OK, we've got some names. Let's format them. @@ -131,7 +131,7 @@ docstring const BibTeXInfo::getAbbreviatedAuthor() const docstring const BibTeXInfo::getYear() const { - if (!isBibTeX_) + if (!is_bibtex_) return docstring(); docstring year = getValueForField("year"); @@ -143,7 +143,7 @@ docstring const BibTeXInfo::getYear() const docstring const BibTeXInfo::getInfo() const { - if (!isBibTeX_) { + if (!is_bibtex_) { BibTeXInfo::const_iterator it = find(from_ascii("ref")); return it->second; } @@ -232,8 +232,8 @@ vector const BiblioInfo::getKeys() const vector const BiblioInfo::getFields() const { vector bibfields; - set::const_iterator it = fieldNames_.begin(); - set::const_iterator end = fieldNames_.end(); + set::const_iterator it = field_names_.begin(); + set::const_iterator end = field_names_.end(); for (; it != end; ++it) bibfields.push_back(*it); sort(bibfields.begin(), bibfields.end()); @@ -244,8 +244,8 @@ vector const BiblioInfo::getFields() const vector const BiblioInfo::getEntries() const { vector bibentries; - set::const_iterator it = entryTypes_.begin(); - set::const_iterator end = entryTypes_.end(); + set::const_iterator it = entry_types_.begin(); + set::const_iterator end = entry_types_.end(); for (; it != end; ++it) bibentries.push_back(*it); sort(bibentries.begin(), bibentries.end()); diff --git a/src/BiblioInfo.h b/src/BiblioInfo.h index 20c0dff158..6d9de140df 100644 --- a/src/BiblioInfo.h +++ b/src/BiblioInfo.h @@ -106,20 +106,20 @@ public: docstring & operator[](docstring const & f) { return bimap_[f]; } /// - docstring const & allData() const { return allData_; } + docstring const & allData() const { return all_data_; } /// - void setAllData(docstring const & d) { allData_ = d; } + void setAllData(docstring const & d) { all_data_ = d; } /// - docstring entryType() const { return entryType_; } + docstring entryType() const { return entry_type_; } private: /// true if from BibTeX; false if from bibliography environment - bool isBibTeX_; + bool is_bibtex_; /// the BibTeX key for this entry - docstring bibKey_; + docstring bib_key_; /// a single string containing all BibTeX data associated with this key - docstring allData_; + docstring all_data_; /// the BibTeX entry type (article, book, incollection, ...) - docstring entryType_; + docstring entry_type_; /// our map: std::map bimap_; }; @@ -192,14 +192,14 @@ public: /// BibTeXInfo & operator[](docstring const & f) { return bimap_[f]; } /// - void addFieldName(docstring const & f) { fieldNames_.insert(f); } + void addFieldName(docstring const & f) { field_names_.insert(f); } /// - void addEntryType(docstring const & f) { entryTypes_.insert(f); } + void addEntryType(docstring const & f) { entry_types_.insert(f); } private: /// - std::set fieldNames_; + std::set field_names_; /// - std::set entryTypes_; + std::set entry_types_; /// our map: keys --> BibTeXInfo std::map bimap_; };