Update import

This commit is contained in:
vczh
2021-10-29 02:29:11 -07:00
parent 842ba6d014
commit 2ec909f968
30 changed files with 1906 additions and 1600 deletions
+32 -7
View File
@@ -1888,6 +1888,7 @@ namespace vl
namespace controls namespace controls
{ {
using namespace reflection::description;
/*********************************************************************** /***********************************************************************
GuiTabPage GuiTabPage
@@ -2003,7 +2004,7 @@ GuiTab
{ {
auto ct = TypedControlTemplateObject(true); auto ct = TypedControlTemplateObject(true);
ct->SetCommands(commandExecutor.Obj()); ct->SetCommands(commandExecutor.Obj());
ct->SetTabPages(tabPages.GetWrapper()); ct->SetTabPages(UnboxValue<Ptr<IValueObservableList>>(BoxParameter(tabPages)));
ct->SetSelectedTabPage(selectedPage); ct->SetSelectedTabPage(selectedPage);
} }
@@ -5471,6 +5472,11 @@ DataProvider
DataProvider::~DataProvider() DataProvider::~DataProvider()
{ {
if (itemChangedEventHandler)
{
auto ol = itemSource.Cast<IValueObservableList>();
ol->ItemChanged.Remove(itemChangedEventHandler);
}
} }
Ptr<IDataFilter> DataProvider::GetAdditionalFilter() Ptr<IDataFilter> DataProvider::GetAdditionalFilter()
@@ -5828,7 +5834,11 @@ GuiBindableTextList::ItemSource
GuiBindableTextList::ItemSource::~ItemSource() GuiBindableTextList::ItemSource::~ItemSource()
{ {
SetItemSource(nullptr); if (itemChangedEventHandler)
{
auto ol = itemSource.Cast<IValueObservableList>();
ol->ItemChanged.Remove(itemChangedEventHandler);
}
} }
Ptr<description::IValueEnumerable> GuiBindableTextList::ItemSource::GetItemSource() Ptr<description::IValueEnumerable> GuiBindableTextList::ItemSource::GetItemSource()
@@ -6035,7 +6045,11 @@ GuiBindableListView::ItemSource
GuiBindableListView::ItemSource::~ItemSource() GuiBindableListView::ItemSource::~ItemSource()
{ {
SetItemSource(nullptr); if (itemChangedEventHandler)
{
auto ol = itemSource.Cast<IValueObservableList>();
ol->ItemChanged.Remove(itemChangedEventHandler);
}
} }
Ptr<description::IValueEnumerable> GuiBindableListView::ItemSource::GetItemSource() Ptr<description::IValueEnumerable> GuiBindableListView::ItemSource::GetItemSource()
@@ -6488,6 +6502,11 @@ GuiBindableTreeView::ItemSourceNode
GuiBindableTreeView::ItemSourceNode::~ItemSourceNode() GuiBindableTreeView::ItemSourceNode::~ItemSourceNode()
{ {
if (itemChangedEventHandler)
{
auto ol = childrenVirtualList.Cast<IValueObservableList>();
ol->ItemChanged.Remove(itemChangedEventHandler);
}
} }
description::Value GuiBindableTreeView::ItemSourceNode::GetItemSource() description::Value GuiBindableTreeView::ItemSourceNode::GetItemSource()
@@ -22432,12 +22451,14 @@ list::GroupedDataSource
GroupTitlePropertyChanged.SetAssociatedComposition(associatedComposition); GroupTitlePropertyChanged.SetAssociatedComposition(associatedComposition);
GroupChildrenPropertyChanged.SetAssociatedComposition(associatedComposition); GroupChildrenPropertyChanged.SetAssociatedComposition(associatedComposition);
groupChangedHandler = groupedItemSource.GetWrapper()->ItemChanged.Add(this, &GroupedDataSource::OnGroupChanged); auto vol = UnboxValue<Ptr<IValueObservableList>>(BoxParameter(groupedItemSource));
groupChangedHandler = vol->ItemChanged.Add(this, &GroupedDataSource::OnGroupChanged);
} }
GroupedDataSource::~GroupedDataSource() GroupedDataSource::~GroupedDataSource()
{ {
joinedItemSource.GetWrapper()->ItemChanged.Remove(groupChangedHandler); auto vol = UnboxValue<Ptr<IValueObservableList>>(BoxParameter(joinedItemSource));
vol->ItemChanged.Remove(groupChangedHandler);
} }
Ptr<IValueEnumerable> GroupedDataSource::GetItemSource() Ptr<IValueEnumerable> GroupedDataSource::GetItemSource()
@@ -22779,7 +22800,7 @@ GuiBindableRibbonGalleryList
itemList = new GuiBindableTextList(theme::ThemeName::RibbonGalleryItemList); itemList = new GuiBindableTextList(theme::ThemeName::RibbonGalleryItemList);
itemList->GetBoundsComposition()->SetAlignmentToParent(Margin(0, 0, 0, 0)); itemList->GetBoundsComposition()->SetAlignmentToParent(Margin(0, 0, 0, 0));
itemList->SetArranger(itemListArranger); itemList->SetArranger(itemListArranger);
itemList->SetItemSource(joinedItemSource.GetWrapper()); itemList->SetItemSource(UnboxValue<Ptr<IValueObservableList>>(BoxParameter(joinedItemSource)));
itemList->SelectionChanged.AttachMethod(this, &GuiBindableRibbonGalleryList::OnItemListSelectionChanged); itemList->SelectionChanged.AttachMethod(this, &GuiBindableRibbonGalleryList::OnItemListSelectionChanged);
itemList->ItemMouseEnter.AttachMethod(this, &GuiBindableRibbonGalleryList::OnItemListItemMouseEnter); itemList->ItemMouseEnter.AttachMethod(this, &GuiBindableRibbonGalleryList::OnItemListItemMouseEnter);
itemList->ItemMouseLeave.AttachMethod(this, &GuiBindableRibbonGalleryList::OnItemListItemMouseLeave); itemList->ItemMouseLeave.AttachMethod(this, &GuiBindableRibbonGalleryList::OnItemListItemMouseLeave);
@@ -22797,7 +22818,7 @@ GuiBindableRibbonGalleryList
groupStack->SetMinSizeLimitation(GuiGraphicsComposition::LimitToElementAndChildren); groupStack->SetMinSizeLimitation(GuiGraphicsComposition::LimitToElementAndChildren);
groupStack->SetAlignmentToParent(Margin(0, 0, 0, 0)); groupStack->SetAlignmentToParent(Margin(0, 0, 0, 0));
groupStack->SetDirection(GuiStackComposition::Vertical); groupStack->SetDirection(GuiStackComposition::Vertical);
groupStack->SetItemSource(groupedItemSource.GetWrapper()); groupStack->SetItemSource(UnboxValue<Ptr<IValueObservableList>>(BoxParameter(groupedItemSource)));
groupContainer->GetContainerComposition()->AddChild(groupStack); groupContainer->GetContainerComposition()->AddChild(groupStack);
MenuResetGroupTemplate(); MenuResetGroupTemplate();
} }
@@ -26081,6 +26102,10 @@ GuiRepeatCompositionBase
GuiRepeatCompositionBase::~GuiRepeatCompositionBase() GuiRepeatCompositionBase::~GuiRepeatCompositionBase()
{ {
if (itemChangedHandler)
{
itemSource.Cast<IValueObservableList>()->ItemChanged.Remove(itemChangedHandler);
}
} }
GuiRepeatCompositionBase::ItemStyleProperty GuiRepeatCompositionBase::GetItemTemplate() GuiRepeatCompositionBase::ItemStyleProperty GuiRepeatCompositionBase::GetItemTemplate()
+79 -95
View File
@@ -5,8 +5,8 @@ DEVELOPER: Zihan Chen(vczh)
#include "VlppParser.h" #include "VlppParser.h"
#include "VlppWorkflowLibrary.h" #include "VlppWorkflowLibrary.h"
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
/*********************************************************************** /***********************************************************************
@@ -72,6 +72,14 @@ Enumerations
UpRight, UpRight,
}; };
#define GUI_DEFINE_COMPARE_OPERATORS(TYPE)\
inline bool operator==(const TYPE& right)const { return Compare(right) == 0; } \
inline bool operator!=(const TYPE& right)const { return Compare(right) != 0; } \
inline bool operator< (const TYPE& right)const { return Compare(right) < 0; } \
inline bool operator<=(const TYPE& right)const { return Compare(right) <= 0; } \
inline bool operator> (const TYPE& right)const { return Compare(right) > 0; } \
inline bool operator>=(const TYPE& right)const { return Compare(right) >= 0; } \
/*********************************************************************** /***********************************************************************
TextPos TextPos
***********************************************************************/ ***********************************************************************/
@@ -100,21 +108,14 @@ TextPos
{ {
} }
vint Compare(const TextPos& value)const inline vint Compare(const TextPos& value)const
{ {
if(row<value.row) return -1; vint result;
if(row>value.row) return 1; if ((result = row - value.row) != 0) return result;
if(column<value.column) return -1; if ((result = column - value.column) != 0) return result;
if(column>value.column) return 1;
return 0; return 0;
} }
GUI_DEFINE_COMPARE_OPERATORS(TextPos)
bool operator==(const TextPos& value)const {return Compare(value)==0;}
bool operator!=(const TextPos& value)const {return Compare(value)!=0;}
bool operator<(const TextPos& value)const {return Compare(value)<0;}
bool operator<=(const TextPos& value)const {return Compare(value)<=0;}
bool operator>(const TextPos& value)const {return Compare(value)>0;}
bool operator>=(const TextPos& value)const {return Compare(value)>=0;}
}; };
/*********************************************************************** /***********************************************************************
@@ -145,21 +146,14 @@ GridPos
{ {
} }
vint Compare(const GridPos& value)const inline vint Compare(const GridPos& value)const
{ {
if(row<value.row) return -1; vint result;
if(row>value.row) return 1; if ((result = row - value.row) != 0) return result;
if(column<value.column) return -1; if ((result = column - value.column) != 0) return result;
if(column>value.column) return 1;
return 0; return 0;
} }
GUI_DEFINE_COMPARE_OPERATORS(GridPos)
bool operator==(const GridPos& value)const {return Compare(value)==0;}
bool operator!=(const GridPos& value)const {return Compare(value)!=0;}
bool operator<(const GridPos& value)const {return Compare(value)<0;}
bool operator<=(const GridPos& value)const {return Compare(value)<=0;}
bool operator>(const GridPos& value)const {return Compare(value)>0;}
bool operator>=(const GridPos& value)const {return Compare(value)>=0;}
}; };
/*********************************************************************** /***********************************************************************
@@ -185,12 +179,8 @@ Coordinate
NativeCoordinate& operator=(const NativeCoordinate& _value) = default; NativeCoordinate& operator=(const NativeCoordinate& _value) = default;
NativeCoordinate& operator=(NativeCoordinate&& _value) = default; NativeCoordinate& operator=(NativeCoordinate&& _value) = default;
inline bool operator==(NativeCoordinate c)const { return value == c.value; }; inline vint Compare(NativeCoordinate c) const { return value - c.value; }
inline bool operator!=(NativeCoordinate c)const { return value != c.value; }; GUI_DEFINE_COMPARE_OPERATORS(NativeCoordinate)
inline bool operator<(NativeCoordinate c)const { return value < c.value; };
inline bool operator<=(NativeCoordinate c)const { return value <= c.value; };
inline bool operator>(NativeCoordinate c)const { return value > c.value; };
inline bool operator>=(NativeCoordinate c)const { return value >= c.value; };
inline NativeCoordinate operator+(NativeCoordinate c)const { return value + c.value; }; inline NativeCoordinate operator+(NativeCoordinate c)const { return value + c.value; };
inline NativeCoordinate operator-(NativeCoordinate c)const { return value - c.value; }; inline NativeCoordinate operator-(NativeCoordinate c)const { return value - c.value; };
@@ -203,6 +193,9 @@ Coordinate
inline NativeCoordinate& operator/=(NativeCoordinate c) { value /= c.value; return *this; }; inline NativeCoordinate& operator/=(NativeCoordinate c) { value /= c.value; return *this; };
}; };
inline vint CompareCoordinate(vint a, vint b) { return a - b; }
inline vint CompareCoordinate(NativeCoordinate a, NativeCoordinate b) { return a.value - b.value; }
/*********************************************************************** /***********************************************************************
Point Point
***********************************************************************/ ***********************************************************************/
@@ -233,15 +226,14 @@ Point
{ {
} }
bool operator==(Point_<T> point)const inline vint Compare(const Point_<T>& value)const
{ {
return x == point.x && y == point.y; vint result;
} if ((result = CompareCoordinate(x, value.x)) != 0) return result;
if ((result = CompareCoordinate(y, value.y)) != 0) return result;
bool operator!=(Point_<T> point)const return 0;
{
return x != point.x || y != point.y;
} }
GUI_DEFINE_COMPARE_OPERATORS(Point_<T>)
}; };
using Point = Point_<GuiCoordinate>; using Point = Point_<GuiCoordinate>;
@@ -277,15 +269,14 @@ Size
{ {
} }
bool operator==(Size_<T> size)const inline vint Compare(const Size_<T>& value)const
{ {
return x == size.x && y == size.y; vint result;
} if ((result = CompareCoordinate(x, value.x)) != 0) return result;
if ((result = CompareCoordinate(y, value.y)) != 0) return result;
bool operator!=(Size_<T> size)const return 0;
{
return x != size.x || y != size.y;
} }
GUI_DEFINE_COMPARE_OPERATORS(Size_<T>)
}; };
using Size = Size_<GuiCoordinate>; using Size = Size_<GuiCoordinate>;
@@ -334,15 +325,16 @@ Rectangle
{ {
} }
bool operator==(Rect_<T> rect)const inline vint Compare(const Rect_<T>& value)const
{ {
return x1 == rect.x1 && y1 == rect.y1 && x2 == rect.x2 && y2 == rect.y2; vint result;
} if ((result = CompareCoordinate(x1, value.x1)) != 0) return result;
if ((result = CompareCoordinate(y1, value.y1)) != 0) return result;
bool operator!=(Rect_<T> rect)const if ((result = CompareCoordinate(x2, value.x2)) != 0) return result;
{ if ((result = CompareCoordinate(y2, value.y2)) != 0) return result;
return x1 != rect.x1 || y1 != rect.y1 || x2 != rect.x2 || y2 != rect.y2; return 0;
} }
GUI_DEFINE_COMPARE_OPERATORS(Rect_<T>)
Point_<T> LeftTop()const Point_<T> LeftTop()const
{ {
@@ -547,6 +539,7 @@ Color
{ {
return value - color.value; return value - color.value;
} }
GUI_DEFINE_COMPARE_OPERATORS(Color)
static Color Parse(const WString& value) static Color Parse(const WString& value)
{ {
@@ -594,13 +587,6 @@ Color
} }
return result; return result;
} }
bool operator==(Color color)const {return Compare(color)==0;}
bool operator!=(Color color)const {return Compare(color)!=0;}
bool operator<(Color color)const {return Compare(color)<0;}
bool operator<=(Color color)const {return Compare(color)<=0;}
bool operator>(Color color)const {return Compare(color)>0;}
bool operator>=(Color color)const {return Compare(color)>=0;}
}; };
/*********************************************************************** /***********************************************************************
@@ -641,15 +627,16 @@ Margin
{ {
} }
bool operator==(Margin_<T> margin)const inline vint Compare(const Margin_<T>& value)const
{ {
return left==margin.left && top==margin.top && right==margin.right && bottom==margin.bottom; vint result;
} if ((result = CompareCoordinate(left, value.left)) != 0) return result;
if ((result = CompareCoordinate(top, value.top)) != 0) return result;
bool operator!=(Margin_<T> margin)const if ((result = CompareCoordinate(right, value.right)) != 0) return result;
{ if ((result = CompareCoordinate(bottom, value.bottom)) != 0) return result;
return left!=margin.left || top!=margin.top || right!=margin.right || bottom!=margin.bottom; return 0;
} }
GUI_DEFINE_COMPARE_OPERATORS(Margin_<T>)
}; };
using Margin = Margin_<GuiCoordinate>; using Margin = Margin_<GuiCoordinate>;
@@ -735,13 +722,7 @@ Resources
return 0; return 0;
} }
GUI_DEFINE_COMPARE_OPERATORS(FontProperties)
bool operator==(const FontProperties& value)const {return Compare(value)==0;}
bool operator!=(const FontProperties& value)const {return Compare(value)!=0;}
bool operator<(const FontProperties& value)const {return Compare(value)<0;}
bool operator<=(const FontProperties& value)const {return Compare(value)<=0;}
bool operator>(const FontProperties& value)const {return Compare(value)>0;}
bool operator>=(const FontProperties& value)const {return Compare(value)>=0;}
}; };
/*********************************************************************** /***********************************************************************
@@ -6409,13 +6390,8 @@ Global String Key
vint key = -1; vint key = -1;
public: public:
static vint Compare(GlobalStringKey a, GlobalStringKey b){ return a.key - b.key; } inline vint Compare(GlobalStringKey value)const{ return key - value.key; }
bool operator==(GlobalStringKey g)const{ return key == g.key; } GUI_DEFINE_COMPARE_OPERATORS(GlobalStringKey)
bool operator!=(GlobalStringKey g)const{ return key != g.key; }
bool operator<(GlobalStringKey g)const{ return key < g.key; }
bool operator<=(GlobalStringKey g)const{ return key <= g.key; }
bool operator>(GlobalStringKey g)const{ return key > g.key; }
bool operator>=(GlobalStringKey g)const{ return key >= g.key; }
static GlobalStringKey Get(const WString& string); static GlobalStringKey Get(const WString& string);
vint ToKey()const; vint ToKey()const;
@@ -9228,8 +9204,14 @@ Colorized Plain Text (model)
/// </summary> /// </summary>
Color background; Color background;
bool operator==(const ColorItem& value)const { return text == value.text && background == value.background; } inline vint Compare(const ColorItem& value)const
bool operator!=(const ColorItem& value)const { return !(*this == value); } {
vint result;
if ((result = text.Compare(value.text)) != 0) return result;
if ((result = background.Compare(value.background)) != 0) return result;
return 0;
}
GUI_DEFINE_COMPARE_OPERATORS(ColorItem)
}; };
/// <summary> /// <summary>
@@ -9250,8 +9232,15 @@ Colorized Plain Text (model)
/// </summary> /// </summary>
ColorItem selectedUnfocused; ColorItem selectedUnfocused;
bool operator==(const ColorEntry& value)const {return normal == value.normal && selectedFocused == value.selectedFocused && selectedUnfocused == value.selectedUnfocused;} inline vint Compare(const ColorEntry& value)const
bool operator!=(const ColorEntry& value)const {return !(*this == value);} {
vint result;
if ((result = normal.Compare(value.normal)) != 0) return result;
if ((result = selectedFocused.Compare(value.selectedFocused)) != 0) return result;
if ((result = selectedUnfocused.Compare(value.selectedUnfocused)) != 0) return result;
return 0;
}
GUI_DEFINE_COMPARE_OPERATORS(ColorEntry)
}; };
} }
@@ -19205,19 +19194,14 @@ Ribbon Gallery List
{ {
} }
vint Compare(GalleryPos value)const inline vint Compare(const GalleryPos& value)const
{ {
vint result = group - value.group; vint result;
if (result != 0) return result; if ((result = group - value.group) != 0) return result;
return item - value.item; if ((result = item - value.item) != 0) return result;
return 0;
} }
GUI_DEFINE_COMPARE_OPERATORS(GalleryPos)
bool operator==(const GalleryPos& value)const { return Compare(value) == 0; }
bool operator!=(const GalleryPos& value)const { return Compare(value) != 0; }
bool operator<(const GalleryPos& value)const { return Compare(value)<0; }
bool operator<=(const GalleryPos& value)const { return Compare(value) <= 0; }
bool operator>(const GalleryPos& value)const { return Compare(value)>0; }
bool operator>=(const GalleryPos& value)const { return Compare(value) >= 0; }
}; };
namespace list namespace list
+1 -1
View File
@@ -8,8 +8,8 @@ DEVELOPER: Zihan Chen(vczh)
#include "VlppParser.h" #include "VlppParser.h"
#include "VlppWorkflowLibrary.h" #include "VlppWorkflowLibrary.h"
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
#include "VlppWorkflowRuntime.h" #include "VlppWorkflowRuntime.h"
+1 -1
View File
@@ -7,8 +7,8 @@ DEVELOPER: Zihan Chen(vczh)
#include "VlppParser.h" #include "VlppParser.h"
#include "VlppWorkflowLibrary.h" #include "VlppWorkflowLibrary.h"
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
#include "VlppWorkflowRuntime.h" #include "VlppWorkflowRuntime.h"
+8 -6
View File
@@ -224,12 +224,14 @@ WindowsDirect2DParagraph
TextRange(){} TextRange(){}
TextRange(vint _start, vint _end):start(_start),end(_end){} TextRange(vint _start, vint _end):start(_start),end(_end){}
bool operator==(const TextRange& range) const { return start==range.start; } inline vint Compare(const TextRange& value)const
bool operator!=(const TextRange& range) const { return start!=range.start; } {
bool operator<(const TextRange& range) const { return start<range.start; } vint result;
bool operator<=(const TextRange& range) const { return start<=range.start; } if ((result = start - value.start) != 0) return result;
bool operator>(const TextRange& range) const { return start>range.start; } if ((result = end - value.end) != 0) return result;
bool operator>=(const TextRange& range) const { return start>=range.start; } return 0;
}
GUI_DEFINE_COMPARE_OPERATORS(TextRange)
}; };
typedef Dictionary<IGuiGraphicsElement*, ComPtr<WindowsDirect2DElementInlineObject>> InlineElementMap; typedef Dictionary<IGuiGraphicsElement*, ComPtr<WindowsDirect2DElementInlineObject>> InlineElementMap;
+17 -9
View File
@@ -6,8 +6,8 @@ DEVELOPER: Zihan Chen(vczh)
#include "VlppParser.h" #include "VlppParser.h"
#include "VlppWorkflowLibrary.h" #include "VlppWorkflowLibrary.h"
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
/*********************************************************************** /***********************************************************************
@@ -1431,12 +1431,14 @@ UniscribeColor
UniscribeColorRange(){} UniscribeColorRange(){}
UniscribeColorRange(vint _start, vint _end):start(_start),end(_end){} UniscribeColorRange(vint _start, vint _end):start(_start),end(_end){}
bool operator==(const UniscribeColorRange& range) const { return start==range.start; } inline vint Compare(const UniscribeColorRange& value)const
bool operator!=(const UniscribeColorRange& range) const { return start!=range.start; } {
bool operator<(const UniscribeColorRange& range) const { return start<range.start; } vint result;
bool operator<=(const UniscribeColorRange& range) const { return start<=range.start; } if ((result = start - value.start) != 0) return result;
bool operator>(const UniscribeColorRange& range) const { return start>range.start; } if ((result = end - value.end) != 0) return result;
bool operator>=(const UniscribeColorRange& range) const { return start>=range.start; } return 0;
}
GUI_DEFINE_COMPARE_OPERATORS(UniscribeColorRange)
}; };
struct UniscribeColor struct UniscribeColor
@@ -1447,8 +1449,14 @@ UniscribeColor
UniscribeColor(){} UniscribeColor(){}
UniscribeColor(Color _fontColor, Color _backgroundColor):fontColor(_fontColor),backgroundColor(_backgroundColor){} UniscribeColor(Color _fontColor, Color _backgroundColor):fontColor(_fontColor),backgroundColor(_backgroundColor){}
bool operator==(const UniscribeColor& color) const { return fontColor==color.fontColor && backgroundColor==color.backgroundColor; } inline vint Compare(const UniscribeColor& value)const
bool operator!=(const UniscribeColor& color) const { return fontColor!=color.fontColor || backgroundColor!=color.backgroundColor; } {
vint result;
if ((result = fontColor.Compare(value.fontColor)) != 0) return result;
if ((result = backgroundColor.Compare(value.backgroundColor)) != 0) return result;
return 0;
}
GUI_DEFINE_COMPARE_OPERATORS(UniscribeColor)
}; };
} }
} }
+17 -17
View File
@@ -23932,7 +23932,7 @@ namespace darkskin
} }
(this->__vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(8); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(8); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(9); __vwsn_temp__.y = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(9); __vwsn_temp__.y = static_cast<::vl::vint>(5); return __vwsn_temp__; }());
@@ -24445,7 +24445,7 @@ Class (::darkskin::ComboBoxTemplateConstructor)
} }
(this->__vwsn_precompile_8 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_8 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }());
@@ -24979,7 +24979,7 @@ Class (::darkskin::ExpandingDecoratorTemplateConstructor)
} }
(this->__vwsn_precompile_3 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_3 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(1); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(1); __vwsn_temp__.y = static_cast<::vl::vint>(8); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_3.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(1); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(1); __vwsn_temp__.y = static_cast<::vl::vint>(8); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_3.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_3.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(9); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_3.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(9); return __vwsn_temp__; }());
@@ -24996,7 +24996,7 @@ Class (::darkskin::ExpandingDecoratorTemplateConstructor)
} }
(this->__vwsn_precompile_5 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_5 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(7); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(7); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_5.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(7); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(7); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_5.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_5.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(9); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_5.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(9); return __vwsn_temp__; }());
@@ -25736,7 +25736,7 @@ Class (::darkskin::LeftScrollButtonTemplateConstructor)
} }
(this->__vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(8); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(8); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(9); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(9); return __vwsn_temp__; }());
@@ -25876,7 +25876,7 @@ Class (::darkskin::ListViewColumnHeaderTemplateConstructor)
} }
(this->__vwsn_precompile_8 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_8 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(3); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(6); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(3); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(6); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }());
@@ -25893,7 +25893,7 @@ Class (::darkskin::ListViewColumnHeaderTemplateConstructor)
} }
(this->__vwsn_precompile_10 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_10 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(3); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(6); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_10.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(3); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(6); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_10.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_10.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_10.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }());
@@ -26376,7 +26376,7 @@ Class (::darkskin::MenuItemButtonTemplateConstructor)
} }
(this->__vwsn_precompile_11 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_11 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(3); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(6); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_11.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(3); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(6); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_11.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_11.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(7); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_11.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(7); return __vwsn_temp__; }());
@@ -27051,7 +27051,7 @@ Class (::darkskin::RibbonGalleryDropdownButtonTemplateConstructor)
} }
(this->__vwsn_precompile_4 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_4 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(8); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_4.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(8); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_4.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_4.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(9); __vwsn_temp__.y = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_4.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(9); __vwsn_temp__.y = static_cast<::vl::vint>(5); return __vwsn_temp__; }());
@@ -27373,7 +27373,7 @@ Class (::darkskin::RibbonGroupExpandButtonTemplateConstructor)
} }
(this->__vwsn_precompile_1 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_1 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(6); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(6); __vwsn_temp__.y = static_cast<::vl::vint>(6); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(6); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_1.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(6); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(6); __vwsn_temp__.y = static_cast<::vl::vint>(6); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(6); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_1.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_1.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(7); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_1.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(7); __vwsn_temp__.y = static_cast<::vl::vint>(7); return __vwsn_temp__; }());
@@ -28060,7 +28060,7 @@ Class (::darkskin::RibbonLargeDropdownButtonTemplateConstructor)
} }
(this->__vwsn_precompile_12 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_12 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_12.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_12.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_12.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_12.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }());
@@ -28643,7 +28643,7 @@ Class (::darkskin::RibbonSmallDropdownButtonTemplateConstructor)
} }
(this->__vwsn_precompile_11 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_11 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_11.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_11.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_11.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_11.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }());
@@ -29186,7 +29186,7 @@ Class (::darkskin::RibbonSplitArrowTemplateConstructor)
} }
(this->__vwsn_precompile_6 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_6 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_6.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_6.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_6.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_6.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }());
@@ -29570,7 +29570,7 @@ Class (::darkskin::RightScrollButtonTemplateConstructor)
} }
(this->__vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(8); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(8); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(9); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(9); return __vwsn_temp__; }());
@@ -30835,7 +30835,7 @@ Class (::darkskin::ToolstripDropdownButtonTemplateConstructor)
} }
(this->__vwsn_precompile_8 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_8 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_8.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }());
@@ -31032,7 +31032,7 @@ Class (::darkskin::ToolstripSplitArrowTemplateConstructor)
} }
(this->__vwsn_precompile_3 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_3 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_3.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(2); __vwsn_temp__.y = static_cast<::vl::vint>(2); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_3.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_3.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_3.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(5); __vwsn_temp__.y = static_cast<::vl::vint>(3); return __vwsn_temp__; }());
@@ -31479,7 +31479,7 @@ Class (::darkskin::TopScrollButtonTemplateConstructor)
} }
(this->__vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>())); (this->__vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiPolygonElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiPolygonElement>()));
{ {
[&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateList().Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Add([&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(8); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetPointsArray(__vwsn_temp_0); }(); [&]()->decltype(auto){ auto __vwsn_temp_x0 = ::vl::__vwsn::Box(::vl::Ptr<::vl::reflection::description::IValueReadonlyList>((::vl::__vwsn::CreateArray().Resize(3).Set(0, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(0); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }()).Set(1, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(4); __vwsn_temp__.y = static_cast<::vl::vint>(0); return __vwsn_temp__; }()).Set(2, [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(8); __vwsn_temp__.y = static_cast<::vl::vint>(4); return __vwsn_temp__; }())).list)); ::vl::collections::Array<::vl::presentation::Point> __vwsn_temp_0; ::vl::reflection::description::UnboxParameter(__vwsn_temp_x0, __vwsn_temp_0); return ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetPointsArray(__vwsn_temp_0); }();
} }
{ {
::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(9); __vwsn_temp__.y = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_2.Obj())->SetSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(9); __vwsn_temp__.y = static_cast<::vl::vint>(5); return __vwsn_temp__; }());
+1 -1
View File
@@ -6,8 +6,8 @@ DEVELOPER: Zihan Chen(vczh)
#include "VlppParser.h" #include "VlppParser.h"
#include "VlppWorkflowLibrary.h" #include "VlppWorkflowLibrary.h"
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
/*********************************************************************** /***********************************************************************
+1 -1
View File
@@ -8,8 +8,8 @@ DEVELOPER: Zihan Chen(vczh)
#include "VlppParser.h" #include "VlppParser.h"
#include "VlppWorkflowLibrary.h" #include "VlppWorkflowLibrary.h"
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
/*********************************************************************** /***********************************************************************
+142 -104
View File
@@ -1160,58 +1160,9 @@ Licensed under https://github.com/vczh-libraries/License
#include <memory.h> #include <memory.h>
namespace vl namespace vl
{ {
template<typename T> template<typename T>
class Func; class Func;
/***********************************************************************
vl::function_lambda::LambdaRetriveType<R(TArgs...)>
***********************************************************************/
namespace function_lambda
{
template<typename T>
struct LambdaRetriveType
{
};
template<typename T>
struct FunctionObjectRetriveType
{
typedef typename LambdaRetriveType<decltype(&T::operator())>::Type Type;
typedef typename LambdaRetriveType<decltype(&T::operator())>::FunctionType FunctionType;
typedef typename LambdaRetriveType<decltype(&T::operator())>::ResultType ResultType;
typedef typename LambdaRetriveType<decltype(&T::operator())>::ParameterTypes ParameterTypes;
};
template<typename TObject, typename R, typename ...TArgs>
struct LambdaRetriveType<R(__thiscall TObject::*)(TArgs...)const>
{
typedef Func<R(TArgs...)> Type;
typedef R(FunctionType)(TArgs...);
typedef R ResultType;
typedef TypeTuple<TArgs...> ParameterTypes;
};
template<typename TObject, typename R, typename ...TArgs>
struct LambdaRetriveType<R(__thiscall TObject::*)(TArgs...)>
{
typedef Func<R(TArgs...)> Type;
typedef R(FunctionType)(TArgs...);
typedef R ResultType;
typedef TypeTuple<TArgs...> ParameterTypes;
};
template<typename R, typename ...TArgs>
struct FunctionObjectRetriveType<R(*)(TArgs...)>
{
typedef Func<R(TArgs...)> Type;
typedef R(FunctionType)(TArgs...);
typedef R ResultType;
typedef TypeTuple<TArgs...> ParameterTypes;
};
}
/*********************************************************************** /***********************************************************************
vl::Func<R(TArgs...)> vl::Func<R(TArgs...)>
***********************************************************************/ ***********************************************************************/
@@ -1430,11 +1381,34 @@ vl::Func<R(TArgs...)>
}; };
/*********************************************************************** /***********************************************************************
LAMBDA vl::function_lambda::LambdaRetriveType<R(TArgs...)>
***********************************************************************/ ***********************************************************************/
namespace function_lambda namespace function_lambda
{ {
template<typename T>
struct LambdaRetriveType
{
};
template<typename TObject, typename R, typename ...TArgs>
struct LambdaRetriveType<R(__thiscall TObject::*)(TArgs...)const>
{
typedef Func<R(TArgs...)> Type;
typedef R(FunctionType)(TArgs...);
typedef R ResultType;
typedef TypeTuple<TArgs...> ParameterTypes;
};
template<typename TObject, typename R, typename ...TArgs>
struct LambdaRetriveType<R(__thiscall TObject::*)(TArgs...)>
{
typedef Func<R(TArgs...)> Type;
typedef R(FunctionType)(TArgs...);
typedef R ResultType;
typedef TypeTuple<TArgs...> ParameterTypes;
};
/// <summary>Create a functor in [T:vl.Func`1] from another functor, with all type arguments autotimatically inferred. The "LAMBDA" macro is recommended for the same purpose for writing compact code.</summary> /// <summary>Create a functor in [T:vl.Func`1] from another functor, with all type arguments autotimatically inferred. The "LAMBDA" macro is recommended for the same purpose for writing compact code.</summary>
/// <typeparam name="T">Type of the functor to copy.</typeparam> /// <typeparam name="T">Type of the functor to copy.</typeparam>
/// <returns>A copied functor in [T:vl.Func`1].</returns> /// <returns>A copied functor in [T:vl.Func`1].</returns>
@@ -1445,20 +1419,7 @@ LAMBDA
return functionObject; return functionObject;
} }
/// <summary>Create a functor in [T:vl.Func`1] from a function pointer, with all type arguments autotimatically inferred. The "FUNCTION" macro is recommended for the same purpose for writing compact code.</summary>
/// <typeparam name="T">Type of the function pointer.</typeparam>
/// <returns>A copied functor in [T:vl.Func`1].</returns>
/// <param name="functionObject">The function pointer.</param>
template<typename T>
typename FunctionObjectRetriveType<T>::Type ConvertToFunction(T functionObject)
{
return functionObject;
}
#define LAMBDA vl::function_lambda::Lambda #define LAMBDA vl::function_lambda::Lambda
#define FUNCTION vl::function_lambda::ConvertToFunction
#define FUNCTION_TYPE(T) typename vl::function_lambda::FunctionObjectRetriveType<T>::Type
#define FUNCTION_RESULT_TYPE(T) typename vl::function_lambda::FunctionObjectRetriveType<T>::ResultType
} }
/*********************************************************************** /***********************************************************************
@@ -2136,6 +2097,15 @@ namespace vl
{ {
namespace collections namespace collections
{ {
/***********************************************************************
Reflection
***********************************************************************/
class ICollectionReference : public virtual Interface
{
public:
virtual void OnDisposed() = 0;
};
/*********************************************************************** /***********************************************************************
Interfaces Interfaces
@@ -2228,6 +2198,71 @@ Interfaces
/// </remarks> /// </remarks>
/// <returns>The enumerator.</returns> /// <returns>The enumerator.</returns>
virtual IEnumerator<T>* CreateEnumerator() const = 0; virtual IEnumerator<T>* CreateEnumerator() const = 0;
/// <summary>Get the underlying collection object.</summary>
/// <returns>
/// The underlying collection object.
/// It could returns nullptr when <see cref="GetCollectionEntity"/> returns <see cref="CollectionEntity::Unknown"/>.
/// </returns>
virtual const Object* GetCollectionObject() const = 0;
/// <summary>Get the associated collection reference.</summary>
/// <returns>The associated collection reference.</returns>
virtual Ptr<ICollectionReference> GetCollectionReference() const = 0;
/// <summary>
/// Associate a collection reference to this collection.
/// It will crash if one has been associated.
/// <see cref="ICollectionReference::OnDisposed"/> will be called when this collection is no longer available.
/// </summary>
/// <param name="ref">The associated collection reference.</param>
virtual void SetCollectionReference(Ptr<ICollectionReference> ref) const = 0;
/// <summary>
/// Get the strong-typed associated collection reference.
/// It returns nullptr when none has been associated.
/// It throws when one has been associated but the type is unexpected.
/// </summary>
/// <typeparam name="T">The expected type of the associated collection reference.</typeparam>
/// <returns>The strong-typed associated collection reference.</returns>
template<typename U>
Ptr<U> TryGetCollectionReference()
{
auto ref = GetCollectionReference();
if (!ref) return nullptr;
auto sref = ref.Cast<U>();
CHECK_ERROR(sref, L"IEnumerable<T>::TryGetCollectionReference<U>()#The associated collection reference has an unexpected type.");
return sref;
}
};
template<typename T>
class EnumerableBase : public Object, public virtual IEnumerable<T>
{
private:
mutable Ptr<ICollectionReference> colref;
public:
~EnumerableBase()
{
if (colref) colref->OnDisposed();
}
const Object* GetCollectionObject() const override
{
return this;
}
Ptr<ICollectionReference> GetCollectionReference() const override
{
return colref;
}
void SetCollectionReference(Ptr<ICollectionReference> ref) const override
{
CHECK_ERROR(!colref, L"EnumerableBase<T>::SetCollectionReference(Ptr<ICollectionReference>)#Cannot associate another collection reference to this collection.");
colref = ref;
}
}; };
/*********************************************************************** /***********************************************************************
@@ -2310,7 +2345,7 @@ Memory Management
class ListStore; class ListStore;
template<typename T> template<typename T>
class ListStore<T, false> abstract : public Object class ListStore<T, false> abstract : public EnumerableBase<T>
{ {
protected: protected:
static void InitializeItemsByDefault(void* dst, vint count) static void InitializeItemsByDefault(void* dst, vint count)
@@ -2391,7 +2426,7 @@ Memory Management
}; };
template<typename T> template<typename T>
class ListStore<T, true> abstract : public Object class ListStore<T, true> abstract : public EnumerableBase<T>
{ {
protected: protected:
static void InitializeItemsByDefault(void* dst, vint count) static void InitializeItemsByDefault(void* dst, vint count)
@@ -2447,7 +2482,7 @@ ArrayBase
/// <summary>Base type of all linear container.</summary> /// <summary>Base type of all linear container.</summary>
/// <typeparam name="T">Type of elements.</typeparam> /// <typeparam name="T">Type of elements.</typeparam>
template<typename T> template<typename T>
class ArrayBase abstract : public ListStore<T>, public virtual IEnumerable<T> class ArrayBase abstract : public ListStore<T>
{ {
protected: protected:
class Enumerator : public Object, public virtual IEnumerator<T> class Enumerator : public Object, public virtual IEnumerator<T>
@@ -2513,9 +2548,6 @@ ArrayBase
return *(T*)AddressOf(buffer, index); return *(T*)AddressOf(buffer, index);
} }
public: public:
ArrayBase()
{
}
IEnumerator<T>* CreateEnumerator()const IEnumerator<T>* CreateEnumerator()const
{ {
@@ -2739,9 +2771,6 @@ ListBase
} }
} }
public: public:
ListBase()
{
}
~ListBase() ~ListBase()
{ {
@@ -3223,7 +3252,7 @@ namespace vl
typename KK=typename KeyType<KT>::Type, typename KK=typename KeyType<KT>::Type,
typename VK=typename KeyType<VT>::Type typename VK=typename KeyType<VT>::Type
> >
class Dictionary : public Object, public virtual IEnumerable<Pair<KT, VT>> class Dictionary : public EnumerableBase<Pair<KT, VT>>
{ {
public: public:
typedef SortedList<KT, KK> KeyContainer; typedef SortedList<KT, KK> KeyContainer;
@@ -3422,7 +3451,7 @@ namespace vl
typename KK=typename KeyType<KT>::Type, typename KK=typename KeyType<KT>::Type,
typename VK=typename KeyType<VT>::Type typename VK=typename KeyType<VT>::Type
> >
class Group : public Object, public virtual IEnumerable<Pair<KT, VT>> class Group : public EnumerableBase<Pair<KT, VT>>
{ {
public: public:
typedef SortedList<KT, KK> KeyContainer; typedef SortedList<KT, KK> KeyContainer;
@@ -4063,14 +4092,11 @@ EmptyEnumerable
***********************************************************************/ ***********************************************************************/
template<typename T> template<typename T>
class EmptyEnumerable : public Object, public IEnumerable<T> class EmptyEnumerator : public Object, public virtual IEnumerator<T>
{
private:
class Enumerator : public Object, public virtual IEnumerator<T>
{ {
IEnumerator<T>* Clone()const override IEnumerator<T>* Clone()const override
{ {
return new Enumerator; return new EmptyEnumerator<T>();
} }
const T& Current()const override const T& Current()const override
@@ -4097,12 +4123,6 @@ EmptyEnumerable
return true; return true;
} }
}; };
public:
IEnumerator<T>* CreateEnumerator()const
{
return new Enumerator;
}
};
/*********************************************************************** /***********************************************************************
RangeEnumerator RangeEnumerator
@@ -4584,9 +4604,9 @@ Pairwise
protected: protected:
IEnumerator<S>* enumerator1; IEnumerator<S>* enumerator1;
IEnumerator<T>* enumerator2; IEnumerator<T>* enumerator2;
Pair<S, T> current; Nullable<Pair<S, T>> current;
public: public:
PairwiseEnumerator(IEnumerator<S>* _enumerator1, IEnumerator<T>* _enumerator2, Pair<S, T> _current=Pair<S, T>()) PairwiseEnumerator(IEnumerator<S>* _enumerator1, IEnumerator<T>* _enumerator2, Nullable<Pair<S, T>> _current = {})
:enumerator1(_enumerator1) :enumerator1(_enumerator1)
,enumerator2(_enumerator2) ,enumerator2(_enumerator2)
,current(_current) ,current(_current)
@@ -4606,7 +4626,7 @@ Pairwise
const Pair<S, T>& Current()const override const Pair<S, T>& Current()const override
{ {
return current; return current.Value();
} }
vint Index()const override vint Index()const override
@@ -4670,9 +4690,9 @@ Select
protected: protected:
IEnumerator<T>* enumerator; IEnumerator<T>* enumerator;
Func<K(T)> selector; Func<K(T)> selector;
K current; Nullable<K> current;
public: public:
SelectEnumerator(IEnumerator<T>* _enumerator, const Func<K(T)>& _selector, K _current=K()) SelectEnumerator(IEnumerator<T>* _enumerator, const Func<K(T)>& _selector, Nullable<K> _current = {})
:enumerator(_enumerator) :enumerator(_enumerator)
,selector(_selector) ,selector(_selector)
,current(_current) ,current(_current)
@@ -4691,7 +4711,7 @@ Select
const K& Current()const override const K& Current()const override
{ {
return current; return current.Value();
} }
vint Index()const override vint Index()const override
@@ -4939,7 +4959,7 @@ Distinct
protected: protected:
IEnumerator<T>* enumerator; IEnumerator<T>* enumerator;
SortedList<T> distinct; SortedList<T> distinct;
T lastValue; Nullable<T> lastValue;
public: public:
DistinctEnumerator(IEnumerator<T>* _enumerator) DistinctEnumerator(IEnumerator<T>* _enumerator)
@@ -4966,7 +4986,7 @@ Distinct
const T& Current()const override const T& Current()const override
{ {
return lastValue; return lastValue.Value();
} }
vint Index()const override vint Index()const override
@@ -5060,7 +5080,7 @@ FromIterator
***********************************************************************/ ***********************************************************************/
template<typename T, typename I> template<typename T, typename I>
class FromIteratorEnumerable : public Object, public IEnumerable<T> class FromIteratorEnumerable : public EnumerableBase<T>
{ {
private: private:
class Enumerator : public Object, public IEnumerator<T> class Enumerator : public Object, public IEnumerator<T>
@@ -6892,7 +6912,7 @@ LazyList
/// <p>In this way you get a lazy list with all values copied, they do not rely on other objects.</p> /// <p>In this way you get a lazy list with all values copied, they do not rely on other objects.</p>
/// </remarks> /// </remarks>
template<typename T> template<typename T>
class LazyList : public Object, public IEnumerable<T> class LazyList : public EnumerableBase<T>
{ {
protected: protected:
Ptr<IEnumerator<T>> enumeratorPrototype; Ptr<IEnumerator<T>> enumeratorPrototype;
@@ -6901,6 +6921,8 @@ LazyList
{ {
return enumeratorPrototype->Clone(); return enumeratorPrototype->Clone();
} }
using TInput = decltype(std::declval<IEnumerator<T>>().Current());
public: public:
/// <summary>Create a lazy list from an enumerator. This enumerator will be deleted when this lazy list is deleted.</summary> /// <summary>Create a lazy list from an enumerator. This enumerator will be deleted when this lazy list is deleted.</summary>
/// <param name="enumerator">The enumerator.</param> /// <param name="enumerator">The enumerator.</param>
@@ -6928,6 +6950,15 @@ LazyList
LazyList(const LazyList<T>& lazyList) LazyList(const LazyList<T>& lazyList)
:enumeratorPrototype(lazyList.enumeratorPrototype) :enumeratorPrototype(lazyList.enumeratorPrototype)
{ {
// no need to clone enumeratorPrototype as it will never be iterated
}
/// <summary>Create a lazy list from another lazy list.</summary>
/// <param name="lazyList">The lazy list.</param>
LazyList(LazyList<T>&& lazyList)
:enumeratorPrototype(lazyList.enumeratorPrototype)
{
lazyList.enumeratorPrototype = nullptr;
} }
/// <summary>Create a lazy list from a container. It is very useful to <see cref="MakePtr`2"/> a container as an intermediate result and then put in a lazy list.</summary> /// <summary>Create a lazy list from a container. It is very useful to <see cref="MakePtr`2"/> a container as an intermediate result and then put in a lazy list.</summary>
@@ -6941,16 +6972,24 @@ LazyList
/// <summary>Create an empty lazy list.</summary> /// <summary>Create an empty lazy list.</summary>
LazyList() LazyList()
:enumeratorPrototype(EmptyEnumerable<T>().CreateEnumerator()) :enumeratorPrototype(new EmptyEnumerator<T>())
{ {
} }
LazyList<T>& operator=(const LazyList<T>& lazyList) LazyList<T>& operator=(const LazyList<T>& lazyList)
{ {
// no need to clone enumeratorPrototype as it will never be iterated
enumeratorPrototype = lazyList.enumeratorPrototype; enumeratorPrototype = lazyList.enumeratorPrototype;
return *this; return *this;
} }
LazyList<T>& operator=(LazyList<T>&& lazyList)
{
enumeratorPrototype = lazyList.enumeratorPrototype;
lazyList.enumeratorPrototype = nullptr;
return *this;
}
IEnumerator<T>* CreateEnumerator()const IEnumerator<T>* CreateEnumerator()const
{ {
return enumeratorPrototype->Clone(); return enumeratorPrototype->Clone();
@@ -6971,9 +7010,9 @@ LazyList
/// } /// }
/// ]]></example> /// ]]></example>
template<typename F> template<typename F>
LazyList<FUNCTION_RESULT_TYPE(F)> Select(F f)const auto Select(F f) const -> LazyList<decltype(f(std::declval<TInput>()))>
{ {
return new SelectEnumerator<T, FUNCTION_RESULT_TYPE(F)>(xs(), f); return new SelectEnumerator<T, decltype(f(std::declval<TInput>()))>(xs(), f);
} }
/// <summary>Create a new lazy list with all elements filtered.</summary> /// <summary>Create a new lazy list with all elements filtered.</summary>
@@ -7050,7 +7089,7 @@ LazyList
{ {
SortLambda<T, F>(&sorted->operator[](0), sorted->Count(), f); SortLambda<T, F>(&sorted->operator[](0), sorted->Count(), f);
} }
return new ContainerEnumerator<T, List<T>>(sorted); return sorted;
} }
//------------------------------------------------------- //-------------------------------------------------------
@@ -7487,10 +7526,9 @@ LazyList
/// } /// }
/// ]]></example> /// ]]></example>
template<typename F> template<typename F>
FUNCTION_RESULT_TYPE(F) SelectMany(F f)const auto SelectMany(F f)const -> LazyList<typename decltype(f(std::declval<TInput>()))::ElementType>
{ {
typedef FUNCTION_RESULT_TYPE(F) LazyListU; using U = typename decltype(f(std::declval<TInput>()))::ElementType;
typedef typename LazyListU::ElementType U;
return Select(f).Aggregate(LazyList<U>(), [](const LazyList<U>& a, const IEnumerable<U>& b)->LazyList<U> {return a.Concat(b); }); return Select(f).Aggregate(LazyList<U>(), [](const LazyList<U>& a, const IEnumerable<U>& b)->LazyList<U> {return a.Concat(b); });
} }
@@ -7518,9 +7556,9 @@ LazyList
/// } /// }
/// ]]></example> /// ]]></example>
template<typename F> template<typename F>
LazyList<Pair<FUNCTION_RESULT_TYPE(F), LazyList<T>>> GroupBy(F f)const auto GroupBy(F f)const -> LazyList<Pair<decltype(f(std::declval<TInput>())), LazyList<T>>>
{ {
typedef FUNCTION_RESULT_TYPE(F) K; using K = decltype(f(std::declval<TInput>()));
auto self = *this; auto self = *this;
return Select(f) return Select(f)
.Distinct() .Distinct()
+10 -11
View File
@@ -3148,9 +3148,9 @@ CreateLookAhead
void CopyStableLookAheads(List<Ptr<ParsingTable::LookAheadInfo>>& la, List<Ptr<ParsingTable::LookAheadInfo>>& sla, const List<Ptr<ParsingTable::LookAheadInfo>>& la2) void CopyStableLookAheads(List<Ptr<ParsingTable::LookAheadInfo>>& la, List<Ptr<ParsingTable::LookAheadInfo>>& sla, const List<Ptr<ParsingTable::LookAheadInfo>>& la2)
{ {
CopyFrom(sla, From(la) CopyFrom(sla, From(la)
.Where([&](Ptr<ParsingTable::LookAheadInfo> lai) .Where([&](auto&& lai)
{ {
return From(la2).All([&](Ptr<ParsingTable::LookAheadInfo> lai2) return From(la2).All([&](auto&& lai2)
{ {
return ParsingTable::LookAheadInfo::TestPrefix(lai, lai2)==ParsingTable::LookAheadInfo::NotPrefix; return ParsingTable::LookAheadInfo::TestPrefix(lai, lai2)==ParsingTable::LookAheadInfo::NotPrefix;
}); });
@@ -3188,9 +3188,9 @@ CreateLookAhead
{ {
CopyFrom(sla, t->lookAheads, true); CopyFrom(sla, t->lookAheads, true);
CopyFrom(t->lookAheads, From(sla) CopyFrom(t->lookAheads, From(sla)
.Where([&](Ptr<ParsingTable::LookAheadInfo> lai) .Where([&](auto&& lai)
{ {
return From(sla).All([&](Ptr<ParsingTable::LookAheadInfo> lai2) return From(sla).All([&](auto&& lai2)
{ {
if(lai==lai2) return true; if(lai==lai2) return true;
ParsingTable::LookAheadInfo::PrefixResult result=ParsingTable::LookAheadInfo::TestPrefix(lai, lai2); ParsingTable::LookAheadInfo::PrefixResult result=ParsingTable::LookAheadInfo::TestPrefix(lai, lai2);
@@ -3730,7 +3730,7 @@ GenerateTable
CopyFrom( CopyFrom(
bag->transitionItems, bag->transitionItems,
From(bag->transitionItems) From(bag->transitionItems)
.OrderBy([&](Ptr<ParsingTable::TransitionItem> t1, Ptr<ParsingTable::TransitionItem> t2) .OrderBy([&](auto&& t1, auto&& t2)
{ {
// stable transition order // stable transition order
vint i1 = bag->transitionItems.IndexOf(t1.Obj()); vint i1 = bag->transitionItems.IndexOf(t1.Obj());
@@ -3741,8 +3741,7 @@ GenerateTable
ParsingTable::TransitionItem::SameOrder ParsingTable::TransitionItem::SameOrder
; ;
return ParsingTable::TransitionItem::Compare(t1, t2, defaultOrder); return ParsingTable::TransitionItem::Compare(t1, t2, defaultOrder);
}) }));
);
// build look ahead inside a transition // build look ahead inside a transition
for (vint k1 = 0; k1 < bag->transitionItems.Count() - 1; k1++) for (vint k1 = 0; k1 < bag->transitionItems.Count() - 1; k1++)
@@ -4510,8 +4509,8 @@ CreateNondeterministicPDAFromEpsilonPDA
CopyFrom( CopyFrom(
newStates, newStates,
From(epsilonPDA->states) From(epsilonPDA->states)
.Where([&](Ptr<State> s) {return oldNewStateMap.Keys().Contains(s.Obj()); }) .Where([&](auto&& s) {return oldNewStateMap.Keys().Contains(s.Obj()); })
.Select([&](Ptr<State> s) { return oldNewStateMap[s.Obj()]; }) .Select([&](auto&& s) { return oldNewStateMap[s.Obj()]; })
); );
DeleteUnnecessaryStates(automaton, newRuleInfo, newStates); DeleteUnnecessaryStates(automaton, newRuleInfo, newStates);
MergeStates(automaton, newRuleInfo, newStates); MergeStates(automaton, newRuleInfo, newStates);
@@ -8715,7 +8714,7 @@ ParsingTreeNode
CopyFrom( CopyFrom(
cachedOrderedSubNodes, cachedOrderedSubNodes,
From(subNodes) From(subNodes)
.Where([=](Ptr<ParsingTreeNode> node) .Where([=](auto&& node)
{ {
const auto& range = node->GetCodeRange(); const auto& range = node->GetCodeRange();
return !range.start.IsInvalid() && !range.end.IsInvalid(); return !range.start.IsInvalid() && !range.end.IsInvalid();
@@ -10463,7 +10462,7 @@ Linq To Xml
{ {
return From(element->subNodes) return From(element->subNodes)
.FindType<XmlElement>() .FindType<XmlElement>()
.Where([name](Ptr<XmlElement> e){return e->name.value==name;}); .Where([name](auto&& e){return e->name.value==name;});
} }
WString XmlGetValue(XmlElement* element) WString XmlGetValue(XmlElement* element)
+3 -3
View File
@@ -3,8 +3,8 @@ THIS FILE IS AUTOMATICALLY GENERATED. DO NOT MODIFY
DEVELOPER: Zihan Chen(vczh) DEVELOPER: Zihan Chen(vczh)
***********************************************************************/ ***********************************************************************/
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
/*********************************************************************** /***********************************************************************
@@ -2269,7 +2269,7 @@ Syntax Analyzer
void Reset()override; void Reset()override;
}; };
class TokenLookAhead : public Object, public collections::IEnumerable<vint> class TokenLookAhead : public collections::EnumerableBase<vint>
{ {
protected: protected:
const ParsingTokenWalker* walker; const ParsingTokenWalker* walker;
@@ -2279,7 +2279,7 @@ Syntax Analyzer
collections::IEnumerator<vint>* CreateEnumerator()const override; collections::IEnumerator<vint>* CreateEnumerator()const override;
}; };
class ReduceLookAhead : public Object, public collections::IEnumerable<vint> class ReduceLookAhead : public collections::EnumerableBase<vint>
{ {
protected: protected:
const ParsingTokenWalker* walker; const ParsingTokenWalker* walker;
+31
View File
@@ -2532,6 +2532,27 @@ IValueEnumerable
return new ValueEnumerableWrapper<Ptr<IEnumerable<Value>>>(enumerable); return new ValueEnumerableWrapper<Ptr<IEnumerable<Value>>>(enumerable);
} }
/***********************************************************************
IValueArray
***********************************************************************/
Ptr<IValueArray> IValueArray::Create()
{
return Create(LazyList<Value>());
}
Ptr<IValueArray> IValueArray::Create(Ptr<IValueReadonlyList> values)
{
return Create(GetLazyList<Value>(values));
}
Ptr<IValueArray> IValueArray::Create(collections::LazyList<Value> values)
{
Ptr<Array<Value>> list = new Array<Value>;
CopyFrom(*list.Obj(), values);
return new ValueArrayWrapper<Ptr<Array<Value>>>(list);
}
/*********************************************************************** /***********************************************************************
IValueList IValueList
***********************************************************************/ ***********************************************************************/
@@ -2711,6 +2732,7 @@ TypeName
IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueEnumerator, system::Enumerator) IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueEnumerator, system::Enumerator)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueEnumerable, system::Enumerable) IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueEnumerable, system::Enumerable)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueReadonlyList, system::ReadonlyList) IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueReadonlyList, system::ReadonlyList)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueArray, system::Array)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueList, system::List) IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueList, system::List)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueObservableList, system::ObservableList) IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueObservableList, system::ObservableList)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueReadonlyDictionary, system::ReadonlyDictionary) IMPL_TYPE_INFO_RENAME(vl::reflection::description::IValueReadonlyDictionary, system::ReadonlyDictionary)
@@ -3254,6 +3276,15 @@ LoadPredefinedTypes
CLASS_MEMBER_METHOD(IndexOf, { L"value" }) CLASS_MEMBER_METHOD(IndexOf, { L"value" })
END_INTERFACE_MEMBER(IValueReadonlyList) END_INTERFACE_MEMBER(IValueReadonlyList)
BEGIN_INTERFACE_MEMBER(IValueArray)
CLASS_MEMBER_BASE(IValueReadonlyList)
CLASS_MEMBER_EXTERNALCTOR(Ptr<IValueArray>(), NO_PARAMETER, vl::reflection::description::IValueArray::Create)
CLASS_MEMBER_EXTERNALCTOR(Ptr<IValueArray>(Ptr<IValueReadonlyList>), { L"values" }, vl::reflection::description::IValueArray::Create)
CLASS_MEMBER_METHOD(Set, { L"index" _ L"value" })
CLASS_MEMBER_METHOD(Resize, { L"size" })
END_INTERFACE_MEMBER(IValueArray)
BEGIN_INTERFACE_MEMBER(IValueList) BEGIN_INTERFACE_MEMBER(IValueList)
CLASS_MEMBER_BASE(IValueReadonlyList) CLASS_MEMBER_BASE(IValueReadonlyList)
CLASS_MEMBER_EXTERNALCTOR(Ptr<IValueList>(), NO_PARAMETER, vl::reflection::description::IValueList::Create) CLASS_MEMBER_EXTERNALCTOR(Ptr<IValueList>(), NO_PARAMETER, vl::reflection::description::IValueList::Create)
+1324 -1222
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -635,7 +635,7 @@ Tokenizer
/// } /// }
/// } /// }
/// ]]></example> /// ]]></example>
class RegexTokens : public Object, public collections::IEnumerable<RegexToken> class RegexTokens : public collections::EnumerableBase<RegexToken>
{ {
friend class RegexLexer; friend class RegexLexer;
protected: protected:
@@ -650,7 +650,7 @@ Tokenizer
RegexTokens(const RegexTokens& tokens); RegexTokens(const RegexTokens& tokens);
~RegexTokens(); ~RegexTokens();
collections::IEnumerator<RegexToken>* CreateEnumerator()const; collections::IEnumerator<RegexToken>* CreateEnumerator() const override;
/// <summary>Copy all tokens.</summary> /// <summary>Copy all tokens.</summary>
/// <param name="tokens">Returns all tokens.</param> /// <param name="tokens">Returns all tokens.</param>
@@ -936,7 +936,7 @@ Tokenizer
/// RegexLexer lexer(tokenDefs, proc); /// RegexLexer lexer(tokenDefs, proc);
/// RegexLexerColorizer colorizer = lexer.Colorize(); /// RegexLexerColorizer colorizer = lexer.Colorize();
/// ///
/// /// for (auto [line, index] : indexed(From(lines))) /// for (auto [line, index] : indexed(From(lines)))
/// { /// {
/// Console::WriteLine(L"Begin line " + itow(index)); /// Console::WriteLine(L"Begin line " + itow(index));
/// argument.processingText = line; /// argument.processingText = line;
+78 -16
View File
@@ -9512,10 +9512,12 @@ IsExpressionDependOnExpectedType(Expression)
{ {
public: public:
WfLexicalScopeManager* manager; WfLexicalScopeManager* manager;
bool hasExpectedType;
bool result = false; bool result = false;
IsExpressionDependOnExpectedTypeVisitor(WfLexicalScopeManager* _manager) IsExpressionDependOnExpectedTypeVisitor(WfLexicalScopeManager* _manager, bool _hasExpectedType)
:manager(_manager) :manager(_manager)
, hasExpectedType(_hasExpectedType)
{ {
} }
@@ -9576,7 +9578,7 @@ IsExpressionDependOnExpectedType(Expression)
void Visit(WfConstructorExpression* node)override void Visit(WfConstructorExpression* node)override
{ {
if (node->arguments.Count() == 0) if (hasExpectedType || node->arguments.Count() == 0)
{ {
result = true; result = true;
} }
@@ -9613,9 +9615,9 @@ IsExpressionDependOnExpectedType(Expression)
} }
}; };
bool IsExpressionDependOnExpectedType(WfLexicalScopeManager* manager, Ptr<WfExpression> expression) bool IsExpressionDependOnExpectedType(WfLexicalScopeManager* manager, Ptr<WfExpression> expression, bool hasExpectedType)
{ {
IsExpressionDependOnExpectedTypeVisitor visitor(manager); IsExpressionDependOnExpectedTypeVisitor visitor(manager, hasExpectedType);
expression->Accept(&visitor); expression->Accept(&visitor);
return visitor.result; return visitor.result;
} }
@@ -11081,7 +11083,7 @@ Helper Functions
List<Ptr<ITypeInfo>> types; List<Ptr<ITypeInfo>> types;
for (auto argument : arguments) for (auto argument : arguments)
{ {
if (!argument || IsExpressionDependOnExpectedType(manager, argument)) if (!argument || IsExpressionDependOnExpectedType(manager, argument, true))
{ {
resolvables.Add(false); resolvables.Add(false);
types.Add(nullptr); types.Add(nullptr);
@@ -12631,6 +12633,12 @@ ValidateSemantic(Expression)
indexType = TypeInfoRetriver<vint>::CreateTypeInfo(); indexType = TypeInfoRetriver<vint>::CreateTypeInfo();
resultType = CopyTypeInfo(genericType->GetGenericArgument(0)); resultType = CopyTypeInfo(genericType->GetGenericArgument(0));
} }
else if (classType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueArray>())
{
indexType = TypeInfoRetriver<vint>::CreateTypeInfo();
resultType = CopyTypeInfo(genericType->GetGenericArgument(0));
leftValue = true;
}
else if (classType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>()) else if (classType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>())
{ {
indexType = TypeInfoRetriver<vint>::CreateTypeInfo(); indexType = TypeInfoRetriver<vint>::CreateTypeInfo();
@@ -12666,6 +12674,12 @@ ValidateSemantic(Expression)
indexType = TypeInfoRetriver<vint>::CreateTypeInfo(); indexType = TypeInfoRetriver<vint>::CreateTypeInfo();
resultType = TypeInfoRetriver<Value>::CreateTypeInfo(); resultType = TypeInfoRetriver<Value>::CreateTypeInfo();
} }
else if (genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueArray>())
{
indexType = TypeInfoRetriver<vint>::CreateTypeInfo();
resultType = TypeInfoRetriver<Value>::CreateTypeInfo();
leftValue = true;
}
else if (genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>()) else if (genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>())
{ {
indexType = TypeInfoRetriver<vint>::CreateTypeInfo(); indexType = TypeInfoRetriver<vint>::CreateTypeInfo();
@@ -12767,7 +12781,7 @@ ValidateSemantic(Expression)
else if (node->op == WfBinaryOperator::FailedThen) else if (node->op == WfBinaryOperator::FailedThen)
{ {
Ptr<ITypeInfo> firstType = GetExpressionType(manager, node->first, 0); Ptr<ITypeInfo> firstType = GetExpressionType(manager, node->first, 0);
bool depend = IsExpressionDependOnExpectedType(manager, node->second); bool depend = IsExpressionDependOnExpectedType(manager, node->second, firstType);
Ptr<ITypeInfo> secondType = GetExpressionType(manager, node->second, (depend ? firstType : nullptr)); Ptr<ITypeInfo> secondType = GetExpressionType(manager, node->second, (depend ? firstType : nullptr));
if (firstType && secondType) if (firstType && secondType)
@@ -12978,8 +12992,8 @@ ValidateSemantic(Expression)
} }
else else
{ {
bool resolveFirst = !IsExpressionDependOnExpectedType(manager, node->trueBranch); bool resolveFirst = !IsExpressionDependOnExpectedType(manager, node->trueBranch, false);
bool resolveSecond = !IsExpressionDependOnExpectedType(manager, node->falseBranch); bool resolveSecond = !IsExpressionDependOnExpectedType(manager, node->falseBranch, false);
if (resolveFirst == resolveSecond) if (resolveFirst == resolveSecond)
{ {
@@ -13182,6 +13196,7 @@ ValidateSemantic(Expression)
} }
} }
else if (genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueObservableList>() else if (genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueObservableList>()
|| genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueArray>()
|| genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>() || genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>()
|| genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueReadonlyList>() || genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueReadonlyList>()
|| genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueEnumerable>()) || genericType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueEnumerable>())
@@ -13250,9 +13265,29 @@ ValidateSemantic(Expression)
if (keyType) if (keyType)
{ {
Ptr<ITypeInfo> classType; Ptr<ITypeInfo> classType;
if (expectedType && expectedType->GetTypeDescriptor()==description::GetTypeDescriptor<IValueObservableList>()) if (expectedType)
{ {
classType = MakePtr<TypeDescriptorTypeInfo>(description::GetTypeDescriptor<IValueObservableList>(), TypeInfoHint::Normal); switch (expectedType->GetHint())
{
case TypeInfoHint::ObservableList:
classType = MakePtr<TypeDescriptorTypeInfo>(description::GetTypeDescriptor<IValueObservableList>(), expectedType->GetHint());
break;
case TypeInfoHint::Array:
classType = MakePtr<TypeDescriptorTypeInfo>(description::GetTypeDescriptor<IValueArray>(), expectedType->GetHint());
break;
case TypeInfoHint::Normal:
if (expectedType->GetTypeDescriptor() == description::GetTypeDescriptor<IValueObservableList>())
{
classType = MakePtr<TypeDescriptorTypeInfo>(description::GetTypeDescriptor<IValueObservableList>(), expectedType->GetHint());
}
else
{
classType = MakePtr<TypeDescriptorTypeInfo>(description::GetTypeDescriptor<IValueList>(), expectedType->GetHint());
}
break;
default:
classType = MakePtr<TypeDescriptorTypeInfo>(description::GetTypeDescriptor<IValueList>(), expectedType->GetHint());
}
} }
else else
{ {
@@ -14450,7 +14485,7 @@ ValidateSemantic(Statement)
for (auto switchCase : node->caseBranches) for (auto switchCase : node->caseBranches)
{ {
Ptr<ITypeInfo> caseType; Ptr<ITypeInfo> caseType;
if (IsExpressionDependOnExpectedType(manager, switchCase->expression)) if (IsExpressionDependOnExpectedType(manager, switchCase->expression, type))
{ {
caseType = GetExpressionType(manager, switchCase->expression, type); caseType = GetExpressionType(manager, switchCase->expression, type);
} }
@@ -20149,7 +20184,25 @@ WfGenerateExpressionVisitor
} }
else else
{ {
if (result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>()) if (result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueArray>())
{
auto elementType = result.type->GetElementType()->GetGenericArgument(0);
writer.WriteString(L"(::vl::__vwsn::CreateArray().Resize(");
writer.WriteString(itow(node->arguments.Count()));
writer.WriteString(L")");
for (auto&& [argument, index] : indexed(node->arguments))
{
writer.WriteString(L".Set(");
writer.WriteString(itow(index));
writer.WriteString(L", ");
Call(argument->key);
writer.WriteString(L")");
}
writer.WriteString(L").list");
}
else if (result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>())
{ {
auto elementType = result.type->GetElementType()->GetGenericArgument(0); auto elementType = result.type->GetElementType()->GetGenericArgument(0);
writer.WriteString(L"(::vl::__vwsn::CreateList()"); writer.WriteString(L"(::vl::__vwsn::CreateList()");
@@ -25802,14 +25855,23 @@ GenerateInstructions(Expression)
} }
else if (result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueEnumerable>() else if (result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueEnumerable>()
|| result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueReadonlyList>() || result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueReadonlyList>()
|| result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>()) || result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueArray>())
{ {
Ptr<ITypeInfo> keyType = CopyTypeInfo(result.type->GetElementType()->GetGenericArgument(0)); Ptr<ITypeInfo> keyType = CopyTypeInfo(result.type->GetElementType()->GetGenericArgument(0));
for (auto argument : From(node->arguments).Reverse()) for (auto argument : From(node->arguments).Reverse())
{ {
GenerateExpressionInstructions(context, argument->key, keyType); GenerateExpressionInstructions(context, argument->key, keyType);
} }
INSTRUCTION(Ins::CreateArray(node->arguments.Count())); INSTRUCTION(Ins::NewArray(node->arguments.Count()));
}
else if (result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueList>())
{
Ptr<ITypeInfo> keyType = CopyTypeInfo(result.type->GetElementType()->GetGenericArgument(0));
for (auto argument : From(node->arguments).Reverse())
{
GenerateExpressionInstructions(context, argument->key, keyType);
}
INSTRUCTION(Ins::NewList(node->arguments.Count()));
} }
else if (result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueObservableList>()) else if (result.type->GetTypeDescriptor() == description::GetTypeDescriptor<IValueObservableList>())
{ {
@@ -25818,7 +25880,7 @@ GenerateInstructions(Expression)
{ {
GenerateExpressionInstructions(context, argument->key, keyType); GenerateExpressionInstructions(context, argument->key, keyType);
} }
INSTRUCTION(Ins::CreateObservableList(node->arguments.Count())); INSTRUCTION(Ins::NewObservableList(node->arguments.Count()));
} }
else else
{ {
@@ -25829,7 +25891,7 @@ GenerateInstructions(Expression)
GenerateExpressionInstructions(context, argument->key, keyType); GenerateExpressionInstructions(context, argument->key, keyType);
GenerateExpressionInstructions(context, argument->value, valueType); GenerateExpressionInstructions(context, argument->value, valueType);
} }
INSTRUCTION(Ins::CreateMap(node->arguments.Count() * 2)); INSTRUCTION(Ins::NewDictionary(node->arguments.Count() * 2));
} }
} }
+2 -2
View File
@@ -5,8 +5,8 @@ DEVELOPER: Zihan Chen(vczh)
#include "VlppWorkflowLibrary.h" #include "VlppWorkflowLibrary.h"
#include "VlppWorkflowRuntime.h" #include "VlppWorkflowRuntime.h"
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
#include "VlppParser.h" #include "VlppParser.h"
@@ -4267,7 +4267,7 @@ Type Analyzing
extern Ptr<reflection::description::ITypeInfo> CreateTypeInfoFromMethodInfo(reflection::description::IMethodInfo* info); extern Ptr<reflection::description::ITypeInfo> CreateTypeInfoFromMethodInfo(reflection::description::IMethodInfo* info);
extern bool IsExpressionDependOnExpectedType(WfLexicalScopeManager* manager, Ptr<WfExpression> expression); extern bool IsExpressionDependOnExpectedType(WfLexicalScopeManager* manager, Ptr<WfExpression> expression, bool hasExpectedType);
extern WString GetExpressionName(Ptr<WfExpression> expression); extern WString GetExpressionName(Ptr<WfExpression> expression);
extern void SearchOrderedName(WfLexicalScope* scope, Ptr<WfExpression> expression, collections::SortedList<vint>& names); extern void SearchOrderedName(WfLexicalScope* scope, Ptr<WfExpression> expression, collections::SortedList<vint>& names);
+14
View File
@@ -13,6 +13,20 @@ namespace vl
namespace __vwsn namespace __vwsn
{ {
/***********************************************************************
CreateArray
***********************************************************************/
CreateArray::CreateArray()
:list(IValueArray::Create())
{
}
CreateArray::CreateArray(Ptr<IValueArray> _list)
:list(_list)
{
}
/*********************************************************************** /***********************************************************************
CreateList CreateList
***********************************************************************/ ***********************************************************************/
+32 -9
View File
@@ -3,8 +3,8 @@ THIS FILE IS AUTOMATICALLY GENERATED. DO NOT MODIFY
DEVELOPER: Zihan Chen(vczh) DEVELOPER: Zihan Chen(vczh)
***********************************************************************/ ***********************************************************************/
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
/*********************************************************************** /***********************************************************************
@@ -149,16 +149,16 @@ namespace vl
} }
template<typename T> template<typename T>
reflection::description::Value Box(const T& value) reflection::description::Value Box(T&& value)
{ {
return reflection::description::BoxParameter<std::remove_cvref_t<T>>(const_cast<T&>(value)); return reflection::description::BoxParameter(value);
} }
template<typename T> template<typename T>
T Unbox(const reflection::description::Value& value) T Unbox(const reflection::description::Value& value)
{ {
T result; T result;
reflection::description::UnboxParameter<std::remove_cvref_t<T>>(value, result); reflection::description::UnboxParameter(value, result);
return result; return result;
} }
@@ -224,23 +224,46 @@ namespace vl
} }
template<typename T, typename U> template<typename T, typename U>
Ptr<T> UnboxCollection(const U& value) Ptr<T> UnboxCollection(U&& value)
{ {
auto boxedValue = reflection::description::BoxParameter<U>(const_cast<U&>(value)); auto boxedValue = reflection::description::BoxParameter(value);
Ptr<T> result; Ptr<T> result;
reflection::description::UnboxParameter<Ptr<T>>(boxedValue, result); reflection::description::UnboxParameter(boxedValue, result);
return result; return result;
} }
template<typename T, typename U> template<typename T, typename U>
Ptr<T> UnboxCollection(const collections::LazyList<U>& value) Ptr<T> UnboxCollection(const collections::LazyList<U>& value)
{ {
auto boxedValue = reflection::description::BoxParameter<collections::LazyList<U>>(const_cast<collections::LazyList<U>&>(value)); auto boxedValue = reflection::description::BoxParameter(const_cast<collections::LazyList<U>&>(value));
Ptr<T> result; Ptr<T> result;
reflection::description::UnboxParameter<Ptr<T>>(boxedValue, result); reflection::description::UnboxParameter(boxedValue, result);
return result; return result;
} }
struct CreateArray
{
using IValueArray = reflection::description::IValueArray;
Ptr<IValueArray> list;
CreateArray();
CreateArray(Ptr<IValueArray> _list);
CreateArray Resize(vint size)
{
list->Resize(size);
return{ list };
}
template<typename T>
CreateArray Set(vint index, const T& value)
{
list->Set(index, Box(value));
return{ list };
}
};
struct CreateList struct CreateList
{ {
using IValueList = reflection::description::IValueList; using IValueList = reflection::description::IValueList;
+19 -3
View File
@@ -3627,7 +3627,23 @@ WfRuntimeThreadContext
} }
return WfRuntimeExecutionAction::ExitStackFrame; return WfRuntimeExecutionAction::ExitStackFrame;
} }
case WfInsCode::CreateArray: case WfInsCode::NewArray:
{
auto list = IValueArray::Create();
if (ins.countParameter > 0)
{
list->Resize(ins.countParameter);
Value operand;
for (vint i = 0; i < ins.countParameter; i++)
{
CONTEXT_ACTION(PopValue(operand), L"failed to pop a value from the stack.");
list->Set(i, operand);
}
}
CONTEXT_ACTION(PushValue(Value::From(list)), L"failed to push a value to the stack.");
return WfRuntimeExecutionAction::ExecuteInstruction;
}
case WfInsCode::NewList:
{ {
auto list = IValueList::Create(); auto list = IValueList::Create();
Value operand; Value operand;
@@ -3639,7 +3655,7 @@ WfRuntimeThreadContext
CONTEXT_ACTION(PushValue(Value::From(list)), L"failed to push a value to the stack."); CONTEXT_ACTION(PushValue(Value::From(list)), L"failed to push a value to the stack.");
return WfRuntimeExecutionAction::ExecuteInstruction; return WfRuntimeExecutionAction::ExecuteInstruction;
} }
case WfInsCode::CreateObservableList: case WfInsCode::NewObservableList:
{ {
auto list = IValueObservableList::Create(); auto list = IValueObservableList::Create();
Value operand; Value operand;
@@ -3651,7 +3667,7 @@ WfRuntimeThreadContext
CONTEXT_ACTION(PushValue(Value::From(list)), L"failed to push a value to the stack."); CONTEXT_ACTION(PushValue(Value::From(list)), L"failed to push a value to the stack.");
return WfRuntimeExecutionAction::ExecuteInstruction; return WfRuntimeExecutionAction::ExecuteInstruction;
} }
case WfInsCode::CreateMap: case WfInsCode::NewDictionary:
{ {
auto map = IValueDictionary::Create(); auto map = IValueDictionary::Create();
Value key, value; Value key, value;
+10 -8
View File
@@ -4,8 +4,8 @@ DEVELOPER: Zihan Chen(vczh)
***********************************************************************/ ***********************************************************************/
#include "VlppParser.h" #include "VlppParser.h"
#include "VlppReflection.h" #include "VlppReflection.h"
#include "VlppOS.h"
#include "Vlpp.h" #include "Vlpp.h"
#include "VlppOS.h"
#include "VlppRegex.h" #include "VlppRegex.h"
/*********************************************************************** /***********************************************************************
@@ -53,9 +53,10 @@ Instruction
Duplicate, // count : () -> Value ; copy stack[stack.Count()-1-count] Duplicate, // count : () -> Value ; copy stack[stack.Count()-1-count]
Pop, // : Value -> () ; Pop, // : Value -> () ;
Return, // : Value -> Value ; (exit function) Return, // : Value -> Value ; (exit function)
CreateArray, // count : Value-count, ..., Value-1 -> <array> ; {1 2 3} -> <3 2 1> NewArray, // count : Value-count, ..., Value-1 -> <array> ; {1 2 3} -> <3 2 1>
CreateObservableList, // count : Value-count, ..., Value-1 -> <observable-list> ; {1 2 3} -> <3 2 1> NewList, // count : Value-count, ..., Value-1 -> <array> ; {1 2 3} -> <3 2 1>
CreateMap, // count : Value-count*2, ..., Value-1 -> <map> ; {1:2 3:4} -> <3 4 1 2> NewObservableList, // count : Value-count, ..., Value-1 -> <observable-list> ; {1 2 3} -> <3 2 1>
NewDictionary, // count : Value-count*2, ..., Value-1 -> <map> ; {1:2 3:4} -> <3 4 1 2>
CreateClosureContext, // count : Value-1, ..., Value-count -> <closure-context> ; CreateClosureContext, // count : Value-1, ..., Value-count -> <closure-context> ;
CreateClosure, // : <closure-context>, Value-function-index -> <closure> ; CreateClosure, // : <closure-context>, Value-function-index -> <closure> ;
CreateInterface, // IMethodInfo*, count : <closure-context>, Value-count, ..., Value-1 -> <map> ; {"Get":a "Set":b} -> new TInterface(InterfaceProxy^) CreateInterface, // IMethodInfo*, count : <closure-context>, Value-count, ..., Value-1 -> <map> ; {"Get":a "Set":b} -> new TInterface(InterfaceProxy^)
@@ -126,9 +127,10 @@ Instruction
APPLY_COUNT(Duplicate)\ APPLY_COUNT(Duplicate)\
APPLY(Pop)\ APPLY(Pop)\
APPLY(Return)\ APPLY(Return)\
APPLY_COUNT(CreateArray)\ APPLY_COUNT(NewArray)\
APPLY_COUNT(CreateObservableList)\ APPLY_COUNT(NewList)\
APPLY_COUNT(CreateMap)\ APPLY_COUNT(NewObservableList)\
APPLY_COUNT(NewDictionary)\
APPLY_COUNT(CreateClosureContext)\ APPLY_COUNT(CreateClosureContext)\
APPLY(CreateClosure)\ APPLY(CreateClosure)\
APPLY_METHOD_COUNT(CreateInterface)\ APPLY_METHOD_COUNT(CreateInterface)\
@@ -1815,7 +1817,7 @@ Helper Functions
{ {
auto proxy = LoadFunction(context, name); auto proxy = LoadFunction(context, name);
Func<TFunction> function; Func<TFunction> function;
reflection::description::UnboxParameter<Func<TFunction>>(reflection::description::Value::From(proxy), function); reflection::description::UnboxParameter(reflection::description::Value::From(proxy), function);
return function; return function;
} }
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.