c_cpp-95ad2008.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. import{g as o}from"./index-fe76da25.js";function d(p,s){for(var n=0;n<s.length;n++){const t=s[n];if(typeof t!="string"&&!Array.isArray(t)){for(const e in t)if(e!=="default"&&!(e in p)){const i=Object.getOwnPropertyDescriptor(t,e);i&&Object.defineProperty(p,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var r={exports:{}};(function(p,s){ace.define("ace/snippets/c_cpp.snippets",["require","exports","module"],function(n,t,e){e.exports=`## STL Collections
  2. # std::array
  3. snippet array
  4. std::array<\${1:T}, \${2:N}> \${3};\${4}
  5. # std::vector
  6. snippet vector
  7. std::vector<\${1:T}> \${2};\${3}
  8. # std::deque
  9. snippet deque
  10. std::deque<\${1:T}> \${2};\${3}
  11. # std::forward_list
  12. snippet flist
  13. std::forward_list<\${1:T}> \${2};\${3}
  14. # std::list
  15. snippet list
  16. std::list<\${1:T}> \${2};\${3}
  17. # std::set
  18. snippet set
  19. std::set<\${1:T}> \${2};\${3}
  20. # std::map
  21. snippet map
  22. std::map<\${1:Key}, \${2:T}> \${3};\${4}
  23. # std::multiset
  24. snippet mset
  25. std::multiset<\${1:T}> \${2};\${3}
  26. # std::multimap
  27. snippet mmap
  28. std::multimap<\${1:Key}, \${2:T}> \${3};\${4}
  29. # std::unordered_set
  30. snippet uset
  31. std::unordered_set<\${1:T}> \${2};\${3}
  32. # std::unordered_map
  33. snippet umap
  34. std::unordered_map<\${1:Key}, \${2:T}> \${3};\${4}
  35. # std::unordered_multiset
  36. snippet umset
  37. std::unordered_multiset<\${1:T}> \${2};\${3}
  38. # std::unordered_multimap
  39. snippet ummap
  40. std::unordered_multimap<\${1:Key}, \${2:T}> \${3};\${4}
  41. # std::stack
  42. snippet stack
  43. std::stack<\${1:T}> \${2};\${3}
  44. # std::queue
  45. snippet queue
  46. std::queue<\${1:T}> \${2};\${3}
  47. # std::priority_queue
  48. snippet pqueue
  49. std::priority_queue<\${1:T}> \${2};\${3}
  50. ##
  51. ## Access Modifiers
  52. # private
  53. snippet pri
  54. private
  55. # protected
  56. snippet pro
  57. protected
  58. # public
  59. snippet pub
  60. public
  61. # friend
  62. snippet fr
  63. friend
  64. # mutable
  65. snippet mu
  66. mutable
  67. ##
  68. ## Class
  69. # class
  70. snippet cl
  71. class \${1:\`Filename('$1', 'name')\`}
  72. {
  73. public:
  74. $1(\${2});
  75. ~$1();
  76. private:
  77. \${3:/* data */}
  78. };
  79. # member function implementation
  80. snippet mfun
  81. \${4:void} \${1:\`Filename('$1', 'ClassName')\`}::\${2:memberFunction}(\${3}) {
  82. \${5:/* code */}
  83. }
  84. # namespace
  85. snippet ns
  86. namespace \${1:\`Filename('', 'my')\`} {
  87. \${2}
  88. } /* namespace $1 */
  89. ##
  90. ## Input/Output
  91. # std::cout
  92. snippet cout
  93. std::cout << \${1} << std::endl;\${2}
  94. # std::cin
  95. snippet cin
  96. std::cin >> \${1};\${2}
  97. ##
  98. ## Iteration
  99. # for i
  100. snippet fori
  101. for (int \${2:i} = 0; $2 < \${1:count}; $2\${3:++}) {
  102. \${4:/* code */}
  103. }\${5}
  104. # foreach
  105. snippet fore
  106. for (\${1:auto} \${2:i} : \${3:container}) {
  107. \${4:/* code */}
  108. }\${5}
  109. # iterator
  110. snippet iter
  111. for (\${1:std::vector}<\${2:type}>::\${3:const_iterator} \${4:i} = \${5:container}.begin(); $4 != $5.end(); ++$4) {
  112. \${6}
  113. }\${7}
  114. # auto iterator
  115. snippet itera
  116. for (auto \${1:i} = $1.begin(); $1 != $1.end(); ++$1) {
  117. \${2:std::cout << *$1 << std::endl;}
  118. }\${3}
  119. ##
  120. ## Lambdas
  121. # lamda (one line)
  122. snippet ld
  123. [\${1}](\${2}){\${3:/* code */}}\${4}
  124. # lambda (multi-line)
  125. snippet lld
  126. [\${1}](\${2}){
  127. \${3:/* code */}
  128. }\${4}
  129. `}),ace.define("ace/snippets/c_cpp",["require","exports","module","ace/snippets/c_cpp.snippets"],function(n,t,e){t.snippetText=n("./c_cpp.snippets"),t.scope="c_cpp"}),function(){ace.require(["ace/snippets/c_cpp"],function(n){p&&(p.exports=n)})}()})(r);var $=r.exports;const c=o($),u=d({__proto__:null,default:c},[$]);export{u as c};