author.h

Go to the documentation of this file.
00001 // Copyright (C) 2004 Xavier Décoret <Xavier.Decoret@imag.fr>
00002 
00003 // This program is free software; you can redistribute it and/or 
00004 // modify it under the terms of the GNU General Public License 
00005 // as published by the Free Software Foundation; either 
00006 // version 2 of the License, or (at your option) any later 
00007 // version.
00008 
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 
00018 #ifndef XDKBIB_AUTHOR_H
00019 #define XDKBIB_AUTHOR_H
00020 
00021 #if HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <xdkbibtex/base.h>
00026 
00027 #include <string>
00028 #include <vector>
00029 
00030 namespace xdkbib
00031 {
00032   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00033   // Interface of Author
00034   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00035   class Author
00036   {
00037   public:
00038     Author();
00039     const std::vector<std::string>& first() const;
00040     const std::vector<std::string>& von() const;
00041     const std::vector<std::string>& jr() const;
00042     const std::vector<std::string>& last() const;
00043 
00044     std::string firstJoin(const char* sep=" ") const;
00045     std::string vonJoin(const char* sep=" ") const;
00046     std::string jrJoin(const char* sep=" ") const;
00047     std::string lastJoin(const char* sep=" ") const;
00048 
00049     void pushFirst(const std::string&);
00050     void pushVon(const std::string&);
00051     void pushJr(const std::string&);
00052     void pushLast(const std::string&);
00053   private:
00054     std::vector<std::string> first_;
00055     std::vector<std::string> von_;
00056     std::vector<std::string> jr_;
00057     std::vector<std::string> last_;
00058   };
00059   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00060   // Interface of AuthorList
00061   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00062   class AuthorList : public std::vector<Author>
00063   {
00064   public:
00065     void readFrom(const char* nameList) throw(xdkbib::parsing_error);
00066   };
00067 }
00068 
00069 #endif // XDKBIB_AUTHOR_H

Generated on Wed Jan 24 01:14:42 2007 for XDKBIBTEX by  doxygen 1.5.1