From 8ac6831cdfd111ab6004d410113b717a12ea5ca4 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Wed, 6 Sep 2017 20:41:54 +0500 Subject: [PATCH] Rename editor::ide to editor::ide_base (https://github.com/Xottab-DUTY/xray-16/issues/1) --- src/Include/editor/ide.hpp | 2 +- src/Include/editor/interfaces.hpp | 6 +++--- src/editors/xrWeatherEditor/entry_point.cpp | 11 +++++------ src/editors/xrWeatherEditor/ide_impl.hpp | 2 +- src/editors/xrWeatherEditor/window_ide.cpp | 2 +- src/editors/xrWeatherEditor/window_ide.h | 6 +++--- src/editors/xrWeatherEditor/window_weather_editor.h | 11 +++++------ src/xrEngine/device.h | 4 ++-- src/xrEngine/editor_environment_weathers_manager.cpp | 8 ++++---- src/xrEngine/ide.hpp | 4 ++-- 10 files changed, 27 insertions(+), 29 deletions(-) diff --git a/src/Include/editor/ide.hpp b/src/Include/editor/ide.hpp index c84866ed192..d9c777969a5 100644 --- a/src/Include/editor/ide.hpp +++ b/src/Include/editor/ide.hpp @@ -21,7 +21,7 @@ class property_holder_holder; namespace editor { -class ide +class ide_base { public: virtual HWND main_handle() = 0; diff --git a/src/Include/editor/interfaces.hpp b/src/Include/editor/interfaces.hpp index e4c3d4a99e7..c3028c39701 100644 --- a/src/Include/editor/interfaces.hpp +++ b/src/Include/editor/interfaces.hpp @@ -11,11 +11,11 @@ namespace editor { -class ide; +class ide_base; class engine; -typedef void(__cdecl* initialize_function_ptr)(ide*&, engine*); -typedef void(__cdecl* finalize_function_ptr)(ide*&); +typedef void(__cdecl* initialize_function_ptr)(ide_base*&, engine*); +typedef void(__cdecl* finalize_function_ptr)(ide_base*&); } // namespace editor diff --git a/src/editors/xrWeatherEditor/entry_point.cpp b/src/editors/xrWeatherEditor/entry_point.cpp index 9e1c61c7c88..c29f8fd80d9 100644 --- a/src/editors/xrWeatherEditor/entry_point.cpp +++ b/src/editors/xrWeatherEditor/entry_point.cpp @@ -10,11 +10,10 @@ #pragma comment(lib, "user32.lib") -private -ref class window_ide_final : public editor::window_ide +private ref class window_ide_final : public editor::window_ide { public: - window_ide_final(editor::ide*& ide, editor::engine* engine) : editor::window_ide(engine) + window_ide_final(editor::ide_base*& ide, editor::engine* engine) : editor::window_ide(engine) { m_ide = ide; Application::Idle += gcnew System::EventHandler(this, &window_ide_final::on_idle); @@ -61,7 +60,7 @@ ref class window_ide_final : public editor::window_ide ide_impl* g_ide = nullptr; -static void initialize_impl(editor::ide*& ide, editor::engine* engine) +static void initialize_impl(editor::ide_base*& ide, editor::engine* engine) { VERIFY(!g_ide); g_ide = new ide_impl(engine); @@ -74,13 +73,13 @@ static void initialize_impl(editor::ide*& ide, editor::engine* engine) WINOLEAPI CoInitializeEx(IN LPVOID pvReserved, IN DWORD dwCoInit); #pragma comment(lib, "ole32.lib") -extern "C" __declspec(dllexport) void initialize(editor::ide*& ide, editor::engine* engine) +extern "C" __declspec(dllexport) void initialize(editor::ide_base*& ide, editor::engine* engine) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); initialize_impl(ide, engine); } -extern "C" __declspec(dllexport) void finalize(editor::ide*& ide) +extern "C" __declspec(dllexport) void finalize(editor::ide_base*& ide) { delete (ide); ide = nullptr; diff --git a/src/editors/xrWeatherEditor/ide_impl.hpp b/src/editors/xrWeatherEditor/ide_impl.hpp index 38b78058538..e9e565b46c4 100644 --- a/src/editors/xrWeatherEditor/ide_impl.hpp +++ b/src/editors/xrWeatherEditor/ide_impl.hpp @@ -25,7 +25,7 @@ class engine; class property_holder_holder; } // namespace editor -class ide_impl : public editor::ide +class ide_impl : public editor::ide_base { public: typedef editor::window_ide window_ide; diff --git a/src/editors/xrWeatherEditor/window_ide.cpp b/src/editors/xrWeatherEditor/window_ide.cpp index 479bbdbfb59..afbbfdb4fb3 100644 --- a/src/editors/xrWeatherEditor/window_ide.cpp +++ b/src/editors/xrWeatherEditor/window_ide.cpp @@ -111,7 +111,7 @@ Void window_ide::window_ide_FormClosing(System::Object ^ sender, System::Windows m_engine->disconnect(); } -editor::ide& window_ide::ide() +editor::ide_base& window_ide::ide() { VERIFY(m_ide); return (*m_ide); diff --git a/src/editors/xrWeatherEditor/window_ide.h b/src/editors/xrWeatherEditor/window_ide.h index 5021a9230cb..4e85961f767 100644 --- a/src/editors/xrWeatherEditor/window_ide.h +++ b/src/editors/xrWeatherEditor/window_ide.h @@ -23,7 +23,7 @@ interface class IDockContent; namespace editor { class engine; -class ide; +class ide_base; ref class window_view; ref class window_levels; @@ -128,10 +128,10 @@ ref class window_ide : public System::Windows::Forms::Form window_weather_editor ^ m_weather_editor; protected: - editor::ide* m_ide; + editor::ide_base* m_ide; public: - editor::ide& ide(); + editor::ide_base& ide(); window_view % view(); editor::engine& engine(); diff --git a/src/editors/xrWeatherEditor/window_weather_editor.h b/src/editors/xrWeatherEditor/window_weather_editor.h index bab21e76724..ee4c5c54756 100644 --- a/src/editors/xrWeatherEditor/window_weather_editor.h +++ b/src/editors/xrWeatherEditor/window_weather_editor.h @@ -22,8 +22,7 @@ ref class window_ide; /// the designers will not be able to interact properly with localized /// resources associated with this form. /// -public -ref class window_weather_editor : public WeifenLuo::WinFormsUI::DockContent +public ref class window_weather_editor : public WeifenLuo::WinFormsUI::DockContent { public: window_weather_editor(window_ide ^ ide, engine* engine) @@ -949,10 +948,10 @@ ref class window_weather_editor : public WeifenLuo::WinFormsUI::DockContent } #pragma endregion public: - typedef ::editor::ide::weathers_getter_type weathers_getter_type; - typedef ::editor::ide::weathers_size_getter_type weathers_size_getter_type; - typedef ::editor::ide::frames_getter_type frames_getter_type; - typedef ::editor::ide::frames_size_getter_type frames_size_getter_type; + typedef editor::ide_base::weathers_getter_type weathers_getter_type; + typedef editor::ide_base::weathers_size_getter_type weathers_size_getter_type; + typedef editor::ide_base::frames_getter_type frames_getter_type; + typedef editor::ide_base::frames_size_getter_type frames_size_getter_type; public: void weathers_ids(weathers_getter_type const& weathers_getter, diff --git a/src/xrEngine/device.h b/src/xrEngine/device.h index d36d766e226..545152a80c5 100644 --- a/src/xrEngine/device.h +++ b/src/xrEngine/device.h @@ -261,7 +261,7 @@ class ENGINE_API CRenderDevice : public CRenderDeviceBase virtual void RemoveSeqFrame(pureFrame* f); #ifdef INGAME_EDITOR public: - IC editor::ide* editor() const { return m_editor; } + IC editor::ide_base* editor() const { return m_editor; } private: void initialize_editor(); void message_loop_editor(); @@ -272,7 +272,7 @@ class ENGINE_API CRenderDevice : public CRenderDeviceBase HMODULE m_editor_module; initialize_function_ptr m_editor_initialize; finalize_function_ptr m_editor_finalize; - editor::ide* m_editor; + editor::ide_base* m_editor; engine_impl* m_engine; #endif // #ifdef INGAME_EDITOR }; diff --git a/src/xrEngine/editor_environment_weathers_manager.cpp b/src/xrEngine/editor_environment_weathers_manager.cpp index 0221e64008b..4ba8d75dedc 100644 --- a/src/xrEngine/editor_environment_weathers_manager.cpp +++ b/src/xrEngine/editor_environment_weathers_manager.cpp @@ -149,19 +149,19 @@ void manager::fill(property_holder_type* holder) VERIFY(holder); holder->add_property("weathers", "weathers", "this option is resposible for weathers", m_collection); - typedef ::editor::ide::weathers_getter_type weathers_getter_type; + typedef ::editor::ide_base::weathers_getter_type weathers_getter_type; weathers_getter_type weathers_getter; weathers_getter.bind(this, &manager::weathers_getter); - typedef ::editor::ide::weathers_size_getter_type weathers_size_getter_type; + typedef ::editor::ide_base::weathers_size_getter_type weathers_size_getter_type; weathers_size_getter_type weathers_size_getter; weathers_size_getter.bind(this, &manager::weathers_size_getter); - typedef ::editor::ide::frames_getter_type frames_getter_type; + typedef ::editor::ide_base::frames_getter_type frames_getter_type; frames_getter_type frames_getter; frames_getter.bind(this, &manager::frames_getter); - typedef ::editor::ide::frames_size_getter_type frames_size_getter_type; + typedef ::editor::ide_base::frames_size_getter_type frames_size_getter_type; frames_size_getter_type frames_size_getter; frames_size_getter.bind(this, &manager::frames_size_getter); diff --git a/src/xrEngine/ide.hpp b/src/xrEngine/ide.hpp index 621b291e8eb..8036fff188b 100644 --- a/src/xrEngine/ide.hpp +++ b/src/xrEngine/ide.hpp @@ -15,10 +15,10 @@ namespace editor { -class ide; +class ide_base; } // namespace editor -inline editor::ide& ide() +inline editor::ide_base& ide() { VERIFY(Device.editor()); return (*Device.editor());