7#ifndef BOOST_LOCALE_LOCALIZATION_BACKEND_HPP
8#define BOOST_LOCALE_LOCALIZATION_BACKEND_HPP
10#include <boost/locale/generator.hpp>
11#include <boost/locale/hold_ptr.hpp>
19# pragma warning(disable : 4275 4251 4231 4660)
22namespace boost {
namespace locale {
53 virtual void set_option(
const std::string& name,
const std::string& value) = 0;
78 std::unique_ptr<localization_backend>
get()
const;
80 BOOST_DEPRECATED(
"This function is deprecated, use 'get()' instead")
86 void add_backend(
const std::string& name, std::unique_ptr<localization_backend> backend);
a smart pointer similar to std::unique_ptr but the underlying object has the same constness as the po...
Definition: hold_ptr.hpp:16
Localization backend manager is a class that holds various backend and allows creation of their combi...
Definition: localization_backend.hpp:65
localization_backend_manager()
New empty localization_backend_manager.
static localization_backend_manager global()
localization_backend * create() const
Create new localization backend according to current settings. Ownership is passed to caller.
static localization_backend_manager global(const localization_backend_manager &)
localization_backend_manager(const localization_backend_manager &)
Copy localization_backend_manager.
localization_backend_manager & operator=(const localization_backend_manager &)
Assign localization_backend_manager.
std::unique_ptr< localization_backend > get() const
Create new localization backend according to current settings.
~localization_backend_manager()
Destructor.
void remove_all_backends()
Clear backend.
void select(const std::string &backend_name, category_t category=all_categories)
void add_backend(const std::string &name, std::unique_ptr< localization_backend > backend)
std::vector< std::string > get_all_backends() const
Get list of all available backends.
void adopt_backend(const std::string &name, localization_backend *backend)
this class represents a localization backend that can be used for localizing your application.
Definition: localization_backend.hpp:40
virtual localization_backend * clone() const =0
Make a polymorphic copy of the backend.
virtual void clear_options()=0
Clear all options.
virtual std::locale install(const std::locale &base, category_t category, char_facet_t type)=0
Create a facet for category category and character type type.
virtual void set_option(const std::string &name, const std::string &value)=0
Set option for backend, for example "locale" or "encoding".
char_facet_t
Definition: generator.hpp:34
category_t
Definition: generator.hpp:64