#include "WfRuntimeAssembly.h"
namespace
{
using
namespace
reflection
::
description
;
using
namespace
workflow
::
runtime
;
using
namespace
workflow
::
typeimpl
;
using
namespace
collections
;
namespace
{
namespace
{
struct
WfDeserializationException
{
};
struct
{
<
,
*>
;
<
,
*>
;
<
,
*>
;
<
,
*>
;
&
;
(
&
)
:errors(
)
{
}
};
struct
{
<
*>
;
<
*>
;
<
*>
;
<
*>
;
};
struct
{
<
*,
>
;
<
*,
>
;
<
*,
>
;
<
*,
>
;
void
(
&
)
{
FOREACH_INDEXER(ITypeDescriptor*, td, index, prepare.tds)
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__
.
(
td
);
index
++)
{
.
(
td
,
index
);
}
FOREACH_INDEXER(IMethodInfo*, mi, index, prepare.mis)
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__
.
(
mi
);
index
++)
{
.
(
mi
,
index
);
}
FOREACH_INDEXER(IPropertyInfo*, pi, index, prepare.pis)
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__
.
(
pi
);
index
++)
{
.
(
pi
,
index
);
}
FOREACH_INDEXER(IEventInfo*, ei, index, prepare.eis)
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__
.
(
ei
);
index
++)
{
.
(
ei
,
index
);
}
}
};
using
=
<
<
>>;
using
=
<
<
>>;
static
void
(
*
,
&
)
{
if
(!
.
.
(
))
{
.
.
(
);
}
}
static
void
(
*
,
&
)
{
switch
(
->
())
{
case
::
:
case
::
:
case
::
:
(
->
(),
);
break
;
case
::
:
{
(
->
(),
);
=
->
();
for
(
=
0
;
i
<
count
;
i
++)
{
(
->
(
i
),
);
}
}
break
;
case
::
:
(
->
(),
);
break
;
}
}
static
void
(
*
,
&
)
{
(
->
(),
);
(
->
(),
);
=
->
();
for
(
=
0
;
i
<
count
;
i
++)
{
(
->
(
i
)->
(),
);
}
}
static
void
(
*
,
&
)
{
(
->
(),
);
(
->
(),
);
}
static
void
(
*
,
&
)
{
(
->
(),
);
(
->
(),
);
}
static
void
(
*
,
&
)
{
((
*)
,
);
=
->
GetBaseTypeDescriptorCount
();
for
(
=
0
;
i
<
baseCount
;
i
++)
{
auto
=
->
(
i
);
(
baseType
,
);
}
if
(
auto
=
->
())
{
=
group
->
();
for
(
=
0
;
j
<
methodCount
;
j
++)
{
auto
=
group
->
(
j
);
(
method
,
);
}
}
=
->
();
for
(
=
0
;
i
<
methodGroupCount
;
i
++)
{
auto
=
->
(
i
);
=
group
->
();
for
(
=
0
;
j
<
methodCount
;
j
++)
{
auto
=
group
->
(
j
);
(
method
,
);
}
}
=
->
();
for
(
=
0
;
i
<
propertyCount
;
i
++)
{
(
->
(
i
),
);
}
=
->
();
for
(
=
0
;
i
<
eventCount
;
i
++)
{
(
->
(
i
),
);
}
}
static
void
(
*
,
&
)
{
((
*)
,
);
=
->
();
for
(
=
0
;
i
<
propertyCount
;
i
++)
{
(
->
(
i
),
);
}
}
static
void
(
*
,
&
)
{
((
*)
,
);
}
static
void
(
*
,
&
)
{
FOREACH(Ptr<WfClass>, td, typeImpl->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, typeImpl->interfaces)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
->
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
td
.
(),
);
}
FOREACH(Ptr<WfStruct>, td, typeImpl->structs)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
->
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
td
.
(),
);
}
FOREACH(Ptr<WfEnum>, td, typeImpl->enums)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
->
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
td
.
(),
);
}
}
static
void
(
collections
::
<
>&
,
&
)
{
#define TD(X) do{ if (!prepare.tds.Contains(X)) prepare.tds.Add(X); }while(0)
#define MI(X) do{ if (!prepare.mis.Contains(X)) prepare.mis.Add(X); }while(0)
#define PI(X) do{ if (!prepare.pis.Contains(X)) prepare.pis.Add(X); }while(0)
#define EI(X) do{ if (!prepare.eis.Contains(X)) prepare.eis.Add(X); }while(0)
#define COLLECTMETADATA(NAME) case WfInsCode::NAME: break;
#define COLLECTMETADATA_VALUE(NAME) case WfInsCode::NAME: if (auto td = ins.valueParameter.typeDescriptor) TD(td); break;
#define COLLECTMETADATA_FUNCTION(NAME) case WfInsCode::NAME: break;
#define COLLECTMETADATA_FUNCTION_COUNT(NAME) case WfInsCode::NAME: break;
#define COLLECTMETADATA_VARIABLE(NAME) case WfInsCode::NAME: break;
#define COLLECTMETADATA_COUNT(NAME) case WfInsCode::NAME: break;
#define COLLECTMETADATA_FLAG_TYPEDESCRIPTOR(NAME) case WfInsCode::NAME: TD(ins.typeDescriptorParameter); break;
#define COLLECTMETADATA_PROPERTY(NAME) case WfInsCode::NAME: PI(ins.propertyParameter); break;
#define COLLECTMETADATA_METHOD(NAME) case WfInsCode::NAME: MI(ins.methodParameter); break;
#define COLLECTMETADATA_METHOD_COUNT(NAME) case WfInsCode::NAME: MI(ins.methodParameter); break;
#define COLLECTMETADATA_EVENT(NAME) case WfInsCode::NAME: EI(ins.eventParameter); break;
#define COLLECTMETADATA_EVENT_COUNT(NAME) case WfInsCode::NAME: EI(ins.eventParameter); break;
#define COLLECTMETADATA_LABEL(NAME) case WfInsCode::NAME: break;
#define COLLECTMETADATA_TYPE(NAME) case WfInsCode::NAME: break;
for
(
=
0
;
i
<
.
();
i
++)
{
auto
&
=
i
];
switch
(
ins
.
)
{
INSTRUCTION_CASES(
COLLECTMETADATA,
COLLECTMETADATA_VALUE,
COLLECTMETADATA_FUNCTION,
COLLECTMETADATA_FUNCTION_COUNT,
COLLECTMETADATA_VARIABLE,
COLLECTMETADATA_COUNT,
COLLECTMETADATA_FLAG_TYPEDESCRIPTOR,
COLLECTMETADATA_PROPERTY,
COLLECTMETADATA_METHOD,
COLLECTMETADATA_METHOD_COUNT,
COLLECTMETADATA_EVENT,
COLLECTMETADATA_EVENT_COUNT,
COLLECTMETADATA_LABEL,
COLLECTMETADATA_TYPE
)
case
::
:
break
;
case
::
:
if
(
auto
=
ins
.
.
)
do
{
if
(!
.
.
(
td
))
.
.
(
td
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
do
{
if
(!
.
.
(
ins
.
))
.
.
(
ins
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
}
}
FOREACH(IMethodInfo*, mi, prepare.mis)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
mi
);)
{
(
mi
,
);
}
FOREACH(IPropertyInfo*, pi, prepare.pis)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
pi
);)
{
(
pi
,
);
}
FOREACH(IEventInfo*, ei, prepare.eis)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
ei
);)
{
(
ei
,
);
}
#undef COLLECTMETADATA
#undef COLLECTMETADATA_VALUE
#undef COLLECTMETADATA_FUNCTION
#undef COLLECTMETADATA_FUNCTION_COUNT
#undef COLLECTMETADATA_VARIABLE
#undef COLLECTMETADATA_COUNT
#undef COLLECTMETADATA_FLAG_TYPEDESCRIPTOR
#undef COLLECTMETADATA_PROPERTY
#undef COLLECTMETADATA_METHOD
#undef COLLECTMETADATA_METHOD_COUNT
#undef COLLECTMETADATA_EVENT
#undef COLLECTMETADATA_EVENT_COUNT
#undef COLLECTMETADATA_LABEL
#undef COLLECTMETADATA_TYPE
#undef MI
#undef TD
#undef PI
#undef EI
}
BEGIN_SERIALIZATION(WfInstructionDebugInfo)
template
<>
struct
<
> {
template
<
typename
>
static
void
(
&
,
&
) {
SERIALIZE(instructionCodeMapping)
BEGIN_SERIALIZATION(WfAssemblyFunction)
template
<>
struct
<
> {
template
<
typename
>
static
void
(
&
,
&
) {
SERIALIZE(capturedVariableNames)
SERIALIZE(localVariableNames)
SERIALIZE(firstInstruction)
SERIALIZE(lastInstruction)
SERIALIZE_ENUM(WfInsCode)
template
<>
struct
<
> {
template
<
typename
>
static
void
(
<
>&
,
&
) {
=
0
;
<
>::
(
,
v
);
= (
)
v
; }
template
<
typename
>
static
void
(
<
>&
,
&
) {
= (
)
;
<
>::
(
,
v
); } };
SERIALIZE_ENUM(WfInsType)
template
<>
struct
<
> {
template
<
typename
>
static
void
(
<
>&
,
&
) {
=
0
;
<
>::
(
,
v
);
= (
)
v
; }
template
<
typename
>
static
void
(
<
>&
,
&
) {
= (
)
;
<
>::
(
,
v
); } };
SERIALIZE_ENUM(Value::ValueType)
template
<>
struct
<
::
> {
template
<
typename
>
static
void
(
<
>&
,
::
&
) {
=
0
;
<
>::
(
,
v
);
= (
::
)
v
; }
template
<
typename
>
static
void
(
<
>&
,
::
&
) {
= (
)
;
<
>::
(
,
v
); } };
template
<>
struct
<
*>
{
static
void
(
&
,
*&
)
{
;
id
;
=
(
id
);
if
(!
)
{
.
.
.
(
id
);
}
}
static
void
(
&
,
*&
)
{
=
->
();
id
;
}
};
template
<>
struct
<
>
{
static
void
(
&
,
<
>&
)
{
=
0
;
decorator
;
switch
(
static_cast
<
::
>(
decorator
))
{
case
::
:
{
<
>
;
(
,
elementType
);
<
>(
elementType
);
}
break
;
case
::
:
{
<
>
;
(
,
elementType
);
<
>(
elementType
);
}
break
;
case
::
:
{
<
>
;
(
,
elementType
);
<
>(
elementType
);
}
break
;
case
::
:
{
<
>
;
(
,
elementType
);
auto
=
<
>(
elementType
);
genericType
;
=
0
;
count
;
for
(
=
0
;
i
<
count
;
i
++)
{
<
>
;
(
,
argumentType
);
genericType
(
argumentType
);
}
}
break
;
case
::
:
{
=
0
;
hint
;
;
index
;
<
>(
.
index
],
static_cast
<
>(
hint
));
}
break
;
}
}
static
void
(
&
,
*
)
{
=
static_cast
<
>(
->
());
decorator
;
switch
(
->
())
{
case
::
:
case
::
:
case
::
:
(
,
->
());
break
;
case
::
:
{
(
,
->
());
=
->
();
count
;
for
(
=
0
;
i
<
count
;
i
++)
{
(
,
->
(
i
));
}
}
break
;
case
::
:
{
=
static_cast
<
>(
->
());
hint
;
=
.
->
()];
index
;
}
break
;
}
}
};
template
<>
struct
<
*>
{
static
void
(
&
,
*&
)
{
=
nullptr
;
= -
1
;
;
typeIndex
name
;
auto
=
.
typeIndex
];
auto
=
name
==
L"#ctor"
?
type
->
()
:
type
->
(
name
,
false
);
if
(!
group
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"(...): *"
);
return
;
}
= -
1
;
methodFlag
;
if
(
0
>
methodFlag
||
methodFlag
>
3
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"(...): *"
);
return
;
}
=
group
->GetMethodCount();
switch
(
methodFlag
)
{
case
0
:
{
if
(
methodCount
>
1
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"(...): *; This is caused by a change to this class. When the current assembly was compiled, this imported method didn't have overloadings."
);
return
;
}
=
group
->GetMethod(
0
);
}
break
;
case
1
:
{
= -
1
;
count
;
;
for
(
=
0
;
i
<
count
;
i
++)
{
if
(
i
==
0
)
{
parameters
=
L"*"
;
}
else
{
parameters
+=
L", *"
;
}
}
for
(
=
0
;
i
<
methodCount
;
i
++)
{
auto
=
group
->GetMethod(
i
);
if
(
method
->GetParameterCount() ==
count
)
{
if
(
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"("
+
parameters
+
L"): *; This is caused by a change to this class. When the current assembly was compiled, this imported method didn't have overloadings with the same amount of parameters."
);
return
;
}
=
method
;
}
}
if
(!
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"("
+
parameters
+
L"): *; A qualified method doesn't exist."
);
return
;
}
}
break
;
case
2
:
{
<
>
;
<
>::IOType(
,
returnType
);
auto
=
returnType
();
for
(
=
0
;
i
<
methodCount
;
i
++)
{
auto
=
group
->GetMethod(
i
);
if
(
method
->GetReturn()->GetTypeFriendlyName() ==
signature
)
{
if
(
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"(...): "
+
signature
+
L"; This is caused by a change to this class. When the current assembly was compiled, this imported method didn't have overloadings with the same return type."
);
return
;
}
=
method
;
}
}
if
(!
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"(...): "
+
signature
+
L"; A qualified method doesn't exist."
);
return
;
}
}
break
;
case
3
:
{
= -
1
;
count
;
<
>
;
for
(
=
0
;
i
<
count
;
i
++)
{
<
>
;
<
>::IOType(
,
type
);
signatures
.
(
type
());
}
;
for
(
=
0
;
i
<
count
;
i
++)
{
if
(
i
==
0
)
{
parameters
signatures
0
];
}
else
{
parameters
+=
L", "
+
signatures
i
];
}
}
for
(
=
0
;
i
<
methodCount
;
i
++)
{
auto
=
group
->GetMethod(
i
);
if
(
method
->GetParameterCount() ==
count
)
{
bool
=
true
;
for
(
=
0
;
j
<
count
;
j
++)
{
if
(
method
->GetParameter(
j
)->GetType()->GetTypeFriendlyName() !=
signatures
j
])
{
found
=
false
;
break
;
}
}
if
(
found
)
{
if
(
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"("
+
parameters
+
L"): *; This is caused by a change to this class. When the current assembly was compiled, this imported method didn't have overloadings with the same parameter types."
);
return
;
}
=
method
;
}
}
}
if
(!
)
{
.
.
.
(
L"method: "
+
type
->
() +
L"::"
+
name
+
L"("
+
parameters
+
L"): *; A qualified method doesn't exist."
);
return
;
}
}
break
;
}
}
static
void
(
&
,
*&
)
{
auto
=
->
();
=
.
type
];
auto
=
->
();
=
group
==
type
->
()
?
L"#ctor"
:
->
();
typeIndex
name
;
=
0
;
if
(
group
->
() ==
1
)
{
methodFlag
;
return
;
}
=
->
();
{
=
0
;
for
(
=
0
;
i
<
group
->
();
i
++)
{
if
(
group
->
(
i
)->
() ==
count
)
{
satisfied
++;
}
}
if
(
satisfied
==
1
)
{
methodFlag
=
1
;
methodFlag
count
;
return
;
}
}
auto
=
->
();
{
auto
=
returnType
->
();
=
0
;
for
(
=
0
;
i
<
group
->
();
i
++)
{
if
(
group
->
(
i
)->
()->
() ==
signature
)
{
satisfied
++;
}
}
if
(
satisfied
==
1
)
{
methodFlag
=
2
;
methodFlag
;
<
>::IOType(
,
returnType
);
return
;
}
}
methodFlag
=
3
;
methodFlag
count
;
for
(
=
0
;
i
<
count
;
i
++)
{
<
>::IOType(
,
->
(
i
)->
());
}
}
};
template
<>
struct
<
*>
{
static
void
(
&
,
*&
)
{
= -
1
;
;
typeIndex
name
;
auto
=
.
typeIndex
];
=
type
->
(
name
,
false
);
if
(!
)
{
.
.
.
(
L"property: "
+
type
->
() +
L"::"
+
name
);
}
}
static
void
(
&
,
*&
)
{
auto
=
->
();
=
.
type
];
=
->
();
typeIndex
name
;
}
};
template
<>
struct
<
*>
{
static
void
(
&
,
*&
)
{
= -
1
;
;
typeIndex
name
;
auto
=
.
typeIndex
];
=
type
->
(
name
,
false
);
if
(!
)
{
.
.
.
(
L"event: "
+
type
->
() +
L"::"
+
name
);
}
}
static
void
(
&
,
*&
)
{
auto
=
->
();
=
.
type
];
=
->
();
typeIndex
name
;
}
};
template
<>
struct
<
>
{
static
void
(
&
,
&
)
{
= -
1
;
typeIndex
;
.
=
typeIndex
== -
1
?
nullptr
:
.
typeIndex
];
.
;
.
();
switch
(
.
)
{
case
::
:
.
;
break
;
case
::
: {
=
0
;
intValue
;
.
= (
)
intValue
;
break
; }
case
::
: {
=
0
;
intValue
;
.
= (
)
intValue
;
break
; }
case
::
: {
=
0
;
intValue
;
.
= (
)
intValue
;
break
; }
case
::
: {
=
0
;
intValue
;
.
= (
)
intValue
;
break
; }
case
::
: {
=
0
;
intValue
;
.
= (
)
intValue
;
break
; }
case
::
: {
=
0
;
intValue
;
.
= (
)
intValue
;
break
; }
case
::
: {
=
0
;
intValue
;
.
= (
)
intValue
;
break
; }
case
::
: {
=
0
;
intValue
;
.
= (
)
intValue
;
break
; }
case
::
:
.
;
break
;
case
::
:
.
;
break
;
case
::
:
.
;
break
;
default
:;
}
}
static
void
(
&
,
&
)
{
= -
1
;
if
(
.
)
typeIndex
=
.
.
];
typeIndex
;
.
;
switch
(
.
)
{
case
::
:
.
;
break
;
case
::
: {
=
.
;
intValue
;
break
; }
case
::
: {
=
.
;
intValue
;
break
; }
case
::
: {
=
.
;
intValue
;
break
; }
case
::
: {
=
.
;
intValue
;
break
; }
case
::
: {
=
.
;
intValue
;
break
; }
case
::
: {
=
.
;
intValue
;
break
; }
case
::
: {
=
.
;
intValue
;
break
; }
case
::
: {
=
.
;
intValue
;
break
; }
case
::
:
.
;
break
;
case
::
:
.
;
break
;
case
::
:
.
;
break
;
default
:;
}
}
};
template
<>
struct
<
>
{
static
void
(
&
,
<
>&
)
{
<
>::IOType(
,
);
}
static
void
(
&
,
*
)
{
<
>::IOType(
,
);
}
static
void
(
&
,
*
)
{
<
>
;
(
,
type
);
->
(
type
);
=
0
;
count
;
for
(
=
0
;
i
<
count
;
i
++)
{
;
(
,
type
);
name
;
->
(
new
(
,
name
,
type
));
}
}
static
void
(
&
,
*
)
{
(
,
->
());
=
->
();
count
;
for
(
=
0
;
i
<
count
;
i
++)
{
auto
=
->
(
i
);
(
,
parameter
->
());
=
parameter
->
();
name
;
}
}
static
void
(
&
,
*
)
{
->
;
(
,
);
}
static
void
(
&
,
*
)
{
->
;
(
,
);
}
static
void
(
&
,
*
)
{
->
;
(
,
);
}
static
void
(
&
,
*
)
{
->
;
(
,
);
}
static
void
(
&
,
<
>&
)
{
new
(
nullptr
);
;
(
,
.
());
}
static
void
(
&
,
*
)
{
->
;
(
,
);
}
static
void
(
&
,
<
>&
)
{
<
>
;
(
,
type
);
new
(
type
);
}
static
void
(
&
,
*
)
{
(
,
->
());
}
static
void
(
&
,
*
)
{
(
,
);
}
static
void
(
&
,
*
)
{
(
,
);
}
static
void
(
&
,
*
,
bool
)
{
{
=
0
;
methodCount
;
for
(
=
0
;
i
<
methodCount
;
i
++)
{
if
(
)
{
<
>
;
(
,
ctor
);
->
(
ctor
);
}
else
{
<
>
;
(
,
ctor
);
->
(
ctor
);
}
}
}
=
0
;
baseCount
;
for
(
=
0
;
i
<
baseCount
;
i
++)
{
=
0
;
index
;
auto
=
.
index
];
->
(
baseTd
);
}
=
0
;
methodGroupCount
;
for
(
=
0
;
i
<
methodGroupCount
;
i
++)
{
=
0
;
;
methodCount
methodName
;
for
(
=
0
;
j
<
methodCount
;
j
++)
{
bool
=
false
;
isStaticMethod
;
if
(
isStaticMethod
)
{
auto
=
<
>();
->
(
methodName
,
info
);
(
,
info
.
());
}
else
if
(
)
{
auto
=
<
>();
->
(
methodName
,
info
);
(
,
info
.
());
}
else
{
auto
=
<
>();
->
(
methodName
,
info
);
(
,
info
.
());
}
}
}
=
0
;
eventCount
;
for
(
=
0
;
i
<
eventCount
;
i
++)
{
;
eventName
;
<
>
;
(
,
eventType
);
auto
=
<
>(
,
eventName
);
info
(
eventType
);
->
(
info
);
}
=
0
;
propertyCount
;
for
(
=
0
;
i
<
propertyCount
;
i
++)
{
bool
=
false
;
;
isProperty
propName
;
if
(
isProperty
)
{
auto
=
<
>(
,
propName
);
,
,
;
getterName
setterName
eventName
;
if
(
getterName
!=
L""
)
{
info
(
dynamic_cast
<
*>(
->
(
getterName
,
false
)->
(
0
)));
}
if
(
setterName
!=
L""
)
{
info
(
dynamic_cast
<
*>(
->
(
setterName
,
false
)->
(
0
)));
}
if
(
eventName
!=
L""
)
{
info
(
dynamic_cast
<
*>(
->
(
eventName
,
false
)));
}
->
(
info
);
}
else
{
<
>
;
(
,
fieldType
);
auto
=
<
>(
,
propName
);
info
(
fieldType
);
->
(
info
);
}
}
}
static
void
(
&
,
*
,
bool
)
{
{
=
0
;
if
(
auto
=
->
())
{
=
group
->
();
methodCount
;
for
(
=
0
;
i
<
methodCount
;
i
++)
{
if
(
)
{
auto
=
dynamic_cast
<
*>(
group
->
(
i
));
(
,
ctor
);
}
else
{
auto
=
dynamic_cast
<
*>(
group
->
(
i
));
(
,
ctor
);
}
}
}
else
{
methodCount
;
}
}
=
->
GetBaseTypeDescriptorCount
();
baseCount
;
for
(
=
0
;
i
<
baseCount
;
i
++)
{
auto
=
->
(
i
);
=
.
baseTd
];
index
;
}
=
->
();
methodGroupCount
;
for
(
=
0
;
i
<
methodGroupCount
;
i
++)
{
auto
=
->
(
i
);
=
group
->
();
=
group
->
();
methodCount
methodName
;
for
(
=
0
;
j
<
methodCount
;
j
++)
{
auto
=
group
->
(
j
);
bool
=
false
;
if
(
auto
=
dynamic_cast
<
*>(
method
))
{
isStaticMethod
=
true
;
isStaticMethod
;
(
,
staticMethod
);
}
else
if
(
)
{
isStaticMethod
;
(
,
dynamic_cast
<
*>(
method
));
}
else
{
auto
=
dynamic_cast
<
*>(
method
);
isStaticMethod
;
(
,
interfaceMethod
);
}
}
}
=
->
();
eventCount
;
for
(
=
0
;
i
<
eventCount
;
i
++)
{
auto
=
->
(
i
);
=
info
->
();
eventName
;
(
,
info
->
());
}
=
->
();
propertyCount
;
for
(
=
0
;
i
<
propertyCount
;
i
++)
{
auto
=
->
(
i
);
bool
=
false
;
if
(
dynamic_cast
<
*>(
propInfo
))
{
isProperty
=
true
;
=
propInfo
->
();
isProperty
propName
;
auto
=
propInfo
->
() ?
propInfo
->
()->
() :
L""
;
auto
=
propInfo
->
() ?
propInfo
->
()->
() :
L""
;
auto
=
propInfo
->
() ?
propInfo
->
()->
() :
L""
;
getterName
setterName
eventName
;
}
else
{
isProperty
=
false
;
=
propInfo
->
();
isProperty
propName
;
(
,
propInfo
->
());
}
}
}
static
void
(
&
,
*
)
{
->
;
(
,
,
true
);
}
static
void
(
&
,
*
)
{
->
;
(
,
,
true
);
}
static
void
(
&
,
*
)
{
(
,
,
false
);
}
static
void
(
&
,
*
)
{
(
,
,
false
);
}
static
void
(
&
,
*
)
{
;
count
;
for
(
=
0
;
i
<
count
;
i
++)
{
;
name
;
<
>
;
(
,
typeInfo
);
auto
=
<
>(
,
name
);
field
(
typeInfo
);
->
(
field
);
}
}
static
void
(
&
,
*
)
{
=
->
();
count
;
for
(
=
0
;
i
<
count
;
i
++)
{
auto
=
->
(
i
);
=
prop
->
();
name
;
*
=
prop
->
();
(
,
typeInfo
);
}
}
static
void
(
&
,
*
)
{
;
count
;
auto
=
->
();
for
(
=
0
;
i
<
count
;
i
++)
{
;
;
name
value
;
->
(
name
, (
)
value
);
}
}
static
void
(
&
,
*
)
{
auto
=
->
();
=
et
->
();
count
;
for
(
=
0
;
i
<
count
;
i
++)
{
=
et
->
(
i
);
= (
)
et
->
(
i
);
name
value
;
}
}
static
void
(
&
,
&
)
{
FOREACH(Ptr<WfClass>, td, value.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, value.interfaces)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
,
td
.
());
}
FOREACH(Ptr<WfStruct>, td, value.structs)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
,
td
.
());
}
FOREACH(Ptr<WfEnum>, td, value.enums)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
,
td
.
());
}
}
static
void
(
&
,
&
)
{
FOREACH(Ptr<WfClass>, td, value.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, value.interfaces)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
,
td
.
());
}
FOREACH(Ptr<WfStruct>, td, value.structs)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
,
td
.
());
}
FOREACH(Ptr<WfEnum>, td, value.enums)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
td
);)
{
(
,
td
.
());
}
}
};
template
<>
struct
<
>
{
static
void
(
&
,
&
)
{
.
;
#define IO(X) do{ reader << (X); }while(0)
#define TD(X) do{ vint index = -1; reader << index; X = reader.context->tdIndex[index]; }while(0)
#define MI(X) do{ vint index = -1; reader << index; X = reader.context->miIndex[index]; }while(0)
#define PI(X) do{ vint index = -1; reader << index; X = reader.context->piIndex[index]; }while(0)
#define EI(X) do{ vint index = -1; reader << index; X = reader.context->eiIndex[index]; }while(0)
#define STREAMIO(NAME) case WfInsCode::NAME: break;
#define STREAMIO_VALUE(NAME) case WfInsCode::NAME: IO(value.valueParameter); break;
#define STREAMIO_FUNCTION(NAME) case WfInsCode::NAME: IO(value.indexParameter); break;
#define STREAMIO_FUNCTION_COUNT(NAME) case WfInsCode::NAME: IO(value.indexParameter); IO(value.countParameter); break;
#define STREAMIO_VARIABLE(NAME) case WfInsCode::NAME: IO(value.indexParameter); break;
#define STREAMIO_COUNT(NAME) case WfInsCode::NAME: IO(value.countParameter); break;
#define STREAMIO_FLAG_TYPEDESCRIPTOR(NAME) case WfInsCode::NAME: IO(value.flagParameter); TD(value.typeDescriptorParameter); break;
#define STREAMIO_PROPERTY(NAME) case WfInsCode::NAME: PI(value.propertyParameter); break;
#define STREAMIO_METHOD(NAME) case WfInsCode::NAME: MI(value.methodParameter); break;
#define STREAMIO_METHOD_COUNT(NAME) case WfInsCode::NAME: MI(value.methodParameter); IO(value.countParameter); break;
#define STREAMIO_EVENT(NAME) case WfInsCode::NAME: EI(value.eventParameter); break;
#define STREAMIO_EVENT_COUNT(NAME) case WfInsCode::NAME: EI(value.eventParameter); IO(value.countParameter); break;
#define STREAMIO_LABEL(NAME) case WfInsCode::NAME: IO(value.indexParameter); break;
#define STREAMIO_TYPE(NAME) case WfInsCode::NAME: IO(value.typeParameter); break;
switch
(
.
)
{
INSTRUCTION_CASES(
STREAMIO,
STREAMIO_VALUE,
STREAMIO_FUNCTION,
STREAMIO_FUNCTION_COUNT,
STREAMIO_VARIABLE,
STREAMIO_COUNT,
STREAMIO_FLAG_TYPEDESCRIPTOR,
STREAMIO_PROPERTY,
STREAMIO_METHOD,
STREAMIO_METHOD_COUNT,
STREAMIO_EVENT,
STREAMIO_EVENT_COUNT,
STREAMIO_LABEL,
STREAMIO_TYPE)
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
do
{
= -
1
;
index
;
.
=
.
index
]; }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
}
#undef STREAMIO
#undef STREAMIO_VALUE
#undef STREAMIO_FUNCTION
#undef STREAMIO_FUNCTION_COUNT
#undef STREAMIO_VARIABLE
#undef STREAMIO_COUNT
#undef STREAMIO_FLAG_TYPEDESCRIPTOR
#undef STREAMIO_PROPERTY
#undef STREAMIO_METHOD
#undef STREAMIO_METHOD_COUNT
#undef STREAMIO_EVENT
#undef STREAMIO_EVENT_COUNT
#undef STREAMIO_LABEL
#undef STREAMIO_TYPE
#undef MI
#undef TD
#undef PI
#undef EI
#undef IO
}
static
void
(
&
,
&
)
{
.
;
#define IO(X) do{ writer << (X); }while(0)
#define TD(X) do{ vint index = writer.context->tdIndex[X]; writer << index; }while(0)
#define MI(X) do{ vint index = writer.context->miIndex[X]; writer << index; }while(0)
#define PI(X) do{ vint index = writer.context->piIndex[X]; writer << index; }while(0)
#define EI(X) do{ vint index = writer.context->eiIndex[X]; writer << index; }while(0)
#define STREAMIO(NAME) case WfInsCode::NAME: break;
#define STREAMIO_VALUE(NAME) case WfInsCode::NAME: IO(value.valueParameter); break;
#define STREAMIO_FUNCTION(NAME) case WfInsCode::NAME: IO(value.indexParameter); break;
#define STREAMIO_FUNCTION_COUNT(NAME) case WfInsCode::NAME: IO(value.indexParameter); IO(value.countParameter); break;
#define STREAMIO_VARIABLE(NAME) case WfInsCode::NAME: IO(value.indexParameter); break;
#define STREAMIO_COUNT(NAME) case WfInsCode::NAME: IO(value.countParameter); break;
#define STREAMIO_FLAG_TYPEDESCRIPTOR(NAME) case WfInsCode::NAME: IO(value.flagParameter); TD(value.typeDescriptorParameter); break;
#define STREAMIO_PROPERTY(NAME) case WfInsCode::NAME: PI(value.propertyParameter); break;
#define STREAMIO_METHOD(NAME) case WfInsCode::NAME: MI(value.methodParameter); break;
#define STREAMIO_METHOD_COUNT(NAME) case WfInsCode::NAME: MI(value.methodParameter); IO(value.countParameter); break;
#define STREAMIO_EVENT(NAME) case WfInsCode::NAME: EI(value.eventParameter); break;
#define STREAMIO_EVENT_COUNT(NAME) case WfInsCode::NAME: EI(value.eventParameter); IO(value.countParameter); break;
#define STREAMIO_LABEL(NAME) case WfInsCode::NAME: IO(value.indexParameter); break;
#define STREAMIO_TYPE(NAME) case WfInsCode::NAME: IO(value.typeParameter); break;
switch
(
.
)
{
INSTRUCTION_CASES(
STREAMIO,
STREAMIO_VALUE,
STREAMIO_FUNCTION,
STREAMIO_FUNCTION_COUNT,
STREAMIO_VARIABLE,
STREAMIO_COUNT,
STREAMIO_FLAG_TYPEDESCRIPTOR,
STREAMIO_PROPERTY,
STREAMIO_METHOD,
STREAMIO_METHOD_COUNT,
STREAMIO_EVENT,
STREAMIO_EVENT_COUNT,
STREAMIO_LABEL,
STREAMIO_TYPE)
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
do
{
=
.
.
];
index
; }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
do
{
(
.
); }
while
(
0
);
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
case
::
:
break
;
}
#undef STREAMIO
#undef STREAMIO_VALUE
#undef STREAMIO_FUNCTION
#undef STREAMIO_FUNCTION_COUNT
#undef STREAMIO_VARIABLE
#undef STREAMIO_COUNT
#undef STREAMIO_FLAG_TYPEDESCRIPTOR
#undef STREAMIO_PROPERTY
#undef STREAMIO_METHOD
#undef STREAMIO_METHOD_COUNT
#undef STREAMIO_EVENT
#undef STREAMIO_EVENT_COUNT
#undef STREAMIO_LABEL
#undef STREAMIO_TYPE
#undef MI
#undef TD
#undef PI
#undef EI
#undef IO
}
};
template
<>
struct
<
>
{
static
void
(
&
,
<
>&
)
{
bool
;
;
if
(
(
typeName
))
{
.
.
.
(
typeName
);
}
isFlags
typeName
;
<
>(
isFlags
,
typeName
);
}
static
void
(
&
,
<
>&
)
{
bool
=
() ==
::
;
=
();
isFlags
typeName
;
}
template
<
typename
>
static
void
(
&
,
<
>&
)
{
;
typeName
;
if
(
(
typeName
))
{
.
.
.
(
typeName
);
}
<
>(
typeName
);
}
template
<
typename
>
static
void
(
&
,
<
>&
)
{
=
GetTypeName();
typeName
;
}
template
<
typename
>
static
void
(
&
,
<
<
>>&
)
{
=
0
;
typeCount
;
for
(
=
0
;
i
<
typeCount
;
i
++)
{
<
>
;
(
,
type
);
.
(
type
);
}
for
(
=
0
;
i
<
typeCount
;
i
++)
{
= -
.
.
() -
1
;
.
.
(
index
,
i
].
());
}
}
template
<
typename
>
static
void
(
&
,
<
<
>>&
)
{
=
.
();
typeCount
;
for
(
=
0
;
i
<
typeCount
;
i
++)
{
auto
=
i
];
(
,
type
);
}
for
(
=
0
;
i
<
typeCount
;
i
++)
{
= -
.
.
() -
1
;
.
.
(
i
].
(),
index
);
}
}
static
void
(
&
,
&
,
&
)
{
.
new
(
);
bool
=
false
;
hasTypeImpl
;
if
(
hasTypeImpl
)
{
.
new
;
(
,
.
);
(
,
.
);
(
,
.
);
(
,
.
);
}
= -
1
;
= -
1
;
= -
1
;
= -
1
;
tdCount
miCount
piCount
eiCount
;
for
(
=
0
;
i
<
tdCount
;
i
++)
{
*
=
nullptr
;
td
;
.
.
(
i
,
td
);
}
if
(
.
.
() +
.
.
() >
0
)
{
throw
WfDeserializationException
();
}
if
(
hasTypeImpl
)
{
<
>::
(
, *
.
.
());
()->
(
.
);
}
for
(
=
0
;
i
<
miCount
;
i
++)
{
*
=
nullptr
;
mi
;
.
.
(
i
,
mi
);
}
for
(
=
0
;
i
<
piCount
;
i
++)
{
*
=
nullptr
;
pi
;
.
.
(
i
,
pi
);
}
for
(
=
0
;
i
<
eiCount
;
i
++)
{
*
=
nullptr
;
ei
;
.
.
(
i
,
ei
);
}
if
(
.
.
() >
0
)
{
throw
WfDeserializationException
();
}
}
static
void
(
&
,
&
,
&)
{
.
new
;
bool
=
.
nullptr
;
hasTypeImpl
;
if
(
hasTypeImpl
)
{
(
,
.
);
(
,
.
);
(
,
.
);
(
,
.
);
}
;
if
(
hasTypeImpl
)
{
(
.
.
(),
prepare
);
}
(
.
,
prepare
);
for
(
=
prepare
.
.
() -
1
;
i
>=
0
;
i
--)
{
if
(
.
.
().
(
prepare
.
i
]))
{
prepare
.
.
(
i
);
}
}
.
(
prepare
);
=
prepare
.
.
();
=
prepare
.
.
();
=
prepare
.
.
();
=
prepare
.
.
();
tdCount
miCount
piCount
eiCount
;
FOREACH(ITypeDescriptor*, td, prepare.tds)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
prepare
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
td
);)
{
td
;
}
if
(
hasTypeImpl
)
{
<
>::
(
, *
.
.
());
()->
(
.
);
}
FOREACH(IMethodInfo*, mi, prepare.mis)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
prepare
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
mi
);)
{
mi
;
}
FOREACH(IPropertyInfo*, pi, prepare.pis)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
prepare
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
pi
);)
{
pi
;
}
FOREACH(IEventInfo*, ei, prepare.eis)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
prepare
.
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
ei
);)
{
ei
;
}
}
template
<
typename
>
static
void
(
&
,
&
,
&
)
{
(
,
,
);
<<
.
<<
.
<<
.
<<
.
<<
.
<<
.
;
if
(
.
)
{
()->
(
.
);
}
}
};
}
}
namespace
{
namespace
{
void
::
()
{
for
(
=
0
;
i
<
.
();
i
++)
{
const
auto
&
=
i
];
if
(
range
.
!= -
1
)
{
.
(
<
,
>(
range
.
,
range
.
.
),
i
);
}
}
}
::
()
{
}
void
::
()
{
();
();
}
<
>
::
(
stream
::
&
,
&
)
{
try
{
auto
=
<
>();
stream
::
internal
::
(
);
stream
::
internal
::
<
>::
(
reader
, *
assembly
.
(),
);
assembly
();
return
assembly
;
}
catch
(
stream
::
internal
::
WfDeserializationException
)
{
return
{};
}
}
void
::
(
stream
::
&
)
{
;
stream
::
internal
::
(
);
stream
::
internal
::
<
>::
(
writer
, *
this
,
dummy
);
}
}
}
}