Line data Source code
1 : /*! 2 : * \file esys/repo/git/signature_git.cpp 3 : * \brief 4 : * 5 : * \cond 6 : * __legal_b__ 7 : * 8 : * Copyright (c) 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/signature.h" 20 : 21 : namespace esys::repo::git 22 : { 23 : 24 36 : Signature::Signature() = default; 25 : 26 36 : Signature::~Signature() = default; 27 : 28 32 : void Signature::set_date_time(const std::chrono::system_clock::time_point &date_time) 29 : { 30 32 : m_date_time = date_time; 31 32 : } 32 : 33 4 : const std::chrono::system_clock::time_point &Signature::get_date_time() const 34 : { 35 4 : return m_date_time; 36 : } 37 : 38 24 : void Signature::set_offset(int offset) 39 : { 40 24 : m_offset = offset; 41 24 : } 42 : 43 0 : int Signature::get_offset() const 44 : { 45 0 : return m_offset; 46 : } 47 : 48 0 : bool Signature::operator==(const Signature &other) const 49 : { 50 0 : if (!Person::operator==(other)) return false; 51 0 : if (get_date_time() != other.get_date_time()) return false; 52 0 : if (get_offset() != other.get_offset()) return false; 53 : return true; 54 : } 55 : 56 0 : bool Signature::operator!=(const Signature &other) const 57 : { 58 0 : return !operator==(other); 59 : } 60 : 61 : } // namespace esys::repo::git