Integrating latest 47acbe8
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
#define CRYINCLUDE_EDITOR_INCLUDE_ICOMMANDMANAGER_H
|
||||
#pragma once
|
||||
#include "Command.h"
|
||||
#include "functor.h"
|
||||
|
||||
typedef void (* TPfnDeleter)(void*);
|
||||
|
||||
@@ -23,7 +22,7 @@ class ICommandManager
|
||||
{
|
||||
public:
|
||||
virtual ~ICommandManager() = default;
|
||||
|
||||
|
||||
virtual bool AddCommand(CCommand* pCommand, TPfnDeleter deleter = nullptr) = 0;
|
||||
virtual bool UnregisterCommand(const char* module, const char* name) = 0;
|
||||
virtual bool AttachUIInfo(const char* fullCmdName, const CCommand0::SUIInfo& uiInfo) = 0;
|
||||
@@ -37,51 +36,51 @@ namespace CommandManagerHelper
|
||||
{
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor0& functor);
|
||||
const AZStd::function<void()>& functor);
|
||||
template <typename RT>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor0wRet<RT>& functor);
|
||||
const AZStd::function<RT()>& functor);
|
||||
template <LIST(1, typename P)>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor1<LIST(1, P)>& functor);
|
||||
const AZStd::function<void(LIST(1, P))>& functor);
|
||||
template <LIST(1, typename P), typename RT>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor1wRet<LIST(1, P), RT>& functor);
|
||||
const AZStd::function<RT(LIST(1, P))>& functor);
|
||||
template <LIST(2, typename P)>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor2<LIST(2, P)>& functor);
|
||||
const AZStd::function<void(LIST(2, P))>& functor);
|
||||
template <LIST(2, typename P), typename RT>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor2wRet<LIST(2, P), RT>& functor);
|
||||
const AZStd::function<RT(LIST(2, P))>& functor);
|
||||
template <LIST(3, typename P)>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor3<LIST(3, P)>& functor);
|
||||
const AZStd::function<void(LIST(3, P))>& functor);
|
||||
template <LIST(3, typename P), typename RT>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor3wRet<LIST(3, P), RT>& functor);
|
||||
const AZStd::function<RT(LIST(3, P))>& functor);
|
||||
template <LIST(4, typename P)>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor4<LIST(4, P)>& functor);
|
||||
const AZStd::function<void(LIST(4, P))>& functor);
|
||||
template <LIST(4, typename P), typename RT>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor4wRet<LIST(4, P), RT>& functor);
|
||||
const AZStd::function<RT(LIST(4, P))>& functor);
|
||||
template <LIST(5, typename P)>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor5<LIST(5, P)>& functor);
|
||||
const AZStd::function<void(LIST(5, P))>& functor);
|
||||
template <LIST(6, typename P)>
|
||||
bool RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor6<LIST(6, P)>& functor);
|
||||
const AZStd::function<void(LIST(6, P))>& functor);
|
||||
|
||||
namespace Private
|
||||
{
|
||||
@@ -117,96 +116,96 @@ bool CommandManagerHelper::Private::RegisterCommand(ICommandManager* pCmdMgr,
|
||||
inline
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor0& functor)
|
||||
const AZStd::function<void()>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor0, CCommand0>(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<void()>, CCommand0>(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <typename RT>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor0wRet<RT>& functor)
|
||||
const AZStd::function<RT()>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor0wRet<RT>, CCommand0wRet<RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<RT()>, CCommand0wRet<RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(1, typename P)>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor1<LIST(1, P)>& functor)
|
||||
const AZStd::function<void(LIST(1, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor1<LIST(1, P)>, CCommand1<LIST(1, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<void(LIST(1, P))>, CCommand1<LIST(1, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(1, typename P), typename RT>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor1wRet<LIST(1, P), RT>& functor)
|
||||
const AZStd::function<RT(LIST(1, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor1wRet<LIST(1, P), RT>, CCommand1wRet<LIST(1, P), RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<RT(LIST(1, P))>, CCommand1wRet<LIST(1, P), RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(2, typename P)>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor2<LIST(2, P)>& functor)
|
||||
const AZStd::function<void(LIST(2, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor2<LIST(2, P)>, CCommand2<LIST(2, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<void(LIST(2, P))>, CCommand2<LIST(2, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(2, typename P), typename RT>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor2wRet<LIST(2, P), RT>& functor)
|
||||
const AZStd::function<RT(LIST(2, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor2wRet<LIST(2, P), RT>, CCommand2wRet<LIST(2, P), RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<RT(LIST(2, P))>, CCommand2wRet<LIST(2, P), RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(3, typename P)>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor3<LIST(3, P)>& functor)
|
||||
const AZStd::function<void(LIST(3, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor3<LIST(3, P)>, CCommand3<LIST(3, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<void(LIST(3, P))>, CCommand3<LIST(3, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(3, typename P), typename RT>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor3wRet<LIST(3, P), RT>& functor)
|
||||
const AZStd::function<RT(LIST(3, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor3wRet<LIST(3, P), RT>, CCommand3wRet<LIST(3, P), RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<RT(LIST(3, P))>, CCommand3wRet<LIST(3, P), RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(4, typename P)>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor4<LIST(4, P)>& functor)
|
||||
const AZStd::function<void(LIST(4, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor4<LIST(4, P)>, CCommand4<LIST(4, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<void(LIST(4, P))>, CCommand4<LIST(4, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(4, typename P), typename RT>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor4wRet<LIST(4, P), RT>& functor)
|
||||
const AZStd::function<RT(LIST(4, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor4wRet<LIST(4, P), RT>, CCommand4wRet<LIST(4, P), RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<RT(LIST(4, P))>, CCommand4wRet<LIST(4, P), RT> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(5, typename P)>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor5<LIST(5, P)>& functor)
|
||||
const AZStd::function<void(LIST(5, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor5<LIST(5, P)>, CCommand5<LIST(5, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<void(LIST(5, P))>, CCommand5<LIST(5, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
|
||||
template <LIST(6, typename P)>
|
||||
bool CommandManagerHelper::RegisterCommand(ICommandManager* pCmdMgr, const char* module, const char* name,
|
||||
const char* description, const char* example,
|
||||
const Functor6<LIST(6, P)>& functor)
|
||||
const AZStd::function<void(LIST(6, P))>& functor)
|
||||
{
|
||||
return Private::RegisterCommand<Functor6<LIST(6, P)>, CCommand6<LIST(6, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
return Private::RegisterCommand<AZStd::function<void(LIST(6, P))>, CCommand6<LIST(6, P)> >(pCmdMgr, module, name, description, example, functor);
|
||||
}
|
||||
#endif // CRYINCLUDE_EDITOR_INCLUDE_ICOMMANDMANAGER_H
|
||||
|
||||
Reference in New Issue
Block a user