mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Add base for menu parsing unit tests
This commit is contained in:
@ -13,7 +13,7 @@ CommonEventHandlerCondition::CommonEventHandlerCondition(std::unique_ptr<ICommon
|
||||
{
|
||||
}
|
||||
|
||||
CommonEventHandlerElementType CommonEventHandlerCondition::GetType()
|
||||
CommonEventHandlerElementType CommonEventHandlerCondition::GetType() const
|
||||
{
|
||||
return CommonEventHandlerElementType::CONDITION;
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ namespace menu
|
||||
std::unique_ptr<CommonEventHandlerSet> m_else_elements;
|
||||
|
||||
CommonEventHandlerCondition();
|
||||
explicit CommonEventHandlerCondition(std::unique_ptr<ICommonExpression> condition, std::unique_ptr<CommonEventHandlerSet> conditionElements,
|
||||
std::unique_ptr<CommonEventHandlerSet> elseElements);
|
||||
CommonEventHandlerCondition(std::unique_ptr<ICommonExpression> condition, std::unique_ptr<CommonEventHandlerSet> conditionElements,
|
||||
std::unique_ptr<CommonEventHandlerSet> elseElements);
|
||||
|
||||
CommonEventHandlerElementType GetType() override;
|
||||
_NODISCARD CommonEventHandlerElementType GetType() const override;
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ CommonEventHandlerScript::CommonEventHandlerScript(std::string script)
|
||||
{
|
||||
}
|
||||
|
||||
CommonEventHandlerElementType CommonEventHandlerScript::GetType()
|
||||
CommonEventHandlerElementType CommonEventHandlerScript::GetType() const
|
||||
{
|
||||
return CommonEventHandlerElementType::SCRIPT;
|
||||
}
|
||||
|
@ -14,6 +14,6 @@ namespace menu
|
||||
CommonEventHandlerScript();
|
||||
explicit CommonEventHandlerScript(std::string script);
|
||||
|
||||
CommonEventHandlerElementType GetType() override;
|
||||
_NODISCARD CommonEventHandlerElementType GetType() const override;
|
||||
};
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ CommonEventHandlerSetLocalVar::CommonEventHandlerSetLocalVar(SetLocalVarType typ
|
||||
{
|
||||
}
|
||||
|
||||
CommonEventHandlerElementType CommonEventHandlerSetLocalVar::GetType()
|
||||
CommonEventHandlerElementType CommonEventHandlerSetLocalVar::GetType() const
|
||||
{
|
||||
return CommonEventHandlerElementType::SET_LOCAL_VAR;
|
||||
}
|
||||
|
@ -26,6 +26,6 @@ namespace menu
|
||||
CommonEventHandlerSetLocalVar();
|
||||
CommonEventHandlerSetLocalVar(SetLocalVarType type, std::string varName, std::unique_ptr<ICommonExpression> value);
|
||||
|
||||
CommonEventHandlerElementType GetType() override;
|
||||
_NODISCARD CommonEventHandlerElementType GetType() const override;
|
||||
};
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Utils/ClassUtils.h"
|
||||
|
||||
namespace menu
|
||||
{
|
||||
enum class CommonEventHandlerElementType
|
||||
@ -21,6 +23,6 @@ namespace menu
|
||||
ICommonEventHandlerElement& operator=(const ICommonEventHandlerElement& other) = default;
|
||||
ICommonEventHandlerElement& operator=(ICommonEventHandlerElement&& other) noexcept = default;
|
||||
|
||||
virtual CommonEventHandlerElementType GetType() = 0;
|
||||
_NODISCARD virtual CommonEventHandlerElementType GetType() const = 0;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user