<commit_before>/*
 * Copyright(c) Sophist Solutions, Inc. 1990-2021.  All rights reserved
 */
#ifndef _Stroika_Foundation_IO_Network_HTTP_Cookie_inl_
#define _Stroika_Foundation_IO_Network_HTTP_Cookie_inl_ 1

/*
 ********************************************************************************
 ***************************** Implementation Details ***************************
 ********************************************************************************
 */
namespace Stroika::Foundation::IO::Network::HTTP {

    /*
     ********************************************************************************
     ********************************** HTTP::Cookie ********************************
     ********************************************************************************
     */
    inline Cookie::Cookie (const String& name, const String& value)
        : KeyValuePair<String, String>{name, value}
    {
    }
    inline String HTTP::Cookie::ToString () const
    {
        return Encode ();
    }
#if __cpp_impl_three_way_comparison < 201907
    inline bool operator== (const Cookie& lhs, const Cookie& rhs)
    {
        // clang-format off
        return 
            lhs.fKey == rhs.fKey 
            and lhs.fValue == rhs.fValue
            and lhs.fExpires == rhs.fExpires
            and lhs.fMaxAge == rhs.fMaxAge
            and lhs.fDomain == rhs.fDomain
            and lhs.fPath == rhs.fPath
            and lhs.fSecure == rhs.fSecure
            and lhs.fHttpOnly == rhs.fHttpOnly
            and lhs.fOtherAttributes == rhs.fOtherAttributes
            ;
        // clang-format on
    }
    inline bool operator!= (const Cookie& lhs, const Cookie& rhs)
    {
        return not(lhs == rhs);
    }
#endif

    /*
     ********************************************************************************
     ******************************** HTTP::CookieList ******************************
     ********************************************************************************
     */

#if __cpp_impl_three_way_comparison >= 201907
    inline bool CookieList::operator== (const CookieList& rhs) const
    {
        return Traversal::Iterable<Cookie>::SequentialEqualsComparer{}(fCookieDetails_, rhs.fCookieDetails_);
    }
#endif
#if __cpp_impl_three_way_comparison < 201907
    inline bool operator== (const CookieList& lhs, const CookieList& rhs)
    {
        return Traversal::Iterable<Cookie>::SequentialEqualsComparer{}(lhs.fCookieDetails_, rhs.fCookieDetails_);
    }
    inline bool operator!= (const CookieList& lhs, const CookieList& rhs)
    {
        return not(lhs == rhs);
    }
#endif

}

#endif /*_Stroika_Foundation_IO_Network_HTTP_Cookie_inl_*/
<commit_msg>fixed typo<commit_after>/*
 * Copyright(c) Sophist Solutions, Inc. 1990-2021.  All rights reserved
 */
#ifndef _Stroika_Foundation_IO_Network_HTTP_Cookie_inl_
#define _Stroika_Foundation_IO_Network_HTTP_Cookie_inl_ 1

/*
 ********************************************************************************
 ***************************** Implementation Details ***************************
 ********************************************************************************
 */
namespace Stroika::Foundation::IO::Network::HTTP {

    /*
     ********************************************************************************
     ********************************** HTTP::Cookie ********************************
     ********************************************************************************
     */
    inline Cookie::Cookie (const String& name, const String& value)
        : KeyValuePair<String, String>{name, value}
    {
    }
    inline String HTTP::Cookie::ToString () const
    {
        return Encode ();
    }
#if __cpp_impl_three_way_comparison < 201907
    inline bool operator== (const Cookie& lhs, const Cookie& rhs)
    {
        // clang-format off
        return 
            lhs.fKey == rhs.fKey 
            and lhs.fValue == rhs.fValue
            and lhs.fExpires == rhs.fExpires
            and lhs.fMaxAge == rhs.fMaxAge
            and lhs.fDomain == rhs.fDomain
            and lhs.fPath == rhs.fPath
            and lhs.fSecure == rhs.fSecure
            and lhs.fHttpOnly == rhs.fHttpOnly
            and lhs.fOtherAttributes == rhs.fOtherAttributes
            ;
        // clang-format on
    }
    inline bool operator!= (const Cookie& lhs, const Cookie& rhs)
    {
        return not(lhs == rhs);
    }
#endif

    /*
     ********************************************************************************
     ******************************** HTTP::CookieList ******************************
     ********************************************************************************
     */

#if __cpp_impl_three_way_comparison >= 201907
    inline bool CookieList::operator== (const CookieList& rhs) const
    {
        return Traversal::Iterable<Cookie>::SequentialEqualsComparer<>{}(fCookieDetails_, rhs.fCookieDetails_);
    }
#endif
#if __cpp_impl_three_way_comparison < 201907
    inline bool operator== (const CookieList& lhs, const CookieList& rhs)
    {
        return Traversal::Iterable<Cookie>::SequentialEqualsComparer<>{}(lhs.fCookieDetails_, rhs.fCookieDetails_);
    }
    inline bool operator!= (const CookieList& lhs, const CookieList& rhs)
    {
        return not(lhs == rhs);
    }
#endif

}

#endif /*_Stroika_Foundation_IO_Network_HTTP_Cookie_inl_*/

{'fraction_non_alphanumeric': 0.32497678737233054, 'fraction_numerical': 0.010027855153203343, 'mean_word_length': 3.699825479930192, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7248135', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1312, 'n_words': 275}