-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobject.hpp
More file actions
44 lines (32 loc) · 1.05 KB
/
Copy pathobject.hpp
File metadata and controls
44 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef J2CPP_OBJECT_H
#define J2CPP_OBJECT_H
#include <j2cpp/config.hpp>
namespace j2cpp {
template < typename Derived >
class object
{
public:
typedef Derived derived_type;
object(): m_jobject(0) { }
object(jobject jobj): m_jobject(jobj) { }
~object(){ }
jobject get_jobject() const
{
return m_jobject;
}
protected:
jobject m_jobject;
};
} //namespace j2cpp
#define J2CPP_CLASS_NAME _j2cpp_class_name
#define J2CPP_DECLARE_CLASS static const char _j2cpp_class_name[];
#define J2CPP_DECLARE_METHOD(id)\
static const char _j2cpp_method_name_##id[];\
static const char _j2cpp_method_signature_##id[];
#define J2CPP_METHOD_NAME(id) _j2cpp_method_name_##id
#define J2CPP_METHOD_SIGNATURE(id) _j2cpp_method_signature_##id
#define J2CPP_DEFINE_CLASS(fqc, name) char const fqc::_j2cpp_class_name[]=name;
#define J2CPP_DEFINE_METHOD(fqc, id, name, signature)\
const char fqc::_j2cpp_method_name_##id[]=name;\
const char fqc::_j2cpp_method_signature_##id[]=signature;
#endif //J2CPP_CPP_OBJECT_H