Author.hpp

Basic information about an author.

This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2016-2017 Michigan State University MIT Software license; see doc/LICENSE.md

Developer notes:

  • Prefixes (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 expression?

Defines

INCLUDE_EMP_SCHOLAR_AUTHOR_HPP_GUARD
class Author
#include <Author.hpp>

Public Functions

inline Author(const String &first, const String &middle, const String &last)
inline Author(const String &first, const String &last)
inline Author(const 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 String &GetPrefix() const
inline const String &GetFirstName() const
inline const String &GetMiddleName(size_t id = 0) const
inline const String &GetLastName() const
inline const String &GetSuffix() const
inline String GetFullName() const
inline String GetReverseName() const
inline String GetFirstInitial() const
inline String GetMiddleInitials() const
inline String GetLastInitial() const
inline String GetInitials() const
inline String GetName(String pattern = "FML")
inline Author &Clear()
inline Author &SetFirst(const String &str)
inline Author &SetLast(const String &str)
inline Author &AddMiddle(const String &str)

Private Members

String prefix
String first_name
vector<String> middle_names
String last_name
String suffix

Private Static Functions

static inline Lexer &GetFormatLexer()

Private Static Attributes

static size_t ID_type
static size_t ID_spacing