-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathfile_rw.h
More file actions
34 lines (31 loc) · 746 Bytes
/
file_rw.h
File metadata and controls
34 lines (31 loc) · 746 Bytes
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
#ifndef __FILE_RW__
#define __FILE_RW__
#include "msg_define.h"
class File_RW {
typedef std::vector<Msg_Define *> MSGDEFINES;
public:
File_RW(char *path, char *srcfile, char *dstfile);
~File_RW();
int readFile();
void print();
int write_to_h();
int write_to_cpp();
int write_to_js();
private:
int write_to_h_msg(FILE *fp);
int write_to_h_head(FILE *fp);
int write_to_h_include(FILE *fp);
int write_to_h_end(FILE *fp);
int write_to_h_declare(FILE *fp);
int write_to_h_struct(FILE *fp);
int write_to_cpp_head(FILE *fp);
int write_to_cpp_struct(FILE *fp);
int write_to_js_head(FILE *fp);
int write_to_js_struct(FILE *fp);
private:
char path_[64];
std::string srcfile_;
std::string dstfile_;
MSGDEFINES msgDefines_;
};
#endif