mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-13 08:18:21 -05:00
Add base for menu eventhandlerset parsing
This commit is contained in:
@ -1,18 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
|
||||
#include "Domain/CommonFunctionDef.h"
|
||||
#include "Domain/CommonMenuDef.h"
|
||||
#include "Domain/MenuFeatureLevel.h"
|
||||
#include "Domain/EventHandler/CommonEventHandlerCondition.h"
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class MenuFileParserState
|
||||
{
|
||||
public:
|
||||
class EventHandlerConditionState
|
||||
{
|
||||
public:
|
||||
bool m_in_condition_elements;
|
||||
std::unique_ptr<CommonEventHandlerCondition> m_condition;
|
||||
|
||||
explicit EventHandlerConditionState(std::unique_ptr<CommonEventHandlerCondition> condition);
|
||||
};
|
||||
|
||||
const FeatureLevel m_feature_level;
|
||||
|
||||
std::vector<std::string> m_menus_to_load;
|
||||
@ -26,6 +39,11 @@ namespace menu
|
||||
std::unique_ptr<CommonFunctionDef> m_current_function;
|
||||
std::unique_ptr<CommonMenuDef> m_current_menu;
|
||||
std::unique_ptr<CommonItemDef> m_current_item;
|
||||
std::unique_ptr<CommonEventHandlerSet> m_current_event_handler_set;
|
||||
|
||||
std::function<void(MenuFileParserState* state, std::unique_ptr<CommonEventHandlerSet> value)> m_event_handler_set_callback;
|
||||
std::ostringstream m_current_script;
|
||||
std::stack<EventHandlerConditionState> m_current_condition;
|
||||
|
||||
explicit MenuFileParserState(FeatureLevel featureLevel);
|
||||
};
|
||||
|
Reference in New Issue
Block a user