Commit f8f20ec5 authored by Ryan Pavlik's avatar Ryan Pavlik

Add basic boilerplate templates

parent accf6566
{% set notice -%}
Copyright (c) {{year}} Collabora, Ltd.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{%- endset %}
\ No newline at end of file
{% from 'base' import notice -%}
{% block fileheader -%}
/** @file
* @brief {% block brief %}{% endblock %}
* @author {{author}}
*/
{% endblock -%}
{{ notice | c_block_comment('/*', ' * ', ' */') }}
{% block content %}{% endblock %}
\ No newline at end of file
{%- extends 'base.cpp' -%}
{% macro fn() -%}{{stem}}.cpp{%- endmacro -%}
{%- block brief %}Implementation{% endblock -%}
{%- block content %}
// Internal Includes
#include "{{stem}}.h"
// Library Includes
// - none
// Standard Includes
// - none
namespace xrt {
} // namespace xrt
{% endblock %}
{%- extends 'base.cpp' -%}
{%- macro fn() -%}{{stem}}.h{%- endmacro -%}
{%- block brief %}Header{% endblock -%}
{%- set include_guard_raw %}INCLUDED_{{fn()}}_GUID_{{ make_guid() }}{% endset %}
{%- macro include_guard() %}{{ ('INCLUDED_' + fn() + '_GUID_' + make_guid()) | make_identifier() }}{% endmacro %}
{% block content %}
#pragma once
#ifndef {{include_guard()}}
#define {{include_guard()}}
// Internal Includes
#include "{{stem}}.h"
// Library Includes
// - none
// Standard Includes
// - none
namespace xrt {
} // namespace xrt
#endif // {{include_guard()}}
{% endblock %}
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