#include "WfRuntime.h"
namespace
{
namespace
{
namespace
{
using
namespace
reflection
;
using
namespace
reflection
::
description
;
using
namespace
collections
;
using
namespace
runtime
;
::
(
const
&
,
*
)
:thisObject(
)
, methodInfo(
)
{
}
::
()
{
}
::
(
<
>
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
<
>
;
(
::
(
),
values
);
return
->
(
,
values
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
CreateFunctionProxyInternal
(
const
&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
return
::
(
<
>(
,
this
));
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
void
::
(
runtime
::
*
)
{
=
;
}
::
(
bool
)
:
(
nullptr
,
nullptr
,
)
{
}
::
()
{
}
::
*
::
()
{
return
nullptr
;
}
runtime
::
*
::
()
{
return
;
}
void
::
(
<
>
)
{
;
}
::
(
const
&
,
collections
::
<
>&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
::
(
);
return
::
(
,
nullptr
,
,
argumentArray
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
()
:
(
true
)
{
}
::
(
const
&
,
collections
::
<
>&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
<
>(
());
{
(
::
(
instance
.
()),
);
}
if
(
() ==
::
)
{
return
::
(
instance
);
}
else
{
return
::
(
instance
.
());
}
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
(
<
>
)
:
(
true
)
{
(
);
}
void
::
(
const
&
,
collections
::
<
>&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
<
>();
capturedVariables
.
(
1
);
capturedVariables
0
]
::
(
.
());
auto
=
::
(
);
::
(
,
capturedVariables
,
,
argumentArray
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
(
const
&
,
collections
::
<
>&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
<
>();
capturedVariables
.
(
1
);
capturedVariables
0
]
::
(
.
());
auto
=
::
(
);
return
::
(
,
capturedVariables
,
,
argumentArray
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
()
:
(
false
)
{
}
::
(
const
&
,
collections
::
<
>&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
if
(
.
() !=
1
)
{
throw
ArgumentCountMismtatchException
(
());
}
auto
=
<
<
>>(
0
]);
<
*>
;
{
const
auto
&
=
dynamic_cast
<
*>(
())->
();
for
(
=
0
;
i
<
baseTypes
.
();
i
++)
{
auto
=
baseTypes
i
];
if
(
td
!=
description
::
<
>())
{
if
(
auto
=
td
->
())
{
=
group
->
();
*
=
nullptr
;
for
(
=
0
;
j
<
count
;
j
++)
{
auto
=
group
->
(
j
);
if
(
ctor
->
() ==
1
)
{
auto
=
ctor
->
(
0
)->
();
if
(
type
->
() ==
::
&&
type
->
() ==
description
::
<
>())
{
selectedCtor
=
ctor
;
break
;
}
}
}
if
(
selectedCtor
)
{
baseCtors
.
(
selectedCtor
);
}
else
{
throw
ArgumentCountMismtatchException
(
group
);
}
}
else
{
throw
ConstructorNotExistsException
(
td
);
}
}
}
}
<
>
=
new
(
(),
proxy
,
baseCtors
);
if
(
() ==
::
)
{
return
::
(
instance
);
}
else
{
return
::
(
instance
.
());
}
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
(
<
>
)
:
(
true
)
{
auto
=
<
<
>>::
();
auto
=
<
>(
this
,
L"proxy"
,
argumentType
);
(
parameter
);
(
);
}
::
(
const
&
,
collections
::
<
>&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
.
()->
<
>();
return
instance
->
()
(
this
,
::
(
(
)));
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
()
:
(
false
)
{
}
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
template
<
typename
,
typename
>
<
>
(
*
,
*
,
const
&
,
bool
)
{
if
(!
)
{
throw
(
L"thisObject"
,
);
}
auto
=
->
(
);
auto
=
untypedValue
.
<
>();
if
(
untypedValue
)
{
if
(!
typedValue
)
{
throw
(
L"Key mismatches with the record type."
,
L"vl::workflow::typeimpl::GetFieldRecord"
,
L"key"
);
}
}
else
if
(
)
{
typedValue
new
;
->
(
,
typedValue
);
}
return
typedValue
;
}
#endif
const
wchar_t
*
::
EventRecordInternalPropertyName
=
L"WfEvent::EventRecord"
;
<
::
>
::
(
*
,
bool
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
return
<
>(
this
,
,
EventRecordInternalPropertyName
,
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
<
>
::
(
*
,
<
>
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
(
,
true
);
auto
=
<
>(
);
record
.
(
this
,
result
);
return
result
;
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
bool
::
(
*
,
<
>
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
.
<
>();
if
(!
impl
)
return
false
;
auto
=
(
,
true
);
if
(
record
.
(
this
,
impl
.
()))
{
impl
=
false
;
return
true
;
}
return
false
;
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
void
::
(
*
,
<
>
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
(
,
false
);
if
(
record
)
{
=
record
.
().
(
this
);
if
(
index
!= -
1
)
{
auto
&
=
record
.
(
index
);
FOREACH(Ptr<EventHandlerImpl>, handler, values)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
values
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
handler
);)
{
handler
(
);
}
}
}
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
<
>
::
()
{
return
;
}
::
(
*
,
const
&
)
:
(
,
)
{
}
::
()
{
}
::
*
::
()
{
return
nullptr
;
}
void
::
(
<
>
)
{
;
}
const
wchar_t
*
::
FieldRecordInternalPropertyName
=
L"WfField::FieldRecord"
;
<
::
>
::
(
*
,
bool
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
return
<
>(
this
,
,
FieldRecordInternalPropertyName
,
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
(
const
&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
(
.
(),
true
);
return
record
.
(
this
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
void
::
(
&
,
const
&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
(
.
(),
true
);
record
.
(
this
,
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
(
*
,
const
&
)
:
(
,
,
nullptr
)
{
}
::
()
{
}
::
*
::
()
{
return
nullptr
;
}
void
::
(
<
>
)
{
;
}
::
(
const
&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
.
().
<
::
<
>>();
if
(!
structValue
)
{
throw
ArgumentTypeMismtatchException
(
L"thisObject"
,
(),
::
,
);
}
=
structValue
.
.
().
(
this
);
if
(
index
== -
1
)
{
return
()->
()->
();
}
else
{
return
structValue
.
.
()
index
];
}
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
void
::
(
&
,
const
&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
.
().
<
::
<
>>();
if
(!
structValue
)
{
throw
ArgumentTypeMismtatchException
(
L"thisObject"
,
(),
::
,
);
}
structValue
.
.
(
this
,
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
(
*
,
const
&
)
:
(
,
,
nullptr
)
{
}
::
()
{
}
::
*
::
()
{
return
nullptr
;
}
void
::
(
<
>
)
{
;
}
::
(
*
,
const
&
)
:
(
,
,
nullptr
,
nullptr
,
nullptr
)
{
}
::
()
{
}
void
::
(
*
)
{
=
;
}
void
::
(
*
)
{
=
;
}
void
::
(
*
)
{
=
;
}
::
(
const
&
)
:workflowTypeName(
)
{
=
.
();
=
nullptr
;
=
::
;
}
void
::
(
runtime
::
*
,
*
)
{
=
->
();
for
(
=
0
;
j
<
methodCount
;
j
++)
{
auto
=
->
(
j
);
if
(
auto
=
dynamic_cast
<
*>(
method
))
{
methodInfo
->
(
);
}
}
}
void
::
(
runtime
::
*
)
{
=
;
if
(
auto
=
())
{
(
,
group
);
}
=
();
for
(
=
0
;
i
<
methodGroupCount
;
i
++)
{
auto
=
(
i
);
(
,
group
);
}
}
void
::
()
{
}
::
(
reflection
::
description
::
,
const
&
)
:
<
reflection
::
description
::
>(
,
)
{
}
::
()
{
}
runtime
::
*
::
()
{
return
;
}
const
::
&
::
()
{
if
(!
)
{
=
true
;
;
customTypes
.
(
this
);
for
(
=
0
;
i
<
customTypes
.
();
i
++)
{
auto
=
customTypes
i
];
=
td
->
GetBaseTypeDescriptorCount
();
for
(
=
0
;
j
<
count
;
j
++)
{
auto
=
td
->
(
j
);
if
(
dynamic_cast
<
*>(
baseTd
))
{
customTypes
.
(
baseTd
);
}
else
{
.
(
baseTd
);
}
}
}
}
return
;
}
void
::
(
*
)
{
::
(
);
}
void
::
(
const
&
,
<
>
)
{
(
,
);
}
void
::
(
<
>
)
{
(
);
}
void
::
(
<
>
)
{
(
);
}
void
::
(
<
>
)
{
(
);
}
void
::
(
<
>
)
{
(
);
}
void
::
(
<
>
)
{
(
);
}
::
(
const
&
)
:
(
::
,
)
{
}
::
()
{
}
::
(
const
&
)
:
(
::
,
)
{
}
::
()
{
}
::
::
(
*
)
:owner(
)
{
}
::
::
()
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
return
::
(
new
::
<
>,
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
::
::
(
const
&
,
const
&
)
{
return
::
;
}
::
(
const
&
)
:
<
reflection
::
description
::
>(
::
,
)
{
this
->
new
(
this
);
}
::
()
{
}
::
()
{
this
->
();
return
.
();
}
*
::
(
)
{
this
->
();
if
(
<
0
||
>=
.
())
{
return
nullptr
;
}
return
.
()
].
();
}
bool
::
(
const
&
,
bool
)
{
this
->
();
return
.
().
(
);
}
*
::
(
const
&
,
bool
)
{
this
->
();
=
.
().
(
);
if
(
index
== -
1
)
return
nullptr
;
return
.
()
index
].
();
}
void
::
(
<
>
)
{
.
(
(),
);
}
::
::
(
*
)
:owner(
)
{
}
bool
::
::
()
{
return
->
() ==
::
;
}
::
::
()
{
return
->
.
();
}
::
::
(
)
{
if
(
<
0
||
>=
->
.
())
{
return
L""
;
}
return
->
.
()
];
}
::
::
(
)
{
if
(
<
0
||
>=
->
.
())
{
return
0
;
}
return
->
.
()
];
}
::
::
(
)
{
return
->
.
().
(
);
}
::
::
(
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
<
::
<
>>();
boxedValue
.
=
;
return
::
(
boxedValue
,
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
::(
const
& )
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
.
().
<
::
<
>>();
if
(!
enumValue
)
{
throw
ArgumentTypeMismtatchException
(
L"enumValue"
,
,
::
,
);
}
return
enumValue
.
;
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
::
(
*
)
:owner(
)
{
}
::
::
()
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
return
::
(
new
::
<
>,
);
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
::
::
(
const
&
,
const
&
)
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
auto
=
.
().
<
::
<
>>();
if
(!
ea
)
{
throw
ArgumentTypeMismtatchException
(
L"ea"
,
,
::
,
);
}
auto
=
.
().
<
::
<
>>();
if
(!
eb
)
{
throw
ArgumentTypeMismtatchException
(
L"eb"
,
,
::
,
);
}
if
(
ea
.
<
eb
.
)
return
::
;
if
(
ea
.
>
eb
.
)
return
::
;
return
::
;
#else
CHECK_FAIL(L"Not Implemented under VCZH_DEBUG_METAONLY_REFLECTION!");
#endif
}
::
(
bool
,
const
&
)
:
<
reflection
::
description
::
>((
?
::
:
::
),
)
{
this
->
new
(
this
);
this
->
new
(
this
);
}
::
()
{
}
void
::
(
const
&
,
)
{
.
(
,
);
}
::
(
*
)
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
:
<
>(
)
#endif
{
=
dynamic_cast
<
*>(
);
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
(
->
().
());
#endif
}
::
()
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
if
(
->
!= -
1
)
{
auto
=
<
>();
capturedVariables
.
(
1
);
capturedVariables
0
]
::
(
this
);
auto
=
::
();
::
(
->
(),
capturedVariables
,
->
,
argumentArray
);
}
#endif
}
void
::
(
*
,
&
)
{
<
>
;
{
if
(!(
ptr
.
()))
{
ptr
.
();
}
();
}
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
=
->
().
(
);
(
index
,
ptr
);
#endif
}
::
(
*
,
<
>
,
collections
::
<
*>&
)
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
:
<
>(
)
, proxy(
)
#endif
{
<
>
(
1
);
arguments
0
]
::
(
);
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
(
.
());
FOREACH_INDEXER(IMethodInfo*, ctor, index, baseCtors)
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__
.
(
ctor
);
index
++)
{
<
>
;
{
auto
=
ctor
->
(
(),
arguments
);
if
(!(
ptr
value
.
()))
{
ptr
value
.
();
}
}
(
index
,
ptr
);
}
#endif
}
::
()
{
}
<
>
::
()
{
return
;
}
runtime
::
*
::
()
{
return
;
}
void
::
(
runtime
::
*
)
{
if
(
)
{
CHECK_ERROR(!_globalContext, L"vl::workflow::typeimpl::WfTypeImpl::SetGlobalContext(WfRuntimeGlobalContext*)#Only one global context is allowed to create from an assembly at the same time.");
do
{
if
(!(!
))
throw
(
L"vl::workflow::typeimpl::WfTypeImpl::SetGlobalContext(WfRuntimeGlobalContext*)#Only one global context is allowed to create from an assembly at the same time."
);}
while
(
0
);
}
else
{
CHECK_ERROR(_globalContext, L"vl::workflow::typeimpl::WfTypeImpl::SetGlobalContext(WfRuntimeGlobalContext*)#Only one global context is allowed to create from an assembly at the same time.");
do
{
if
(!(
))
throw
(
L"vl::workflow::typeimpl::WfTypeImpl::SetGlobalContext(WfRuntimeGlobalContext*)#Only one global context is allowed to create from an assembly at the same time."
);}
while
(
0
);
}
=
;
FOREACH(Ptr<WfClass>, td, classes)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
td
(
);
}
FOREACH(Ptr<WfInterface>, td, interfaces)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
td
(
);
}
if
(
)
{
()->
(
<
>(
this
));
}
else
{
()->
(
<
>(
this
));
}
}
void
::
(
reflection
::
description
::
*
)
{
FOREACH(Ptr<WfClass>, td, classes)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
if
(
td
GetBaseTypeDescriptorCount
() ==
0
)
{
td
(
description
::
<
>());
}
->
(
td
(),
td
);
}
FOREACH(Ptr<WfInterface>, td, interfaces)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
if
(
td
GetBaseTypeDescriptorCount
() ==
0
)
{
td
(
description
::
<
>());
}
->
(
td
(),
td
);
}
FOREACH(Ptr<WfStruct>, td, structs)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
->
(
td
(),
td
);
}
FOREACH(Ptr<WfEnum>, td, enums)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
->
(
td
(),
td
);
}
}
void
::
(
reflection
::
description
::
*
)
{
FOREACH(Ptr<WfClass>, td, classes)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
->
(
td
(),
nullptr
);
}
FOREACH(Ptr<WfInterface>, td, interfaces)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
->
(
td
(),
nullptr
);
}
FOREACH(Ptr<WfStruct>, td, structs)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
->
(
td
(),
nullptr
);
}
FOREACH(Ptr<WfEnum>, td, enums)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
->
(
td
(),
nullptr
);
}
}
}
}
}