NDEVR
API Documentation
CustomModelBuilder

Generates boilerplate header and source files for a custom Model subclass, optionally including a companion CustomModelLogic behavior class. More...

Collaboration diagram for CustomModelBuilder:
[legend]

Public Member Functions

String className () const
 Returns the computed class name for the model.
void createCustomBehaviorHeader (File &file) const
 Creates the custom behavior header file.
void createCustomBehaviorSource (File &file) const
 Creates the custom behavior source file.
bool createFiles ()
 Generates all model and behavior files.
void createHeader (File &file) const
 Creates the model header file.
void createSource (File &file) const
 Creates the model source file.
String customBehaviorHeaderPath () const
 Returns the relative header path for the custom behavior class.
String customLogicClassName () const
 Returns the class name for the custom behavior logic.
String headerPath () const
 Returns the relative header path for the model class.
String modelHeaderString () const
 Generates the model header file content as a string.
String modelLogicHeaderString () const
 Generates the model logic header file content as a string.
String modelLogicSourceString () const
 Generates the model logic source file content as a string.
String modelSourceString () const
 Generates the model source file content as a string.
String typeName () const
 Returns the model type name used for registration.

Public Attributes

String behavior_project_name
 The project that owns the behavior class.
BoilerMaker boiler_maker
 Boilerplate template generator.
String class_name
 The derived class name (computed lazily).
bool generate_behavior = true
 Whether to also generate a behavior class.
LogPtr log
 Log for status messages.
String model_name
 The human-readable model name.
String model_project_name
 The project that owns the model class.
bool override = false
 Whether to overwrite existing files.
File source_directory
 The directory where generated source files are placed.
String type_name
 The model type identifier (computed lazily).
File ui_directory
 The directory for generated UI files.

Detailed Description

Generates boilerplate header and source files for a custom Model subclass, optionally including a companion CustomModelLogic behavior class.

Definition at line 11 of file CustomModelBuilder.h.

Member Function Documentation

◆ className()

String CustomModelBuilder::className ( ) const

Returns the computed class name for the model.

Returns
The class name string.

◆ createCustomBehaviorHeader()

void CustomModelBuilder::createCustomBehaviorHeader ( File & file) const

Creates the custom behavior header file.

Parameters
[in]fileThe output file to write to.

◆ createCustomBehaviorSource()

void CustomModelBuilder::createCustomBehaviorSource ( File & file) const

Creates the custom behavior source file.

Parameters
[in]fileThe output file to write to.

◆ createFiles()

bool CustomModelBuilder::createFiles ( )

Generates all model and behavior files.

Returns
True on success.

◆ createHeader()

void CustomModelBuilder::createHeader ( File & file) const

Creates the model header file.

Parameters
[in]fileThe output file to write to.

◆ createSource()

void CustomModelBuilder::createSource ( File & file) const

Creates the model source file.

Parameters
[in]fileThe output file to write to.

◆ customBehaviorHeaderPath()

String CustomModelBuilder::customBehaviorHeaderPath ( ) const

Returns the relative header path for the custom behavior class.

Returns
The behavior header file path string.

◆ customLogicClassName()

String CustomModelBuilder::customLogicClassName ( ) const

Returns the class name for the custom behavior logic.

Returns
The behavior logic class name string.

◆ headerPath()

String CustomModelBuilder::headerPath ( ) const

Returns the relative header path for the model class.

Returns
The header file path string.

◆ modelHeaderString()

String CustomModelBuilder::modelHeaderString ( ) const

Generates the model header file content as a string.

Returns
The header source code.

◆ modelLogicHeaderString()

String CustomModelBuilder::modelLogicHeaderString ( ) const

Generates the model logic header file content as a string.

Returns
The header source code.

◆ modelLogicSourceString()

String CustomModelBuilder::modelLogicSourceString ( ) const

Generates the model logic source file content as a string.

Returns
The source code.

◆ modelSourceString()

String CustomModelBuilder::modelSourceString ( ) const

Generates the model source file content as a string.

Returns
The source code.

◆ typeName()

String CustomModelBuilder::typeName ( ) const

Returns the model type name used for registration.

Returns
The type name string.

The documentation for this class was generated from the following file: