File: implementation.cpp

package info (click to toggle)
grantlee5 5.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,004 kB
  • sloc: cpp: 25,617; javascript: 6,043; python: 299; sh: 97; perl: 37; ruby: 24; makefile: 17
file content (40 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{% include licence|append:".h" %}

#include "{{ className|lower }}.h"
{% if pimpl %}
#include "{{ className|lower }}_p.h"
{% endif %}

{% for property in properties %}
{{ property.type }} {{ className }}::{{ property.name }}() const
{
  {{% if pimpl %}
  Q_D(const {{ className }});
  {% endif %}
  return {% if pimpl %}d->{% endif %}m_{{ property.name }};
}
  {% if not property.readonly %}

void {{ className }}::{{ property.name|to_write }}({{ property.type|to_arg }}{{ property.name }})
{
    {{% if pimpl %}
  Q_D({{ className }});
    {% endif %}
  {% if pimpl %}d->{% endif %}m_{{ property.name }} = {{ property.name }};
}
  {% endif %}

{% endfor %}
{# Don't put default args in implementation methods. #}
{% with false as default %}
  {% for method in methods %}
    {% ifnotequal method.accessType "signals" %}
{{ method.type }} {{ className }}::{{ method.name }}({% include "args.h" %}){% if method.const %}const{% endif %}
{

}
    {% endifnotequal %}

  {% endfor %}
{% endwith %}
#include "{{ className|lower }}.moc"