dotr\Maia\Builder
CLASS Basic

CLASS dotr.Maia.Builder.Basic

Maia Basic builder

Core methods to build source file from the template provided
Author:
Julian Lyndon-Smith (julian+maia@dotr.com)

Field Summary
INTEGER DatatypeSize PROTECTED
           
TTIndex PROTECTED
           holds all unique indicies from a table.
TTProperty PROTECTED
           temptable to hold the meta-data for an object.
 

Property Summary
LOGICAL BuilderAvailable PUBLIC GET PROTECTED SET
           
ObjectConfig ObjectConfig1 PROTECTED GET PRIVATE SET
           
 

Method Summary
CONSTRUCTOR (ObjectConfig p_ObjectConfig)
           p_ObjectConfig is the instance of the _Maia-Config/foo.xml file
VOID BuildIndex ()
           creates temp-table records for all unique indicies of an object
VOID BuildProperties ()
           Create temp-table record for each property
VOID Copyright (Directive p_Directive)
           Insert copyright message in each file
VOID CustomCode (Directive p_Directive)
           insert custom code
VOID DefineBuffer (Directive p_Directive)
           create a buffer, using the database name if supplied
VOID DefineClassName (Directive p_Directive)
           Example of how to write a build method. Not a very useful method ;)
VOID DefineDefaultconstructor (Directive p_Directive)
           Example of how to write a build method. Not a very useful method ;)
VOID DefineFluentMethods (Directive p_Directive)
           fluent method definitions
VOID DefineGetMethods (Directive p_Directive)
           build the methods for each of the get statements in the model
VOID DefineInstance (Directive p_Directive)
           create "instance" statements
VOID DefineProperties (Directive p_Directive)
           build the "def property" statement for each of the properties
LONGCHAR EndBuild (LONGCHAR p_Data)
           Dummy placeholder for end of build event
CHARACTER GetParameter (Directive p_Directive, CHARACTER p_Label)
           gets the value of a directive parameter
VOID ID (Directive p_Directive)
           Insert version control ID tag
VOID JavaDocHeader (Directive p_Directive)
           Generate JavaDoc method header comment
VOID MethodHeader (Directive p_Directive)
           Example of how to write a build method. Not a very useful method ;)
VOID Publish (Directive p_Directive)
           class event definitions
LONGCHAR StartBuild (LONGCHAR p_Data)
           Dummy placeholder for start of build event
VOID Using (Directive p_Directive)
           Example of how to write a build method. Not a very useful method ;)
 

Field Detail

DatatypeSize

INTEGER PROTECTED

TTIndex

PROTECTED
holds all unique indicies from a table.

Used to build get statements in the model and crud classes

TTProperty

PROTECTED
temptable to hold the meta-data for an object.

Meta-data from each object (from the _Maia-Config directory) can hold information from a database (created using dotr/Maia/BuildTableMVC.w) and then enhanced with custom properties

Property Detail

BuilderAvailable

LOGICAL PUBLIC GET PROTECTED SET

ObjectConfig1

ObjectConfig PROTECTED GET PRIVATE SET

Method Detail

CONSTRUCTOR

CONSTRUCTOR(ObjectConfig p_ObjectConfig)
p_ObjectConfig is the instance of the _Maia-Config/foo.xml file


BuildIndex

PUBLIC VOID BuildIndex()
creates temp-table records for all unique indicies of an object


BuildProperties

PUBLIC VOID BuildProperties()
Create temp-table record for each property


Copyright

PUBLIC VOID Copyright(Directive p_Directive)
Insert copyright message in each file

Parameters:
p_Directive - : holds the directive name and all parameters

CustomCode

PUBLIC VOID CustomCode(Directive p_Directive)
insert custom code

calls the getCustomCode method in the objectConfig class to insert custom code into the template
Parameters:
p_Directive - : holds the directive name and all parameters

DefineBuffer

PUBLIC VOID DefineBuffer(Directive p_Directive)
create a buffer, using the database name if supplied

Parameters:
p_Directive - : holds the directive name and all parameters

DefineClassName

PUBLIC VOID DefineClassName(Directive p_Directive)
Example of how to write a build method. Not a very useful method ;)

Parameters:
p_Directive - : holds the directive name and all parameters

DefineDefaultconstructor

PUBLIC VOID DefineDefaultconstructor(Directive p_Directive)
Example of how to write a build method. Not a very useful method ;)

Parameters:
p_Directive - : holds the directive name and all parameters

DefineFluentMethods

PUBLIC VOID DefineFluentMethods(Directive p_Directive)
fluent method definitions

experimental feature to make code "easier" to read each property can have a "fluent" method name, which takes a parameter to set the property but then returns THIS-OBJECT so that you can chain method calls together
Parameters:
p_Directive - : holds the directive name and all parameters

DefineGetMethods

PUBLIC VOID DefineGetMethods(Directive p_Directive)
build the methods for each of the get statements in the model

Parameters:
p_Directive - : holds the directive name and all parameters

DefineInstance

PUBLIC VOID DefineInstance(Directive p_Directive)
create "instance" statements

used to create pseudo-singletons. (Singletons without the static defintions
Parameters:
p_Directive - : holds the directive name and all parameters

DefineProperties

PUBLIC VOID DefineProperties(Directive p_Directive)
build the "def property" statement for each of the properties

Parameters:
p_Directive - : holds the directive name and all parameters

EndBuild

PUBLIC LONGCHAR EndBuild(LONGCHAR p_Data)
Dummy placeholder for end of build event

Parameters:
p_Data - : Contents of modified template
Returns:
longchar: altered data

GetParameter

PROTECTED CHARACTER GetParameter(Directive p_Directive, CHARACTER p_Label)
gets the value of a directive parameter

Parameters:
p_Directive - : holds the directive name and all parameters
Returns:
char : Value of parameter. Blank if not found

ID

PUBLIC VOID ID(Directive p_Directive)
Insert version control ID tag

Parameters:
p_Directive - : holds the directive name and all parameters

JavaDocHeader

PUBLIC VOID JavaDocHeader(Directive p_Directive)
Generate JavaDoc method header comment

Parameters:
p_Directive - : holds the directive name and all parameters

MethodHeader

PUBLIC VOID MethodHeader(Directive p_Directive)
Example of how to write a build method. Not a very useful method ;)

Gives example of how to use parameter if supplied, or default to standard option
Parameters:
p_Directive - : holds the directive name and all parameters

Publish

PUBLIC VOID Publish(Directive p_Directive)
class event definitions

Parameters:
p_Directive - : holds the directive name and all parameters

StartBuild

PUBLIC LONGCHAR StartBuild(LONGCHAR p_Data)
Dummy placeholder for start of build event

Parameters:
p_Data - : Contents of template
Returns:
longchar: altered data

Using

PUBLIC VOID Using(Directive p_Directive)
Example of how to write a build method. Not a very useful method ;)

Parameters:
p_Directive - : holds the directive name and all parameters