xtd 0.2.0
Loading...
Searching...
No Matches
country.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../forms_export.hpp"
6#include <xtd/drawing/bitmap>
7#include <xtd/iequatable>
8#include <xtd/object>
9#include <xtd/string>
10#include <xtd/convert_string>
11#include <xtd/static>
12
14namespace xtd {
16 namespace forms {
18 class countries;
20
34 class forms_export_ country : public object, public xtd::iequatable<country> {
35 struct data;
36
37 public:
39 country();
40 country(const country& other);
41 country& operator =(const country& other);
43
45
49 static const country empty();
51
53
57 virtual const xtd::string alpha_2_code() const noexcept;
58
61 virtual const xtd::string alpha_3_code() const noexcept;
62
65 virtual const xtd::string emoticon() const noexcept;
66
69 virtual const xtd::drawing::image flag() const noexcept;
70
73 virtual const xtd::drawing::image flag_squared() const noexcept;
74
77 virtual const xtd::string name() const noexcept;
78
81 virtual int32 numeric_code() const noexcept;
83
85
87 using object::equals;
88 bool equals(const country& value) const noexcept override;
89
92 virtual xtd::string to_string() const noexcept override;
94
96
100 static country from_alpha_2_code(const xtd::string& alpha_2_code);
101
104 static country from_alpha_3_code(const xtd::string& alpha_3_code);
105
108 static country from_name(const xtd::string& name);
109
112 static country from_numeric_code(int32 numeric_code);
114
115 private:
116 friend class countries;
117 static const std::vector<xtd::string> enclosed_letters;
118 country(const xtd::string& name, const xtd::string& alpha_2_code, const xtd::string& alpha_3_code, int32 numeric_code);
119
120 xtd::sptr<data> data_;
121 };
122 }
123}
Represents text as a sequence of character units.
Definition basic_string.hpp:79
Provides a collection of xtd::forms::country for all countries in the world. This class cannot be inh...
Definition countries.hpp:24
Represent a country with name, alpha codes, numeric code, emoticon and flag.
Definition country.hpp:34
static const country empty()
Gets an empty country.
virtual const xtd::string alpha_2_code() const noexcept
Gets the country alpha 2 code.
Represent a emoticon with name and codepoints.
Definition emoticon.hpp:30
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
@ other
The operating system is other.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10