00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
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
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