#include "GuiInstanceLoader_TemplateControl.h"
#ifndef VCZH_DEBUG_NO_REFLECTION
namespace
{
namespace
{
namespace
{
class
GuiDocumentItemInstanceLoader
:
public
,
public
{
protected
:
;
;
public
:
GuiDocumentItemInstanceLoader
()
{
=
::
(
description
::
<
>::
.typeName);
=
::
(
L"Name"
);
}
()
override
{
return
;
}
void
(
const
&
,
collections
::
<
>&
)
override
{
if
(
(
))
{
.
(
);
}
}
void
(
const
&
,
collections
::
<
>&
)
override
{
(
,
);
.
(
::
);
}
<
>
(
const
&
)
override
{
if
(
.
==
::
)
{
auto
=
::
(
nullptr
);
info
.
(
<
*>::
());
info
.
(
<
*>::
());
return
info
;
}
else
if
(
.
)
{
auto
=
::
(
<
>::
());
info
=
::
;
return
info
;
}
return
::
(
);
}
bool
(
const
&
)
override
{
return
.
;
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
types
::
&
,
const
&
,
,
&
,
,
::
&
)
override
{
if
(
(
))
{
=
.
().
(
);
if
(
indexName
!= -
1
)
{
auto
=
<
<
>>::
();
auto
=
<
>();
createExpr
(
type
.
());
createExpr
.
(
.
(
indexName
)
0
].
);
auto
=
<
>();
refVariable
.
.
();
auto
=
<
>();
assignExpr
=
::
;
assignExpr
refVariable
;
assignExpr
createExpr
;
auto
=
<
>();
assignStat
assignExpr
;
return
assignStat
;
}
}
return
nullptr
;
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
types
::
&
,
const
&
,
,
&
,
,
::
&
)
override
{
auto
=
<
>();
FOREACH_INDEXER(GlobalStringKey, prop, index, arguments.Keys())
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__
.
(
prop
);
index
++)
{
const
auto
&
=
.
(
index
);
if
(
prop
==
::
)
{
auto
=
values
0
].
;
auto
=
values
0
].
();
<
>
;
if
(
td
->
(
description
::
<
>()))
{
auto
=
<
>();
member
value
;
member
.
=
L"BoundsComposition"
;
compositionExpr
member
;
}
else
if
(
td
->
(
description
::
<
>()))
{
compositionExpr
value
;
}
if
(
compositionExpr
)
{
auto
=
<
>();
refItem
.
.
();
auto
=
<
>();
refContainer
refItem
;
refContainer
.
=
L"Container"
;
auto
=
<
>();
refAddChild
refContainer
;
refAddChild
.
=
L"AddChild"
;
auto
=
<
>();
call
refAddChild
;
call
.
(
compositionExpr
);
auto
=
<
>();
stat
call
;
block
.
(
stat
);
}
}
}
if
(
block
.
() >
0
)
{
return
block
;
}
return
nullptr
;
}
};
template
<
typename
>
class
GuiDocumentInstanceLoaderBase
:
public
{
private
:
using
=
typename
::TypeInfo;
public
:
using
=
::
;
using
=
::
;
GuiDocumentInstanceLoaderBase
(
const
&
,
theme
::
)
:
(
,
)
{
}
void
(
const
&
,
collections
::
<
>&
)
override
{
.
(
::
);
::GetPropertyNames(
,
);
}
<
>
(
const
&
)
override
{
if
(
.
==
::
)
{
return
::
(
<
<
>>::
());
}
return
::GetPropertyType(
);
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
types
::
&
,
const
&
,
,
&
,
,
::
&
)
override
{
auto
=
<
>();
FOREACH_INDEXER(GlobalStringKey, prop, index, arguments.Keys())
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__
.
(
prop
);
index
++)
{
const
auto
&
=
.
(
index
);
if
(
prop
==
::
)
{
auto
=
<
>();
refControl
.
.
();
auto
=
<
>();
refAddDocumentItem
refControl
;
refAddDocumentItem
.
=
L"AddDocumentItem"
;
auto
=
<
>();
call
refAddDocumentItem
;
call
.
(
values
0
].
);
auto
=
<
>();
stat
call
;
block
.
(
stat
);
}
}
if
(
block
.
() >
0
)
{
return
block
;
}
return
::AssignParameters(
,
,
,
,
,
,
);
}
};
#define BASE_TYPE GuiTemplateControlInstanceLoader<GuiDocumentViewer>
class GuiDocumentViewerInstanceLoader : public GuiDocumentInstanceLoaderBase<BASE_TYPE>
class
GuiDocumentViewerInstanceLoader
:
public
GuiDocumentInstanceLoaderBase
<
GuiTemplateControlInstanceLoader
<
>>
{
public
:
GuiDocumentViewerInstanceLoader
()
:GuiDocumentInstanceLoaderBase<BASE_TYPE>(description::TypeInfo<GuiDocumentViewer>::content.typeName, theme::ThemeName::DocumentViewer)
:
GuiDocumentInstanceLoaderBase
<
GuiTemplateControlInstanceLoader
<
>>(
description
::
<
>::
.typeName,
theme
::
::
)
{
}
};
#undef BASE_TYPE
#define BASE_TYPE GuiTemplateControlInstanceLoader<GuiDocumentLabel>
class GuiDocumentLabelInstanceLoader : public GuiDocumentInstanceLoaderBase<BASE_TYPE>
class
GuiDocumentLabelInstanceLoader
:
public
GuiDocumentInstanceLoaderBase
<
GuiTemplateControlInstanceLoader
<
>>
{
public
:
GuiDocumentLabelInstanceLoader
()
:GuiDocumentInstanceLoaderBase<BASE_TYPE>(description::TypeInfo<GuiDocumentLabel>::content.typeName, theme::ThemeName::DocumentLabel)
:
GuiDocumentInstanceLoaderBase
<
GuiTemplateControlInstanceLoader
<
>>(
description
::
<
>::
.typeName,
theme
::
::
)
{
}
};
#undef BASE_TYPE
void
(
IGuiInstanceLoaderManager
*
)
{
->
(
new
GuiDocumentItemInstanceLoader
);
->
(
new
GuiDocumentViewerInstanceLoader
);
->
(
new
GuiDocumentLabelInstanceLoader
);
}
}
}
}
#endif