#include "GuiInstanceAnimation.h"
#include "WorkflowCodegen/GuiInstanceLoader_WorkflowCodegen.h"
#include "../Controls/Templates/GuiAnimation.h"
namespace
{
namespace
{
using
namespace
reflection
::
description
;
using
namespace
collections
;
using
namespace
parsing
::
xml
;
using
namespace
workflow
;
using
namespace
workflow
::
analyzer
;
using
namespace
presentation
::
controls
;
<
GuiInstanceGradientAnimation
>
GuiInstanceGradientAnimation
::
(
<
>
,
<
parsing
::
xml
::
>
,
::
&
)
{
auto
=
<
GuiInstanceGradientAnimation
>();
animation
{ {
},
.
};
if
(
auto
=
(
,
L"ref.Class"
))
{
animation
=
classAttr
->value.value;
animation
= { {
},
classAttr
->value.codeRange.start };
animation
.
+=
1
;
}
else
{
.
({
{{
},
.
},
L"Precompile: Missing required attribute: \"ref.Class\"."
});
}
if
(
auto
=
(
,
L"Type"
))
{
animation
=
typeAttr
->value.value;
animation
= { {
},
typeAttr
->value.codeRange.start };
animation
.
+=
1
;
}
else
{
.
({
{ {
},
.
},
L"Precompile: Missing required attribute: \"Type\"."
});
}
if
(
auto
=
(
,
L"Interpolation"
))
{
if
(
auto
=
interpolationElement
->subNodes[
0
].Cast<
>())
{
animation
=
cdata
->content.value;
animation
= { {
},
cdata
->codeRange.start };
animation
.
+=
9
;
}
else
{
.
({
{ {
},
interpolationElement
->codeRange.start },
L"Precompile: Interpolation function should be contained in a CDATA section."
});
}
}
if
(
auto
=
(
,
L"Targets"
))
{
FOREACH(Ptr<XmlElement>, targetElement, XmlGetElements(targetsElement, L"Target"))
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
(
targetsElement
,
L"Target"
));
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
targetElement
);)
{
;
if
(
auto
=
(
targetElement
,
L"Name"
))
{
target
.
=
nameAttr
->value.value;
target
.
= { {
},
nameAttr
->value.codeRange.start };
target
.
.
+=
1
;
}
else
{
.
({
{ {
},
targetElement
.
},
L"Precompile: Missing required attribute: \"Name\"."
});
}
if
(
auto
=
(
targetElement
,
L"Interpolation"
))
{
if
(
auto
=
interpolationElement
->subNodes[
0
].Cast<
>())
{
target
.
=
cdata
->content.value;
target
.
= { {
},
cdata
->codeRange.start };
target
.
.
+=
9
;
}
else
{
.
({
{ {
},
interpolationElement
->codeRange.start },
L"Precompile: Interpolation function should be contained in a CDATA section."
});
}
}
animation
.
(
target
);
}
if
(
animation
.
() ==
0
)
{
.
({
{ {
},
targetsElement
->codeRange.start },
L"Precompile: Missing required element: \"Target\" in \"Targets\"."
});
}
}
else
{
.
({
{ {
},
.
},
L"Precompile: Missing required element: \"Targets\"."
});
}
return
animation
;
}
<
parsing
::
xml
::
>
GuiInstanceGradientAnimation
::
()
{
auto
=
<
>();
{
auto
=
<
>();
classAttr
.
=
L"ref.Class"
;
classAttr
.
;
gradientElement
.
(
classAttr
);
}
{
auto
=
<
>();
typeAttr
.
=
L"Type"
;
typeAttr
.
;
gradientElement
.
(
typeAttr
);
}
if
(
!=
L""
)
{
auto
=
<
>();
interpolationElement
.
=
L"Interpolation"
;
gradientElement
.
(
interpolationElement
);
auto
=
<
>();
cdata
.
;
interpolationElement
.
(
cdata
);
}
{
auto
=
<
>();
targetsElement
.
=
L"Targets"
;
gradientElement
.
(
targetsElement
);
FOREACH(Target, target, targets)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
target
);)
{
auto
=
<
>();
targetElement
.
=
L"Target"
;
targetsElement
.
(
targetElement
);
{
auto
=
<
>();
nameAttr
.
=
L"Name"
;
nameAttr
.
target
.
;
targetElement
.
(
nameAttr
);
}
if
(
target
.
!=
L""
)
{
auto
=
<
>();
interpolationElement
.
=
L"Interpolation"
;
targetElement
.
(
interpolationElement
);
auto
=
<
>();
cdata
.
target
.
;
interpolationElement
.
(
cdata
);
}
}
}
return
gradientElement
;
}
bool
GuiInstanceGradientAnimation
::
(
description
::
*
)
{
if
(
==
description
::
<
>())
return
true
;
if
(
==
description
::
<
>())
return
true
;
if
(
==
description
::
<
>())
return
true
;
if
(
==
description
::
<
>())
return
true
;
if
(
==
description
::
<
>())
return
true
;
if
(
==
description
::
<
>())
return
true
;
if
(
==
description
::
<
>())
return
true
;
if
(
==
description
::
<
>())
return
true
;
if
(
==
description
::
<
float
>())
return
true
;
if
(
==
description
::
<
double
>())
return
true
;
return
false
;
}
GuiInstanceGradientAnimation
::
(
,
description
::
*
,
const
&
,
::
&
)
{
=
0
;
=
->
();
for
(
=
0
;
i
<
count
;
i
++)
{
auto
=
->
(
i
);
members
+=
(
,
propInfo
->
(),
+
L"."
+
propInfo
->
(),
);
}
count
=
->
GetBaseTypeDescriptorCount
();
for
(
=
0
;
i
<
count
;
i
++)
{
members
+=
(
,
->
(
i
),
,
);
}
return
members
;
}
GuiInstanceGradientAnimation
::
(
,
description
::
*
,
const
&
,
::
&
,
bool
)
{
auto
=
->
();
switch
(
td
->
())
{
case
::
:
if
(
(
td
))
{
return
1
;
}
break
;
case
::
:
{
=
(
,
td
,
,
);
if
(
&&
members
==
0
)
{
.
({
,
L"Precompile: Property \""
+
+
L"\" of type \""
+
->
() +
L"\" in class \""
+
+
L"\" is not supported. A struct should at least has one numeric primitive member to perform gradual changing."
});
}
return
members
;
}
default
:;
}
.
({
,
L"Precompile: Property \""
+
+
L"\" of type \""
+
->
() +
L"\" in class \""
+
+
L"\" is not supported. Only numeric types and structs are able to perform gradual changing."
});
return
0
;
}
void
GuiInstanceGradientAnimation
::
(
,
,
description
::
*
,
description
::
*
)
{
auto
=
->
()->
();
auto
= [=](
<
>
)
{
auto
=
<
>();
member
expression
);
member
.
->
();
return
member
;
};
switch
(
td
->
())
{
case
::
:
newAccessor
,
,
);
break
;
case
::
:
(
,
newAccessor
,
td
,
);
break
;
default
:;
}
}
void
GuiInstanceGradientAnimation
::
(
,
,
description
::
*
,
description
::
*
)
{
=
->
();
for
(
=
0
;
i
<
count
;
i
++)
{
auto
=
->
(
i
);
if
(
propInfo
->
()
L"value"
&&
propInfo
->
() ==
description
::
<
>())
{
continue
;
}
(
,
,
propInfo
,
);
}
count
=
->
GetBaseTypeDescriptorCount
();
for
(
=
0
;
i
<
count
;
i
++)
{
(
,
,
->
(
i
),
);
}
}
void
GuiInstanceGradientAnimation
::
(
,
description
::
*
)
{
FOREACH(Target, target, targets)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
target
);)
{
auto
=
->
(
target
.
,
true
);
(
, [](
auto
) {
return
x
; },
propInfo
,
propInfo
);
}
}
<
workflow
::
>
GuiInstanceGradientAnimation
::
(
description
::
*
,
const
&
,
collections
::
<
>&
)
{
auto
=
->
()->
();
auto
=
+
L"_"
+
->
();
if
(
td
->
() ==
::
)
{
if
(!
.
(
name
))
{
return
nullptr
;
}
auto
=
<
>();
ref
.
=
L"<ani>"
+
name
;
return
ref
;
}
else
{
<
*>
;
tds
.
(
td
);
auto
=
<
>();
for
(
=
0
;
i
<
tds
.
();
i
++)
{
auto
=
tds
i
];
=
currentTd
->
GetBaseTypeDescriptorCount
();
for
(
=
0
;
j
<
count
;
j
++)
{
tds
.
(
currentTd
->
(
j
));
}
count
=
currentTd
->
();
for
(
=
0
;
j
<
count
;
j
++)
{
auto
=
currentTd
->
(
j
);
if
(
auto
=
(
currentPropInfo
,
name
,
))
{
auto
=
<
>();
auto
=
<
>();
refName
.
currentPropInfo
->
();
pair
refName
;
pair
=
expr
;
ref
.
(
pair
);
}
}
}
return
ref
;
}
}
<
workflow
::
>
GuiInstanceGradientAnimation
::
(
GuiResourcePrecompileContext
&
,
const
&
,
bool
,
::
&
)
{
if
(
auto
=
description
::
(
))
{
if
(
td
->
() ==
::
)
{
{
if
(
auto
=
td
->
())
{
=
ctorGroup
->
();
for
(
=
0
;
i
<
count
;
i
++)
{
auto
=
ctorGroup
->
(
i
);
if
(
ctor
->
()->
() ==
::
&&
ctor
->
() ==
0
)
{
goto
CTOR_CHECK_PASS;
}
}
}
.
({
,
L"Precompile: Class \""
+
+
L"\" should have a default constructor which returns a shared pointer and has no arguments."
});
CTOR_CHECK_PASS:;
}
auto
=
<
>();
module
.
;
auto
=
(
,
module
);
auto
=
<
>(
<
>(
td
,
::
));
auto
=
CreateTypeInfoFromTypeFlag
(
::
);
auto
= [=](
<
>
)
{
decl
<
>();
decl
=
::
;
animationClass
.
(
decl
);
};
auto
= []()
{
auto
=
<
>();
auto
=
<
>();
stringExpr
.
=
L"Not Implemented"
;
auto
=
<
WfRaiseExceptionStatement
>();
raiseStat
stringExpr
;
block
.
(
raiseStat
);
return
block
;
};
{
auto
=
<
WfAutoPropertyDeclaration
>();
addDecl
(
prop
);
prop
.
=
L"Begin"
;
prop
(
typeInfo
.
());
prop
(
typeInfo
.
());
prop
=
::
;
prop
=
::
;
}
{
auto
=
<
WfAutoPropertyDeclaration
>();
addDecl
(
prop
);
prop
.
=
L"End"
;
prop
(
typeInfo
.
());
prop
(
typeInfo
.
());
prop
=
::
;
prop
=
::
;
}
{
auto
=
<
WfAutoPropertyDeclaration
>();
addDecl
(
prop
);
prop
.
=
L"Current"
;
prop
(
typeInfo
.
());
prop
(
typeInfo
.
());
prop
=
::
;
prop
=
::
;
}
auto
= [&](
const
&
,
const
&
,
)
{
auto
=
<
>();
addDecl
(
var
);
auto
=
<
>();
att
.
=
L"cpp"
;
att
.
=
L"Private"
;
var
.
(
att
);
var
.
=
L"<ani-int>"
+
name
;
var
(
<
<
double
(
double
)>>::
().
());
if
(
interpolation
L""
|| !
)
{
auto
=
<
>();
ref
.
=
L"$1"
;
auto
=
<
WfOrderedLambdaExpression
>();
lambda
ref
;
var
lambda
;
}
else
{
var
(
,
interpolationPosition
.
,
interpolation
,
interpolationPosition
,
);
}
};
createIntVar
(
L""
,
,
);
FOREACH(Target, target, targets)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
target
);)
{
if
(
target
.
!=
L""
)
{
createIntVar
(
target
.
,
target
.
,
target
.
);
}
}
<
*>
;
<
<
>>
;
FOREACH(Target, target, targets)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
target
);)
{
if
(
auto
=
td
->
(
target
.
,
true
))
{
if
(!
propInfo
->
())
{
.
({
target
.
,
L"Precompile: Variable \""
+
target
.
+
L"\" is not supported. An writable property with event is expected."
});
}
else
if
(!
propInfo
->
())
{
.
({
target
.
,
L"Precompile: Readonly property \""
+
target
.
+
L"\" is not supported. An writable property with event is expected."
});
}
else
if
(!
propInfo
->
())
{
.
({
target
.
,
L"Precompile: Property \""
+
target
.
+
L"\" is not supported. An writable property with event is expected."
});
}
(
target
.
,
propInfo
->
(),
propInfo
->
(),
,
true
);
<
>
;
if
(
target
.
!=
L""
&&
)
{
interpolation
(
,
target
.
.
,
target
.
,
target
.
,
);
}
props
.
(
propInfo
);
interpolations
.
(
interpolation
);
}
else
{
.
({
target
.
,
L"Precompile: Property \""
+
target
.
+
L"\" does not exist."
});
}
}
{
auto
=
<
>();
addDecl
(
func
);
func
=
::
;
func
.
=
L"GetTimeScale"
;
{
auto
=
<
>();
argument
.
=
L"<ani>begin"
;
argument
(
typeInfo
.
());
func
.
(
argument
);
}
{
auto
=
<
>();
argument
.
=
L"<ani>end"
;
argument
(
typeInfo
.
());
func
.
(
argument
);
}
{
auto
=
<
>();
argument
.
=
L"<ani>current"
;
argument
(
typeInfo
.
());
func
.
(
argument
);
}
func
(
typeInfoDouble
.
());
if
(
)
{
auto
=
<
>();
func
block
;
{
auto
=
<
>();
refZero
.
=
L"0.0"
;
auto
=
<
>();
varScale
.
=
L"<ani>scale"
;
varScale
refZero
;
auto
=
<
>();
declStat
varScale
;
block
.
(
declStat
);
}
([&](
,
description
::
*,
description
::
*
)
{
auto
=
<
>();
block
.
(
subBlock
);
auto
= [=](
const
&
,
const
&
,
const
&
)
{
auto
=
<
>();
refBegin
.
first
;
auto
=
<
>();
firstExpr
accessor
refBegin
);
firstExpr
(
<
double
>::
().
());
firstExpr
=
::
;
auto
=
<
>();
refEnd
.
second
;
auto
=
<
>();
secondExpr
accessor
refEnd
);
secondExpr
(
<
double
>::
().
());
secondExpr
=
::
;
auto
=
<
>();
subExpr
firstExpr
;
subExpr
secondExpr
;
subExpr
=
::
;
auto
=
<
>();
refAbs
GetExpressionFromTypeDescriptor
(
description
::
<
>());
refAbs
.
=
L"Abs"
;
auto
=
<
>();
callExpr
refAbs
;
callExpr
.
(
subExpr
);
auto
=
<
>();
varRef
.
variable
;
varRef
callExpr
;
auto
=
<
>();
declStat
varRef
;
subBlock
.
(
declStat
);
};
createVariable
(
L"<ani>begin"
,
L"<ani>end"
,
L"<ani>ref"
);
createVariable
(
L"<ani>current"
,
L"<ani>end"
,
L"<ani>cur"
);
{
auto
=
<
>();
refRef
.
=
L"<ani>ref"
;
auto
=
<
>();
refEpsilon
.
=
L"0.000001"
;
auto
=
<
>();
refMaxEpsilon
GetExpressionFromTypeDescriptor
(
description
::
<
>());
refMaxEpsilon
.
=
L"Max"
;
auto
=
<
>();
callExprEpsilon
refMaxEpsilon
;
callExprEpsilon
.
(
refRef
);
callExprEpsilon
.
(
refEpsilon
);
auto
=
<
>();
refCur
.
=
L"<ani>cur"
;
auto
=
<
>();
divExpr
refCur
;
divExpr
callExprEpsilon
;
divExpr
=
::
;
auto
=
<
>();
refMax
GetExpressionFromTypeDescriptor
(
description
::
<
>());
refMax
.
=
L"Max"
;
auto
=
<
>();
refScale
.
=
L"<ani>scale"
;
auto
=
<
>();
callExpr
refMax
;
callExpr
.
(
refScale
);
callExpr
.
(
divExpr
);
auto
=
<
>();
refScale2
.
=
L"<ani>scale"
;
auto
=
<
>();
assignExpr
refScale2
;
assignExpr
callExpr
;
assignExpr
=
::
;
auto
=
<
>();
exprStat
assignExpr
;
subBlock
.
(
exprStat
);
}
},
td
);
{
auto
=
<
>();
refOne
.
=
L"1.0"
;
auto
=
<
>();
refScale
.
=
L"<ani>scale"
;
auto
=
<
>();
refMin
GetExpressionFromTypeDescriptor
(
description
::
<
>());
refMin
.
=
L"Min"
;
auto
=
<
>();
callExpr
refMin
;
callExpr
.
(
refOne
);
callExpr
.
(
refScale
);
auto
=
<
>();
returnStat
callExpr
;
block
.
(
returnStat
);
}
}
else
{
func
=
notImplemented
();
}
}
{
auto
=
<
>();
addDecl
(
func
);
func
=
::
;
func
.
=
L"Interpolate"
;
{
auto
=
<
>();
argument
.
=
L"<ani>begin"
;
argument
(
typeInfo
.
());
func
.
(
argument
);
}
{
auto
=
<
>();
argument
.
=
L"<ani>end"
;
argument
(
typeInfo
.
());
func
.
(
argument
);
}
{
auto
=
<
>();
argument
.
=
L"<ani>current"
;
argument
(
typeInfo
.
());
func
.
(
argument
);
}
{
auto
=
<
>();
argument
.
=
L"<ani>ratio"
;
argument
(
typeInfoDouble
.
());
func
.
(
argument
);
}
func
(
<
void
>::
().
());
if
(
)
{
auto
=
<
>();
func
block
;
<
>
;
([&](
,
description
::
*
,
description
::
*
)
{
=
L"<ani-int>"
;
if
(
(
).Any([=](
const
&
)
{
return
target
.
originPropInfo
->
() &&
target
.
!=
L""
;
}))
{
intFunc
originPropInfo
->
();
}
<
>
,
,
;
{
auto
=
<
>();
refParent
.
=
L"<ani>begin"
;
auto
=
<
>();
refProp
(
propChain
accessor
refParent
));
refProp
(
<
double
>::
().
());
refProp
=
::
;
auto
=
<
>();
refOne
.
=
L"1.0"
;
auto
=
<
>();
refInt
.
intFunc
;
auto
=
<
>();
refRatio
.
=
L"<ani>ratio"
;
auto
=
<
>();
callExpr
refInt
;
callExpr
.
(
refRatio
);
auto
=
<
>();
subExpr
refOne
;
subExpr
callExpr
;
subExpr
=
::
;
auto
=
<
>();
mulExpr
refProp
;
mulExpr
subExpr
;
mulExpr
=
::
;
part1
mulExpr
;
}
{
auto
=
<
>();
refParent
.
=
L"<ani>end"
;
auto
=
<
>();
refProp
accessor
refParent
);
refProp
(
<
double
>::
().
());
refProp
=
::
;
auto
=
<
>();
refInt
.
intFunc
;
auto
=
<
>();
refRatio
.
=
L"<ani>ratio"
;
auto
=
<
>();
callExpr
refInt
;
callExpr
.
(
refRatio
);
auto
=
<
>();
mulExpr
refProp
;
mulExpr
callExpr
;
mulExpr
=
::
;
part2
mulExpr
;
}
<
>
;
{
auto
=
<
>();
addExpr
part1
;
addExpr
part2
;
addExpr
=
::
;
if
(
propInfo
->
()->
() ==
description
::
<
double
>())
{
exprMixed
addExpr
;
}
else
if
(
propInfo
->
()->
() ==
description
::
<
double
>())
{
exprMixed
addExpr
;
}
else
{
auto
=
<
>();
refRound
GetExpressionFromTypeDescriptor
(
description
::
<
>());
refRound
.
=
L"Round"
;
auto
=
<
>();
callRoundExpr
refRound
;
callRoundExpr
.
(
addExpr
);
exprMixed
callRoundExpr
;
}
}
auto
=
<
>();
castExpr
exprMixed
;
castExpr
(
propInfo
->
());
castExpr
=
::
;
auto
=
<
>();
{
=
L""
;
while
(
auto
=
propChain
.
<
>())
{
name
=
L"_"
+
member
.
+
name
;
propChain
member
;
}
varNames
.
(
name
);
varRef
.
=
L"<ani>"
+
name
;
}
varRef
castExpr
;
auto
=
<
>();
declStat
varRef
;
block
.
(
declStat
);
},
td
);
FOREACH(Target, target, targets)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
target
);)
{
auto
=
<
>();
refCurrent
.
=
L"<ani>current"
;
auto
=
<
>();
refProp
refCurrent
;
refProp
.
target
.
;
auto
=
<
>();
assignExpr
refProp
;
assignExpr
=
(
td
->
(
target
.
,
true
),
L""
,
varNames
);
assignExpr
=
::
;
auto
=
<
>();
exprStat
assignExpr
;
block
.
(
exprStat
);
}
}
else
{
func
=
notImplemented
();
}
}
{
auto
=
<
>();
addDecl
(
func
);
func
=
::
;
func
.
=
L"Interpolate"
;
{
auto
=
<
>();
argument
.
=
L"<ani>ratio"
;
argument
(
typeInfoDouble
.
());
func
.
(
argument
);
}
func
(
<
void
>::
().
());
if
(
)
{
auto
=
<
>();
func
block
;
auto
=
<
>();
refBegin
.
=
L"Begin"
;
auto
=
<
>();
refEnd
.
=
L"End"
;
auto
=
<
>();
refCurrent
.
=
L"Current"
;
auto
=
<
>();
refRatio
.
=
L"<ani>ratio"
;
auto
=
<
>();
refFunc
.
=
L"Interpolate"
;
auto
=
<
>();
callExpr
refFunc
;
callExpr
.
(
refBegin
);
callExpr
.
(
refEnd
);
callExpr
.
(
refCurrent
);
callExpr
.
(
refRatio
);
auto
=
<
>();
exprStat
callExpr
;
block
.
(
exprStat
);
}
else
{
func
=
notImplemented
();
}
}
{
auto
=
<
>();
addDecl
(
func
);
func
=
::
;
func
.
=
L"CreateAnimation"
;
{
auto
=
<
>();
argument
.
=
L"<ani>target"
;
argument
(
typeInfo
.
());
func
.
(
argument
);
}
{
auto
=
<
>();
argument
.
=
L"<ani>time"
;
argument
(
<
>::
().
());
func
.
(
argument
);
}
func
(
<
<
>>::
().
());
if
(
)
{
auto
=
<
>();
func
block
;
{
auto
=
<
>();
refEnd
.
=
L"End"
;
auto
=
<
>();
refTarget
.
=
L"<ani>target"
;
auto
=
<
>();
refCurrent
.
=
L"Current"
;
auto
=
<
>();
refFunc
.
=
L"GetTimeScale"
;
auto
=
<
>();
callExpr
refFunc
;
callExpr
.
(
refEnd
);
callExpr
.
(
refTarget
);
callExpr
.
(
refCurrent
);
auto
=
<
>();
refTime
.
=
L"<ani>time"
;
auto
=
<
>();
mulExpr
refTime
;
mulExpr
callExpr
;
mulExpr
=
::
;
auto
=
<
>();
refRound
GetExpressionFromTypeDescriptor
(
description
::
<
>());
refRound
.
=
L"Round"
;
auto
=
<
>();
callRoundExpr
refRound
;
callRoundExpr
.
(
mulExpr
);
auto
=
<
>();
castExpr
(
<
>::
().
());
castExpr
callRoundExpr
;
castExpr
=
::
;
auto
=
<
>();
varDecl
.
=
L"<ani>scaledTime"
;
varDecl
castExpr
;
auto
=
<
>();
varStat
varDecl
;
block
.
(
varStat
);
}
{
FOREACH(Target, target, targets)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
target
);)
{
auto
=
<
>();
refBegin
.
=
L"Begin"
;
auto
=
<
>();
refBeginProp
refBegin
;
refBeginProp
.
target
.
;
auto
=
<
>();
refCurrent
.
=
L"Current"
;
auto
=
<
>();
refCurrentProp
refCurrent
;
refCurrentProp
.
target
.
;
auto
=
<
>();
assignExpr
refBeginProp
;
assignExpr
refCurrentProp
;
assignExpr
=
::
;
auto
=
<
>();
exprStat
assignExpr
;
block
.
(
exprStat
);
}
}
{
auto
=
<
>();
refEnd
.
=
L"End"
;
auto
=
<
>();
refTarget
.
=
L"<ani>target"
;
auto
=
<
>();
assignExpr
refEnd
;
assignExpr
refTarget
;
assignExpr
=
::
;
auto
=
<
>();
exprStat
assignExpr
;
block
.
(
exprStat
);
}
{
auto
=
<
>();
refCA
GetExpressionFromTypeDescriptor
(
description
::
<
>());
refCA
.
=
L"CreateAnimation"
;
auto
=
<
>();
{
auto
=
<
>();
funcExpr
funcDecl
;
funcDecl
=
::
;
{
auto
=
<
>();
argument
.
=
L"<ani>currentTime"
;
argument
(
<
>::
().
());
funcDecl
.
(
argument
);
}
funcDecl
(
<
void
>::
().
());
auto
=
<
>();
funcDecl
subBlock
;
{
auto
=
<
>();
refCurrentTime
.
=
L"<ani>currentTime"
;
auto
=
<
>();
firstExpr
refCurrentTime
;
firstExpr
(
<
double
>::
().
());
firstExpr
=
::
;
auto
=
<
>();
refTime
.
=
L"<ani>time"
;
auto
=
<
>();
secondExpr
refTime
;
secondExpr
(
<
double
>::
().
());
secondExpr
=
::
;
auto
=
<
>();
divExpr
firstExpr
;
divExpr
secondExpr
;
divExpr
=
::
;
auto
=
<
>();
refInt
.
=
L"Interpolate"
;
auto
=
<
>();
callExpr
refInt
;
callExpr
.
(
divExpr
);
auto
=
<
>();
exprStat
callExpr
;
subBlock
.
(
exprStat
);
}
}
auto
=
<
>();
refTime
.
=
L"<ani>time"
;
auto
=
<
>();
callExpr
refCA
;
callExpr
.
(
funcExpr
);
callExpr
.
(
refTime
);
auto
=
<
>();
returnStat
callExpr
;
block
.
(
returnStat
);
}
}
else
{
func
=
notImplemented
();
}
}
{
auto
=
<
>();
addDecl
(
func
);
func
=
::
;
{
auto
=
<
>();
argument
.
=
L"<ani>current"
;
argument
(
typeInfo
.
());
func
.
(
argument
);
}
if
(
)
{
auto
=
<
>();
func
block
;
{
<
>
;
propNames
.
(
L"Begin"
);
propNames
.
(
L"End"
);
propNames
.
(
L"Current"
);
FOREACH(WString, propName, propNames)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
propNames
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
propName
);)
{
{
auto
=
<
>();
newExpr
(
typeInfo
.
());
auto
=
<
>();
refProp
.
propName
;
auto
=
<
>();
assignExpr
refProp
;
assignExpr
newExpr
;
assignExpr
=
::
;
auto
=
<
>();
exprStat
assignExpr
;
block
.
(
exprStat
);
}
FOREACH(Target, target, targets)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
target
);)
{
auto
=
<
>();
refProp
.
propName
;
auto
=
<
>();
refPropProp
refProp
;
refPropProp
.
target
.
;
auto
=
<
>();
refCurrent
.
=
L"<ani>current"
;
auto
=
<
>();
refCurrentProp
refCurrent
;
refCurrentProp
.
target
.
;
auto
=
<
>();
assignExpr
refPropProp
;
assignExpr
refCurrentProp
;
assignExpr
=
::
;
auto
=
<
>();
exprStat
assignExpr
;
block
.
(
exprStat
);
}
}
}
}
else
{
func
=
notImplemented
();
}
}
return
module
;
}
else
{
.
({
,
L"Precompile: Type \""
+
+
L"\" is not a class."
});
}
}
else
{
.
({
,
L"Precompile: Type \""
+
+
L"\" does not exist."
});
}
return
nullptr
;
}
}
}