Skip to content

Commit

Permalink
Reformat: Include
Browse files Browse the repository at this point in the history
  • Loading branch information
invokr committed Jan 15, 2017
1 parent 88a3f6a commit 5f64707
Show file tree
Hide file tree
Showing 32 changed files with 1,143 additions and 1,376 deletions.
97 changes: 46 additions & 51 deletions src/Include/editor/engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,71 +11,66 @@

class shared_str;

namespace editor {

namespace editor
{
class property_holder;

class engine {
class engine
{
public:
virtual bool on_message (
HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam,
LRESULT &result
) = 0;
virtual void on_idle () = 0;
virtual void on_resize () = 0;
virtual void pause (bool const &value) = 0;
virtual void capture_input (bool const &value) = 0;
virtual void disconnect () = 0;
// shared_str support
virtual void value (LPCSTR value, shared_str& result) = 0;
virtual LPCSTR value (shared_str const& value) = 0;

// weather editor
virtual bool on_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& result) = 0;
virtual void on_idle() = 0;
virtual void on_resize() = 0;
virtual void pause(bool const& value) = 0;
virtual void capture_input(bool const& value) = 0;
virtual void disconnect() = 0;
// shared_str support
virtual void value(LPCSTR value, shared_str& result) = 0;
virtual LPCSTR value(shared_str const& value) = 0;

// weather editor

public:
// weather
virtual void weather (LPCSTR value) = 0;
virtual LPCSTR weather () = 0;
// weather frame
virtual void current_weather_frame (LPCSTR frame_id) = 0;
virtual LPCSTR current_weather_frame () = 0;
// weather
virtual void weather(LPCSTR value) = 0;
virtual LPCSTR weather() = 0;
// weather frame
virtual void current_weather_frame(LPCSTR frame_id) = 0;
virtual LPCSTR current_weather_frame() = 0;

virtual void track_frame (float const& time) = 0;
virtual float track_frame () = 0;
virtual void track_frame(float const& time) = 0;
virtual float track_frame() = 0;

virtual void track_weather (float const& time) = 0;
virtual float track_weather () = 0;
virtual void track_weather(float const& time) = 0;
virtual float track_weather() = 0;

virtual property_holder* current_frame_property_holder () = 0;
virtual property_holder* blend_frame_property_holder () = 0;
virtual property_holder* target_frame_property_holder () = 0;
virtual property_holder* current_frame_property_holder() = 0;
virtual property_holder* blend_frame_property_holder() = 0;
virtual property_holder* target_frame_property_holder() = 0;

virtual void weather_paused (bool const &value) = 0;
virtual bool weather_paused () = 0;
virtual void weather_time_factor (float const &value) = 0;
virtual float weather_time_factor () = 0;
virtual void save_weathers () = 0;
virtual void weather_paused(bool const& value) = 0;
virtual bool weather_paused() = 0;
virtual void weather_time_factor(float const& value) = 0;
virtual float weather_time_factor() = 0;
virtual void save_weathers() = 0;

virtual bool save_time_frame (char* buffer, u32 const& buffer_size) = 0;
virtual bool save_time_frame(char* buffer, u32 const& buffer_size) = 0;

virtual bool paste_current_time_frame (char const* buffer, u32 const& buffer_size) = 0;
virtual bool paste_target_time_frame (char const* buffer, u32 const& buffer_size) = 0;
virtual bool paste_current_time_frame(char const* buffer, u32 const& buffer_size) = 0;
virtual bool paste_target_time_frame(char const* buffer, u32 const& buffer_size) = 0;

virtual void reload_current_time_frame () = 0;
virtual void reload_target_time_frame () = 0;
virtual void reload_current_time_frame() = 0;
virtual void reload_target_time_frame() = 0;

virtual void reload_current_weather () = 0;
virtual void reload_weathers () = 0;
virtual void reload_current_weather() = 0;
virtual void reload_weathers() = 0;

virtual bool add_time_frame (char const* buffer, u32 const& buffer_size) = 0;
virtual bool add_time_frame(char const* buffer, u32 const& buffer_size) = 0;

virtual char const* weather_current_time () const = 0;
virtual void weather_current_time (char const*) = 0;
}; // class engine
virtual char const* weather_current_time() const = 0;
virtual void weather_current_time(char const*) = 0;
}; // class engine

} // namespace editor
} // namespace editor

#endif // ifndef EDITOR_ENGINE_HPP_INCLUDED
#endif // ifndef EDITOR_ENGINE_HPP_INCLUDED
53 changes: 26 additions & 27 deletions src/Include/editor/ide.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,38 @@
#ifndef EDITOR_IDE_HPP_INCLUDED
#define EDITOR_IDE_HPP_INCLUDED

namespace editor {

namespace editor
{
class property_holder;
class property_holder_collection;
class property_holder_holder;

class ide {
class ide
{
public:
virtual HWND main_handle () = 0;
virtual HWND view_handle () = 0;
virtual void run () = 0;
virtual void on_load_finished () = 0;
virtual void pause () = 0;
virtual HWND main_handle() = 0;
virtual HWND view_handle() = 0;
virtual void run() = 0;
virtual void on_load_finished() = 0;
virtual void pause() = 0;

public:
virtual property_holder* create_property_holder (LPCSTR display_name, property_holder_collection* collection = 0, property_holder_holder* holder = 0) = 0;
virtual void destroy (property_holder *&property_holder) = 0;
virtual void environment_levels (property_holder *property_holder) = 0;
virtual void environment_weathers (property_holder *property_holder) = 0;
virtual property_holder* create_property_holder(
LPCSTR display_name, property_holder_collection* collection = 0, property_holder_holder* holder = 0) = 0;
virtual void destroy(property_holder*& property_holder) = 0;
virtual void environment_levels(property_holder* property_holder) = 0;
virtual void environment_weathers(property_holder* property_holder) = 0;

public:
typedef fastdelegate::FastDelegate0<LPCSTR const*> weathers_getter_type;
typedef fastdelegate::FastDelegate0<u32> weathers_size_getter_type;
typedef fastdelegate::FastDelegate1<LPCSTR, LPCSTR const*> frames_getter_type;
typedef fastdelegate::FastDelegate1<LPCSTR, u32> frames_size_getter_type;
virtual void weather_editor_setup (
weathers_getter_type const& weathers_getter,
weathers_size_getter_type const& weathers_size_getter,
frames_getter_type const& frames_getter,
frames_size_getter_type const& frames_size_getter
) = 0;
}; // class ide

} // namespace editor

#endif // ifndef EDITOR_IDE_HPP_INCLUDED
typedef fastdelegate::FastDelegate0<LPCSTR const*> weathers_getter_type;
typedef fastdelegate::FastDelegate0<u32> weathers_size_getter_type;
typedef fastdelegate::FastDelegate1<LPCSTR, LPCSTR const*> frames_getter_type;
typedef fastdelegate::FastDelegate1<LPCSTR, u32> frames_size_getter_type;
virtual void weather_editor_setup(weathers_getter_type const& weathers_getter,
weathers_size_getter_type const& weathers_size_getter, frames_getter_type const& frames_getter,
frames_size_getter_type const& frames_size_getter) = 0;
}; // class ide

} // namespace editor

#endif // ifndef EDITOR_IDE_HPP_INCLUDED
12 changes: 6 additions & 6 deletions src/Include/editor/interfaces.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
#ifndef EDITOR_INTERFACES_HPP_INCLUDED
#define EDITOR_INTERFACES_HPP_INCLUDED

namespace editor {

namespace editor
{
class ide;
class engine;

typedef void (__cdecl *initialize_function_ptr) (ide*&, engine*);
typedef void (__cdecl *finalize_function_ptr) (ide*&);
typedef void(__cdecl* initialize_function_ptr)(ide*&, engine*);
typedef void(__cdecl* finalize_function_ptr)(ide*&);

} // namespace editor
} // namespace editor

#endif // ifndef EDITOR_INTERFACES_HPP_INCLUDED
#endif // ifndef EDITOR_INTERFACES_HPP_INCLUDED
Loading

0 comments on commit 5f64707

Please sign in to comment.