Top Method Summary
Options Name Purpose
LOGICAL AppendEventHandlerMethod (character, character, character, RepositoryEventDescriptor) Appends a client-side event handler method to a Logic Object class
LOGICAL AppendServerSideEventHandlerMethod (character, character, character, character, RepositoryEventDescriptor) Appends a server-side event handler method to a Business Task class
CHARACTER CollapseSpaces (character) Returns the given string with tabs converted to blanks and runs of blanks collapsed
INTEGER FindEndClassLine (longchar) Returns the line number of the closing end class statement
CHARACTER FindIncludeFile (character, character) Returns the PROPATH relative name of a dataset include file when it exists
INTEGER FindMethodLine (longchar, character) Returns the line number of the declaration of the given method
CHARACTER GenerateLogicObject (character, character, character, character, logical) Generates the Logic Object class of a repository container
CHARACTER GenerateServerSideEventHandler (character, character, character, character, character, character, logical) Generates the server-side event handler Business Task of a repository container
CHARACTER GetDatasetName (character) Returns the name of the ProDataset a server-side event handler class operates on
CHARACTER GetDataSourceEntityName (character) Returns the Business Entity a MetaDataSource object master is bound to
CHARACTER GetEventSource (character) Returns the description of the source of an event for the method documentation
INTEGER GetMethodLineNumber (character, character) Returns the line number a method of the given class file is declared in
CHARACTER GetOutputFileName (character, character) Returns the name of the class file to generate
CHARACTER GetPackageFolder (character) Returns the package folder of a fully qualified class name
LOGICAL HasMethod (character, character) Returns if the given class file already declares a method of that name
LOGICAL InsertMethod (character, longchar, character) Inserts a method into a class file, before the closing end class statement
CHARACTER MaskLine (character, integer) Returns a copy of the given source line with comments and string literals blanked out
LONGCHAR MaskSource (longchar) Returns a copy of the source with all comments and string literals blanked out
CHARACTER ProposeMethodName (character, character, character, character) Returns the proposed name of an event handler method
LONGCHAR ReadSource (character) Reads a class file with the line endings normalized to CHR(10)
ResolveDataset (character, character, character) Resolves the ProDataset include file and dataset name of a Business Entity
ResolveDatasetFromBusinessEntity (character, character, character) Resolves the ProDataset from the Business Entity itself
ResolveDatasetFromModelFile (character, character, character) Resolves the ProDataset from the .bedgm model file of the Business Entity
WriteFile (character, longchar) Writes the generated source to the given file

Top Constructor Summary
Options Name Purpose
RepositoryCodeGenerationService () Constructor for the RepositoryCodeGenerationService class

Top Property Summary
Options Name Purpose
CHARACTER OutputFolder


Method Detail
Top

LOGICAL AppendEventHandlerMethod (character, character, character, RepositoryEventDescriptor)

Purpose: Appends a client-side event handler method to a Logic Object class
Notes: The method is inserted before the closing end class statement. When the
class already declares a method of that name nothing is written

Parameters:
pcFileName CHARACTER
The name of the Logic Object class file
pcMethodName CHARACTER
The name of the event handler method
pcInstanceName CHARACTER
The name of the object instance raising the event, empty for object master level events
poEvent Consultingwerk.SmartFramework.Repository.RepositoryEventDescriptor
The RepositoryEventDescriptor of the event
Returns LOGICAL
Logical value indicating if the method has been added
Top

LOGICAL AppendServerSideEventHandlerMethod (character, character, character, character, RepositoryEventDescriptor)

Purpose: Appends a server-side event handler method to a Business Task class
Notes: The method is inserted before the closing end class statement. When the
class already declares a method of that name nothing is written

Parameters:
pcFileName CHARACTER
The name of the event handler class file
pcMethodName CHARACTER
The name of the event handler method
pcInstanceName CHARACTER
The name of the object instance raising the event, empty for object master level events
pcDatasetName CHARACTER
The name of the ProDataset, resolved from the class when empty
poEvent Consultingwerk.SmartFramework.Repository.RepositoryEventDescriptor
The RepositoryEventDescriptor of the event
Returns LOGICAL
Logical value indicating if the method has been added
Top

CHARACTER CollapseSpaces (character)

Purpose: Returns the given string with tabs converted to blanks and runs of blanks collapsed
Notes: Lets the caller address the tokens of a source line with ENTRY

Parameters:
pcValue CHARACTER
The string to collapse
Returns CHARACTER
The collapsed string
Top

INTEGER FindEndClassLine (longchar)

Purpose: Returns the line number of the closing end class statement
Notes: Expects the masked source, see ReadSource

Parameters:
plcMasked LONGCHAR
The masked source of the class file
Returns INTEGER
The line number of the end class statement or 0 when not found
Top

CHARACTER FindIncludeFile (character, character)

Purpose: Returns the PROPATH relative name of a dataset include file when it exists
Notes:

Parameters:
pcFolder CHARACTER
The folder the include file is expected in
pcDatasetName CHARACTER
The name of the ProDataset
Returns CHARACTER
The relative name of the include file, or the empty string when it does not exist
Top

INTEGER FindMethodLine (longchar, character)

Purpose: Returns the line number of the declaration of the given method
Notes: Expects the masked source, see ReadSource

Parameters:
plcMasked LONGCHAR
The masked source of the class file
pcMethodName CHARACTER
The name of the method to look for
Returns INTEGER
The line number of the method declaration or 0 when not declared
Top

CHARACTER GenerateLogicObject (character, character, character, character, logical)

Purpose: Generates the Logic Object class of a repository container
Notes: Returns the unknown value when the file exists and plOverwrite is false

Parameters:
pcPackageName CHARACTER
The package name of the Logic Object class
pcClassName CHARACTER
The class name of the Logic Object class
pcObjectType CHARACTER
The object type of the container (MetaForm, MetaControlGroup, MetaViewer or MetaGrid)
pcAuthor CHARACTER
The author to write into the file header
plOverwrite LOGICAL
Logical value indicating if an existing file may be overwritten
Returns CHARACTER
The name of the generated class file or ? when nothing was generated
Top

CHARACTER GenerateServerSideEventHandler (character, character, character, character, character, character, logical)

Purpose: Generates the server-side event handler Business Task of a repository container
Notes: The ProDataset include and the dataset name are mandatory - the
generated class always carries a working include and GetDataset
method. Use ResolveDataset to obtain them from a Business Entity

Parameters:
pcPackageName CHARACTER
The package name of the event handler class
pcClassName CHARACTER
The class name of the event handler class
pcContainerName CHARACTER
The name of the repository container the handler belongs to
pcDatasetIncludeFile CHARACTER
The relative name of the ProDataset include file
pcDatasetName CHARACTER
The name of the ProDataset
pcAuthor CHARACTER
The author to write into the file header
plOverwrite LOGICAL
Logical value indicating if an existing file may be overwritten
Returns CHARACTER
The name of the generated class file or ? when nothing was generated
Top

CHARACTER GetDatasetName (character)

Purpose: Returns the name of the ProDataset a server-side event handler class operates on
Notes: Reads the dataset name from the GetDataset method of the class

Parameters:
pcFileName CHARACTER
The name of the event handler class file
Returns CHARACTER
The name of the ProDataset or the empty string when it cannot be determined
Top

CHARACTER GetDataSourceEntityName (character)

Purpose: Returns the Business Entity a MetaDataSource object master is bound to
Notes: SCL-4372 - the Business Entity is held by the EntityName attribute
of the data source object master. Note that the design time data
source of a container is a field of the object master record
(eSmartObjectMaster.DesignTimeDataSourceGuid / -Name) and names
another object master - it is not an attribute of the container
and not one of its object instances

Parameters:
pcDataSourceObjectMaster CHARACTER
The name or GUID of the MetaDataSource object master
Returns CHARACTER
The fully qualified name of the Business Entity, or the empty string
Top

CHARACTER GetEventSource (character)

Purpose: Returns the description of the source of an event for the method documentation
Notes:

Parameters:
pcInstanceName CHARACTER
The name of the object instance, empty for object master level events
Returns CHARACTER
The instance name or a description of the container
Top

INTEGER GetMethodLineNumber (character, character)

Purpose: Returns the line number a method of the given class file is declared in
Notes: SCL-5669 - allows the Object Master Designer to open an existing
event handler method in the IDE. Comments and string literals are
masked out before the source is scanned

Parameters:
pcFileName CHARACTER
The name of the class file to inspect
pcMethodName CHARACTER
The name of the method to look for
Returns INTEGER
The line number of the method declaration or 0 when it is not declared
Top

CHARACTER GetOutputFileName (character, character)

Purpose: Returns the name of the class file to generate
Notes:

Parameters:
pcPackageName CHARACTER
The package name of the class
pcClassName CHARACTER
The class name
Returns CHARACTER
The name of the class file
Top

CHARACTER GetPackageFolder (character)

Purpose: Returns the package folder of a fully qualified class name
Notes:

Parameters:
pcClassName CHARACTER
The fully qualified name of the class
Returns CHARACTER
The package folder, with forward slashes and no trailing slash
Top

LOGICAL HasMethod (character, character)

Purpose: Returns if the given class file already declares a method of that name
Notes: Comments and string literals are masked out before the source is scanned

Parameters:
pcFileName CHARACTER
The name of the class file to inspect
pcMethodName CHARACTER
The name of the method to look for
Returns LOGICAL
Logical value indicating if the method is already declared
Top

LOGICAL InsertMethod (character, longchar, character)

Purpose: Inserts a method into a class file, before the closing end class statement
Notes: Nothing is written when the class already declares a method of that name

Parameters:
pcFileName CHARACTER
The name of the class file
plcMethod LONGCHAR
The source of the method to insert
pcMethodName CHARACTER
The name of the method to insert
Returns LOGICAL
Logical value indicating if the method has been added
Top

CHARACTER MaskLine (character, integer)

Purpose: Returns a copy of the given source line with comments and string literals blanked out
Notes: ABL block comments nest, so the comment depth is carried from line to line

Parameters:
pcLine CHARACTER
The source line to mask
piCommentDepth INTEGER
The block comment nesting depth at the start and at the end of the line
Returns CHARACTER
The masked source line
Top

LONGCHAR MaskSource (longchar)

Purpose: Returns a copy of the source with all comments and string literals blanked out
Notes: The line structure is kept intact, so the source can be scanned for
ABL statements without matching commented out code

Parameters:
plcSource LONGCHAR
The source of the class file, line endings normalized to CHR(10)
Returns LONGCHAR
The masked copy of the source
Top

CHARACTER ProposeMethodName (character, character, character, character)

Purpose: Returns the proposed name of an event handler method
Notes: Instance level events are named <InstanceName>@lt;EventName>Handler,
object master level events <EventName>Handler, falling back to
<ObjectName>@lt;EventName>Handler when that name is taken

Parameters:
pcFileName CHARACTER
The name of the class file the method is added to
pcObjectName CHARACTER
The name of the repository object master
pcInstanceName CHARACTER
The name of the object instance, empty for object master level events
pcEventName CHARACTER
The name of the event
Returns CHARACTER
The proposed method name
Top

LONGCHAR ReadSource (character)

Purpose: Reads a class file with the line endings normalized to CHR(10)
Notes:

Parameters:
pcFileName CHARACTER
The name of the class file to read
Returns LONGCHAR
The source of the class file
Top

ResolveDataset (character, character, character)

Purpose: Resolves the ProDataset include file and dataset name of a Business Entity
Notes: Two strategies, in order (SCL-4372):
a) the Business Entity Designer model file (.bedgm) next to the
Business Entity class, which names the dataset and the folder
its include file was generated into
b) the Business Entity itself - instantiate it and read the name
off the dataset handed out by IBusinessEntity:FetchDataset,
assuming the include file sits in the Business Entity's package
Throws when neither strategy resolves an include file that exists
on the PROPATH - the generated event handler class must carry a
working ProDataset include and GetDataset method, so failing here
is preferable to emitting a class the developer has to repair

Parameters:
pcBusinessEntityName CHARACTER
The fully qualified name of the Business Entity
pcIncludeFile CHARACTER
The relative name of the ProDataset include file
pcDatasetName CHARACTER
The name of the ProDataset
Top

ResolveDatasetFromBusinessEntity (character, character, character)

Purpose: Resolves the ProDataset from the Business Entity itself
Notes: Strategy b) - instantiates the Business Entity and reads the name
off the dataset returned by IBusinessEntity:FetchDataset. Both
output parameters stay empty when the Business Entity cannot be
instantiated or the include file does not exist in its package

Parameters:
pcBusinessEntityName CHARACTER
The fully qualified name of the Business Entity
pcIncludeFile CHARACTER
The relative name of the ProDataset include file
pcDatasetName CHARACTER
The name of the ProDataset
Top

ResolveDatasetFromModelFile (character, character, character)

Purpose: Resolves the ProDataset from the .bedgm model file of the Business Entity
Notes: Strategy a) - both output parameters stay empty when the model file
is absent or does not lead to an include file that exists

Parameters:
pcBusinessEntityName CHARACTER
The fully qualified name of the Business Entity
pcIncludeFile CHARACTER
The relative name of the ProDataset include file
pcDatasetName CHARACTER
The name of the ProDataset
Top

WriteFile (character, longchar)

Purpose: Writes the generated source to the given file
Notes: Creates the package folder when it does not exist yet

Parameters:
pcFileName CHARACTER
The name of the file to write
plcSource LONGCHAR
The source code to write


Constructor Detail
Top

RepositoryCodeGenerationService ()

Purpose: Constructor for the RepositoryCodeGenerationService class
Notes:



Property Detail
Top

CHARACTER OutputFolder


Returns CHARACTER


Temp-Table Detail


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       24.08.2026 05:56:11