DBPowerSuite 7.9 Application Programming Interface
Documentation Generation

 

Class Description

Get Help Info from Source Code

Class Name

PSFunctionHelp

Parent Class

ULogObject

Header Name

PSFunctionHelp.h

Library

libpsUCommon

Language

C++

Author

Brian N. Ceccarelli

Location

Apex, NC

Date Written

July 7, 2002

Last Updated

August 29, 2002

Last Updated By

Brian N. Ceccarelli

Notes

     This class finds the help for the first function in an array of
text strings.    You supply the pointer to the array of string
pointers, then you call methods of this class which in turn parse
the text strings and give you access to the various sections of the
function's help text.

     You will not know what function's help it's going to get until
after it has read through your string arrays.   Call methods
fhGetClassName and fhGetFunctionName to find out.

     This class finds only the first occurrance of help text in your
string array.    If there is more than 1 function in your string
array, then the class hasn't read that far into the string array.
This class assumes that the help text for the function
either immediately precedes the function body or is inside the
function.  Once the class detects the end of a function, it considers
that it got whatever help comments it's going to get.

     This class also pulls out the class definitions and their
methods.   But again, the class will stop getting the information
once it reaches the end of the first function definition.

     In order for you to pull help from functions further in the
string array, you must set the position of the text array pointer,
and then get the help text again.   You can use fhGetCurrentLine
to get what line the class has stopped at.   Remember, one
PSFunctionHelp object contains the help text for only one function.

     The program that uses this class is psListFunctionsForWeb.

     psListFunctionsForWeb collects a list of class and function
names by using the class PSHeader.   For each class and function
name, psListFunctionsForWeb reads through all the PS source code
using uReadFile() passing uReadFile's array of text strings
to the methods of PSFuntionHelp.  psListFunctionsForWeb organizes
all the returned information from PSFunctionHelp,  then uses
PSWebTable to generate web pages for all classes and functions in
the PS API.

 

Public Methods of Class PSFunctionHelp

#

Inline

Pure Virtual

Virtual

Method

Description

1

No

No

No

PSFunctionHelp()

Constructor

2

No

No

No

static ps_int32 fhFreeClassList(PS_CLASS_LIST& class_list)

 

3

No

No

No

ps_int32 fhGetAuthor(ps_char* author)

 

4

No

No

No

ps_int32 fhGetClassDescription(PS_FUNCTION_HELP_SECTION& section)

 

5

No

No

No

ps_int32 fhGetClassList(PS_CLASS_LIST& class_list, ps_int8 free_class_list_first_sw = 0)

 

6

No

No

No

ps_int32 fhGetClassName(ps_char* class_name)

 

7

No

No

No

ps_int32 fhGetCode(PS_FUNCTION_CODE_SECTION& section)

 

8

No

No

No

ps_int32 fhGetCurrentLine(ps_int32& current_line)

 

9

No

No

No

ps_int32 fhGetDateWritten(ps_char* date_written)

 

10

No

No

No

ps_int32 fhGetFunction(PS_FUNCTION& function)

 

11

No

No

No

ps_int32 fhGetFunctionDescription(PS_FUNCTION_HELP_SECTION& section)

 

12

No

No

No

ps_int32 fhGetFunctionName(ps_char* function_name)

 

13

No

No

No

static ps_int32 fhGetHash(const ps_char* class_name, const ps_char* function_name, ps_uint64& hash)

 

14

No

No

No

ps_int32 fhGetHeaderDescription(PS_FUNCTION_HELP_SECTION& section)

 

15

No

No

No

ps_int32 fhGetLanguage(ps_char* language)

 

16

No

No

No

ps_int32 fhGetLastUpdated(ps_char* last_updated)

 

17

No

No

No

ps_int32 fhGetLastUpdatedBy(ps_char* last_updated_by)

Get the Author Who Updated This Function Last

18

No

No

No

ps_int32 fhGetLibrary(ps_char* library_name)

Get the Library Where This Function Exists

19

No

No

No

ps_int32 fhGetLocation(ps_char* location)

 

20

No

No

No

ps_int32 fhGetNotes(PS_FUNCTION_HELP_SECTION& section)

 

21

No

No

No

ps_int32 fhGetNumberOfClasses(ps_int32& number_of_classes_in_class_list)

 

22

No

No

No

ps_int32 fhGetNumberOfSections(ps_int32& number_of_sections)

 

23

No

No

No

ps_int32 fhGetNumberOfSourceLines(ps_int32& number_of_source_lines)

Get the Number of Sources Lines You Had Specified With fhSetStringArray.

24

No

No

No

ps_int32 fhGetRequiredHeaders(PS_FUNCTION_LIST_SECTION& headers)

 

25

No

No

No

ps_int32 fhGetReturnValues(PS_FUNCTION_HELP_SECTION& section)

 

26

No

No

No

ps_int32 fhGetSection(ps_int32 section_number, PS_FUNCTION_HELP_SECTION& section)

 

27

No

No

No

ps_int32 fhGetSeeAlso(PS_FUNCTION_LIST_SECTION& see_also)

 

28

No

No

No

ps_int32 fhGetSignature(ps_char* signature)

 

29

No

No

No

ps_int32 fhGetStringArray(const ps_char*** source_lines)

 

30

No

No

No

ps_int32 fhLogLinesOfCode()

Write all the Line of Code to the Log File

31

No

No

No

ps_int32 fhSetFunctionAlphabeticalOrderSw(ps_int8 sw = 1)

 

32

No

No

No

ps_int32 fhSetSaveCodeSectionSw(ps_int8 sw = 1)

 

33

No

No

No

ps_int32 fhSetStringArray(const ps_char** source_lines, ps_int32 number_of_source_lines)

 

34

No

No

No

~PSFunctionHelp()

 

 

Protected Methods of Class PSFunctionHelp

#

Inline

Pure Virtual

Virtual

Method

Description

1

No

No

No

ps_int32 fhAddCodeLine(const ps_char* code_line, ps_int8& end_of_function_sw)

Add a Non-Comment Line to the Body of Source Code Section

2

No

No

No

ps_int32 fhAddSectionLine(ps_char* attribute_ptr, const ps_char* source_text)

Add a Line to a Function Help Section

3

No

No

No

ps_int32 fhAddToList(PS_FUNCTION_LIST_SECTION& list, ps_char* source_text)

Add Items to a Function's Help Section which is a List

4

No

No

No

ps_int32 fhBeautifyArgumentList(const ps_char* code_text, ps_char* arguments_list)

Beautify a Function's Argument List

5

No

No

No

ps_int32 fhBuildClassList(PS_LANGUAGE_LINE_LIST& list, const ps_char* current_class, const ps_char* current_parent_class, ps_int32 current_permissions_bits)

Build a List of Classes from a List of Language Lines

6

No

No

No

ps_int32 fhBuildStringFromLines(ps_char* text, ps_int32 starting_line_index, ps_int32 starting_character_index, ps_int32 ending_line_index, ps_int32 ending_character_index, ps_int32 text_max_len)

 

7

No

No

No

ps_int32 fhFindClassListIndex(const ps_char* class_name, const ps_char* parent_class_name, ps_int32& class_list_index)

Find the Index into the Class List Structure for the Class Name

8

No

No

No

ps_int32 fhFreeCodeSection()

 

9

No

No

No

ps_int32 fhFreeLanguageLineList(PS_LANGUAGE_LINE_LIST& list)

 

10

No

No

No

ps_int32 fhFreeSectionLines()

Reset and Free Function Help Memory

11

No

No

No

ps_int32 fhGetHelp()

 

12

No

No

No

ps_int8 fhIsEndOfFunction(ps_int32 code_line_index, ps_int32 character_index)

 

13

No

No

No

ps_int8 fhIsRecordComment(const ps_char* record, ps_char* record_stripped_of_comment_symbols, ps_char* record_stripped_of_comment_symbols_no_white_spaces)

 

14

No

No

No

ps_int8 fhIsSection(const ps_char* record, ps_char* section_name, ps_char* remainder_of_record, ps_int8& section_id)

 

15

No

No

No

ps_int32 fhParseFunctionIntoParts(const ps_char* text, PS_FUNCTION& function)

Extract a Function Signature from a C++ Code Statement

16

No

No

No

ps_int32 fhParseIntoLinesOfCode(const ps_char* code, PS_LANGUAGE_LINE_LIST& list)

Parse a Big String into Individual Lines of Code

17

No

No

No

ps_int32 fhParseOutFunctionDeclarations()

Find the Function Declarations in the Code Section

18

No

No

No

ps_int32 fhParseOutFunctionSignature()

Find the Function Signature in the Code Section

19

No

No

No

ps_int32 fhSortFunctionDeclarations()

Sort the Function Declarations in the Class List

 

Private Methods of Class PSFunctionHelp

#

Inline

Pure Virtual

Virtual

Method

Description

 

Go to DBPowerSuite 7.9 Application Programming Interface.


Updated: Thu Jun 18 21:13:23 2009