#include "GuiTypeDescriptorReflection.h"
#ifndef VCZH_DEBUG_NO_REFLECTION
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
struct
{
<
*,
>
;
<
*,
>
;
<
*,
>
;
<
*,
>
;
};
struct
{
<
,
<
>>
;
<
<
>>
;
<
<
>>
;
<
<
>>
;
<
<
>>
;
};
class
:
public
,
public
{
friend
struct
stream
::
internal
::
<
>;
protected
:
*
=
nullptr
;
=
;
=
::
;
<
>
;
= -
1
;
<
<
>>
;
public
:
() =
default
;
(
&
,
*
)
: decorator(
->
())
, hint(
->
())
, typeDecriptor(
.
->
()])
{
if
(
auto
=
->
())
{
new
(
,
et
);
}
for
(
=
0
;
i
<
->
();
i
++)
{
auto
=
->
(
i
);
.
(
new
(
,
ga
));
}
}
void
(
*
)
{
=
;
if
(
)
{
(
);
}
for
(
=
0
;
i
<
.
();
i
++)
{
i
]
(
);
}
}
()
override
{
return
;
}
()
override
{
return
;
}
*
()
override
{
return
.
();
}
*
()
override
{
return
->
].
();
}
()
override
{
return
.
();
}
*
(
)
override
{
return
].
();
}
()
override
{
switch
(
)
{
case
:
return
() +
L"*"
;
case
:
return
() +
L"^"
;
case
:
return
() +
L"?"
;
case
:
return
()->
();
default
:;
}
=
() +
L"<"
;
FOREACH_INDEXER(Ptr<MetaonlyTypeInfo>, type, i, genericArguments)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
if
(
bool
=
true
)
for
(
=
0
;
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
type
);
i
++)
{
if
(
i
>
0
)
result
+=
L", "
;
result
type
();
}
result
+=
L">"
;
return
result
;
}
};
*
(
*
,
*
)
{
if
(
auto
=
dynamic_cast
<
*>(
))
{
minfo
->
(
);
}
return
;
}
struct
{
= -
1
;
=
0
;
};
struct
{
;
<
>
;
};
struct
{
;
;
;
= -
1
;
= -
1
;
<
<
>>
;
<
>
;
bool
=
false
;
};
struct
{
;
;
= -
1
;
bool
=
false
;
bool
=
false
;
<
>
;
= -
1
;
= -
1
;
= -
1
;
};
struct
{
;
;
;
;
= -
1
;
<
>
;
<
>
;
};
struct
{
;
;
=
::
;
bool
=
false
;
bool
=
false
;
bool
=
false
;
bool
=
false
;
bool
=
false
;
<
>
;
<
>
;
<
>
;
<
>
;
<
>
;
<
>
;
<
>
;
;
};
}
}
namespace
{
namespace
{
SERIALIZE_ENUM(reflection::description::ITypeInfo::Decorator)
template
<>
struct
<
reflection
::
description
::
::
> {
template
<
typename
>
static
void
(
<
>&
,
reflection
::
description
::
::
&
) {
=
0
;
<
>::
(
,
v
);
= (
reflection
::
description
::
::
)
v
; }
template
<
typename
>
static
void
(
<
>&
,
reflection
::
description
::
::
&
) {
= (
)
;
<
>::
(
,
v
); } };
SERIALIZE_ENUM(reflection::description::TypeInfoHint)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
<
>&
,
reflection
::
description
::
&
) {
=
0
;
<
>::
(
,
v
);
= (
reflection
::
description
::
)
v
; }
template
<
typename
>
static
void
(
<
>&
,
reflection
::
description
::
&
) {
= (
)
;
<
>::
(
,
v
); } };
SERIALIZE_ENUM(reflection::description::TypeDescriptorFlags)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
<
>&
,
reflection
::
description
::
&
) {
=
0
;
<
>::
(
,
v
);
= (
reflection
::
description
::
)
v
; }
template
<
typename
>
static
void
(
<
>&
,
reflection
::
description
::
&
) {
= (
)
;
<
>::
(
,
v
); } };
BEGIN_SERIALIZATION(reflection::description::IdRange)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
&
,
reflection
::
description
::
&
) {
BEGIN_SERIALIZATION(reflection::description::MetaonlyTypeInfo)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
&
,
reflection
::
description
::
&
) {
SERIALIZE(genericArguments)
BEGIN_SERIALIZATION(reflection::description::ParameterInfoMetadata)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
&
,
reflection
::
description
::
&
) {
BEGIN_SERIALIZATION(reflection::description::MethodInfoMetadata)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
&
,
reflection
::
description
::
&
) {
SERIALIZE(invokeTemplate)
SERIALIZE(closureTemplate)
SERIALIZE(ownerTypeDescriptor)
BEGIN_SERIALIZATION(reflection::description::PropertyInfoMetadata)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
&
,
reflection
::
description
::
&
) {
SERIALIZE(referenceTemplate)
SERIALIZE(ownerTypeDescriptor)
SERIALIZE(valueChangedEvent)
BEGIN_SERIALIZATION(reflection::description::EventInfoMetadata)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
&
,
reflection
::
description
::
&
) {
SERIALIZE(attachTemplate)
SERIALIZE(detachTemplate)
SERIALIZE(invokeTemplate)
SERIALIZE(ownerTypeDescriptor)
SERIALIZE(observingProperties)
BEGIN_SERIALIZATION(reflection::description::TypeDescriptorMetadata)
template
<>
struct
<
reflection
::
description
::
> {
template
<
typename
>
static
void
(
&
,
reflection
::
description
::
&
) {
SERIALIZE(isAggregatable)
SERIALIZE(isSerializable)
SERIALIZE(baseTypeDescriptors)
SERIALIZE(constructorGroup)
}
}
namespace
{
namespace
{
using
=
stream
::
internal
::
<
<
>>;
using
=
stream
::
internal
::
<
<
>>;
class
:
public
,
public
{
protected
:
*
=
nullptr
;
<
>
;
= -
1
;
*
=
nullptr
;
public
:
(
*
,
<
>
,
,
*
)
: context(
)
, metadata(
)
, ownerTypeDescriptor(
)
, ownerMethod(
)
{
}
*
()
override
{
return
->
].
();
}
const
&
()
override
{
return
;
}
*
()
override
{
return
(
.
(),
);
}
*
()
override
{
return
;
}
};
class
:
public
,
public
,
protected
::
{
friend
class
;
protected
:
*
=
nullptr
;
<
>
;
*
=
nullptr
;
<
<
>>
;
public
:
(
*
,
<
>
)
: context(
)
, metadata(
)
{
for
(
=
0
;
i
<
.
();
i
++)
{
.
(
new
(
,
i
],
,
this
));
}
}
const
&
()
override
{
return
;
}
const
&
()
override
{
return
;
}
*
()
override
{
return
->
].
();
}
const
&
()
override
{
return
;
}
::
*
()
override
{
if
(
.
() +
.
() >
0
)
{
return
this
;
}
return
nullptr
;
}
*
()
override
{
return
;
}
*
()
override
{
return
== -
1
?
nullptr
:
->
].
();
}
()
override
{
return
.
();
}
*
(
)
override
{
return
].
();
}
*
()
override
{
return
(
.
(),
);
}
bool
()
override
{
return
;
}
void
(
collections
::
<
>&
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
(
const
&
,
collections
::
<
>&
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
(
const
&
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
};
class
:
public
,
public
{
protected
:
*
=
nullptr
;
<
>
;
;
public
:
(
*
,
<
>
,
)
: context(
)
, metadata(
)
, idRange(
)
{
}
*
()
override
{
return
(
0
)->
();
}
const
&
()
override
{
return
(
0
)->
();
}
()
override
{
return
.
;
}
*
(
)
override
{
CHECK_ERROR(0 <= index && index < idRange.count, L"IMethodGroupInfo::GetMethod(vint)#Index out of range.");
do
{
if
(!(
0
<=
&&
<
.
))
throw
(
L"IMethodGroupInfo::GetMethod(vint)#Index out of range."
);}
while
(
0
);
auto
=
dynamic_cast
<
*>(
->
.
+
]].
());
if
(
info
->
==
nullptr
)
{
info
->
=
this
;
}
return
info
;
}
};
class
:
public
,
public
,
protected
::
{
protected
:
*
=
nullptr
;
<
>
;
public
:
(
*
,
<
>
)
: context(
)
, metadata(
)
{
}
const
&
()
override
{
return
;
}
*
()
override
{
return
->
].
();
}
const
&
()
override
{
return
;
}
::
*
()
override
{
if
(
.
() >
0
)
{
return
this
;
}
return
nullptr
;
}
bool
()
override
{
return
;
}
bool
()
override
{
return
;
}
*
()
override
{
return
(
.
(),
);
}
*
()
override
{
return
== -
1
?
nullptr
:
->
].
();
}
*
()
override
{
return
== -
1
?
nullptr
:
->
].
();
}
*
()
override
{
return
== -
1
?
nullptr
:
->
].
();
}
(
const
&
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
void
(
&
,
const
&
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
};
class
:
public
,
public
,
protected
::
{
protected
:
*
=
nullptr
;
<
>
;
public
:
(
*
,
<
>
)
: context(
)
, metadata(
)
{
}
const
&
()
override
{
return
;
}
const
&
()
override
{
return
;
}
const
&
()
override
{
return
;
}
*
()
override
{
return
->
].
();
}
const
&
()
override
{
return
;
}
::
*
()
override
{
if
(
.
() +
.
() +
.
() >
0
)
{
return
this
;
}
return
nullptr
;
}
*
()
override
{
return
(
.
(),
);
}
()
override
{
return
.
();
}
*
(
)
override
{
return
->
]].
();
}
<
>
(
const
&
,
<
>
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
bool
(
const
&
,
<
>
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
void
(
const
&
,
<
>
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
};
class
:
public
,
public
,
protected
::
,
protected
,
protected
{
protected
:
*
=
nullptr
;
<
>
;
*
=
nullptr
;
<
<
>>
;
<
>
;
public
:
(
*
,
<
>
)
: context(
)
, metadata(
)
{
if
(
)
{
=
->
].
();
}
for
(
=
0
;
i
<
.
();
i
++)
{
.
(
new
(
,
,
i
]));
}
if
(
.
!= -
1
)
{
new
(
,
,
);
}
}
const
&
()
override
{
return
;
}
()
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
::
(
const
&
,
const
&
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
bool
()
override
{
return
;
}
()
override
{
return
.
();
}
(
)
override
{
return
];
}
(
)
override
{
return
];
}
(
)
override
{
return
.
(
);
}
(
)
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
(
const
& )
override
{
CHECK_FAIL(L"Not Supported!");
do
{
throw
(
L"Not Supported!"
);}
while
(
0
);
}
::
*
()
override
{
if
(
.
() >
0
)
{
return
this
;
}
return
nullptr
;
}
()
override
{
return
;
}
bool
()
override
{
return
;
}
const
&
()
override
{
return
;
}
*
()
override
{
return
?
this
:
nullptr
;
}
*
()
override
{
return
?
this
:
nullptr
;
}
*
()
override
{
return
;
}
()
override
{
return
.
();
}
*
(
)
override
{
return
->
]].
();
}
bool
(
*
)
override
{
if
(
this
==
)
return
true
;
=
GetBaseTypeDescriptorCount
();
for
(
=
0
;
i
<
count
;
i
++)
{
if
(
(
i
)->
(
))
return
true
;
}
return
false
;
}
()
override
{
return
.
();
}
*
(
)
override
{
return
->
]].
();
}
bool
(
const
&
,
bool
)
override
{
return
(
,
);
}
*
(
const
&
,
bool
)
override
{
for
(
=
0
;
i
<
.
();
i
++)
{
auto
=
(
i
);
if
(
info
->
()
)
{
return
info
;
}
}
if
(
)
{
for
(
=
0
;
i
<
.
();
i
++)
{
if
(
auto
=
(
i
)->
(
,
true
))
{
return
info
;
}
}
}
return
nullptr
;
}
()
override
{
return
.
();
}
*
(
)
override
{
return
->
]].
();
}
bool
(
const
&
,
bool
)
override
{
return
(
,
);
}
*
(
const
&
,
bool
)
override
{
for
(
=
0
;
i
<
.
();
i
++)
{
auto
=
(
i
);
if
(
info
->
()
)
{
return
info
;
}
}
if
(
)
{
for
(
=
0
;
i
<
.
();
i
++)
{
if
(
auto
=
(
i
)->
(
,
true
))
{
return
info
;
}
}
}
return
nullptr
;
}
()
override
{
return
.
();
}
*
(
)
override
{
return
].
();
}
bool
(
const
&
,
bool
)
override
{
return
(
,
);
}
*
(
const
&
,
bool
)
override
{
for
(
=
0
;
i
<
.
();
i
++)
{
auto
=
i
].
();
if
(
info
->
()
)
{
return
info
;
}
}
if
(
)
{
for
(
=
0
;
i
<
.
();
i
++)
{
if
(
auto
=
(
i
)->
(
,
true
))
{
return
info
;
}
}
}
return
nullptr
;
}
*
()
override
{
return
.
();
}
};
void
(
&
,
*
)
{
auto
=
<
>();
if
(
auto
=
->
())
{
metadata
cpp
->
();
}
metadata
->
();
metadata
=
->
();
metadata
=
->
();
metadata
=
->
();
metadata
=
->
();
if
(
auto
=
->
())
{
metadata
=
true
;
metadata
=
enumType
->
();
for
(
=
0
;
i
<
enumType
->
();
i
++)
{
metadata
.
(
enumType
->
(
i
));
metadata
.
(
enumType
->
(
i
));
}
}
for
(
=
0
;
i
<
->
GetBaseTypeDescriptorCount
();
i
++)
{
metadata
.
(
.
->
(
i
)]);
}
for
(
=
0
;
i
<
->
();
i
++)
{
metadata
.
(
.
->
(
i
)]);
}
for
(
=
0
;
i
<
->
();
i
++)
{
metadata
.
(
.
->
(
i
)]);
}
for
(
=
0
;
i
<
->
();
i
++)
{
auto
=
->
(
i
);
;
ir
.
=
metadata
.
();
for
(
=
0
;
j
<
mg
->
();
j
++)
{
metadata
.
(
.
mg
->
(
j
)]);
}
ir
.
=
metadata
.
() -
ir
.
;
metadata
.
(
ir
);
}
if
(
auto
=
->
())
{
metadata
.
=
metadata
.
();
for
(
=
0
;
j
<
cg
->
();
j
++)
{
metadata
.
(
.
cg
->
(
j
)]);
}
metadata
.
=
metadata
.
() -
metadata
.
;
}
metadata
;
}
void
(
&
,
*
)
{
auto
=
<
>();
if
(
auto
=
->
())
{
metadata
cpp
->
();
metadata
cpp
->
();
}
metadata
->
();
metadata
=
.
->
()];
if
(
auto
=
->
())
{
metadata
=
.
pi
];
}
for
(
=
0
;
i
<
->
();
i
++)
{
auto
=
->
(
i
);
auto
=
<
>();
piMetadata
pi
->
();
piMetadata
new
(*
.
.
(),
pi
->
());
metadata
.
(
piMetadata
);
}
metadata
new
(*
.
.
(),
->
());
metadata
=
->
();
metadata
;
}
void
(
&
,
*
)
{
auto
=
<
>();;
if
(
auto
=
->
())
{
metadata
cpp
->
();
}
metadata
->
();
metadata
=
.
->
()];
metadata
=
->
();
metadata
=
->
();
metadata
new
(*
.
.
(),
->
());
if
(
auto
=
->
())
{
metadata
=
.
mi
];
}
if
(
auto
=
->
())
{
metadata
=
.
mi
];
}
if
(
auto
=
->
())
{
metadata
=
.
ei
];
}
metadata
;
}
void
(
&
,
*
)
{
auto
=
<
>();;
if
(
auto
=
->
())
{
metadata
cpp
->
();
metadata
cpp
->
();
metadata
cpp
->
();
}
metadata
->
();
metadata
=
.
->
()];
metadata
new
(*
.
.
(),
->
());
for
(
=
0
;
i
<
->
GetObservingPropertyCount
();
i
++)
{
metadata
.
(
.
->
(
i
)]);
}
metadata
;
}
void
(
stream
::
&
)
{
(
);
writer
.
<
>();
<
,
*>
;
<
*>
;
<
*>
;
<
*>
;
{
auto
=
();
=
tm
->
();
for
(
=
0
;
i
<
count
;
i
++)
{
auto
=
tm
->
(
i
);
tds
.
(
td
->
(),
td
);
}
}
{
=
tds
.
();
for
(
=
0
;
i
<
count
;
i
++)
{
auto
=
tds
.
()
i
];
writer
.
.
(
td
,
writer
.
.
());
=
td
->
();
for
(
=
0
;
j
<
mgCount
;
j
++)
{
auto
=
td
->
(
j
);
=
mg
->
();
for
(
=
0
;
k
<
miCount
;
k
++)
{
auto
=
mg
->
(
k
);
writer
.
.
(
mi
,
mis
.
());
mis
.
(
mi
);
}
}
if
(
auto
=
td
->
())
{
=
cg
->
();
for
(
=
0
;
k
<
miCount
;
k
++)
{
auto
=
cg
->
(
k
);
writer
.
.
(
mi
,
mis
.
());
mis
.
(
mi
);
}
}
=
td
->
();
for
(
=
0
;
j
<
piCount
;
j
++)
{
auto
=
td
->
(
j
);
writer
.
.
(
pi
,
pis
.
());
pis
.
(
pi
);
}
=
td
->
();
for
(
=
0
;
j
<
eiCount
;
j
++)
{
auto
=
td
->
(
j
);
writer
.
.
(
ei
,
eis
.
());
eis
.
(
ei
);
}
}
}
{
=
tds
.
();
=
mis
.
();
=
pis
.
();
=
eis
.
();
writer
tdCount
miCount
piCount
eiCount
;
for
(
=
0
;
i
<
tdCount
;
i
++)
{
GenerateMetaonlyTypeDescriptor
(
writer
,
tds
.
()
i
]);
}
for
(
=
0
;
i
<
miCount
;
i
++)
{
GenerateMetaonlyMethodInfo
(
writer
,
mis
i
]);
}
for
(
=
0
;
i
<
piCount
;
i
++)
{
GenerateMetaonlyPropertyInfo
(
writer
,
pis
i
]);
}
for
(
=
0
;
i
<
eiCount
;
i
++)
{
GenerateMetaonlyEventInfo
(
writer
,
eis
i
]);
}
}
}
class
:
public
,
public
{
public
:
<
>
;
void
(
*
)
override
{
for
(
=
0
;
i
<
.
();
i
++)
{
auto
=
i
];
->
(
td
(),
td
);
}
}
void
(
*
)
override
{
}
};
<
>
(
stream
::
&
,
const
collections
::
<
,
<
>>&
)
{
auto
=
<
>();
(
context
,
);
auto
=
<
>();
loader
context
;
(
);
reader
.
context
;
{
=
0
;
=
0
;
=
0
;
=
0
;
reader
tdCount
miCount
piCount
eiCount
;
for
(
=
0
;
i
<
tdCount
;
i
++)
{
<
>
;
reader
metadata
;
context
.
(
new
(
context
.
(),
metadata
));
}
for
(
=
0
;
i
<
miCount
;
i
++)
{
<
>
;
reader
metadata
;
context
.
(
new
(
context
.
(),
metadata
));
}
for
(
=
0
;
i
<
piCount
;
i
++)
{
<
>
;
reader
metadata
;
context
.
(
new
(
context
.
(),
metadata
));
}
for
(
=
0
;
i
<
eiCount
;
i
++)
{
<
>
;
reader
metadata
;
context
.
(
new
(
context
.
(),
metadata
));
}
}
return
loader
;
}
}
}
}
#endif