-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello.h
60 lines (47 loc) · 1.11 KB
/
hello.h
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _RAWRRINVOKECS
#define _RAWRRINVOKECS
#include <mono/jit/jit.h>
#include <mono/metadata/object.h>
#include <mono/metadata/environment.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/mono-config.h>
#include <string.h>
#include <stdlib.h>
#include <fstream>
#ifndef FALSE
#define FALSE 0
#endif
#include <iostream>
#ifndef MONO_EMBED_CPP_MAIN
#include <Rcpp.h>
#endif
#ifdef MONO_EMBED_CPP_MAIN
#define OUTPUT(ttt) std::cerr << ttt << std::endl
#else
#define OUTPUT(ttt) Rcpp::Rcerr << ttt << std::endl
#endif
class Rawrr
{
std::string rawFile = "/tmp/sample.raw";
std::string assemblyFile = "helloRcpp.exe";
MonoDomain *domain;
MonoAssembly *assembly;
MonoImage *image;
MonoMethod *function_set_rawFile;
MonoMethod *function_get_info;
MonoMethod *function_open_file;
MonoClass *Raw;
MonoObject *obj;
private:
public:
Rawrr ();
void setDomainName (std::string s = "");
void setAssembly (std::string file);
void setRawFile (std::string file);
void createObject ();
void openFile ();
int get_info ();
void dector ();
};
#endif