Class CppUE4ClientCodegen

    • Constructor Detail

      • CppUE4ClientCodegen

        public CppUE4ClientCodegen()
    • Method Detail

      • setOptionalProjectFileFlag

        public void setOptionalProjectFileFlag​(boolean flag)
      • getName

        public String getName()
        Configures a friendly name for the generator. This will be used by the generator to select the library with the -l flag.
        Specified by:
        getName in interface CodegenConfig
        Overrides:
        getName in class DefaultCodegen
        Returns:
        the friendly name for the generator
      • getHelp

        public String getHelp()
        Returns human-friendly help for the generator. Provide the consumer with help tips, parameters here
        Specified by:
        getHelp in interface CodegenConfig
        Overrides:
        getHelp in class DefaultCodegen
        Returns:
        A string value for the help message
      • needToImport

        protected boolean needToImport​(String type)
        Description copied from class: DefaultCodegen
        Check the type to see if it needs import the library/module/package
        Overrides:
        needToImport in class DefaultCodegen
        Parameters:
        type - name of the type
        Returns:
        true if the library/module/package of the corresponding type needs to be imported
      • escapeReservedWord

        public String escapeReservedWord​(String name)
        Escapes a reserved word as defined in the `reservedWords` array. Handle escaping those terms here. This logic is only called if a variable matches the reserved words
        Specified by:
        escapeReservedWord in interface CodegenConfig
        Overrides:
        escapeReservedWord in class AbstractCppCodegen
        Parameters:
        name - the name to be escaped
        Returns:
        the escaped term
      • getTypeDeclaration

        public String getTypeDeclaration​(io.swagger.v3.oas.models.media.Schema p)
        Optional - type declaration. This is a String which is used by the templates to instantiate your types. There is typically special handling for different property types
        Specified by:
        getTypeDeclaration in interface CodegenConfig
        Overrides:
        getTypeDeclaration in class DefaultCodegen
        Parameters:
        p - property schema
        Returns:
        a string value used as the `dataType` field for model templates, `returnType` for api templates
      • toDefaultValue

        public String toDefaultValue​(io.swagger.v3.oas.models.media.Schema p)
        Description copied from class: DefaultCodegen
        Return the default value of the property

        This method should be overridden in the generator to meet its requirement. Return null if you do NOT want a default value. Any non-null value will cause {{#defaultValue} check to pass.

        Overrides:
        toDefaultValue in class DefaultCodegen
        Parameters:
        p - Property schema
        Returns:
        string presentation of the default value of the property
      • getSchemaType

        public String getSchemaType​(io.swagger.v3.oas.models.media.Schema p)
        Optional - OpenAPI type conversion. This is used to map OpenAPI types in a `Property` into either language specific types via `typeMapping` or into complex models if there is not a mapping.
        Overrides:
        getSchemaType in class DefaultCodegen
        Parameters:
        p - property schema
        Returns:
        a string value of the type or complex model for this property
        See Also:
        Schema
      • toModelName

        public String toModelName​(String type)
        Description copied from class: DefaultCodegen
        Converts the OpenAPI schema name to a model name suitable for the current code generator. May be overridden for each programming language. In case the name belongs to the TypeSystem it won't be renamed.
        Specified by:
        toModelName in interface CodegenConfig
        Overrides:
        toModelName in class AbstractCppCodegen
        Parameters:
        type - the name of the model
        Returns:
        capitalized model name
      • toVarName

        public String toVarName​(String name)
        Description copied from class: DefaultCodegen
        Return the variable name by removing invalid characters and proper escaping if it's a reserved word.
        Overrides:
        toVarName in class AbstractCppCodegen
        Parameters:
        name - the variable name
        Returns:
        the sanitized variable name
      • toEnumVarName

        public String toEnumVarName​(String name,
                                    String datatype)
        Description copied from class: DefaultCodegen
        Return the sanitized variable name for enum
        Overrides:
        toEnumVarName in class DefaultCodegen
        Parameters:
        name - enum variable name
        datatype - data type
        Returns:
        the sanitized variable name for enum
      • toParamName

        public String toParamName​(String name)
        Description copied from class: DefaultCodegen
        Return the parameter name by removing invalid characters and proper escaping if it's a reserved word.
        Specified by:
        toParamName in interface CodegenConfig
        Overrides:
        toParamName in class AbstractCppCodegen
        Parameters:
        name - Codegen property object
        Returns:
        the sanitized parameter name
      • toApiName

        public String toApiName​(String type)
        Description copied from class: DefaultCodegen
        Output the API (class) name (capitalized) ending with the specified or default suffix Return DefaultApi if name is empty
        Specified by:
        toApiName in interface CodegenConfig
        Overrides:
        toApiName in class AbstractCppCodegen
        Parameters:
        type - the name of the Api
        Returns:
        capitalized Api name