Commit 26cfd87a authored by Manuel Riecke's avatar Manuel Riecke Committed by Kevin Funk

Correct Basic C++ Template

Removes unnecessary new lines in Header & Create proper implementations for functions (with return type.)
parent e3dabb2b
......@@ -38,46 +38,43 @@ class {{ name }}{% if base_classes %} :{% for base in base_classes %} {{ base.in
{% if public_members or public_functions %}
public:
{% endif %}
{% if public_functions %}
{% for method in public_functions %}
{% include "method_declaration_cpp.txt" %}
{% endfor %}
{% endif %}
{% if public_members %}
{% for member in public_members %}
{{ member.type }} {{ member.name }};
{% endfor %}
{% endif %}
{% if protected_members or protected_functions %}
protected:
{% endif %}
{% if protected_functions %}
{% for method in protected_functions %}
{% include "method_declaration_cpp.txt" %}
{% endfor %}
{% endif %}
{% if protected_members %}
{% for member in protected_members %}
{{ member.type }} {{ member.name }};
{% endfor %}
{% endif %}
{% if private_members or private_functions %}
private:
{% endif %}
{% if private_functions %}
{% for method in private_functions %}
{% include "method_declaration_cpp.txt" %}
{% endfor %}
{% endif %}
{% for member in private_members %}
{{ member.type }} {{ member.name }};
{% endfor %}
{% endblock class_body %}
{% block class_bottom %}
{% endblock %}
{% block class_declaration_close %}
};
{% endblock %}
......
......@@ -37,28 +37,28 @@ class {{ name }}{% if base_classes %} :{% for base in base_classes %} {{ base.in
{% block class_body %}
{% if public_functions %}
public:
{% endif %}
{% for method in public_functions %}
{% include "method_declaration_cpp.txt" %}
{% endfor %}
{% endif %}
{% if protected_functions %}
protected:
{% endif %}
{% for method in protected_functions %}
{% include "method_declaration_cpp.txt" %}
{% endfor %}
{% endif %}
{% if private_functions %}
private:
{% endif %}
{% for method in private_functions %}
{% include "method_declaration_cpp.txt" %}
{% endfor %}
{% endif %}
{% endblock class_body %}
{% block class_bottom %}
......
......@@ -27,15 +27,13 @@
{% block function_definitions %}
{% for method in functions %}
{% with method.arguments as arguments %}
{% if method.type %}{{ method.type }} {% endif %}{{ name }}::{{ method.name }}({% include "arguments_types_names.txt" %})
{% include "method_definition_cpp.txt" %}
{
}
{% endwith %}
{% endfor %}
{% endblock function_definitions %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment