Namespace: Consultingwerk.Util
Class 
ProcedureHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:ProcedureHelper
Purpose:Provides support routines dealing with access to procedures
Syntax:Static methods only, Protected constructor to disallow
instance creation
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Tue Sep 08 15:27:16 CEST 2009
Purpose: Protected default constructor.
Notes: There's no need to create instances of the helper classes



Top Method Summary
Options Name Purpose
+ HANDLE FindPersistentProcedure (character) Searches for the first instance of a persistent procedure with the given name
+ HANDLE FindPersistentProcedure (character, logical) Searches for the first instance of a persistent procedure with the given name, if not found, supports starting the persistent procedure when not found
+ LOGICAL HasEntry (handle, character) Returns true if the procedure or it's super-procedures contains the given entry (internal procedures or user defined functions) and thus the given entry is callable (RUN or DYNAMIC-FUNCTION).
+ LOGICAL HasEntry (handle, character, character) Returns true if the procedure or it's super-procedures contains the given entry (internal procedures or user defined functions) and thus the given entry is callable (RUN or DYNAMIC-FUNCTION).
+ LOGICAL HasEntry (handle, character, EntryTypeEnum) Returns true if the procedure or it's super-procedures contains the given entry (internal procedures or user defined functions) and thus the given entry is callable (RUN or DYNAMIC-FUNCTION).
+ LOGICAL HasEntryMatching (handle, character) Returns true if the procedure or it's super-procedures contains the given entry (internal procedures or user defined functions) and thus the given entry is callable (RUN or DYNAMIC-FUNCTION).
+ LOGICAL HasEntryMatching (handle, character, character) Returns true if the procedure or it's super-procedures contains the given entry (internal procedures or user defined functions) and thus the given entry is callable (RUN or DYNAMIC-FUNCTION).
+ LOGICAL HasEntryMatching (handle, character, EntryTypeEnum) Returns true if the procedure or it's super-procedures contains the given entry (internal procedures or user defined functions) and thus the given entry is callable (RUN or DYNAMIC-FUNCTION).
# CHARACTER HasEntryMatchingInternal (handle, character) Searches the passed in procedure handle for an entry using a search pattern.
+ LOGICAL HasInternalProcedure (handle, character) Returns true if the procedure or it's super-procedures contains the named internal procedures and thus the named internal procedue is callable (RUN).
+ LOGICAL HasUserDefinedFunction (handle, character) Returns true if the procedure or it's super-procedures contains the named user defined function internal procedures and thus the user defined function is callable (DYNAMIC-FUNCTION).
+ CHARACTER ShortDotPName (handle) Returns the file-name of the current procedure handle without the pathname and without the extension

Top Constructor Summary
Options Name Purpose
# ProcedureHelper () Protected default constructor.


Method Detail
Top

PUBLIC HANDLE FindPersistentProcedure (character)

Purpose: Searches for the first instance of a persistent procedure with the
given name
Notes:

Parameters:
pcFileName CHARACTER
The file name of the persistent procedure to search for
Returns HANDLE
The handle of the persistent procedure instance or ? when no instance is found
Top

PUBLIC HANDLE FindPersistentProcedure (character, logical)

Purpose: Searches for the first instance of a persistent procedure with the
given name, if not found, supports starting the persistent procedure when not found
Notes:

Parameters:
pcFileName CHARACTER
The file name of the persistent procedure to search for
plStart LOGICAL
Start the persistent procedure or not
Returns HANDLE
The handle of the persistent procedure instance or ? when no instance is found
Top

PUBLIC LOGICAL HasEntry (handle, character)

Purpose: Returns true if the procedure or it's super-procedures contains the
given entry (internal procedures or user defined functions) and thus
the given entry is callable (RUN or DYNAMIC-FUNCTION).
Notes:

Parameters:
phProcedure HANDLE
The handle of the persistent procedure
pcEntry CHARACTER
The name of an internal procedure or user defined function
Returns LOGICAL
TRUE when an entry is found, else FALSE
Top

PUBLIC LOGICAL HasEntry (handle, character, character)

Purpose: Returns true if the procedure or it's super-procedures contains the
given entry (internal procedures or user defined functions) and thus
the given entry is callable (RUN or DYNAMIC-FUNCTION).
Notes:

Parameters:
phProcedure HANDLE
The handle of the persistent procedure
pcEntry CHARACTER
The name of an internal procedure or user defined function
pcType CHARACTER
The entry type, PROCEDURE or FUNCTION
Returns LOGICAL
TRUE when an entry is found, else FALSE
Top

PUBLIC LOGICAL HasEntry (handle, character, EntryTypeEnum)

Purpose: Returns true if the procedure or it's super-procedures contains the
given entry (internal procedures or user defined functions) and thus
the given entry is callable (RUN or DYNAMIC-FUNCTION).
Notes:

Parameters:
phProcedure HANDLE
The handle of the persistent procedure
pcEntry CHARACTER
The name of an internal procedure or user defined function
poType Consultingwerk.EntryTypeEnum
The entry type as an EntryTypeEnum member
Returns LOGICAL
TRUE when an entry is found, else FALSE
Top

PUBLIC LOGICAL HasEntryMatching (handle, character)

Purpose: Returns true if the procedure or it's super-procedures contains the
given entry (internal procedures or user defined functions) and thus
the given entry is callable (RUN or DYNAMIC-FUNCTION).
Notes: Uses MATCHES to compare pcEntry to the name of the internal entries

Parameters:
phProcedure HANDLE
The handle of the procedure
pcEntry CHARACTER
The search pattern for internal entries
Returns LOGICAL
TRUE when an entry is found, else FALSE
Top

PUBLIC LOGICAL HasEntryMatching (handle, character, character)

Purpose: Returns true if the procedure or it's super-procedures contains the
given entry (internal procedures or user defined functions) and thus
the given entry is callable (RUN or DYNAMIC-FUNCTION).
Notes: Uses MATCHES to compare pcEntry to the name of the internal entries

Parameters:
phProcedure HANDLE
The handle of the procedure
pcEntry CHARACTER
The search pattern for internal entries
pcType CHARACTER
The entry type, e.g. PROCEDURE or FUNCTION
Returns LOGICAL
TRUE when an entry is found, else FALSE
Top

PUBLIC LOGICAL HasEntryMatching (handle, character, EntryTypeEnum)

Purpose: Returns true if the procedure or it's super-procedures contains the
given entry (internal procedures or user defined functions) and thus
the given entry is callable (RUN or DYNAMIC-FUNCTION).
Notes: Uses MATCHES to compare pcEntry to the name of the internal entries

Parameters:
phProcedure HANDLE
The handle of the procedure
pcEntry CHARACTER
The search pattern for internal entries
poType Consultingwerk.EntryTypeEnum
The entry type as an EntryTypeEnum member
Returns LOGICAL
TRUE when an entry is found, else FALSE
Top

PROTECTED CHARACTER HasEntryMatchingInternal (handle, character)

Purpose: Searches the passed in procedure handle for an entry using a search
pattern.
Notes: Uses MATCHES to compare pcEntry to the name of the internal entries

Parameters:
phProcedure HANDLE
The handle of the procedure
pcEntry CHARACTER
The search pattern for internal entries
Returns CHARACTER
The name of the matching entry name or ? if none is found
Top

PUBLIC LOGICAL HasInternalProcedure (handle, character)

Purpose: Returns true if the procedure or it's super-procedures contains the
named internal procedures and thus the named internal procedue is
callable (RUN).
Notes:

Parameters:
phProcedure HANDLE
The handle of the procedure to validate
pcEntry CHARACTER
The name of the internal procedure to test for
Returns LOGICAL
Logical value indicating if the internal procedure exists
Top

PUBLIC LOGICAL HasUserDefinedFunction (handle, character)

Purpose: Returns true if the procedure or it's super-procedures contains the
named user defined function internal procedures and thus the user
defined function is callable (DYNAMIC-FUNCTION).
Notes:

Parameters:
phProcedure HANDLE
The handle of the procedure to validate
pcEntry CHARACTER
The name of the user defined function to test for
Returns LOGICAL
Logical value indicating if the user defined function exists
Top

PUBLIC CHARACTER ShortDotPName (handle)

Purpose: Returns the file-name of the current procedure handle without the
pathname and without the extension
Notes:

Parameters:
phProcedureHandle HANDLE
The handle to the procedure
Returns CHARACTER
The short name of the procedure file


Constructor Detail
Top

PROTECTED ProcedureHelper ()

Purpose: Protected default constructor.
Notes: There's no need to create instances of the helper classes



©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       15.04.2024 06:16:57