aboutsummaryrefslogtreecommitdiffstats
path: root/library/ace/snippets/c_cpp.js
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-21 14:56:42 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-21 14:56:42 -0400
commitc6aa42773a17d53b4572488967b99666ab97ef97 (patch)
tree8ba4a4071c3a8941e7d851ad80d48cee9c3f71bd /library/ace/snippets/c_cpp.js
parent4979a451207c7072785c114a09fdd394f2a97734 (diff)
downloadvolse-hubzilla-c6aa42773a17d53b4572488967b99666ab97ef97.tar.gz
volse-hubzilla-c6aa42773a17d53b4572488967b99666ab97ef97.tar.bz2
volse-hubzilla-c6aa42773a17d53b4572488967b99666ab97ef97.zip
Trying to fix wiki branch starting fresh from dev
Diffstat (limited to 'library/ace/snippets/c_cpp.js')
-rw-r--r--library/ace/snippets/c_cpp.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/ace/snippets/c_cpp.js b/library/ace/snippets/c_cpp.js
new file mode 100644
index 000000000..9fc5a5824
--- /dev/null
+++ b/library/ace/snippets/c_cpp.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/c_cpp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="## STL Collections\n# std::array\nsnippet array\n std::array<${1:T}, ${2:N}> ${3};${4}\n# std::vector\nsnippet vector\n std::vector<${1:T}> ${2};${3}\n# std::deque\nsnippet deque\n std::deque<${1:T}> ${2};${3}\n# std::forward_list\nsnippet flist\n std::forward_list<${1:T}> ${2};${3}\n# std::list\nsnippet list\n std::list<${1:T}> ${2};${3}\n# std::set\nsnippet set\n std::set<${1:T}> ${2};${3}\n# std::map\nsnippet map\n std::map<${1:Key}, ${2:T}> ${3};${4}\n# std::multiset\nsnippet mset\n std::multiset<${1:T}> ${2};${3}\n# std::multimap\nsnippet mmap\n std::multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_set\nsnippet uset\n std::unordered_set<${1:T}> ${2};${3}\n# std::unordered_map\nsnippet umap\n std::unordered_map<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_multiset\nsnippet umset\n std::unordered_multiset<${1:T}> ${2};${3}\n# std::unordered_multimap\nsnippet ummap\n std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::stack\nsnippet stack\n std::stack<${1:T}> ${2};${3}\n# std::queue\nsnippet queue\n std::queue<${1:T}> ${2};${3}\n# std::priority_queue\nsnippet pqueue\n std::priority_queue<${1:T}> ${2};${3}\n##\n## Access Modifiers\n# private\nsnippet pri\n private\n# protected\nsnippet pro\n protected\n# public\nsnippet pub\n public\n# friend\nsnippet fr\n friend\n# mutable\nsnippet mu\n mutable\n## \n## Class\n# class\nsnippet cl\n class ${1:`Filename('$1', 'name')`} \n {\n public:\n $1(${2});\n ~$1();\n\n private:\n ${3:/* data */}\n };\n# member function implementation\nsnippet mfun\n ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {\n ${5:/* code */}\n }\n# namespace\nsnippet ns\n namespace ${1:`Filename('', 'my')`} {\n ${2}\n } /* namespace $1 */\n##\n## Input/Output\n# std::cout\nsnippet cout\n std::cout << ${1} << std::endl;${2}\n# std::cin\nsnippet cin\n std::cin >> ${1};${2}\n##\n## Iteration\n# for i \nsnippet fori\n for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n ${4:/* code */}\n }${5}\n\n# foreach\nsnippet fore\n for (${1:auto} ${2:i} : ${3:container}) {\n ${4:/* code */}\n }${5}\n# iterator\nsnippet iter\n for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {\n ${6}\n }${7}\n\n# auto iterator\nsnippet itera\n for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {\n ${2:std::cout << *$1 << std::endl;}\n }${3}\n##\n## Lambdas\n# lamda (one line)\nsnippet ld\n [${1}](${2}){${3:/* code */}}${4}\n# lambda (multi-line)\nsnippet lld\n [${1}](${2}){\n ${3:/* code */}\n }${4}\n",t.scope="c_cpp"}) \ No newline at end of file