include
This commit is contained in:
parent
9eef21df1b
commit
42b233e6a4
@ -1,9 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "../std.hpp"
|
||||
#include "../UsefulException.hpp"
|
||||
#include "../format.hpp"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@ -29,6 +28,7 @@ typedef MonoString* String;
|
||||
typedef MonoObject* Object;
|
||||
typedef void Void;
|
||||
|
||||
|
||||
template<typename PrimitiveT>
|
||||
MonoClass* getClass();
|
||||
|
||||
@ -55,10 +55,7 @@ void getMethodSignatureTypes(MonoMethod* mono_method,
|
||||
MonoType** return_type,
|
||||
std::vector<MonoType*>& argument_types);
|
||||
|
||||
/// @brief all types must have template implementation of getClass<T>()
|
||||
/// @tparam ReturnT return type
|
||||
/// @tparam ...ArgTypes argument types
|
||||
/// @return function which takes arguments and returns value of ReturnT
|
||||
/// all types must implement getClass<T>()
|
||||
template<typename ReturnT, typename... ArgTypes>
|
||||
std::shared_ptr<std::function<ReturnT(MonoObject*, ArgTypes...)>> getMethod(
|
||||
MonoClass* target_class,
|
||||
@ -114,6 +111,7 @@ std::shared_ptr<std::function<ReturnT(MonoObject*, ArgTypes...)>> getMethod(
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
class Assembly {
|
||||
MonoAssembly* ptr;
|
||||
MonoImage* image;
|
||||
@ -125,6 +123,7 @@ public:
|
||||
MonoClass* getClass(const std::string& name_space, const std::string& name);
|
||||
};
|
||||
|
||||
|
||||
///LINUX: `config.xml`, `mscorelib.dll`, `libmono-native.so` in `mono-libs` directory
|
||||
///
|
||||
///WINDOWS: `config.xml`, `mscorelib.dll` in `mono-libs` directory
|
||||
@ -138,4 +137,4 @@ public:
|
||||
std::shared_ptr<Assembly> loadAssembly(const std::string& name);
|
||||
};
|
||||
|
||||
} // namespace Mono
|
||||
}
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
#include "../std.hpp"
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ougge::Resources {
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <SDL.h>
|
||||
#include "Resources.hpp"
|
||||
#include "../math.hpp"
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
typedef int8_t i8;
|
||||
typedef uint8_t u8;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user