diff --git a/Import/GacUI.cpp b/Import/GacUI.cpp index b7952fe1..84b0f584 100644 --- a/Import/GacUI.cpp +++ b/Import/GacUI.cpp @@ -1631,11 +1631,11 @@ GuiButton { switch (arguments.code) { - case VKEY::_RETURN: + case VKEY::KEY_RETURN: CheckAndClick(arguments); arguments.handled = true; break; - case VKEY::_SPACE: + case VKEY::KEY_SPACE: if (!arguments.autoRepeatKeyDown) { keyPressing = true; @@ -1654,7 +1654,7 @@ GuiButton { switch (arguments.code) { - case VKEY::_SPACE: + case VKEY::KEY_SPACE: if (keyPressing) { keyPressing = false; @@ -2021,20 +2021,20 @@ GuiTab switch (hint) { case TabPageOrder::LeftToRight: - if (arguments.code == VKEY::_LEFT) tabOffset = -1; - else if (arguments.code == VKEY::_RIGHT) tabOffset = 1; + if (arguments.code == VKEY::KEY_LEFT) tabOffset = -1; + else if (arguments.code == VKEY::KEY_RIGHT) tabOffset = 1; break; case TabPageOrder::RightToLeft: - if (arguments.code == VKEY::_LEFT) tabOffset = 1; - else if (arguments.code == VKEY::_RIGHT) tabOffset = -1; + if (arguments.code == VKEY::KEY_LEFT) tabOffset = 1; + else if (arguments.code == VKEY::KEY_RIGHT) tabOffset = -1; break; case TabPageOrder::TopToBottom: - if (arguments.code == VKEY::_UP) tabOffset = -1; - else if (arguments.code == VKEY::_DOWN) tabOffset = 1; + if (arguments.code == VKEY::KEY_UP) tabOffset = -1; + else if (arguments.code == VKEY::KEY_DOWN) tabOffset = 1; break; case TabPageOrder::BottomToTop: - if (arguments.code == VKEY::_UP) tabOffset = 1; - else if (arguments.code == VKEY::_DOWN) tabOffset = -1; + if (arguments.code == VKEY::KEY_UP) tabOffset = 1; + else if (arguments.code == VKEY::KEY_DOWN) tabOffset = -1; break; default:; } @@ -3391,29 +3391,29 @@ GuiScroll { switch (arguments.code) { - case VKEY::_HOME: + case VKEY::KEY_HOME: SetPosition(GetMinPosition()); arguments.handled = true; break; - case VKEY::_END: + case VKEY::KEY_END: SetPosition(GetMaxPosition()); arguments.handled = true; break; - case VKEY::_PRIOR: + case VKEY::KEY_PRIOR: commandExecutor->BigDecrease(); arguments.handled = true; break; - case VKEY::_NEXT: + case VKEY::KEY_NEXT: commandExecutor->BigIncrease(); arguments.handled = true; break; - case VKEY::_LEFT: - case VKEY::_UP: + case VKEY::KEY_LEFT: + case VKEY::KEY_UP: commandExecutor->SmallDecrease(); arguments.handled = true; break; - case VKEY::_RIGHT: - case VKEY::_DOWN: + case VKEY::KEY_RIGHT: + case VKEY::KEY_DOWN: commandExecutor->SmallIncrease(); arguments.handled = true; break; @@ -6952,10 +6952,10 @@ GuiComboBoxListControl { switch (arguments.code) { - case VKEY::_RETURN: + case VKEY::KEY_RETURN: DisplaySelectedContent(containedListControl->GetSelectedItemIndex()); arguments.handled = true; - case VKEY::_ESCAPE: + case VKEY::KEY_ESCAPE: GetSubMenu()->Hide(); arguments.handled = true; break; @@ -7658,7 +7658,7 @@ GuiVirtualDataGrid { if (selectedCell.row != -1) { - if (arguments.code == VKEY::_RETURN) + if (arguments.code == VKEY::KEY_RETURN) { RequestSaveData(); SelectCell(selectedCell, !currentEditor); @@ -7669,7 +7669,7 @@ GuiVirtualDataGrid } arguments.handled = true; } - else if (arguments.code == VKEY::_ESCAPE) + else if (arguments.code == VKEY::KEY_ESCAPE) { if (currentEditor) { @@ -7683,11 +7683,11 @@ GuiVirtualDataGrid vint columnOffset = 0; switch (arguments.code) { - case VKEY::_LEFT: + case VKEY::KEY_LEFT: columnOffset = -1; arguments.handled = true; break; - case VKEY::_RIGHT: + case VKEY::KEY_RIGHT: columnOffset = 1; arguments.handled = true; break; @@ -10263,28 +10263,28 @@ GuiSelectableListControl KeyDirection keyDirection = KeyDirection::Up; switch (code) { - case VKEY::_UP: + case VKEY::KEY_UP: keyDirection = KeyDirection::Up; break; - case VKEY::_DOWN: + case VKEY::KEY_DOWN: keyDirection = KeyDirection::Down; break; - case VKEY::_LEFT: + case VKEY::KEY_LEFT: keyDirection = KeyDirection::Left; break; - case VKEY::_RIGHT: + case VKEY::KEY_RIGHT: keyDirection = KeyDirection::Right; break; - case VKEY::_HOME: + case VKEY::KEY_HOME: keyDirection = KeyDirection::Home; break; - case VKEY::_END: + case VKEY::KEY_END: keyDirection = KeyDirection::End; break; - case VKEY::_PRIOR: + case VKEY::KEY_PRIOR: keyDirection = KeyDirection::PageUp; break; - case VKEY::_NEXT: + case VKEY::KEY_NEXT: keyDirection = KeyDirection::PageDown; break; default: @@ -15179,31 +15179,31 @@ GuiDocumentCommonInterface switch(code) { - case VKEY::_UP: + case VKEY::KEY_UP: { TextPos newCaret=documentElement->CalculateCaret(currentCaret, IGuiGraphicsParagraph::CaretMoveUp, frontSide); Move(newCaret, shift, frontSide); } break; - case VKEY::_DOWN: + case VKEY::KEY_DOWN: { TextPos newCaret=documentElement->CalculateCaret(currentCaret, IGuiGraphicsParagraph::CaretMoveDown, frontSide); Move(newCaret, shift, frontSide); } break; - case VKEY::_LEFT: + case VKEY::KEY_LEFT: { TextPos newCaret=documentElement->CalculateCaret(currentCaret, IGuiGraphicsParagraph::CaretMoveLeft, frontSide); Move(newCaret, shift, frontSide); } break; - case VKEY::_RIGHT: + case VKEY::KEY_RIGHT: { TextPos newCaret=documentElement->CalculateCaret(currentCaret, IGuiGraphicsParagraph::CaretMoveRight, frontSide); Move(newCaret, shift, frontSide); } break; - case VKEY::_HOME: + case VKEY::KEY_HOME: { TextPos newCaret=documentElement->CalculateCaret(currentCaret, IGuiGraphicsParagraph::CaretLineFirst, frontSide); if(newCaret==currentCaret) @@ -15213,7 +15213,7 @@ GuiDocumentCommonInterface Move(newCaret, shift, frontSide); } break; - case VKEY::_END: + case VKEY::KEY_END: { TextPos newCaret=documentElement->CalculateCaret(currentCaret, IGuiGraphicsParagraph::CaretLineLast, frontSide); if(newCaret==currentCaret) @@ -15223,39 +15223,39 @@ GuiDocumentCommonInterface Move(newCaret, shift, frontSide); } break; - case VKEY::_PRIOR: + case VKEY::KEY_PRIOR: { } break; - case VKEY::_NEXT: + case VKEY::KEY_NEXT: { } break; - case VKEY::_BACK: + case VKEY::KEY_BACK: if(editMode==Editable) { if(begin==end) { - ProcessKey(VKEY::_LEFT, true, false); + ProcessKey(VKEY::KEY_LEFT, true, false); } Array text; EditText(documentElement->GetCaretBegin(), documentElement->GetCaretEnd(), documentElement->IsCaretEndPreferFrontSide(), text); return true; } break; - case VKEY::_DELETE: + case VKEY::KEY_DELETE: if(editMode==Editable) { if(begin==end) { - ProcessKey(VKEY::_RIGHT, true, false); + ProcessKey(VKEY::KEY_RIGHT, true, false); } Array text; EditText(documentElement->GetCaretBegin(), documentElement->GetCaretEnd(), documentElement->IsCaretEndPreferFrontSide(), text); return true; } break; - case VKEY::_RETURN: + case VKEY::KEY_RETURN: if(editMode==Editable) { if(ctrl) @@ -15519,10 +15519,10 @@ GuiDocumentCommonInterface if (documentControl->GetVisuallyEnabled()) { if (editMode == Editable && - arguments.code != (wchar_t)VKEY::_ESCAPE && - arguments.code != (wchar_t)VKEY::_BACK && - arguments.code != (wchar_t)VKEY::_RETURN && - (arguments.code != (wchar_t)VKEY::_TAB || documentControl->GetAcceptTabInput()) && + arguments.code != (wchar_t)VKEY::KEY_ESCAPE && + arguments.code != (wchar_t)VKEY::KEY_BACK && + arguments.code != (wchar_t)VKEY::KEY_RETURN && + (arguments.code != (wchar_t)VKEY::KEY_TAB || documentControl->GetAcceptTabInput()) && !arguments.ctrl) { Array text(1); @@ -15735,12 +15735,12 @@ GuiDocumentCommonInterface undoRedoProcessor=new GuiDocumentUndoRedoProcessor; internalShortcutKeyManager=new GuiShortcutKeyManager; - AddShortcutCommand(VKEY::_Z, Func(this, &GuiDocumentCommonInterface::Undo)); - AddShortcutCommand(VKEY::_Y, Func(this, &GuiDocumentCommonInterface::Redo)); - AddShortcutCommand(VKEY::_A, Func(this, &GuiDocumentCommonInterface::SelectAll)); - AddShortcutCommand(VKEY::_X, Func(this, &GuiDocumentCommonInterface::Cut)); - AddShortcutCommand(VKEY::_C, Func(this, &GuiDocumentCommonInterface::Copy)); - AddShortcutCommand(VKEY::_V, Func(this, &GuiDocumentCommonInterface::Paste)); + AddShortcutCommand(VKEY::KEY_Z, Func(this, &GuiDocumentCommonInterface::Undo)); + AddShortcutCommand(VKEY::KEY_Y, Func(this, &GuiDocumentCommonInterface::Redo)); + AddShortcutCommand(VKEY::KEY_A, Func(this, &GuiDocumentCommonInterface::SelectAll)); + AddShortcutCommand(VKEY::KEY_X, Func(this, &GuiDocumentCommonInterface::Cut)); + AddShortcutCommand(VKEY::KEY_C, Func(this, &GuiDocumentCommonInterface::Copy)); + AddShortcutCommand(VKEY::KEY_V, Func(this, &GuiDocumentCommonInterface::Paste)); } GuiDocumentCommonInterface::~GuiDocumentCommonInterface() @@ -16653,14 +16653,14 @@ GuiTextBoxCommonInterface TextPos end=textElement->GetCaretEnd(); switch(code) { - case VKEY::_ESCAPE: + case VKEY::KEY_ESCAPE: if(autoComplete && autoComplete->IsListOpening() && !shift && !ctrl) { autoComplete->CloseList(); return true; } break; - case VKEY::_RETURN: + case VKEY::KEY_RETURN: if(autoComplete && autoComplete->IsListOpening() && !shift && !ctrl) { if(autoComplete->ApplySelectedListItem()) @@ -16670,7 +16670,7 @@ GuiTextBoxCommonInterface } } break; - case VKEY::_UP: + case VKEY::KEY_UP: if(autoComplete && autoComplete->IsListOpening() && !shift && !ctrl) { autoComplete->SelectPreviousListItem(); @@ -16681,7 +16681,7 @@ GuiTextBoxCommonInterface Move(end, shift); } return true; - case VKEY::_DOWN: + case VKEY::KEY_DOWN: if(autoComplete && autoComplete->IsListOpening() && !shift && !ctrl) { autoComplete->SelectNextListItem(); @@ -16692,7 +16692,7 @@ GuiTextBoxCommonInterface Move(end, shift); } return true; - case VKEY::_LEFT: + case VKEY::KEY_LEFT: { if(ctrl) { @@ -16717,7 +16717,7 @@ GuiTextBoxCommonInterface } } return true; - case VKEY::_RIGHT: + case VKEY::KEY_RIGHT: { if(ctrl) { @@ -16741,7 +16741,7 @@ GuiTextBoxCommonInterface } } return true; - case VKEY::_HOME: + case VKEY::KEY_HOME: { if(ctrl) { @@ -16754,7 +16754,7 @@ GuiTextBoxCommonInterface } } return true; - case VKEY::_END: + case VKEY::KEY_END: { if(ctrl) { @@ -16764,60 +16764,60 @@ GuiTextBoxCommonInterface Move(end, shift); } return true; - case VKEY::_PRIOR: + case VKEY::KEY_PRIOR: { end.row-=callback->GetPageRows(); Move(end, shift); } return true; - case VKEY::_NEXT: + case VKEY::KEY_NEXT: { end.row+=callback->GetPageRows(); Move(end, shift); } return true; - case VKEY::_BACK: + case VKEY::KEY_BACK: if(!readonly) { if(ctrl && !shift) { - ProcessKey(VKEY::_LEFT, true, true); - ProcessKey(VKEY::_BACK, false, false); + ProcessKey(VKEY::KEY_LEFT, true, true); + ProcessKey(VKEY::KEY_BACK, false, false); } else if(!ctrl && shift) { - ProcessKey(VKEY::_UP, true, false); - ProcessKey(VKEY::_BACK, false, false); + ProcessKey(VKEY::KEY_UP, true, false); + ProcessKey(VKEY::KEY_BACK, false, false); } else { if(begin==end) { - ProcessKey(VKEY::_LEFT, true, false); + ProcessKey(VKEY::KEY_LEFT, true, false); } SetSelectionTextAsKeyInput(L""); } return true; } break; - case VKEY::_DELETE: + case VKEY::KEY_DELETE: if(!readonly) { if(ctrl && !shift) { - ProcessKey(VKEY::_RIGHT, true, true); - ProcessKey(VKEY::_DELETE, false, false); + ProcessKey(VKEY::KEY_RIGHT, true, true); + ProcessKey(VKEY::KEY_DELETE, false, false); } else if(!ctrl && shift) { - ProcessKey(VKEY::_DOWN, true, false); - ProcessKey(VKEY::_DELETE, false, false); + ProcessKey(VKEY::KEY_DOWN, true, false); + ProcessKey(VKEY::KEY_DELETE, false, false); } else { if(begin==end) { - ProcessKey(VKEY::_RIGHT, true, false); + ProcessKey(VKEY::KEY_RIGHT, true, false); } SetSelectionTextAsKeyInput(L""); } @@ -16893,7 +16893,7 @@ GuiTextBoxCommonInterface if (preventEnterDueToAutoComplete) { preventEnterDueToAutoComplete = false; - if (arguments.code == (wchar_t)VKEY::_RETURN) + if (arguments.code == (wchar_t)VKEY::KEY_RETURN) { return; } @@ -16901,9 +16901,9 @@ GuiTextBoxCommonInterface if (textControl->GetVisuallyEnabled() && arguments.compositionSource == arguments.eventSource) { if (!readonly && - arguments.code != (wchar_t)VKEY::_ESCAPE && - arguments.code != (wchar_t)VKEY::_BACK && - (arguments.code != (wchar_t)VKEY::_TAB || textControl->GetAcceptTabInput()) && + arguments.code != (wchar_t)VKEY::KEY_ESCAPE && + arguments.code != (wchar_t)VKEY::KEY_BACK && + (arguments.code != (wchar_t)VKEY::KEY_TAB || textControl->GetAcceptTabInput()) && !arguments.ctrl) { SetSelectionTextAsKeyInput(WString::FromChar(arguments.code)); @@ -17027,12 +17027,12 @@ GuiTextBoxCommonInterface AttachTextEditCallback(undoRedoProcessor); internalShortcutKeyManager=new GuiShortcutKeyManager; - AddShortcutCommand(VKEY::_Z, Func(this, &GuiTextBoxCommonInterface::Undo)); - AddShortcutCommand(VKEY::_Y, Func(this, &GuiTextBoxCommonInterface::Redo)); - AddShortcutCommand(VKEY::_A, Func(this, &GuiTextBoxCommonInterface::SelectAll)); - AddShortcutCommand(VKEY::_X, Func(this, &GuiTextBoxCommonInterface::Cut)); - AddShortcutCommand(VKEY::_C, Func(this, &GuiTextBoxCommonInterface::Copy)); - AddShortcutCommand(VKEY::_V, Func(this, &GuiTextBoxCommonInterface::Paste)); + AddShortcutCommand(VKEY::KEY_Z, Func(this, &GuiTextBoxCommonInterface::Undo)); + AddShortcutCommand(VKEY::KEY_Y, Func(this, &GuiTextBoxCommonInterface::Redo)); + AddShortcutCommand(VKEY::KEY_A, Func(this, &GuiTextBoxCommonInterface::SelectAll)); + AddShortcutCommand(VKEY::KEY_X, Func(this, &GuiTextBoxCommonInterface::Cut)); + AddShortcutCommand(VKEY::KEY_C, Func(this, &GuiTextBoxCommonInterface::Copy)); + AddShortcutCommand(VKEY::KEY_V, Func(this, &GuiTextBoxCommonInterface::Paste)); } GuiTextBoxCommonInterface::~GuiTextBoxCommonInterface() @@ -23595,7 +23595,7 @@ GuiToolstripCommand::ShortcutBuilder Parser WString name = match->Groups()[L"key"][0].Value(); builder->key = GetCurrentController()->InputService()->GetKey(name); - return builder->key == VKEY::_UNKNOWN ? nullptr : builder; + return builder->key == VKEY::KEY_UNKNOWN ? nullptr : builder; } }; @@ -32180,7 +32180,7 @@ GuiGraphicsHost { if (altActionManager->SysKeyUp(info)) { return; } - if (!info.ctrl && !info.shift && info.code == VKEY::_MENU && hostRecord.nativeWindow) + if (!info.ctrl && !info.shift && info.code == VKEY::KEY_MENU && hostRecord.nativeWindow) { if (hostRecord.nativeWindow) { @@ -32783,24 +32783,24 @@ GuiAltActionManager { if (!info.ctrl && !info.shift && currentAltHost) { - if (info.code == VKEY::_ESCAPE) + if (info.code == VKEY::KEY_ESCAPE) { LeaveAltHost(); return true; } - else if (info.code == VKEY::_BACK) + else if (info.code == VKEY::KEY_BACK) { LeaveAltKey(); } - else if (VKEY::_NUMPAD0 <= info.code && info.code <= VKEY::_NUMPAD9) + else if (VKEY::KEY_NUMPAD0 <= info.code && info.code <= VKEY::KEY_NUMPAD9) { - if (EnterAltKey((wchar_t)(L'0' + ((vint)info.code - (vint)VKEY::_NUMPAD0)))) + if (EnterAltKey((wchar_t)(L'0' + ((vint)info.code - (vint)VKEY::KEY_NUMPAD0)))) { supressAltKey = info.code; return true; } } - else if ((VKEY::_0 <= info.code && info.code <= VKEY::_9) || (VKEY::_A <= info.code && info.code <= VKEY::_Z)) + else if ((VKEY::KEY_0 <= info.code && info.code <= VKEY::KEY_9) || (VKEY::KEY_A <= info.code && info.code <= VKEY::KEY_Z)) { if (EnterAltKey((wchar_t)info.code)) { @@ -32821,7 +32821,7 @@ GuiAltActionManager { if (!info.ctrl && !info.shift && info.code == supressAltKey) { - supressAltKey = VKEY::_UNKNOWN; + supressAltKey = VKEY::KEY_UNKNOWN; return true; } return false; @@ -32829,7 +32829,7 @@ GuiAltActionManager bool GuiAltActionManager::SysKeyDown(const NativeWindowKeyInfo& info) { - if (!info.ctrl && !info.shift && info.code == VKEY::_MENU && !currentAltHost) + if (!info.ctrl && !info.shift && info.code == VKEY::KEY_MENU && !currentAltHost) { if (auto altHost = controlHost->QueryTypedService()) { @@ -32854,7 +32854,7 @@ GuiAltActionManager bool GuiAltActionManager::Char(const NativeWindowCharInfo& info) { - if (currentAltHost || supressAltKey != VKEY::_UNKNOWN) + if (currentAltHost || supressAltKey != VKEY::KEY_UNKNOWN) { return true; } @@ -33130,7 +33130,7 @@ GuiTabActionManager bool GuiTabActionManager::KeyDown(const NativeWindowKeyInfo& info, GuiGraphicsComposition* focusedComposition) { - if (!info.ctrl && !info.alt && info.code == VKEY::_TAB) + if (!info.ctrl && !info.alt && info.code == VKEY::KEY_TAB) { GuiControl* focusedControl = nullptr; if (focusedComposition) @@ -39840,9 +39840,9 @@ GuiResource WString GuiResource::GetStringByPath(const WString& path) { - Ptr> result=GetValueByPath(path).Cast>(); + Ptr result=GetValueByPath(path).Cast(); if(!result) throw ArgumentException(L"Path not exists.", L"GuiResource::GetStringByPath", L"path"); - return result->Unbox(); + return result->GetText(); } /*********************************************************************** diff --git a/Import/GacUI.h b/Import/GacUI.h index 48892a13..eb07db7f 100644 --- a/Import/GacUI.h +++ b/Import/GacUI.h @@ -978,10 +978,10 @@ ITEM(BACKSLASH, 0xDC) /* OEM_5 */ \ ITEM(LEFT_BRACKET, 0xDD) /* OEM_6 */ \ ITEM(APOSTROPHE, 0xDE) /* OEM_7 */ \ -#define GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM(NAME, CODE) _##NAME = CODE, +#define GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM(NAME, CODE) KEY_##NAME = CODE, enum class VKEY { - _UNKNOWN = -1, + KEY_UNKNOWN = -1, GUI_DEFINE_KEYBOARD_CODE(GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM) }; #undef GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM @@ -5905,7 +5905,7 @@ Alt-Combined Shortcut Key Interfaces Helpers AltActionMap currentActiveAltActions; AltControlMap currentActiveAltTitles; WString currentAltPrefix; - VKEY supressAltKey = VKEY::_UNKNOWN; + VKEY supressAltKey = VKEY::KEY_UNKNOWN; void EnterAltHost(IGuiAltActionHost* host); void LeaveAltHost(); @@ -9838,11 +9838,11 @@ namespace vl namespace controls { - template + template struct QueryServiceHelper; template - struct QueryServiceHelper::YesNoType> + struct QueryServiceHelper>> { static WString GetIdentifier() { @@ -9851,7 +9851,7 @@ namespace vl }; template - struct QueryServiceHelper::YesNoType> + struct QueryServiceHelper>> { static WString GetIdentifier() { diff --git a/Import/GacUICompiler.cpp b/Import/GacUICompiler.cpp index a9a0babe..67f21cc3 100644 --- a/Import/GacUICompiler.cpp +++ b/Import/GacUICompiler.cpp @@ -9705,7 +9705,7 @@ FindInstanceLoadingSource template auto FindByTag(Ptr context, GlobalStringKey namespaceName, const WString& typeName, TCallback callback) - -> typename RemoveCVR::Type + -> std::remove_cvref_t { vint index = context->namespaces.Keys().IndexOf(namespaceName); if (index != -1) diff --git a/Import/GacUIReflection.cpp b/Import/GacUIReflection.cpp index 74bac742..17ee2c31 100644 --- a/Import/GacUIReflection.cpp +++ b/Import/GacUIReflection.cpp @@ -361,9 +361,9 @@ Type Declaration STRUCT_MEMBER(verticalAntialias) END_STRUCT_MEMBER(FontProperties) -#define GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM(NAME, CODE) ENUM_CLASS_ITEM(_##NAME) +#define GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM(NAME, CODE) ENUM_CLASS_ITEM(KEY_##NAME) BEGIN_ENUM_ITEM(VKEY) - ENUM_CLASS_ITEM(_UNKNOWN) + ENUM_CLASS_ITEM(KEY_UNKNOWN) GUI_DEFINE_KEYBOARD_CODE(GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM) END_ENUM_ITEM(VKEY) #undef GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM diff --git a/Import/GacUIWindows.cpp b/Import/GacUIWindows.cpp index 0052cff6..02dc28a4 100644 --- a/Import/GacUIWindows.cpp +++ b/Import/GacUIWindows.cpp @@ -8282,11 +8282,11 @@ WindowsForm if (nonClient) { - info.ctrl = WinIsKeyPressing(VKEY::_CONTROL); - info.shift = WinIsKeyPressing(VKEY::_SHIFT); - info.left= WinIsKeyPressing(VKEY::_LBUTTON); - info.middle= WinIsKeyPressing(VKEY::_MBUTTON); - info.right = WinIsKeyPressing(VKEY::_RBUTTON); + info.ctrl = WinIsKeyPressing(VKEY::KEY_CONTROL); + info.shift = WinIsKeyPressing(VKEY::KEY_SHIFT); + info.left= WinIsKeyPressing(VKEY::KEY_LBUTTON); + info.middle= WinIsKeyPressing(VKEY::KEY_MBUTTON); + info.right = WinIsKeyPressing(VKEY::KEY_RBUTTON); POINTS point = MAKEPOINTS(lParam); NativePoint offset = GetClientBoundsInScreen().LeftTop(); @@ -8295,11 +8295,11 @@ WindowsForm } else { - info.ctrl=((VKEY)wParam & VKEY::_CONTROL)!=(VKEY)0; - info.shift=((VKEY)wParam & VKEY::_SHIFT)!= (VKEY)0; - info.left=((VKEY)wParam & VKEY::_LBUTTON)!= (VKEY)0; - info.middle=((VKEY)wParam & VKEY::_MBUTTON)!= (VKEY)0; - info.right=((VKEY)wParam & VKEY::_RBUTTON)!= (VKEY)0; + info.ctrl=((VKEY)wParam & VKEY::KEY_CONTROL)!=(VKEY)0; + info.shift=((VKEY)wParam & VKEY::KEY_SHIFT)!= (VKEY)0; + info.left=((VKEY)wParam & VKEY::KEY_LBUTTON)!= (VKEY)0; + info.middle=((VKEY)wParam & VKEY::KEY_MBUTTON)!= (VKEY)0; + info.right=((VKEY)wParam & VKEY::KEY_RBUTTON)!= (VKEY)0; POINTS point = MAKEPOINTS(lParam); @@ -8322,10 +8322,10 @@ WindowsForm { NativeWindowKeyInfo info; info.code=(VKEY)wParam; - info.ctrl=WinIsKeyPressing(VKEY::_CONTROL); - info.shift=WinIsKeyPressing(VKEY::_SHIFT); - info.alt=WinIsKeyPressing(VKEY::_MENU); - info.capslock=WinIsKeyToggled(VKEY::_CAPITAL); + info.ctrl=WinIsKeyPressing(VKEY::KEY_CONTROL); + info.shift=WinIsKeyPressing(VKEY::KEY_SHIFT); + info.alt=WinIsKeyPressing(VKEY::KEY_MENU); + info.capslock=WinIsKeyToggled(VKEY::KEY_CAPITAL); info.autoRepeatKeyDown = (((vuint32_t)lParam) >> 30) % 2 == 1; return info; } @@ -8334,10 +8334,10 @@ WindowsForm { NativeWindowCharInfo info; info.code=(wchar_t)wParam; - info.ctrl=WinIsKeyPressing(VKEY::_CONTROL); - info.shift=WinIsKeyPressing(VKEY::_SHIFT); - info.alt=WinIsKeyPressing(VKEY::_MENU); - info.capslock=WinIsKeyToggled(VKEY::_CAPITAL); + info.ctrl=WinIsKeyPressing(VKEY::KEY_CONTROL); + info.shift=WinIsKeyPressing(VKEY::KEY_SHIFT); + info.alt=WinIsKeyPressing(VKEY::KEY_MENU); + info.capslock=WinIsKeyToggled(VKEY::KEY_CAPITAL); return info; } #pragma pop_macro("_CONTROL") @@ -8772,7 +8772,7 @@ WindowsForm { NativeWindowKeyInfo info=ConvertKey(wParam, lParam); info.autoRepeatKeyDown = false; - if (supressingAlt && !info.ctrl && !info.shift && info.code == VKEY::_MENU) + if (supressingAlt && !info.ctrl && !info.shift && info.code == VKEY::KEY_MENU) { supressingAlt = false; break; @@ -8786,7 +8786,7 @@ WindowsForm case WM_SYSKEYDOWN: { NativeWindowKeyInfo info=ConvertKey(wParam, lParam); - if (supressingAlt && !info.ctrl && !info.shift && info.code == VKEY::_MENU) + if (supressingAlt && !info.ctrl && !info.shift && info.code == VKEY::KEY_MENU) { break; } @@ -14610,7 +14610,7 @@ WindowsInputService VKEY WindowsInputService::GetKey(const WString& name) { vint index = keys.Keys().IndexOf(name); - return index == -1 ? VKEY::_UNKNOWN : keys.Values()[index]; + return index == -1 ? VKEY::KEY_UNKNOWN : keys.Values()[index]; } } } diff --git a/Import/GacUIWindows.h b/Import/GacUIWindows.h index fe02d5dc..54cf1573 100644 --- a/Import/GacUIWindows.h +++ b/Import/GacUIWindows.h @@ -1453,18 +1453,6 @@ UniscribeColor } } - template<> - struct POD - { - static const bool Result=true; - }; - - template<> - struct POD - { - static const bool Result=true; - }; - namespace presentation { namespace elements_windows_gdi diff --git a/Import/Vlpp.cpp b/Import/Vlpp.cpp index f416d125..d544ce18 100644 --- a/Import/Vlpp.cpp +++ b/Import/Vlpp.cpp @@ -12,54 +12,168 @@ Author: Zihan Chen (vczh) Licensed under https://github.com/vczh-libraries/License ***********************************************************************/ -#include -#if defined VCZH_MSVC -#include -#elif defined VCZH_GCC -#include -#endif namespace vl { /*********************************************************************** -NotCopyable +Error ***********************************************************************/ - NotCopyable::NotCopyable() + Error::Error(const wchar_t* _description) { + description=_description; } - NotCopyable::NotCopyable(const NotCopyable&) + const wchar_t* Error::Description()const { + return description; } +} - NotCopyable& NotCopyable::operator=(const NotCopyable&) - { - return *this; - } /*********************************************************************** -Error +.\CONSOLE.CPP +***********************************************************************/ +/*********************************************************************** +Author: Zihan Chen (vczh) +Licensed under https://github.com/vczh-libraries/License ***********************************************************************/ - Error::Error(const wchar_t* _description) - { - description=_description; - } +#if defined VCZH_MSVC +#include +#elif defined VCZH_GCC +#include +#include +using namespace std; +#endif - const wchar_t* Error::Description()const +namespace vl +{ + namespace console { - return description; + +/*********************************************************************** +Console +***********************************************************************/ + + void Console::Write(const wchar_t* string, vint length) + { +#if defined VCZH_MSVC + HANDLE outHandle=GetStdHandle(STD_OUTPUT_HANDLE); + DWORD fileMode=0; + DWORD written=0; + if((GetFileType(outHandle) & FILE_TYPE_CHAR) && GetConsoleMode(outHandle, &fileMode)) + { + WriteConsole(outHandle, string, (int)length, &written,0); + } + else + { + int codePage = GetConsoleOutputCP(); + int charCount = WideCharToMultiByte(codePage, 0, string, -1, 0, 0, 0, 0); + char* codePageBuffer = new char[charCount]; + WideCharToMultiByte(codePage, 0, string, -1, codePageBuffer, charCount, 0, 0); + WriteFile(outHandle, codePageBuffer, charCount-1, &written, 0); + delete[] codePageBuffer; + } +#elif defined VCZH_GCC + wstring s(string, string+length); + wcout< +#if defined VCZH_MSVC +#elif defined VCZH_GCC +#include +#endif + +namespace vl +{ /*********************************************************************** DateTime @@ -262,139 +376,6 @@ DateTime return FromFileTime(filetime-milliseconds); #endif } - -/*********************************************************************** -Interface -***********************************************************************/ - - Interface::~Interface() - { - } -} - - -/*********************************************************************** -.\CONSOLE.CPP -***********************************************************************/ -/*********************************************************************** -Author: Zihan Chen (vczh) -Licensed under https://github.com/vczh-libraries/License -***********************************************************************/ - -#if defined VCZH_MSVC -#elif defined VCZH_GCC -#include -#include -using namespace std; -#endif - -namespace vl -{ - namespace console - { - -/*********************************************************************** -Console -***********************************************************************/ - - void Console::Write(const wchar_t* string, vint length) - { -#if defined VCZH_MSVC - HANDLE outHandle=GetStdHandle(STD_OUTPUT_HANDLE); - DWORD fileMode=0; - DWORD written=0; - if((GetFileType(outHandle) & FILE_TYPE_CHAR) && GetConsoleMode(outHandle, &fileMode)) - { - WriteConsole(outHandle, string, (int)length, &written,0); - } - else - { - int codePage = GetConsoleOutputCP(); - int charCount = WideCharToMultiByte(codePage, 0, string, -1, 0, 0, 0, 0); - char* codePageBuffer = new char[charCount]; - WideCharToMultiByte(codePage, 0, string, -1, codePageBuffer, charCount, 0, 0); - WriteFile(outHandle, codePageBuffer, charCount-1, &written, 0); - delete[] codePageBuffer; - } -#elif defined VCZH_GCC - wstring s(string, string+length); - wcout<(callback)); + SuppressCppFailure(std::forward(callback)); } __except (EXCEPTION_EXECUTE_HANDLER) { @@ -1681,7 +1662,7 @@ UnitTest { if (suppressFailure) { - SuppressCFailure(ForwardValue(callback)); + SuppressCFailure(std::forward(callback)); } else { diff --git a/Import/Vlpp.h b/Import/Vlpp.h index 34a5a1b1..8aa689e2 100644 --- a/Import/Vlpp.h +++ b/Import/Vlpp.h @@ -77,15 +77,18 @@ static_assert(false, "wchar_t configuration is not right."); #define _UI64_MAX ((vuint64_t)0xFFFFFFFFFFFFFFFFL) #endif +#include +#include + #define L_(x) L__(x) #define L__(x) L ## x namespace vl { - /*********************************************************************** - x86 and x64 Compatbility - ***********************************************************************/ +/*********************************************************************** +x86 and x64 Compatbility +***********************************************************************/ #if defined VCZH_MSVC /// 1-byte signed integer. @@ -167,19 +170,9 @@ namespace vl #endif #endif - /*********************************************************************** - Basic Types - ***********************************************************************/ - - /// Base type for all classes to stop generating default copy constructors. - class NotCopyable - { - private: - NotCopyable(const NotCopyable&); - NotCopyable& operator=(const NotCopyable&); - public: - NotCopyable(); - }; +/*********************************************************************** +Basic Types +***********************************************************************/ /// Base type of all errors. An error is an exception that is not recommended to catch. Raising it means there is a mistake in the code. class Error @@ -204,109 +197,11 @@ namespace vl if(bool __scope_variable_flag__=true)\ for(TYPE VARIABLE = VALUE;__scope_variable_flag__;__scope_variable_flag__=false) - /*********************************************************************** - Type Traits - ***********************************************************************/ - - template - struct RemoveReference - { - typedef T Type; - }; - - template - struct RemoveReference - { - typedef T Type; - }; - - template - struct RemoveReference - { - typedef T Type; - }; - - template - struct RemoveConst - { - typedef T Type; - }; - - template - struct RemoveConst - { - typedef T Type; - }; - - template - struct RemoveVolatile - { - typedef T Type; - }; - - template - struct RemoveVolatile - { - typedef T Type; - }; - - template - struct RemoveCVR - { - typedef T Type; - }; - - template - struct RemoveCVR - { - typedef typename RemoveCVR::Type Type; - }; - - template - struct RemoveCVR - { - typedef typename RemoveCVR::Type Type; - }; - - template - struct RemoveCVR - { - typedef typename RemoveCVR::Type Type; - }; - - template - struct RemoveCVR - { - typedef typename RemoveCVR::Type Type; - }; - - template - typename RemoveReference::Type&& MoveValue(T&& value) - { - return (typename RemoveReference::Type&&)value; - } - - template - T&& ForwardValue(typename RemoveReference::Type&& value) - { - return (T&&)value; - } - - template - T&& ForwardValue(typename RemoveReference::Type& value) - { - return (T&&)value; - } - template struct TypeTuple { }; - /*********************************************************************** - Basic Types - ***********************************************************************/ - /// /// Base type of all classes. /// This type has a virtual destructor, making all derived classes destructors virtual. @@ -315,72 +210,7 @@ namespace vl class Object { public: - virtual ~Object(); - }; - - /// Store data of a value type in a reference type object. It is useful when the data is required to be stored in a pointer to [T:vl.Object]. - /// boxed = MakePtr>(100); - /// vint unboxed = boxed.Cast>()->Unbox(); - /// Console::WriteLine(itow(unboxed)); - /// } - /// ]]> - /// Value type to use. - template - class ObjectBox : public Object - { - private: - T object; - public: - /// Create a boxed reference object from data of a value type. - /// The data to box. - ObjectBox(const T& _object) - :object(_object) - { - } - - /// Create a boxed reference object by moving data of a value type. - /// The data to move and box. - ObjectBox(T&& _object) - :object(MoveValue(_object)) - { - } - - /// Copy a boxed reference object. - /// The reference object to copy. - ObjectBox(const ObjectBox& value) = default; - - /// Move a boxed reference object. - /// The reference object to move. - ObjectBox(ObjectBox&& value) = default; - - /// Replace the boxed data of a value type. - /// The reference object itself. - /// The data to replace the original data. - ObjectBox& operator=(const T& _object) - { - object = _object; - return *this; - } - - /// Replace the boxed data from another reference object. - /// The reference object itself. - /// The reference object to copy. - ObjectBox& operator=(const ObjectBox& value) = default; - - /// Replace the boxed data by moving from another reference object. - /// The reference object itself. - /// The reference object to move. - ObjectBox& operator=(ObjectBox&& value) = default; - - /// Get the boxed data of a value type. - /// The unboxed data of a value type. - const T& Unbox() - { - return object; - } + virtual ~Object() = default; }; /// Type for representing nullable data. @@ -404,7 +234,7 @@ namespace vl /// Create a non-null value by moving data. /// The data to move. Nullable(T&& value) - :object(new T(MoveValue(value))) + :object(new T(std::move(value))) { } @@ -558,9 +388,9 @@ namespace vl char binary[sizeof(T) > minSize ? sizeof(T) : minSize]; }; - /*********************************************************************** - Type Traits - ***********************************************************************/ +/*********************************************************************** +Type Traits +***********************************************************************/ /// Type for specify and create a representative value for comparing another value of a specific type for containers. /// The element type for containers. @@ -580,38 +410,47 @@ namespace vl } }; - /// Test is a type a Plain-Old-Data type for containers. - /// The type to test. - template - struct POD +/*********************************************************************** +Interface +***********************************************************************/ + +#define NOT_COPYABLE(TYPE)\ + TYPE(const TYPE&) = delete;\ + TYPE(TYPE&&) = delete;\ + TYPE& operator=(const TYPE&) = delete;\ + TYPE& operator=(TYPE&&) = delete + + /// Base type of all interfaces. All interface types are encouraged to be virtual inherited. + class Interface { - /// Returns true if the type is a Plain-Old-Data type. - static const bool Result = false; + public: + NOT_COPYABLE(Interface); + + Interface() = default; + virtual ~Interface() = default; }; +} + +#endif + - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - template<>struct POD { static const bool Result = true; }; - templatestruct POD { static const bool Result = true; }; - templatestruct POD { static const bool Result = true; }; - templatestruct POD { static const bool Result = true; }; - templatestruct POD { static const bool Result = true; }; - templatestruct POD { static const bool Result = POD::Result; }; - templatestruct POD { static const bool Result = POD::Result; }; - templatestruct POD { static const bool Result = POD::Result; }; - templatestruct POD { static const bool Result = POD::Result; }; - - /*********************************************************************** - Date and Time - ***********************************************************************/ +/*********************************************************************** +.\DATETIME.H +***********************************************************************/ +/*********************************************************************** +Author: Zihan Chen (vczh) +Licensed under https://github.com/vczh-libraries/License +***********************************************************************/ + +#ifndef VCZH_DATETIME +#define VCZH_DATETIME + + +namespace vl +{ +/*********************************************************************** +Date and Time +***********************************************************************/ /// A type representing the combination of date and time. struct DateTime @@ -700,116 +539,6 @@ namespace vl bool operator>(const DateTime& value)const { return filetime > value.filetime; } bool operator>=(const DateTime& value)const { return filetime >= value.filetime; } }; - - /*********************************************************************** - Interface - ***********************************************************************/ - - /// Base type of all interfaces. All interface types are encouraged to be virtual inherited. - class Interface : private NotCopyable - { - public: - virtual ~Interface(); - }; - - /*********************************************************************** - Type Traits - ***********************************************************************/ - - struct YesType {}; - struct NoType {}; - - template - struct AcceptType - { - }; - - template - struct AcceptType - { - typedef T Type; - }; - - template - struct YesNoAnd - { - typedef NoType Type; - }; - - template<> - struct YesNoAnd - { - typedef YesType Type; - }; - - template - struct YesNoOr - { - typedef YesType Type; - }; - - template<> - struct YesNoOr - { - typedef NoType Type; - }; - - template - struct AcceptValue - { - static const bool Result = false; - }; - - template<> - struct AcceptValue - { - static const bool Result = true; - }; - - template - T ValueOf(); - - template - struct PointerConvertable - { - static YesType Test(TTo* value); - static NoType Test(void* value); - - typedef decltype(Test(ValueOf())) YesNoType; - }; - - template - struct ReturnConvertable - { - static YesType Test(TTo&& value); - static NoType Test(...); - - typedef decltype(Test(ValueOf())) YesNoType; - }; - - template - struct ReturnConvertable - { - typedef YesType YesNoType; - }; - - template - struct ReturnConvertable - { - typedef NoType YesNoType; - }; - - template<> - struct ReturnConvertable - { - typedef YesType YesNoType; - }; - - template - struct AcceptAlways - { - typedef T Type; - }; } #endif @@ -847,7 +576,7 @@ ReferenceCounterOperator /// [T:vl.Ptr`1] will always use [T:vl.YesType] as the second type parameter. /// This parameter is useful when you want to do partial specialization in the SFINAE way. /// - template + template struct ReferenceCounterOperator { /// Create the reference counter of an object. @@ -985,7 +714,7 @@ Ptr /// Cast a shared pointer implicitly by copying another shared pointer. /// The type of the object before casting. /// The shared pointer to cast. - template::YesNoType>::Type> + template>> Ptr(const Ptr& pointer) { if (auto converted = pointer.Obj()) @@ -1001,7 +730,7 @@ Ptr /// Cast a shared pointer implicitly by moving another shared pointer. /// The type of the object before casting. /// The shared pointer to cast. - template::YesNoType>::Type> + template>> Ptr(Ptr&& pointer) { if (auto converted = pointer.Obj()) @@ -1404,12 +1133,6 @@ Traits } }; - template - struct POD> - { - static const bool Result=false; - }; - template struct KeyType> { @@ -1420,12 +1143,6 @@ Traits return key.Obj(); } }; - - template - struct POD> - { - static const bool Result=false; - }; } #endif @@ -1524,7 +1241,7 @@ vl::Func R Invoke(TArgs&& ...args)override { - return function(ForwardValue(args)...); + return function(std::forward(args)...); } }; @@ -1546,7 +1263,7 @@ vl::Func R Invoke(TArgs&& ...args)override { - return (sender->*function)(ForwardValue(args)...); + return (sender->*function)(std::forward(args)...); } }; @@ -1565,13 +1282,13 @@ vl::Func } ObjectInvoker(C&& _function) - :function(MoveValue(_function)) + :function(std::move(_function)) { } R Invoke(TArgs&& ...args)override { - return function(ForwardValue(args)...); + return function(std::forward(args)...); } }; @@ -1590,13 +1307,13 @@ vl::Func } ObjectInvoker(C&& _function) - :function(MoveValue(_function)) + :function(std::move(_function)) { } void Invoke(TArgs&& ...args)override { - function(ForwardValue(args)...); + function(std::forward(args)...); } }; } @@ -1662,12 +1379,15 @@ vl::Func /// Create a functor from another compatible functor. /// Type of the functor to copy. /// The functor to copy. It could be a lambda expression, or any types that has operator() members. - template()(ValueOf()...)), R>::YesNoType>::Type> + template || + std::is_convertible_v()(std::declval()...)), R> + >> Func(C&& function) { if (!IsEmptyFunc(function)) { - invoker = new internal_invokers::ObjectInvoker::Type, R, TArgs...>(ForwardValue(function)); + invoker = new internal_invokers::ObjectInvoker, R, TArgs...>(std::forward(function)); } } @@ -1676,7 +1396,7 @@ vl::Func /// Arguments to invoke the function. R operator()(TArgs ...args)const { - return invoker->Invoke(ForwardValue(args)...); + return invoker->Invoke(std::forward(args)...); } Func& operator=(const Func& function) @@ -1687,7 +1407,7 @@ vl::Func Func& operator=(const Func&& function) { - invoker = MoveValue(function.invoker); + invoker = std::move(function.invoker); return *this; } @@ -1776,7 +1496,7 @@ vl::function_binding::Binding public: Binder(const Func& _target, T0 _firstArgument) :target(_target) - ,firstArgument(ForwardValue(_firstArgument)) + ,firstArgument(std::forward(_firstArgument)) { } @@ -2396,12 +2116,6 @@ namespace vl } }; } - - template - struct POD> - { - static const bool Result=POD::Result && POD::Result; - }; } #endif @@ -2592,10 +2306,8 @@ namespace vl Memory Management ***********************************************************************/ - template - class ListStore abstract : public Object - { - }; + template> + class ListStore; template class ListStore abstract : public Object @@ -2618,7 +2330,7 @@ Memory Management for (vint i = 0; i < count; i++) { - new(&ds[i])T(MoveValue(ss[i])); + new(&ds[i])T(std::move(ss[i])); } } @@ -2642,14 +2354,14 @@ Memory Management { for (vint i = 0; i < count; i++) { - ds[i] = MoveValue(ss[i]); + ds[i] = std::move(ss[i]); } } else if (ds > ss) { for (vint i = count - 1; i >= 0; i--) { - ds[i] = MoveValue(ss[i]); + ds[i] = std::move(ss[i]); } } } @@ -2735,7 +2447,7 @@ ArrayBase /// Base type of all linear container. /// Type of elements. template - class ArrayBase abstract : public ListStore::Result>, public virtual IEnumerable + class ArrayBase abstract : public ListStore, public virtual IEnumerable { protected: class Enumerator : public Object, public virtual IEnumerator @@ -3328,7 +3040,7 @@ Special Containers ***********************************************************************/ template - class PushOnlyAllocator : public Object, private NotCopyable + class PushOnlyAllocator : public Object { protected: vint blockSize; @@ -3336,6 +3048,8 @@ Special Containers List blocks; public: + NOT_COPYABLE(PushOnlyAllocator); + PushOnlyAllocator(vint _blockSize = 65536) :blockSize(_blockSize) , allocatedSize(0) @@ -3422,7 +3136,7 @@ Special Containers } template - class ByteObjectMap : public Object, private NotCopyable + class ByteObjectMap : public Object { public: typedef PushOnlyAllocator Allocator; @@ -3430,6 +3144,7 @@ Special Containers bom_helper::TreeNode* root = nullptr; public: + NOT_COPYABLE(ByteObjectMap); ByteObjectMap() = default; ~ByteObjectMap() = default; @@ -5636,7 +5351,7 @@ namespace vl /// An event for being subscribed using multiple callbacks. A callback is any functor that returns void. /// Types of callback parameters. template - class Event : public Object, private NotCopyable + class Event : public Object { protected: class EventHandlerImpl : public EventHandler @@ -5659,6 +5374,9 @@ namespace vl collections::SortedList> handlers; public: + NOT_COPYABLE(Event); + Event() = default; + /// Add a callback to the event. /// The event handler representing the callback. /// The callback. @@ -6325,7 +6043,7 @@ namespace vl str.length = _length; str.realLength = realLength; Inc(); - return MoveValue(str); + return std::move(str); } ObjectString ReplaceUnsafe(const ObjectString& source, vint index, vint count)const @@ -6343,7 +6061,7 @@ namespace vl memcpy(str.buffer + index, source.buffer + source.start, sizeof(T) * source.length); memcpy(str.buffer + index + source.length, (buffer + start + index + count), sizeof(T) * (length - index - count)); str.buffer[str.length] = 0; - return MoveValue(str); + return std::move(str); } public: static ObjectString Empty; @@ -6411,7 +6129,7 @@ namespace vl str.length = _length; str.realLength = _length; str.buffer = _buffer; - return MoveValue(str); + return std::move(str); } /// Create a string continaing one code point. @@ -6442,7 +6160,7 @@ namespace vl str.start = 0; str.length = _length; str.realLength = _length; - return MoveValue(str); + return std::move(str); } return {}; } @@ -6461,7 +6179,7 @@ namespace vl str.buffer = (T*)_buffer; str.length = CalculateLength(_buffer); str.realLength = str.length; - return MoveValue(str); + return std::move(str); } /// @@ -6482,7 +6200,7 @@ namespace vl str.length = _string.length; str.realLength = _string.realLength; str.Inc(); - return MoveValue(str); + return std::move(str); } /// @@ -8061,11 +7779,12 @@ namespace vl /// FinalizeGlobalStorage(); /// } /// ]]> - class GlobalStorage : public Object, private NotCopyable + class GlobalStorage : public Object { private: bool cleared = false; public: + NOT_COPYABLE(GlobalStorage); GlobalStorage(const wchar_t* key); ~GlobalStorage(); diff --git a/Import/VlppOS.h b/Import/VlppOS.h index 09839423..3c7f74f7 100644 --- a/Import/VlppOS.h +++ b/Import/VlppOS.h @@ -438,16 +438,17 @@ Kernel Mode Objects } /// Base type of all synchronization objects. - class WaitableObject : public Object, public NotCopyable + class WaitableObject : public Object { #if defined VCZH_MSVC private: threading_internal::WaitableData* waitableData; protected: - WaitableObject(); void SetData(threading_internal::WaitableData* data); public: + NOT_COPYABLE(WaitableObject); + /// Test if the object has already been created. Some of the synchronization objects should initialize itself after the constructor. /// Returns true if the object has already been created. /// This function is only available in Windows. @@ -712,12 +713,13 @@ Kernel Mode Objects in Process /// In Windows, enter a owned critical section will not result in dead lock. /// In Linux and macOS, it works like a mutex. /// - class CriticalSection : public Object, public NotCopyable + class CriticalSection : public Object { private: friend class ConditionVariable; threading_internal::CriticalSectionData* internalData; public: + NOT_COPYABLE(CriticalSection); /// Create a critical section. CriticalSection(); ~CriticalSection(); @@ -731,11 +733,12 @@ Kernel Mode Objects in Process void Leave(); public: - class Scope : public Object, public NotCopyable + class Scope : public Object { private: CriticalSection* criticalSection; public: + NOT_COPYABLE(Scope); Scope(CriticalSection& _criticalSection); ~Scope(); }; @@ -758,12 +761,13 @@ Kernel Mode Objects in Process /// } /// ]]> /// - class ReaderWriterLock : public Object, public NotCopyable + class ReaderWriterLock : public Object { private: friend class ConditionVariable; threading_internal::ReaderWriterLockData* internalData; public: + NOT_COPYABLE(ReaderWriterLock); /// Create a reader writer lock. ReaderWriterLock(); ~ReaderWriterLock(); @@ -783,31 +787,34 @@ Kernel Mode Objects in Process /// Release a writer lock. void LeaveWriter(); public: - class ReaderScope : public Object, public NotCopyable + class ReaderScope : public Object { private: ReaderWriterLock* lock; public: + NOT_COPYABLE(ReaderScope); ReaderScope(ReaderWriterLock& _lock); ~ReaderScope(); }; - class WriterScope : public Object, public NotCopyable + class WriterScope : public Object { private: ReaderWriterLock* lock; public: + NOT_COPYABLE(WriterScope); WriterScope(ReaderWriterLock& _lock); ~WriterScope(); }; }; /// Conditional variable. - class ConditionVariable : public Object, public NotCopyable + class ConditionVariable : public Object { private: threading_internal::ConditionVariableData* internalData; public: + NOT_COPYABLE(ConditionVariable); /// Create a conditional variable. ConditionVariable(); ~ConditionVariable(); @@ -868,11 +875,12 @@ User Mode Objects /// } /// ]]> /// - class SpinLock : public Object, public NotCopyable + class SpinLock : public Object { protected: volatile LockedInt token; public: + NOT_COPYABLE(SpinLock); /// Create a spin lock. SpinLock(); ~SpinLock(); @@ -886,11 +894,12 @@ User Mode Objects void Leave(); public: - class Scope : public Object, public NotCopyable + class Scope : public Object { private: SpinLock* spinLock; public: + NOT_COPYABLE(Scope); Scope(SpinLock& _spinLock); ~Scope(); }; @@ -910,7 +919,7 @@ Thread Local Storage /// This class is designed to define global variables. /// Dynamically allocation will result in undefined behavior. /// - class ThreadLocalStorage : public Object, private NotCopyable + class ThreadLocalStorage : public Object { typedef void(*Destructor)(void*); protected: @@ -920,6 +929,7 @@ Thread Local Storage static void PushStorage(ThreadLocalStorage* storage); public: + NOT_COPYABLE(ThreadLocalStorage); ThreadLocalStorage(Destructor _destructor); ~ThreadLocalStorage(); @@ -943,7 +953,7 @@ Thread Local Storage /// Dynamically allocation will result in undefined behavior. /// template - class ThreadVariable : public Object, private NotCopyable + class ThreadVariable : public Object { protected: ThreadLocalStorage storage; @@ -956,6 +966,8 @@ Thread Local Storage } } public: + NOT_COPYABLE(ThreadVariable); + /// Create a thread local variable. ThreadVariable() :storage(&Destructor) @@ -996,12 +1008,14 @@ Thread Local Storage }; template - class ThreadVariable : public Object, private NotCopyable + class ThreadVariable : public Object { protected: ThreadLocalStorage storage; public: + NOT_COPYABLE(ThreadVariable); + ThreadVariable() :storage(nullptr) { @@ -2517,9 +2531,12 @@ Text Related ***********************************************************************/ /// Text reader. All line breaks are normalized to CRLF regardless whatever in the input stream. - class TextReader : public Object, private NotCopyable + class TextReader : public Object { public: + NOT_COPYABLE(TextReader); + TextReader() = default; + /// Test does the reader reach the end or not. /// Returns true if the reader reaches the end. virtual bool IsEnd()=0; @@ -2539,9 +2556,12 @@ Text Related }; /// Text writer. - class TextWriter : public Object, private NotCopyable + class TextWriter : public Object { public: + NOT_COPYABLE(TextWriter); + TextWriter() = default; + /// Write a single character. /// The character to write. virtual void WriteChar(wchar_t c)=0; diff --git a/Import/VlppReflection.h b/Import/VlppReflection.h index 8a1f5dda..0d95310b 100644 --- a/Import/VlppReflection.h +++ b/Import/VlppReflection.h @@ -698,7 +698,7 @@ ReferenceCounterOperator } template - struct ReferenceCounterOperator::YesNoType> + struct ReferenceCounterOperator>> { static __forceinline volatile vint* CreateCounter(T* reference) { @@ -1833,7 +1833,7 @@ ValueType { private: template - static CompareResult ComparePrimitiveInternal(const U& a, const U& b, typename AcceptAlways::Compare)>::Type) + static CompareResult ComparePrimitiveInternal(const U& a, const U& b, std::enable_if_t::Compare)) >= 0, vint>) { return TypedValueSerializerProvider::Compare(a, b); } @@ -4072,7 +4072,7 @@ TypeInfoRetriver #ifndef VCZH_DEBUG_NO_REFLECTION static Ptr CreateTypeInfo() { - return DetailTypeInfoRetriver::Type, TypeFlag>::CreateTypeInfo(Hint); + return DetailTypeInfoRetriver, TypeFlag>::CreateTypeInfo(Hint); } #endif }; @@ -4094,7 +4094,7 @@ TypeInfoRetriver Helper Functions (BoxValue, UnboxValue) template Value BoxValue(const T& object, ITypeDescriptor* typeDescriptor=0) { - using Type = typename RemoveCVR::Type; + using Type = std::remove_cvref_t; return ValueAccessor::Decorator>::BoxValue(object, typeDescriptor); } @@ -4107,7 +4107,7 @@ TypeInfoRetriver Helper Functions (BoxValue, UnboxValue) template T UnboxValue(const Value& value, ITypeDescriptor* typeDescriptor=0, const WString& valueName=L"value") { - using Type = typename RemoveCVR::Type; + using Type = std::remove_cvref_t; return ValueAccessor::Decorator>::UnboxValue(value, typeDescriptor, valueName); } @@ -5774,7 +5774,7 @@ ValueFunctionProxyWrapper> template struct BoxedFunctionInvoker { - static Value Invoke(const Func& function, Ptr arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(const Func& function, Ptr arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(arguments, 0, args...); R result = function(args...); @@ -5785,7 +5785,7 @@ ValueFunctionProxyWrapper> template struct BoxedFunctionInvoker { - static Value Invoke(const Func& function, Ptr arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(const Func& function, Ptr arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(arguments, 0, args...); function(args...); @@ -5822,7 +5822,7 @@ ValueFunctionProxyWrapper> CHECK_FAIL(L"Argument count mismatch."); #endif } - return internal_helper::BoxedFunctionInvoker::Invoke(function, arguments, typename RemoveCVR::Type()...); + return internal_helper::BoxedFunctionInvoker::Invoke(function, arguments, std::remove_cvref_t()...); } }; @@ -5873,7 +5873,7 @@ ParameterAccessor> result=[functionProxy](TArgs ...args) { Ptr arguments = IValueList::Create(); - internal_helper::AddValueToList(arguments, ForwardValue(args)...); + internal_helper::AddValueToList(arguments, std::forward(args)...); typedef typename TypeInfoRetriver::TempValueType ResultType; ResultType proxyResult; description::UnboxParameter(functionProxy->Invoke(arguments), proxyResult); @@ -5928,7 +5928,7 @@ CustomConstructorInfoImpl template struct BoxedConstructorInvoker { - static Value Invoke(MethodInfoImpl* methodInfo, collections::Array& arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(MethodInfoImpl* methodInfo, collections::Array& arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(methodInfo, arguments, 0, args...); R result = new typename TypeInfoRetriver::Type(args...); @@ -5961,7 +5961,7 @@ CustomConstructorInfoImpl protected: Value InvokeInternal(const Value& thisObject, collections::Array& arguments)override { - return internal_helper::BoxedConstructorInvoker::Invoke(this, arguments, typename RemoveCVR::Type()...); + return internal_helper::BoxedConstructorInvoker::Invoke(this, arguments, std::remove_cvref_t()...); } Value CreateFunctionProxyInternal(const Value& thisObject)override @@ -5998,7 +5998,7 @@ CustomStaticMethodInfoImpl template struct BoxedMethodInvoker { - static Value Invoke(TClass* object, R(__thiscall TClass::* method)(TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(TClass* object, R(__thiscall TClass::* method)(TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(methodInfo, arguments, 0, args...); R result = (object->*method)(args...); @@ -6009,7 +6009,7 @@ CustomStaticMethodInfoImpl template struct BoxedMethodInvoker { - static Value Invoke(TClass* object, void(__thiscall TClass::* method)(TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(TClass* object, void(__thiscall TClass::* method)(TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(methodInfo, arguments, 0, args...); (object->*method)(args...); @@ -6020,7 +6020,7 @@ CustomStaticMethodInfoImpl template struct BoxedExternalMethodInvoker { - static Value Invoke(TClass* object, R(*method)(TClass*, TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(TClass* object, R(*method)(TClass*, TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(methodInfo, arguments, 0, args...); R result = method(object, args...); @@ -6031,7 +6031,7 @@ CustomStaticMethodInfoImpl template struct BoxedExternalMethodInvoker { - static Value Invoke(TClass* object, void(*method)(TClass*, TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(TClass* object, void(*method)(TClass*, TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(methodInfo, arguments, 0, args...); method(object, args...); @@ -6084,7 +6084,7 @@ CustomStaticMethodInfoImpl Value InvokeInternal(const Value& thisObject, collections::Array& arguments)override { TClass* object=UnboxValue(thisObject, GetOwnerTypeDescriptor(), L"thisObject"); - return internal_helper::BoxedMethodInvoker::Invoke(object, method, this, arguments, typename RemoveCVR::Type()...); + return internal_helper::BoxedMethodInvoker::Invoke(object, method, this, arguments, std::remove_cvref_t()...); } Value CreateFunctionProxyInternal(const Value& thisObject)override @@ -6111,7 +6111,7 @@ CustomStaticMethodInfoImpl Value InvokeInternal(const Value& thisObject, collections::Array& arguments)override { TClass* object=UnboxValue(thisObject, GetOwnerTypeDescriptor(), L"thisObject"); - return internal_helper::BoxedExternalMethodInvoker::Invoke(object, method, this, arguments, typename RemoveCVR::Type()...); + return internal_helper::BoxedExternalMethodInvoker::Invoke(object, method, this, arguments, std::remove_cvref_t()...); } Value CreateFunctionProxyInternal(const Value& thisObject)override @@ -6138,7 +6138,7 @@ CustomStaticMethodInfoImpl template struct BoxedStaticMethodInvoker { - static Value Invoke(R(* method)(TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(R(* method)(TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(methodInfo, arguments, 0, args...); R result = method(args...); @@ -6149,7 +6149,7 @@ CustomStaticMethodInfoImpl template struct BoxedStaticMethodInvoker { - static Value Invoke(void(* method)(TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, typename RemoveCVR::Type&& ...args) + static Value Invoke(void(* method)(TArgs...), MethodInfoImpl* methodInfo, collections::Array& arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(methodInfo, arguments, 0, args...); method(args...); @@ -6166,7 +6166,7 @@ CustomStaticMethodInfoImpl Value InvokeInternal(const Value& thisObject, collections::Array& arguments)override { - return internal_helper::BoxedStaticMethodInvoker::Invoke(method, this, arguments, typename RemoveCVR::Type()...); + return internal_helper::BoxedStaticMethodInvoker::Invoke(method, this, arguments, std::remove_cvref_t()...); } Value CreateFunctionProxyInternal(const Value& thisObject)override @@ -6192,7 +6192,7 @@ CustomEventInfoImpl template struct BoxedEventInvoker { - static void Invoke(Event& eventObject, Ptr arguments, typename RemoveCVR::Type&& ...args) + static void Invoke(Event& eventObject, Ptr arguments, std::remove_cvref_t&& ...args) { UnboxSpecifiedParameter(arguments, 0, args...); eventObject(args...); @@ -6213,7 +6213,7 @@ CustomEventInfoImpl auto func = Func([=](TArgs ...args) { auto arguments = IValueList::Create(); - internal_helper::AddValueToList(arguments, ForwardValue(args)...); + internal_helper::AddValueToList(arguments, std::forward(args)...); handler->Invoke(arguments); }); return EventHelper::Attach(eventObject, func); @@ -6230,7 +6230,7 @@ CustomEventInfoImpl { TClass* object = UnboxValue(Value::From(thisObject), GetOwnerTypeDescriptor(), L"thisObject"); Event& eventObject = object->*eventRef; - internal_helper::BoxedEventInvoker::Invoke(eventObject, arguments, typename RemoveCVR::Type()...); + internal_helper::BoxedEventInvoker::Invoke(eventObject, arguments, typename std::remove_cvref_t()...); } Ptr GetHandlerTypeInternal()override @@ -6545,13 +6545,13 @@ ParameterAccessor typeDescriptor = GetTypeDescriptor::Type>(); } #endif - using Type = typename vl::RemoveCVR::Type; + using Type = std::remove_cvref_t; return Value::From(new IValueType::TypedBox(object), typeDescriptor); } static T UnboxValue(const Value& value, ITypeDescriptor* typeDescriptor, const WString& valueName) { - using Type = typename vl::RemoveCVR::Type; + using Type = std::remove_cvref_t; if (auto unboxedValue = value.GetBoxedValue().Cast>()) { return unboxedValue->value; @@ -6911,7 +6911,7 @@ Class protected:\ bool IsAggregatable()override\ {\ - return AcceptValue>::YesNoType>::Result;\ + return std::is_convertible_v*>;\ }\ void LoadInternal()override\ { diff --git a/Import/VlppRegex.cpp b/Import/VlppRegex.cpp index c295ebd4..c031a8f2 100644 --- a/Import/VlppRegex.cpp +++ b/Import/VlppRegex.cpp @@ -3422,18 +3422,6 @@ Data Structures for Backtracking }; } - template<> - struct POD - { - static const bool Result = true; - }; - - template<> - struct POD - { - static const bool Result = true; - }; - namespace regex_internal { using namespace collections; diff --git a/Import/VlppRegex.h b/Import/VlppRegex.h index bb159a09..33918151 100644 --- a/Import/VlppRegex.h +++ b/Import/VlppRegex.h @@ -58,7 +58,7 @@ Data Structure }; /// A match produces by a . - class RegexMatch : public Object, private NotCopyable + class RegexMatch : public Object { friend class Regex; public: @@ -76,6 +76,7 @@ Data Structure RegexMatch(const WString& _string, regex_internal::RichResult* _result, regex_internal::RichInterpretor* _rich); RegexMatch(const RegexString& _result); public: + NOT_COPYABLE(RegexMatch); /// /// Test if this match is a succeeded match or a failed match. @@ -216,7 +217,7 @@ Regex /// Testing only returns a bool very indicating success or failure. ///

///
- class Regex : public Object, private NotCopyable + class Regex : public Object { protected: regex_internal::PureInterpretor* pure = nullptr; @@ -224,6 +225,7 @@ Regex void Process(const WString& text, bool keepEmpty, bool keepSuccess, bool keepFail, RegexMatch::List& matches)const; public: + NOT_COPYABLE(Regex); /// Create a regular expression. It will crash if the regular expression produces syntax error. /// The regular expression in a string. /// Set to true to use DFA if possible. @@ -1009,7 +1011,7 @@ Tokenizer }; /// Lexical analyzer. - class RegexLexer : public Object, private NotCopyable + class RegexLexer : public Object { protected: regex_internal::PureInterpretor* pure = nullptr; @@ -1018,6 +1020,7 @@ Tokenizer RegexProc proc; public: + NOT_COPYABLE(RegexLexer); /// Create a lexical analyzer by a set of regular expressions. [F:vl.regex.RegexToken.token] will be the index of the matched regular expression in the first argument. /// ALl regular expression, each one represent a kind of tokens. /// Configuration of all callbacks. @@ -1089,12 +1092,6 @@ Data Structure bool operator!=(wchar_t item)const; }; } - - template<> - struct POD - { - static const bool Result=true; - }; } #endif @@ -1231,9 +1228,12 @@ namespace vl Regex Expression AST ***********************************************************************/ - class Expression : public Object, private NotCopyable + class Expression : public Object { public: + NOT_COPYABLE(Expression); + Expression() = default; + typedef Ptr Ref; typedef collections::Dictionary Map; @@ -1342,7 +1342,7 @@ Regex Expression AST void Apply(IRegexExpressionAlgorithm& algorithm); }; - class RegexExpression : public Object, private NotCopyable + class RegexExpression : public Object { public: typedef Ptr Ref; @@ -1350,6 +1350,9 @@ Regex Expression AST Expression::Map definitions; // Named regex to be referred Expression::Ref expression; // Regex to match + NOT_COPYABLE(RegexExpression); + RegexExpression() = default; + Expression::Ref Merge(); }; @@ -1660,12 +1663,6 @@ namespace vl }; } - template<> - struct POD - { - static const bool Result=true; - }; - namespace regex_internal { class RichResult diff --git a/Import/VlppWorkflowCompiler.cpp b/Import/VlppWorkflowCompiler.cpp index 124ebe4a..d35fee1b 100644 --- a/Import/VlppWorkflowCompiler.cpp +++ b/Import/VlppWorkflowCompiler.cpp @@ -21515,9 +21515,9 @@ namespace vl writer.WriteLine(L";"); writer.WriteString(tryPrefix); - writer.WriteString(L"::vl::__vwsn::RunOnExit<::vl::RemoveCVR::Type> "); + writer.WriteString(L")>> "); writer.WriteString(blockName); writer.WriteString(L"_dtor(&"); writer.WriteString(blockName); diff --git a/Import/VlppWorkflowLibrary.h b/Import/VlppWorkflowLibrary.h index 69f4f660..ee87987f 100644 --- a/Import/VlppWorkflowLibrary.h +++ b/Import/VlppWorkflowLibrary.h @@ -67,14 +67,14 @@ namespace vl Ptr Ensure(Ptr&& pointer) { CHECK_ERROR(pointer != nullptr, L"The pointer cannot be null."); - return MoveValue(pointer); + return std::move(pointer); } template Nullable Ensure(Nullable&& nullable) { CHECK_ERROR(nullable, L"The pointer cannot be null."); - return MoveValue(nullable); + return std::move(nullable); } template @@ -87,18 +87,16 @@ namespace vl template WString ToString(const T& value) { - using Type = typename RemoveCVR::Type; WString str; - CHECK_ERROR(reflection::description::TypedValueSerializerProvider::Serialize(value, str), L"Failed to serialize."); + CHECK_ERROR(reflection::description::TypedValueSerializerProvider>::Serialize(value, str), L"Failed to serialize."); return str; } template T Parse(const WString& str) { - using Type = typename RemoveCVR::Type; T value; - CHECK_ERROR(reflection::description::TypedValueSerializerProvider::Deserialize(str, value), L"Failed to serialize."); + CHECK_ERROR(reflection::description::TypedValueSerializerProvider>::Deserialize(str, value), L"Failed to serialize."); return value; } @@ -153,16 +151,14 @@ namespace vl template reflection::description::Value Box(const T& value) { - using Type = typename RemoveCVR::Type; - return reflection::description::BoxParameter(const_cast(value)); + return reflection::description::BoxParameter>(const_cast(value)); } template T Unbox(const reflection::description::Value& value) { - using Type = typename RemoveCVR::Type; T result; - reflection::description::UnboxParameter(value, result); + reflection::description::UnboxParameter>(value, result); return result; } @@ -206,8 +202,7 @@ namespace vl template T UnboxWeak(const reflection::description::Value& value) { - using Type = typename RemoveCVR::Type; - return UnboxWeakHelper::Unbox(value); + return UnboxWeakHelper>::Unbox(value); } template diff --git a/Tools/CppMerge.exe b/Tools/CppMerge.exe index 5ab156a7..f5360065 100644 Binary files a/Tools/CppMerge.exe and b/Tools/CppMerge.exe differ diff --git a/Tools/GacGen32.exe b/Tools/GacGen32.exe index 9d856f21..c039d80c 100644 Binary files a/Tools/GacGen32.exe and b/Tools/GacGen32.exe differ diff --git a/Tools/GacGen64.exe b/Tools/GacGen64.exe index 3039c6d6..ab2bb5d7 100644 Binary files a/Tools/GacGen64.exe and b/Tools/GacGen64.exe differ diff --git a/Tools/ParserGen.exe b/Tools/ParserGen.exe index 3a2071cb..edf992a2 100644 Binary files a/Tools/ParserGen.exe and b/Tools/ParserGen.exe differ diff --git a/Tools/Reflection32.bin b/Tools/Reflection32.bin index 764af264..5110e9d4 100644 Binary files a/Tools/Reflection32.bin and b/Tools/Reflection32.bin differ diff --git a/Tools/Reflection64.bin b/Tools/Reflection64.bin index cc37de49..15525e6a 100644 Binary files a/Tools/Reflection64.bin and b/Tools/Reflection64.bin differ diff --git a/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x64 b/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x64 index 9499dde3..f647c1d1 100644 Binary files a/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x64 and b/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x64 differ diff --git a/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x86 b/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x86 index 77e22b17..ceb45e63 100644 Binary files a/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x86 and b/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x86 differ