Changeset View
Changeset View
Standalone View
Standalone View
source/gui/Scripting/JSInterface_IGUIObject.h
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | protected: | ||||
* It sounds fixable, but rather difficult. | * It sounds fixable, but rather difficult. | ||||
*/ | */ | ||||
template <typename funcPtr, funcPtr callable> | template <typename funcPtr, funcPtr callable> | ||||
static bool scriptMethod(JSContext* cx, unsigned argc, JS::Value* vp); | static bool scriptMethod(JSContext* cx, unsigned argc, JS::Value* vp); | ||||
std::map<std::string, JS::PersistentRootedFunction> m_FunctionHandlers; | std::map<std::string, JS::PersistentRootedFunction> m_FunctionHandlers; | ||||
static js::Class m_ProxyObjectClass; | static js::Class m_ProxyObjectClass; | ||||
}; | }; | ||||
class TextObjectFactory : public GUIObjectFactory | class TextObjectFactory : public GUIObjectFactory | ||||
{ | { | ||||
public: | public: | ||||
using cppType = CText; | using cppType = CText; | ||||
TextObjectFactory(ScriptInterface& scriptInterface); | TextObjectFactory(ScriptInterface& scriptInterface); | ||||
}; | }; | ||||
class ListObjectFactory : public GUIObjectFactory | |||||
{ | |||||
public: | |||||
wraitii: Er, forgot to add the correct `using` here. | |||||
wraitiiAuthorUnsubmitted Done Inline ActionsThis isn't detected at compile time because I'm using the actual return type of the function pointer in the template code, as the using isn't 'virtual'... I think I can fix this with CRTP, but it might be a tad tricky. wraitii: This isn't detected at compile time because I'm using the actual return type of the function… | |||||
ListObjectFactory(ScriptInterface& scriptInterface); | |||||
}; | |||||
} | } | ||||
#endif // INCLUDED_JSI_IGUIOBJECT | #endif // INCLUDED_JSI_IGUIOBJECT |
Wildfire Games · Phabricator
Er, forgot to add the correct using here.