-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpp.snip
executable file
·105 lines (84 loc) · 1.84 KB
/
cpp.snip
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
include c.snip
snippet template
abbr template <T>
template<typename ${1:T}>
snippet class
abbr class {}
class ${1:name}
{
public:
$1();
~$1();
${2}
private:
void initialize();
void finalize();
};
snippet impl
abbr struct impl
struct ${1}::Impl
{
${2}
};
snippet try
abbr try catch
try
{
${1}
}
catch (${2:exception})
{
${3}
}
# range based for ( C++11 feature )
snippet for_CPP11
abbr for (:) {}
for (${1:var} : ${2:container})
{
${0}
}
# lambda expression ( C++11 feature )
snippet lambda
abbr [](){}
[${1}](${2})${3}{ ${4} }
# scoped enumeration ( C++11 feature )
snippet enum_scoped
abbr enum struct {}
enum struct { ${1} }
snippet static_cast
static_cast<${1}>(${2})${0}
snippet const_cast
const_cast<${1}>(${2})${0}
snippet dynamic_cast
dynamic_cast<${1}>(${2})${0}
snippet reinterpret_cast
reinterpret_cast<${1}>(${2})${0}
snippet privateheader
//----------------------------------------------------------------------
//! @brief ${1:funcname}
//! @param ${2:paramname}[${3:inout}] ${4:describe}
//! @return ${5:type} ${6:describe}
//----------------------------------------------------------------------
${0}
snippet protectedheader
//======================================================================
//! @brief ${1:funcname}
//! @param ${2:paramname}[${3:inout}] ${4:describe}
//! @return ${5:type} ${6:describe}
//======================================================================
${0}
snippet publicheader
//**********************************************************************
//! @brief ${1:funcname}
//! @param ${2:paramname}[${3:inout}] ${4:describe}
//! @return ${5:type} ${6:describe}
//**********************************************************************
${0}
snippet todo
// TODO: ${1}
${0}
snippet namespace
namespace ${1:name}
{
${0}
} // namespace $1