Line data Source code
1 : /*! 2 : * \file esys/repo/git/person_git.cpp 3 : * \brief 4 : * 5 : * \cond 6 : * __legal_b__ 7 : * 8 : * Copyright (c) 2022-2023 Michel Gillet 9 : * Distributed under the MIT License. 10 : * (See accompanying file LICENSE.txt or 11 : * copy at https://opensource.org/licenses/MIT) 12 : * 13 : * __legal_e__ 14 : * \endcond 15 : * 16 : */ 17 : 18 : #include "esys/repo/esysrepo_prec.h" 19 : #include "esys/repo/git/person.h" 20 : 21 : namespace esys::repo::git 22 : { 23 : 24 40 : Person::Person() = default; 25 : 26 40 : Person::~Person() = default; 27 : 28 44 : void Person::set_name(const std::string &name) 29 : { 30 44 : m_name = name; 31 44 : } 32 : 33 19 : const std::string &Person::get_name() const 34 : { 35 19 : return m_name; 36 : } 37 : 38 44 : void Person::set_email(const std::string &email) 39 : { 40 44 : m_email = email; 41 44 : } 42 : 43 31 : const std::string &Person::get_email() const 44 : { 45 31 : return m_email; 46 : } 47 : 48 0 : bool Person::operator==(const Person &other) const 49 : { 50 0 : if (get_name() != other.get_name()) return false; 51 0 : if (get_email() != other.get_email()) return false; 52 : return true; 53 : } 54 : 55 : 56 0 : bool Person::operator!=(const Person &other) const 57 : { 58 0 : return !operator==(other); 59 : } 60 : 61 : } // namespace esys::repo::git