1/*
2 * Copyright 2011-2019 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Axel D��rfler, axeld@pinc-software.de.
7 *		Adrien Destugues, pulkomandy@gmail.com.
8 *		John Scipione, jscipione@gmail.com
9 * 
10 * Corresponds to:
11 *		headers/os/locale/Country.h	 rev 53489
12 *		src/kits/locale/Country.cpp	 rev 53489
13 */
14
15
16/*!
17	\file Country.h
18	\ingroup locale
19	\ingroup libbe
20	\brief BCountry class definition.
21*/
22
23
24/*!
25	\class BCountry
26	\ingroup locale
27	\ingroup libbe
28	\brief Class representing a country.
29
30	BCountry provides information about a particular country including the
31	countries flag (as an HVIF icon), the localized name of the country,
32	and the ISO country code.
33
34	Date, time, and number formatting also depends to some extent on the
35	language used so they are found in the BLocale class instead.
36
37	\since Haiku R1
38*/
39
40
41/*!
42	\fn BCountry::BCountry(const char* countryCode)
43	\brief Initialize a BCountry from a country code.
44
45	\param countryCode The country code to initialize from.
46
47	\since Haiku R1
48*/
49
50
51/*!
52	\fn BCountry::BCountry(const BCountry& other)
53	\brief Initialize a BCountry from another BCountry object.
54
55	\param other The BCountry object to initialize from.
56
57	\since Haiku R1
58*/
59
60
61/*!
62	\fn BCountry& BCountry::operator=(const BCountry& other)
63	\brief Initialize a BCountry from another BCountry object by overloading
64	       the = operator.
65
66	\param other The BCountry object to initialize from.
67
68	\since Haiku R1
69*/
70
71
72/*!
73	\fn BCountry::~BCountry()
74	\brief Destructor method.
75
76	\since Haiku R1
77*/
78
79
80/*!
81	\fn status_t BCountry::SetTo(const char* countryCode)
82	\brief Initialize a BCountry from a country code.
83
84	\param countryCode The country code to initialize from.
85
86	\returns Same value as InitCheck.
87
88	\since Haiku R1
89*/
90
91
92/*!
93	\fn status_t BCountry::InitCheck()
94	\brief Check validity of the BCountry object.
95
96	\returns B_OK if everything went fine, B_BAD_DATA if the specified country
97	         code is not valid, B_NO_MEMORY if the object could not be
98			 allocated properly.
99
100	\since Haiku R1
101*/
102
103
104/*!
105	\fn status_t BCountry::GetName(BString& name,
106		const BLanguage* displayLanguage = NULL) const
107	\brief Writes the country's name into the supplied BString.
108
109	\param name A reference to a BString to write the country name to.
110	\param displayLanguage The language to use when writing the name. Can be
111	       \c NULL to use the language set by the user's locale.
112
113	\returns A status code, B_OK if everything went fine, or an error code
114	         otherwise.
115
116	\since Haiku R1
117*/
118
119
120/*!
121	\fn status_t BCountry::GetPreferredLanguage(BLanguage& language) const
122	\brief Get the most likely language to use in that country.
123
124	\param language A reference to a BLanguage to set to the preferred language.
125
126	\returns A status code, B_OK if everything went fine, or an error code
127	         otherwise.
128
129	\since Haiku R1
130*/
131
132
133/*!
134	\fn const char* BCountry::Code() const
135	\brief Gets the ISO country code for the country.
136
137	\returns The ISO country code for the country.
138
139	\since Haiku R1
140*/
141
142
143/*!
144	\fn status_t BCountry::GetIcon(BBitmap* result) const;
145	\brief Render the country's flag to the given BBitmap.
146
147	This function renders the country's flag to the given BBitmap. The bitmap
148	should already be set to the pixel format and size you want to use.
149
150	The flag is stored in HVIF format so it can be rendered at any size and
151	color depth.
152
153	\param result The BBitmap object to draw the flag into.
154
155	\returns \c B_OK if the drawing was successful.
156
157	\since Haiku R1
158*/
159