1/* 2 * Copyright 2011 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 42274 12 * src/kits/locale/Country.cpp rev 42274 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 38 39/*! 40 \fn BCountry::BCountry(const char* countryCode) 41 \brief Initialize a BCountry from a country code. 42 43 \param countryCode The country code to initialize from. 44*/ 45 46 47/*! 48 \fn BCountry::BCountry(const BCountry& other) 49 \brief Initialize a BCountry from another BCountry object. 50 51 \param other The BCountry object to initialize from. 52*/ 53 54 55/*! 56 \fn BCountry& BCountry::operator=(const BCountry& other) 57*/ 58 59 60/*! 61 \fn BCountry::~BCountry() 62 \brief Destructor method. 63*/ 64 65 66/*! 67 \fn status_t BCountry::GetName(BString& name, 68 const BLanguage* displayLanguage = NULL) const 69 \brief Writes the country's name into the supplied BString. 70 71 \param name A reference to a BString to write the country name to. 72 \param displayLanguage The language to use when writing the name. Can be 73 \c NULL to use the language set by the user's locale. 74 75 \returns A status code, B_OK if everything went fine, or an error code 76 otherwise. 77*/ 78 79 80/*! 81 \fn const char* BCountry::Code() const 82 \brief Gets the ISO country code for the country. 83 84 \returns The ISO country code for the country. 85*/ 86 87 88/*! 89 \fn status_t BCountry::GetIcon(BBitmap* result) const; 90 \brief Render the country's flag to the given BBitmap. 91 92 This function renders the country's flag to the given BBitmap. The bitmap 93 should already be set to the pixel format and size you want to use. 94 95 The flag is stored in HVIF format so it can be rendered at any size and 96 color depth. 97 98 \param result The BBitmap object to draw the flag into. 99 100 \returns \c B_OK if the drawing was successful. 101*/ 102