Skip to content

Commit

Permalink
Update release
Browse files Browse the repository at this point in the history
  • Loading branch information
vczh committed Oct 9, 2021
1 parent 5bbf4e4 commit 5e2c791
Show file tree
Hide file tree
Showing 142 changed files with 5,189 additions and 3,464 deletions.
14 changes: 14 additions & 0 deletions Import/GacUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -19756,6 +19756,20 @@ GacUI Reflection Helper

namespace vl
{
namespace presentation
{
namespace helper_types
{
struct SiteValue
{
vint row = 0;
vint column = 0;
vint rowSpan = 1;
vint columnSpan = 1;
};
}
}

namespace reflection
{
namespace description
Expand Down
122 changes: 12 additions & 110 deletions Import/GacUICompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ namespace vl
writer.WriteLine(L"\t\t\t\t{");
writer.WriteLine(L"\t\t\t\t\tGUI_PLUGIN_DEPEND(GacUI_Res_Resource);");
writer.WriteLine(L"\t\t\t\t\tGUI_PLUGIN_DEPEND(GacUI_Res_TypeResolvers);");
writer.WriteLine(L"#ifndef VCZH_DEBUG_NO_REFLECTION");
writer.WriteLine(L"#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA");
writer.WriteLine(L"\t\t\t\t\tGUI_PLUGIN_DEPEND(GacUI_Instance_Reflection);");
writer.WriteLine(L"\t\t\t\t\tGUI_PLUGIN_DEPEND(GacUI_Compiler_WorkflowTypeResolvers);");
writer.WriteLine(L"#endif");
Expand Down Expand Up @@ -1548,100 +1548,6 @@ GuiInstanceGradientAnimation::Compile
}


/***********************************************************************
.\GUIINSTANCEHELPERTYPES.CPP
***********************************************************************/

namespace vl
{
namespace presentation
{
namespace helper_types
{
}
}

#ifndef VCZH_DEBUG_NO_REFLECTION

namespace reflection
{
namespace description
{
using namespace presentation::helper_types;

/***********************************************************************
Type Declaration
***********************************************************************/

GUIREFLECTIONHELPERTYPES_TYPELIST(IMPL_VL_TYPE_INFO)

#define _ ,

BEGIN_STRUCT_MEMBER(SiteValue)
STRUCT_MEMBER(row)
STRUCT_MEMBER(column)
STRUCT_MEMBER(rowSpan)
STRUCT_MEMBER(columnSpan)
END_STRUCT_MEMBER(SiteValue)

#undef _
}
}

namespace presentation
{
using namespace reflection::description;
using namespace controls;

/***********************************************************************
Type Loader
***********************************************************************/

class GuiHelperTypesLoader : public Object, public ITypeLoader
{
public:
void Load(ITypeManager* manager)
{
GUIREFLECTIONHELPERTYPES_TYPELIST(ADD_TYPE_INFO)
}

void Unload(ITypeManager* manager)
{
}
};

/***********************************************************************
GuiHelperTypesLoaderPlugin
***********************************************************************/

class GuiHelperTypesLoaderPlugin : public Object, public IGuiPlugin
{
public:

GUI_PLUGIN_NAME(GacUI_Instance_ReflectionHelper)
{
GUI_PLUGIN_DEPEND(GacUI_Instance_Reflection);
}

void Load()override
{
ITypeManager* manager=GetGlobalTypeManager();
if(manager)
{
Ptr<ITypeLoader> loader=new GuiHelperTypesLoader;
manager->AddTypeLoader(loader);
}
}

void Unload()override
{
}
};
GUI_REGISTER_PLUGIN(GuiHelperTypesLoaderPlugin)
}
#endif
}

/***********************************************************************
.\GUIINSTANCELOADER.CPP
***********************************************************************/
Expand Down Expand Up @@ -4369,14 +4275,13 @@ Instance Type Resolver (Instance)
#define UNLOAD_ASSEMBLY(PATH)\
if (auto compiled = Workflow_GetModule(context, PATH, {}))\
{\
compiled->context = nullptr;\
compiled->UnloadTypes();\
}\

#define DELETE_ASSEMBLY(PATH)\
if (auto compiled = Workflow_GetModule(context, PATH, {}))\
{\
compiled->context = nullptr;\
compiled->assembly = nullptr;\
compiled->UnloadAssembly();\
}\

void PerResourcePrecompile(Ptr<GuiResourceItem> resource, GuiResourcePrecompileContext& context, GuiResourceError::List& errors)override
Expand Down Expand Up @@ -7284,14 +7189,6 @@ GuiCellCompositionInstanceLoader
auto call = MakePtr<WfCallExpression>();
call->function = refSetSite;

auto GetValueText = [](const Value& value)
{
WString result;
auto st = value.GetTypeDescriptor()->GetSerializableType();
st->Serialize(value, result);
return result;
};

{
auto arg = MakePtr<WfIntegerExpression>();
arg->value.value = itow(site.row);
Expand Down Expand Up @@ -8293,8 +8190,8 @@ GuiPredefinedInstanceLoadersPlugin
GUI_PLUGIN_NAME(GacUI_Instance_TypeLoaders)
{
GUI_PLUGIN_DEPEND(GacUI_Res_ResourceResolver);
GUI_PLUGIN_DEPEND(GacUI_Instance_Reflection);
GUI_PLUGIN_DEPEND(GacUI_Instance);
GUI_PLUGIN_DEPEND(GacUI_Instance_Reflection);
}

void Load()override
Expand Down Expand Up @@ -9302,6 +9199,8 @@ namespace vl
IMPL_TYPE_INFO_RENAME(vl::presentation::GuiIqSetQuery, presentation::GuiIqSetQuery)
IMPL_TYPE_INFO_RENAME(vl::presentation::GuiIqQuery::IVisitor, presentation::GuiIqQuery::IVisitor)

#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA

BEGIN_CLASS_MEMBER(GuiIqQuery)
CLASS_MEMBER_METHOD_OVERLOAD(Accept, {L"visitor"}, void(GuiIqQuery::*)(GuiIqQuery::IVisitor* visitor))
END_CLASS_MEMBER(GuiIqQuery)
Expand Down Expand Up @@ -9364,8 +9263,10 @@ namespace vl
CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(GuiIqQuery::IVisitor::*)(GuiIqSetQuery* node))
END_INTERFACE_MEMBER(GuiIqQuery)

#endif
#undef PARSING_TOKEN_FIELD

#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
class GuiIqTypeLoader : public vl::Object, public ITypeLoader
{
public:
Expand All @@ -9385,15 +9286,16 @@ namespace vl
{
}
};
#endif
#endif

bool GuiIqLoadTypes()
{
#ifndef VCZH_DEBUG_NO_REFLECTION
ITypeManager* manager=GetGlobalTypeManager();
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
ITypeManager* manager = GetGlobalTypeManager();
if(manager)
{
Ptr<ITypeLoader> loader=new GuiIqTypeLoader;
Ptr<ITypeLoader> loader = new GuiIqTypeLoader;
return manager->AddTypeLoader(loader);
}
#endif
Expand Down
74 changes: 3 additions & 71 deletions Import/GacUICompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,77 +139,6 @@ namespace vl

#endif

/***********************************************************************
.\GUIINSTANCEHELPERTYPES.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
GacUI Reflection: Instance Helper Types
Interfaces:
***********************************************************************/

#ifndef VCZH_PRESENTATION_REFLECTION_GUIINSTANCEHELPERTYPES
#define VCZH_PRESENTATION_REFLECTION_GUIINSTANCEHELPERTYPES


#if defined(__APPLE__) || defined(__APPLE_CC__)

using namespace vl;
using namespace vl::presentation;
using namespace vl::presentation::elements;
using namespace vl::presentation::compositions;
using namespace vl::presentation::controls;
using namespace vl::presentation::templates;
using namespace vl::presentation::theme;

#endif

namespace vl
{
namespace presentation
{

/***********************************************************************
Helper Types
***********************************************************************/

namespace helper_types
{
struct SiteValue
{
vint row = 0;
vint column = 0;
vint rowSpan = 1;
vint columnSpan = 1;
};
}
}

#ifndef VCZH_DEBUG_NO_REFLECTION

namespace reflection
{
namespace description
{

/***********************************************************************
Type List
***********************************************************************/

#define GUIREFLECTIONHELPERTYPES_TYPELIST(F)\
F(presentation::helper_types::SiteValue)\

GUIREFLECTIONHELPERTYPES_TYPELIST(DECL_TYPE_INFO)
}
}

#endif
}

#endif

/***********************************************************************
.\GUIINSTANCELOCALIZEDSTRINGS.H
***********************************************************************/
Expand Down Expand Up @@ -466,6 +395,8 @@ namespace vl
DECL_TYPE_INFO(vl::presentation::GuiIqSetQuery)
DECL_TYPE_INFO(vl::presentation::GuiIqQuery::IVisitor)

#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA

BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(vl::presentation::GuiIqQuery::IVisitor)
void Visit(vl::presentation::GuiIqPrimaryQuery* node)override
{
Expand All @@ -484,6 +415,7 @@ namespace vl

END_INTERFACE_PROXY(vl::presentation::GuiIqQuery::IVisitor)

#endif
#endif
/// <summary>Load all reflectable AST types, only available when <b>VCZH_DEBUG_NO_REFLECTION</b> is off.</summary>
/// <returns>Returns true if this operation succeeded.</returns>
Expand Down
Loading

0 comments on commit 5e2c791

Please sign in to comment.