acme
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages Concepts
_impl_type.h
1//
2// Created by camilo on 23/12/2022 02:48 <3ThomasBorregaardSorensen!!
3//
4#pragma once
5
6
7inline type_atom::type_atom(const ::std::type_info & typeinfo) :
8#ifdef WINDOWS
9 atom(c_demangle(typeinfo.name()))
10#else
11 atom(demangle(typeinfo.name()))
12#endif
13{
14
15}
16
17
18//inline bool type_atom::name_contains(const ::ansi_character * psz) const
19//{
20//
21// return m_str.contains(psz);
22//
23//}
24
25
26inline bool type_atom::operator == (const ::atom& atom) const
27{
28
29 return ::atom::operator ==(atom);
30
31}
32
33
34inline type_atom::type_atom(const ::quantum * p)
35{
36
37 if(::is_null(p))
38 {
39
40 set_type(atom::e_type_null);
41
42 }
43 else
44 {
45
46 auto name = typeid(*(::quantum *) p).name();
47
48 ::atom::operator=(demangle(name));
49
50 }
51
52}
53
54
55template < primitive_object_not_type_atom OBJECT_NOT_TYPE_ATOM >
56type_atom::type_atom(OBJECT_NOT_TYPE_ATOM & objectnottypeatom)
57{
58
59 auto name = typeid(*(&(non_const < OBJECT_NOT_TYPE_ATOM > &)objectnottypeatom)).name();
60
61 ::atom::operator = (demangle(name));
62
63}
64
65
66template < typename BASE >
67inline type_atom::type_atom(const ::pointer<BASE>& p)
68{
69
70 auto name = typeid(*((BASE *)p.m_p)).name();
71
72 ::atom::operator = (demangle(name));
73
74}
75
76
77//template < typename TYPE >
78//inline string __type_name()
79//{
80//
81// auto pszType = typeid(TYPE).name();
82//
83// string strName = demangle(pszType);
84//
85// return strName;
86//
87//}
88//
89//
90//template < typename TYPE >
91//inline string __type_name(const TYPE * p)
92//{
93//
94// auto pszType = typeid(*p).name();
95//
96// string strName = demangle(pszType);
97//
98// return strName;
99//
100//}
101//
102//
103//template < typename TYPE >
104//inline string __type_name(const TYPE & t)
105//{
106//
107// auto pszType = typeid(t).name();
108//
109// string strName = demangle(pszType);
110//
111// return strName;
112//
113//}
114
115
116inline bool type_atom::operator == (const ::quantum * p) const
117{
118
119 return operator ==(::type_atom(p));
120
121}
122
123
124
125template < typename TYPE >
126inline bool type_atom::operator == (const ::pointer < TYPE > & p) const
127{
128
129 return this->operator==(p.m_p);
130
131}
132
133
134
Definition atom.h:233