summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2021-02-10 16:50:08 +0100
committersalad <fmoenne-@student.le-101.fr>2021-02-10 16:50:08 +0100
commite350f0f3e08d9bc89e9318c68bbff37eb1b3f3f4 (patch)
treeb54b315a71eca371b95d47ee7d2a40ba35eb0c15
parentaddautols (diff)
downloaddotfiles-e350f0f3e08d9bc89e9318c68bbff37eb1b3f3f4.tar.gz
dotfiles-e350f0f3e08d9bc89e9318c68bbff37eb1b3f3f4.tar.bz2
dotfiles-e350f0f3e08d9bc89e9318c68bbff37eb1b3f3f4.tar.xz
dotfiles-e350f0f3e08d9bc89e9318c68bbff37eb1b3f3f4.tar.zst
dotfiles-e350f0f3e08d9bc89e9318c68bbff37eb1b3f3f4.zip
add snippets
-rw-r--r--snippets/fundamental-mode/cppcpp28
-rw-r--r--snippets/fundamental-mode/cppheader16
2 files changed, 44 insertions, 0 deletions
diff --git a/snippets/fundamental-mode/cppcpp b/snippets/fundamental-mode/cppcpp
new file mode 100644
index 0000000..eaa9ef9
--- /dev/null
+++ b/snippets/fundamental-mode/cppcpp
@@ -0,0 +1,28 @@
+# -*- mode: snippet -*-
+# name: cppcpp
+# key: cppcpp
+# --
+
+Name::Name(void) {
+ return ;
+}
+
+Name::Name(std::string name) : _name(value) {
+ std::cout << "Name just appeared" << std::endl;
+ return ;
+}
+
+Name::Name(Name const &src) {
+ *this = src;
+ return ;
+}
+
+Name::~Name(void) {
+ std::cout << "Name was destroyed" << std::endl;
+ return ;
+}
+
+Name & Name::operator=(Name const &rhs) {
+ this->field = rhs.getter();
+ return (*this);
+}
diff --git a/snippets/fundamental-mode/cppheader b/snippets/fundamental-mode/cppheader
new file mode 100644
index 0000000..b9eac41
--- /dev/null
+++ b/snippets/fundamental-mode/cppheader
@@ -0,0 +1,16 @@
+# -*- mode: snippet -*-
+# name: cppheader
+# key: cppheader
+# --
+
+\#include <iostream>
+
+class Name {
+ public :
+ Name();
+ Name(std::string name);
+ Name(Name const & name);
+ ~Name();
+
+ Name & operator=(Name const & rhs);
+};