-
Notifications
You must be signed in to change notification settings - Fork 0
/
cpp.json
50 lines (50 loc) · 1.21 KB
/
cpp.json
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
{
"ocfclass": {
"prefix": "ocfclass",
"body": [
"#ifndef ${TM_FILENAME_BASE/(.*)/${1:/upcase}/}_HPP",
"#define ${TM_FILENAME_BASE/(.*)/${1:/upcase}/}_HPP",
"#include <iostream>",
"",
"class $TM_FILENAME_BASE",
"{",
"private:\n\t/*attr*/",
"public:",
"\t$TM_FILENAME_BASE(void);",
"\t$TM_FILENAME_BASE(const $TM_FILENAME_BASE &toCopy);",
"\t$TM_FILENAME_BASE\t&operator = (const $TM_FILENAME_BASE &toCopy);",
"\t~$TM_FILENAME_BASE(void);",
"};",
"",
"#endif"
],
"description": "Code snippet for orthodox canonical form class",
},
"cfunctions": {
"prefix": "cfunctions",
"body": [
"#include \"${TM_FILENAME_BASE}.hpp\"",
"",
"${TM_FILENAME_BASE}::${TM_FILENAME_BASE}(void)",
"{",
"}",
"",
"${TM_FILENAME_BASE}\t&${TM_FILENAME_BASE}::operator = (const ${TM_FILENAME_BASE} &toCopy)",
"{",
"\tif (this == &toCopy)",
"\t\treturn (*this);",
"\treturn (*this);",
"}",
"",
"${TM_FILENAME_BASE}::${TM_FILENAME_BASE}(const ${TM_FILENAME_BASE} &toCopy)",
"{",
"\t(*this) = toCopy;",
"}",
"",
"${TM_FILENAME_BASE}::~${TM_FILENAME_BASE}(void)",
"{",
"}"
],
"description": "Basic member functions code snippet for OCF class"
}
}