Update copyright notices for 2013.
[bpt/emacs.git] / etc / srecode / cpp.srt
CommitLineData
c05676c5
CY
1;;; cpp.srt --- SRecode templates for c++-mode
2
ab422c4d 3;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
c05676c5
CY
4
5;; Author: Eric M. Ludlam <eric@siege-engine.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22set mode "c++-mode"
23
24set comment_start "/**"
25set comment_end " */"
26set comment_prefix " *"
27
c05676c5
CY
28context declaration
29
c05676c5
CY
30template class :indent :blank
31"Insert a C++ class. For use by user insertion.
32Override this template to change contents of a class.
33Override `class-tag' to override the outer structure of the class."
34----
35{{<A:class-tag}}
36 public:
37 {{>CONSTRUCTOR:classdecl:constructor-tag}}
38 {{>DESTRUCTOR:classdecl:destructor-tag}}
39 private:
40 {{^}}
41
42{{/A}}
43----
44
45template subclass :indent :blank
46"Insert a C++ subclass of some other class."
47sectiondictionary "PARENTS"
48set NAME "?PARENTNAME"
49----
50{{>A:class}}
51----
52
53template class-tag :indent :blank
54"Insert a C++ class with the expectation of it being used by a tag inserter.
55Override this to affect applications, or the outer class structure for
56the user-facing template."
57----
58class {{?NAME}} {{#PARENTS}}{{#FIRST}}: {{/FIRST}}public {{NAME}}{{/PARENTS}}
59{
60 {{^}}
61};
62----
63bind "c"
64
65template method :indent :blank
66"Method belonging to some class, declared externally."
67----
68{{?TYPE}} {{?PARENT}}::{{?NAME}}{{>:misc:arglist}}
69{{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
70{
71{{^}}
72}
73----
74
c05676c5
CY
75context classdecl
76
77template constructor-tag :indent :blank
78----
79{{?NAME}}{{>:misc:arglist}}
80{ {{^}} }
81----
82
83;; This one really sucks. How can I finish it?
84template initializers :indent
85----
86{{#FIRST}}:
87{{/FIRST}}{{INITNAME}}(){{#NOTLAST}},{{/NOTLAST}}
88----
89
90template destructor-tag :indent :blank
91----
92~{{?NAME}}{{>:misc:arglist}}
93{ {{^}} }
94----
95
96;;; Base Comment functions for overriding.
97context classdecl
98
99template comment-function-group-start :indent :blank
100"Used for putting comments in front of a functional group of declarations.
101Override this with your own preference to avoid using doxygen."
102----
103{{>A:classdecl:doxygen-function-group-start}}
104----
105
106template comment-function-group-end :indent :blank
107"Used for putting comments in front of a functional group of declarations.
108Override this with your own preference to avoid using doxygen."
109----
110{{>A:classdecl:doxygen-function-group-end}}
111----
112
c05676c5
CY
113;;; DOXYGEN FEATURES
114;;
115;;
116context classdecl
117
118prompt GROUPNAME "Name of declaration group: "
119
120template doxygen-function-group-start :indent :blank
121----
122/**
123 * {{?GROUPNAME}}
124 * @{
125 */
126
127----
128
129template doxygen-function-group-end :indent :blank
130----
131/**
132 * @}
133 */
134
135----
136
c05676c5 137;; end