Skip to content

Commit

Permalink
erpcgen: Add namespace and remove typedefs in C++ common header
Browse files Browse the repository at this point in the history
- Constant variable declarations are not namespaced
  • Loading branch information
Häfele, Philipp committed Apr 4, 2024
1 parent f9af0f6 commit 7ae0969
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions erpcgen/src/templates/c_common_header.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ extern "C"

#if !defined(ERPC_TYPE_DEFINITIONS{$scopeNamePrefix}{$scopeNameC})
#define ERPC_TYPE_DEFINITIONS{$scopeNamePrefix}{$scopeNameC}
{% if not cCommonHeaderFile %}
{$fillNamespaceBegin()}
{% endif -- not cCommonHeaderFile %}
{% if not empty(enums) %}

// Enumerators data types declarations
Expand All @@ -54,6 +57,7 @@ extern "C"
}{$addIndent(" ", enum.name)};{$enum.ilComment}{$loop.addNewLineIfNotLast}
{% endfor -- enums %}
{% endif -- enums %}
{% if cCommonHeaderFile %}
{% if not empty(aliases) %}

// Aliases data types declarations
Expand All @@ -71,6 +75,7 @@ typedef {$alias.typenameName};{$alias.ilComment}
{% endif -- alias.typenameName %}
{% endfor -- aliases %}
{% endif -- aliases %}
{% endif -- cCommonHeaderFile %}
{% if nonExternalStructUnion %}

// Structures/unions data types declarations
Expand All @@ -97,6 +102,11 @@ union {$us.name}
{% endfor -- symbols %}

{% endif -- nonExternalStruct || nonExternalUnion %}

{% if not cCommonHeaderFile %}
{$fillNamespaceEnd()}
{% endif -- not cCommonHeaderFile %}

{% if not empty(consts) %}

// Constant variable declarations
Expand Down

0 comments on commit 7ae0969

Please sign in to comment.