/*******************************************************************************
***  This file is part of Dux Rei Nummariae.                                 ***
***                                                                          ***
***  Copyright (C) 2017, 2018, 2019, 2020, 2021                              ***
***  John Schneiderman <Licensing _AT_ Schneiderman _DOT_ me>                ***
***                                                                          ***
***  This program is free software: you can redistribute it and/or modify it ***
***  under the terms of the GNU Affero General Public License as published   ***
***  by the Free Software Foundation, either version 3 of the License, or    ***
***  (at your option) any later version.                                     ***
***                                                                          ***
***  This program is distributed in the hope that it will be useful, but     ***
***  WITHOUT ANY WARRANTY; without even the implied warranty of              ***
***  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    ***
***  See the GNU Affero General Public License for more details.             ***
***                                                                          ***
***  You should have received a copy of the GNU Affero General Public License***
***  along with this program. If not, see <http://www.gnu.org/licenses/>.    ***
*******************************************************************************/
#ifndef DRN_BUDGETING_BUDGETITEMIDENTIFIER_H_
#define DRN_BUDGETING_BUDGETITEMIDENTIFIER_H_

#include <iosfwd>

#include "budgeting_export.h"
#include "BudgetItemTypes.h"
#include "BudgetSource.h"


namespace drn
{
namespace budgeting
{

struct DRN_BUDGETING_EXPORT BudgetItemIdentifier
{
	BudgetItemTypes type_;
	BudgetSource source_;
};

/**
 * @brief Compares the two objects by the type and then the source.
 *
 * @param lhs The object on the left to compare is less than the other.
 * @param rhs The object on the right that is other to be compared.
 *
 * @return True when the first criteria is met for being less-than, else false.
 */
DRN_BUDGETING_EXPORT bool operator<(
	const BudgetItemIdentifier& lhs,
	const BudgetItemIdentifier& rhs
);
DRN_BUDGETING_EXPORT bool operator==(
	const BudgetItemIdentifier& lhs,
	const BudgetItemIdentifier& rhs
);
DRN_BUDGETING_EXPORT bool operator!=(
	const BudgetItemIdentifier& lhs,
	const BudgetItemIdentifier& rhs
);
DRN_BUDGETING_EXPORT std::ostream& operator<<(std::ostream& o, const BudgetItemIdentifier& bii);
DRN_BUDGETING_EXPORT ::QString presentationText(const BudgetItemIdentifier& bii);

}}

#endif
