mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 18:26:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			927 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			927 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef PLUGINSYSTEM3_PUBLICFNAPI_HPP
 | |
| #define PLUGINSYSTEM3_PUBLICFNAPI_HPP
 | |
| 
 | |
| #include <unordered_map>
 | |
| #include <Script/ScriptFunction.hpp>
 | |
| 
 | |
| 
 | |
| class Public : public ScriptFunction
 | |
| {
 | |
| private:
 | |
|     ~Public();
 | |
| 
 | |
|     static std::unordered_map<std::string, Public *> publics;
 | |
| 
 | |
|     Public(ScriptFunc _public, const std::string &name, char ret_type, const std::string &def);
 | |
| #if defined(ENABLE_LUA)
 | |
|     Public(ScriptFuncLua _public, lua_State *lua, const std::string &name, char ret_type, const std::string &def);
 | |
| #endif
 | |
| 
 | |
| public:
 | |
|     template<typename... Args>
 | |
|     static void MakePublic(Args &&... args)
 | |
|     { new Public(std::forward<Args>(args)...); }
 | |
| 
 | |
|     static boost::any Call(const std::string &name, const std::vector<boost::any> &args);
 | |
| 
 | |
|     static const std::string& GetDefinition(const std::string& name);
 | |
| 
 | |
|     static bool IsLua(const std::string &name);
 | |
| 
 | |
|     static void DeleteAll();
 | |
| };
 | |
| 
 | |
| #endif //PLUGINSYSTEM3_PUBLICFNAPI_HPP
 |