#include "WfAnalyzer.h"
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
using
namespace
parsing
;
using
namespace
reflection
::
description
;
class
ValidateReferenceTypeVisitor
:
public
,
public
::
{
public
:
*
;
bool
;
ValidateReferenceTypeVisitor
(
*
)
:manager(
)
, result(
true
)
{
}
void
(
*
)
override
{
}
void
(
*
)
override
{
}
void
(
*
)
override
{
}
void
(
*
)
override
{
=
false
;
}
void
(
*
)
override
{
=
false
;
}
void
(
*
)
override
{
=
false
;
}
void
(
*
)
override
{
=
false
;
}
void
(
*
)
override
{
=
false
;
}
void
(
*
)
override
{
=
false
;
}
void
(
*
)
override
{
=
false
;
}
void
(
*
)
override
{
->
(
this
);
}
static
bool
(
<
>
,
*
)
{
ValidateReferenceTypeVisitor
(
);
(&
visitor
);
return
visitor
.
;
}
};
class
ValidateStructureTypeVisitor
:
public
,
public
::
{
public
:
*
;
;
*
;
ValidateStructureTypeVisitor
(
*
,
,
*
)
:manager(
)
, strategy(
)
, classDecl(
)
{
}
void
(
*
)
override
{
switch
(
->
)
{
case
::
:
switch
(
)
{
case
::
:
->
.
(
::
(
));
break
;
case
::
:
->
.
(
::
(
,
));
default
:;
}
break
;
case
::
:
switch
(
)
{
case
::
:
case
::
:
->
.
(
::
(
));
break
;
default
:;
}
default
:;
}
}
void
(
*
)
override
{
}
void
(
*
)
override
{
}
void
(
*
)
override
{
if
(
==
::
)
{
->
.
(
::
(
,
));
}
if
(!
ValidateReferenceTypeVisitor
::
(
->
,
))
{
->
.
(
::
RawPointerToNonReferenceType
(
));
}
else
if
(
auto
=
->
.
<
>())
{
if
(
predefinedType
!=
::
)
{
->
.
(
::
RawPointerToNonReferenceType
(
));
}
}
}
void
(
*
)
override
{
if
(
==
::
)
{
->
.
(
::
(
,
));
}
if
(!
ValidateReferenceTypeVisitor
::
(
->
,
))
{
->
.
(
::
SharedPointerToNonReferenceType
(
));
}
else
if
(
auto
=
->
.
<
>())
{
if
(
predefinedType
!=
::
)
{
->
.
(
::
SharedPointerToNonReferenceType
(
));
}
}
}
void
(
*
)
override
{
if
(
==
::
)
{
->
.
(
::
(
,
));
}
if
(!
ValidateReferenceTypeVisitor
::
(
->
,
))
{
->
.
(
::
NullableToNonReferenceType
(
));
}
else
if
(
auto
=
->
.
<
>())
{
switch
(
predefinedType
)
{
case
::
:
case
::
:
case
::
:
->
.
(
::
NullableToNonReferenceType
(
));
break
;
default
:;
}
}
}
void
(
*
)
override
{
if
(
==
::
)
{
->
.
(
::
(
,
));
}
(
,
->
);
}
void
(
*
)
override
{
if
(
==
::
)
{
->
.
(
::
(
,
));
}
if
(
->
)
{
(
,
->
);
}
(
,
->
);
}
void
(
*
)
override
{
if
(
==
::
)
{
->
.
(
::
(
,
));
}
(
,
->
);
}
void
(
*
)
override
{
if
(
==
::
)
{
->
.
(
::
(
,
));
}
(
,
->
,
::
);
FOREACH(Ptr<WfType>, argument, node->arguments)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
->
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
argument
);)
{
(
,
argument
);
}
}
void
(
*
)
override
{
if
(!
ValidateReferenceTypeVisitor
::
(
->
,
))
{
->
.
(
::
(
));
}
}
static
void
(
<
>
,
*
,
,
*
)
{
ValidateStructureTypeVisitor
(
,
,
);
(&
visitor
);
}
};
void
(
*
,
<
>
,
,
*
)
{
ValidateStructureTypeVisitor
::
(
,
,
,
);
}
}
}
}