/*******************************************************************************
***  This file is part of Pecunia.                                           ***
***                                                                          ***
***  Copyright (C) 2017, 2018, 2019, 2020, 2021, 2023                        ***
***  John Schneiderman <Licencing _AT_ Schneiderman _DOT_ me>                ***
***                                                                          ***
***  This program is free software: you can redistribute it and/or modify it ***
***  under the terms of the GNU Lesser 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 Lesser General Public License for more details.             ***
***                                                                          ***
***  You should have received a copy of the GNU Lesser General Public License***
***  along with this program. If not, see <http://www.gnu.org/licenses/>.    ***
*******************************************************************************/
#ifndef PECUNIA_CURRENCY_SETUP_H_
#define PECUNIA_CURRENCY_SETUP_H_

#include <string>

#include <pecunia_export.h> // cppcheck-suppress missingInclude
#include "MoneyTypes.h"


namespace pecunia
{
namespace currency
{

/**
 * @brief Sets-up all the needed values for the currency library. This will establish the user's
 * locale (using defaultLocale), currency conversion function, and clear out the floating-point
 * exceptions.
 *
 * @param converterFunctor The function to use when converting between currencies.
 */
PECUNIA_EXPORT void setUpCurrency(const pecunia::ConversionFunction& converterFunctor);
/**
 * @brief Sets-up all the needed values for the currency library. This will establish the user's
 * locale, currency conversion function (defaultConverter), and clear out the floating-point
 * exceptions.
 *
 * @param locale The C-locale to use for the currency.
 */
PECUNIA_EXPORT void setUpCurrency(const std::string& locale);
/**
 * @brief Sets-up all the needed values for the currency library. This will establish the user's
 * locale, currency conversion function, and clear out the floating-point exceptions.
 *
 * @param converterFunctor The function to use when converting between currencies.
 * @param locale The C-locale to use for the currency.
 */
PECUNIA_EXPORT void setUpCurrency(
	const pecunia::ConversionFunction& converterFunctor,
	const std::string& locale
);

}}

#endif
