Author.hpp

Basic information about an author.

Developer notes:

  • Prefixs (Dr., Prof., etc) and Suffixes (Jr., Sr., III, etc.) should be allowed.

  • Most parts of names can be auto-detected.

  • GetName() (with formatting) needs to be implemented (notes below)

  • Consider using ce_string for inputs? And making other aspects const experession?

class Author
#include <Author.hpp>

Public Functions

inline Author(const std::string &first, const std::string &middle, const std::string &last)
inline Author(const std::string &first, const std::string &last)
inline Author(const std::string &last)
Author(const Author&) = default
inline ~Author()
Author &operator=(const Author&) = default
inline bool operator==(const Author &other) const
inline bool operator!=(const Author &other) const
inline bool operator<(const Author &other) const
inline bool operator>(const Author &other) const
inline bool operator>=(const Author &other) const
inline bool operator<=(const Author &other) const
inline bool HasPrefix() const
inline bool HasFirstName() const
inline bool HasMiddleName() const
inline bool HasLastName() const
inline bool HasSuffix() const
inline const std::string &GetPrefix() const
inline const std::string &GetFirstName() const
inline const std::string &GetMiddleName(size_t id = 0) const
inline const std::string &GetLastName() const
inline const std::string &GetSuffix() const
inline std::string GetFullName() const
inline std::string GetReverseName() const
inline std::string GetFirstInitial() const
inline std::string GetMiddleInitials() const
inline std::string GetLastInitial() const
inline std::string GetInitials() const
inline std::string GetName(std::string pattern = "FML")
inline Author &Clear()
inline Author &SetFirst(const std::string &str)
inline Author &SetLast(const std::string &str)
inline Author &AddMiddle(const std::string &str)

Private Members

std::string prefix
std::string first_name
vector<std::string> middle_names
std::string last_name
std::string suffix

Private Static Functions

static inline Lexer &GetFormatLexer()