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 \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::GetName(BString& name, 82 const BLanguage* displayLanguage = NULL) const 83 \brief Writes the country's name into the supplied BString. 84 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. 88 89 \returns A status code, B_OK if everything went fine, or an error code 90 otherwise. 91 92 \since Haiku R1 93*/ 94 95 96/*! 97 \fn const char* BCountry::Code() const 98 \brief Gets the ISO country code for the country. 99 100 \returns The ISO country code for the country. 101 102 \since Haiku R1 103*/ 104 105 106/*! 107 \fn status_t BCountry::GetIcon(BBitmap* result) const; 108 \brief Render the country's flag to the given BBitmap. 109 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. 112 113 The flag is stored in HVIF format so it can be rendered at any size and 114 color depth. 115 116 \param result The BBitmap object to draw the flag into. 117 118 \returns \c B_OK if the drawing was successful. 119 120 \since Haiku R1 121*/ 122