15 template<
class value_t>
16 inline bool is(
bool value) {
return false;}
17 template<
class value_t>
18 inline bool is(
char value) {
return false;}
19 template<
class value_t>
20 inline bool is(
char16 value) {
return false;}
21 template<
class value_t>
22 inline bool is(
char32 value) {
return false;}
23 template<
class value_t>
24 inline bool is(
char8 value) {
return false;}
25 template<
class value_t>
26 inline bool is(
wchar value) {
return false;}
27 template<
class value_t>
28 inline bool is(
decimal value) {
return false;}
29 template<
class value_t>
30 inline bool is(
double value) {
return false;}
31 template<
class value_t>
32 inline bool is(
float value) {
return false;}
33 template<
class value_t>
34 inline bool is(
sbyte value) {
return false;}
35 template<
class value_t>
36 inline bool is(
int16 value) {
return false;}
37 template<
class value_t>
38 inline bool is(
int32 value) {
return false;}
39 template<
class value_t>
40 inline bool is(
int64 value) {
return false;}
41 template<
class value_t>
42 inline bool is(
slong value) {
return false;}
43 template<
class value_t>
45 template<
class value_t>
46 inline bool is(
uint16 value) {
return false;}
47 template<
class value_t>
48 inline bool is(
uint32 value) {
return false;}
49 template<
class value_t>
50 inline bool is(
uint64 value) {
return false;}
51 template<
class value_t>
483 template<
class type_t>
488 }
catch (
const std::bad_cast&) {
518 template<
class type_t,
class param_t>
519 bool is(
const param_t* value) {
521 if (value ==
nullptr)
return false;
522 return dynamic_cast<const type_t*
>(value) !=
nullptr;
523 }
catch (
const std::bad_cast&) {
538 template<
class type_t,
class param_t>
539 bool is(
const param_t& value) {
553 template<
class type_t,
class param_t>
554 bool is(param_t* value) {
556 if (value ==
nullptr)
return false;
557 return dynamic_cast<type_t*
>(value) !=
nullptr;
558 }
catch (
const std::bad_cast&) {
573 template<
class type_t,
class param_t>
574 bool is(param_t& value) {
588 template<
class new_type_t,
class current_type_t>
590 auto result = std::dynamic_pointer_cast<new_type_t>(value.pointer());
591 if (result)
return true;
Contains xtd::any type and std::bad_any_cast exception.
std::int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
char8_t char8
Represents a 8-bit unicode character.
Definition char8.hpp:26
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition slong.hpp:27
std::int8_t sbyte
Represents a 8-bit signed integer.
Definition sbyte.hpp:23
wchar_t wchar
Represents a wide character.
Definition wchar.hpp:24
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition ulong.hpp:27
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.hpp:23
std::uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
std::int16_t int16
Represents a 16-bit signed integer.
Definition int16.hpp:23
std::uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.hpp:23
std::uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:23
std::any any
Represents the any alias on std::any.
Definition any.hpp:24
bool is< float >(float value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:249
bool is< slong >(slong value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:359
bool is< wchar >(wchar value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:183
bool is< xtd::ulong >(xtd::ulong value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:469
type_t any_cast(const xtd::any &operand)
Performs type-safe access to the contained object.
Definition any_cast.hpp:22
bool is< sbyte >(sbyte value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:271
bool is< decimal >(decimal value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:205
bool is< int64 >(int64 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:337
bool is< char16 >(char16 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:117
bool is(xtd::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:484
bool is< xtd::any >(xtd::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:504
bool is< char32 >(char32 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:139
bool is< uint64 >(uint64 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:447
bool is< double >(double value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:227
bool is< uint16 >(uint16 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:403
bool is< bool >(bool value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:73
bool is< uint32 >(uint32 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:425
bool is< char8 >(char8 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:161
bool is< int32 >(int32 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:315
bool is< char >(char value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:95
bool is< int16 >(int16 value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:293
bool is< xtd::byte >(xtd::byte value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:381
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::parse methods.
Contains xtd fundamental types.