2 * Copyright 2011 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Axel Dörfler, axeld@pinc-software.de.
7 * Adrien Destugues, pulkomandy@gmail.com.
8 * John Scipione, jscipione@gmail.com
11 * headers/os/locale/Country.h rev 42274
12 * src/kits/locale/Country.cpp rev 42274
20 \brief BCountry class definition.
28 \brief Class representing a country.
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.
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.
42 \fn BCountry::BCountry(const char* countryCode)
43 \brief Initialize a BCountry from a country code.
45 \param countryCode The country code to initialize from.
52 \fn BCountry::BCountry(const BCountry& other)
53 \brief Initialize a BCountry from another BCountry object.
55 \param other The BCountry object to initialize from.
62 \fn BCountry& BCountry::operator=(const BCountry& other)
63 \brief Initialize a BCountry from another BCountry object by overloading
66 \param other The BCountry object to initialize from.
73 \fn BCountry::~BCountry()
74 \brief Destructor method.
81 \fn status_t BCountry::GetName(BString& name,
82 const BLanguage* displayLanguage = NULL) const
83 \brief Writes the country's name into the supplied BString.
85 \param name A reference to a BString to write the country name to.
86 \param displayLanguage The language to use when writing the name. Can be
87 \c NULL to use the language set by the user's locale.
89 \returns A status code, B_OK if everything went fine, or an error code
97 \fn const char* BCountry::Code() const
98 \brief Gets the ISO country code for the country.
100 \returns The ISO country code for the country.
107 \fn status_t BCountry::GetIcon(BBitmap* result) const;
108 \brief Render the country's flag to the given BBitmap.
110 This function renders the country's flag to the given BBitmap. The bitmap
111 should already be set to the pixel format and size you want to use.
113 The flag is stored in HVIF format so it can be rendered at any size and
116 \param result The BBitmap object to draw the flag into.
118 \returns \c B_OK if the drawing was successful.