All Downloads are FREE. Search and download functionalities are using the official Maven repository.

icoudot.java4cpp.java4cpp-templates.1.0.2.source-code.enum-template.ftl Maven / Gradle / Ivy

The newest version!
<@cppFormatter>
<#assign fileName = class.type.cppFullName?replace('::', '_')+"Enum.h"/>
#ifndef ${fileName?replace('.', '_')?upper_case}
#define ${fileName?replace('.', '_')?upper_case}

<#assign cppEnum = class.type.cppFullName?split("::")?last + "Enum"/>
<#list class.type.cppFullName?split("::") as namespace>
<#if namespace_has_next>namespace ${namespace} {
namespace ${cppEnum} {

typedef enum {
NULL_VALUE = -1,
<#list class.content.enumKeys as key>
${key}<#if key_has_next>,

} ${cppEnum};

<#list class.type.cppFullName?split("::") as namespace>
}

#endif




© 2015 - 2024 Weber Informatics LLC | Privacy Policy