]> git.lyx.org Git - features.git/commitdiff
Code rules.
authorRichard Heck <rgheck@comcast.net>
Thu, 14 Feb 2008 17:00:40 +0000 (17:00 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 14 Feb 2008 17:00:40 +0000 (17:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23005 a592a061-630c-0410-9148-cb99ea01b6c8

src/BiblioInfo.cpp
src/BiblioInfo.h

index cd309090526bed07430361f3578ba0196f6f6b37..2c21aa9d4492926cb6f291b2415d5680f2900396 100644 (file)
@@ -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<docstring> const BiblioInfo::getKeys() const
 vector<docstring> const BiblioInfo::getFields() const
 {
        vector<docstring> bibfields;
-       set<docstring>::const_iterator it = fieldNames_.begin();
-       set<docstring>::const_iterator end = fieldNames_.end();
+       set<docstring>::const_iterator it = field_names_.begin();
+       set<docstring>::const_iterator end = field_names_.end();
        for (; it != end; ++it)
                bibfields.push_back(*it);
        sort(bibfields.begin(), bibfields.end());
@@ -244,8 +244,8 @@ vector<docstring> const BiblioInfo::getFields() const
 vector<docstring> const BiblioInfo::getEntries() const
 {
        vector<docstring> bibentries;
-       set<docstring>::const_iterator it = entryTypes_.begin();
-       set<docstring>::const_iterator end = entryTypes_.end();
+       set<docstring>::const_iterator it = entry_types_.begin();
+       set<docstring>::const_iterator end = entry_types_.end();
        for (; it != end; ++it)
                bibentries.push_back(*it);
        sort(bibentries.begin(), bibentries.end());
index 20c0dff1586c75e52b07a143e0526c94459ae2df..6d9de140df454cc972a8f039aaf3e75ab493fe3f 100644 (file)
@@ -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: <field, value>
        std::map <docstring, docstring> 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<docstring> fieldNames_;
+       std::set<docstring> field_names_;
        ///
-       std::set<docstring> entryTypes_;
+       std::set<docstring> entry_types_;
        /// our map: keys --> BibTeXInfo
        std::map<docstring, BibTeXInfo> bimap_;
 };