This commit is contained in:
2016-02-22 12:26:12 +01:00
parent 46a9040434
commit 96e9527a0e
65 changed files with 0 additions and 1351 deletions

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name : v.begin(), v.end()
# key: beginend
# --
${1:v}.begin(), $1.end

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: const_[]
# key: c[
# --
const ${1:Type}& operator[](${2:int index}) const
{
$0
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: constructor
# key: ct
# --
${1:Class}::$1(${2:args}) ${3: : ${4:init}}
{
$0
}

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: fori
# key: fori
# --
for (${1:auto }${2:it} = ${3:var}.begin(); $2 != $3.end(); ++$2) {
$0
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: function
# key: f
# --
${1:type} ${2:Class}::${3:name}(${4:args})${5: const}
{
$0
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: operator!=
# key: !=
# group: operator overloading
# --
bool ${1:MyClass}::operator!=(const $1 &other) const
{
return !(*this == other);
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: operator+=
# key: +=
# group: operator overloading
# --
${1:MyClass}& $1::operator+=(${2:const $1 &rhs})
{
$0
return *this;
}

View File

@@ -1,11 +0,0 @@
# -*- mode: snippet -*-
# name: operator+
# key: +
# group: operator overloading
# --
${1:MyClass} $1::operator+(const $1 &other)
{
$1 result = *this;
result += other;
return result;
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: operator==
# key: ==
# group: operator overloading
# --
bool ${1:MyClass}::operator==(const $1 &other) const
{
$0
}

View File

@@ -1,14 +0,0 @@
# -*- mode: snippet -*-
# name: operator=
# key: =
# where this is a reference to myself
# group: operator overloading
# --
${1:MyClass}& $1::operator=(const $1 &rhs)
{
// Check for self-assignment!
if (this == &rhs)
return *this;
$0
return *this;
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: operator[]
# key: []
# group: operator overloading
# --
${1:Type}& operator[](${2:int index})
{
$0
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: operator>>
# key: >>
# group: operator overloading
# --
std::istream& operator>>(std::istream& is, const ${1:Class}& ${2:c})
{
$0
return is;
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: operator<<
# key: <<
# group: operator overloading
# --
std::ostream& operator<<(std::ostream& os, const ${1:Class}& ${2:c})
{
$0
return os;
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: tryw
# key: tryw
# --
try {
`(or yas/selected-text (car kill-ring))`
} catch ${1:Exception} {
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: try
# key: try
# a bit too intrusive now still, not always I want to do this
# --
try {
$0
} catch (${1:type}) {
}

View File

@@ -1,7 +0,0 @@
#name : do { ... } while (...)
# key: do
# --
do
{
$0
} while (${1:condition});

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# contributor: York Zhao
# name: for_n
# key: forn
# --
for (${1:auto }${2:i} = ${3:0}; $2 < ${4:MAXIMUM}; ++$2) {
$0
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: main
# key: main
# --
int main(${1:int argc, char *argv[]})
{
$0
return 0;
}

View File

@@ -1,7 +0,0 @@
#name : struct ... { ... }
# key: struct
# --
struct ${1:name}
{
$0
};