xtd 0.2.0
type_object.h
Go to the documentation of this file.
1 #pragma once
5 #include "iequatable.h"
6 #include "object.h"
7 #include "ustring.h"
8 
10 namespace xtd {
11  class type_object;
12 
13  namespace __s__ {
14  template<typename type_t> xtd::type_object __typeof_() noexcept;
15  template<typename type_t> xtd::type_object __typeof_(const type_t& value) noexcept;
16  xtd::type_object __typeof_(const xtd::type& value) noexcept;
17  }
18 }
20 
21 
23 namespace xtd {
25 
36  class type_object : public object, public xtd::iequatable<type_object> {
37  public:
39  type_object(const type_object&) noexcept = default;
40  type_object& operator=(const type_object&) noexcept;
42 
48  xtd::ustring full_name() const noexcept;
49 
53  xtd::ustring name() const noexcept;
54 
58  xtd::ustring namespace_() const noexcept;
60 
63  bool equals(const type_object& type) const noexcept override;
64 
65  xtd::ustring to_string() const noexcept override;
67 
68  private:
69  template<typename type_t>
70  friend type_object xtd::__s__::__typeof_() noexcept;
71  template<typename type_t>
72  friend type_object xtd::__s__::__typeof_(const type_t& value) noexcept;
73  friend type_object xtd::__s__::__typeof_(const xtd::type& value) noexcept;
74  friend class xtd::object;
75 
76  type_object() noexcept;
77  type_object(const xtd::type& type) noexcept;
78 
79  const xtd::type& type_;
80  };
82 }
std::type_info type
Stores information about a type.
Definition: types.h:217
Contains xtd::iequatable interface.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1063
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
Contains xtd::ustring class.
Contains xtd::object class.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
Represents type declarations: class types, interface types, array types, value types, enumeration types, type parameters, generic type definitions, and open or closed constructed generic types.
Definition: type_object.h:36