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

cpp-ue4.model-header.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
{{>licenseInfo}}
#pragma once

#include "{{modelNamePrefix}}BaseModel.h"
{{#imports}}{{{import}}}
{{/imports}}

{{#cppNamespaceDeclarations}}
namespace {{this}} 
{
{{/cppNamespaceDeclarations}}
{{#models}}
{{#model}}

/*
 * {{classname}}
 *
 * {{description}}
 */
class {{dllapi}} {{classname}} : public Model
{
public:
    virtual ~{{classname}}() {}
	bool FromJson(const TSharedPtr& JsonValue) final;
	void WriteJson(JsonWriter& Writer) const final;

	{{#isString}}
	{{#isEnum}}
	{{#allowableValues}}
	enum class Values
	{
		{{#enumVars}}
		{{name}},
		{{/enumVars}}
  	};

	Values Value{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}};
	{{/allowableValues}}
	{{/isEnum}}
	{{^isEnum}}
	FString Value{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}};
	{{/isEnum}}
	{{/isString}}
    {{#vars}}
	{{#isEnum}}
	{{#allowableValues}}
	enum class {{{enumName}}}
	{
		{{#enumVars}}
		{{name}},
		{{/enumVars}}
  	};
	{{/allowableValues}}
	{{#description}}/* {{{description}}} */
	{{/description}}{{^required}}TOptional<{{/required}}{{{datatypeWithEnum}}}{{^required}}>{{/required}} {{name}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}};
	{{/isEnum}}
	{{^isEnum}}
	{{#description}}/* {{{description}}} */
	{{/description}}{{^required}}TOptional<{{/required}}{{{datatype}}}{{^required}}>{{/required}} {{name}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}};
	{{/isEnum}}
    {{/vars}}
};

{{/model}}
{{/models}}
{{#cppNamespaceDeclarations}}
}
{{/cppNamespaceDeclarations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy