Package DE_EPAGES::SourceDoc::API::BaseLanguage
This an abstract parser class that can be used to parse source code in multiple languages. Derived classes implement the specifics for a particular language.
Functions
- SavePreText
- SaveSkip
- SaveText
- defaultState
- new
- parseCode
- project
- replaceTag
- replaceTagLinks
- sourceDir
- targetDir
SavePreText
Saves a plain text key and preserves whitespace
Syntax |
$self->SavePreText( $hBlock, $hResult ) |
Input |
|
Output |
|
Return |
|
SaveSkip
Prevents from saving unused information
Syntax |
$self->SaveSkip( $hBlock, $hResult ) |
Input |
|
Output |
|
Return |
|
SaveText
Saves a plain text key
Syntax |
$self->SaveText( $hBlock, $hResult ) |
Input |
|
Output |
|
Return |
|
defaultState
Returns or sets the default state for any documantation item that has not specified whether it is public or private.
Syntax |
$DefaultState = $self->defaultState; $self->defaultState( $DefaultState ); |
Input |
|
Return |
|
new
Creates a new parser object.
Syntax |
$Parser = DE_EPAGES::SourceDoc::API::BaseLanguage->new(%Options); |
Input |
|
Return |
|
parseCode
builds the recurse hash-array-structur
Syntax |
$ret = $self->parseCode( $Parent, $ToParse, $Code, $hResult ); |
Input |
|
Output |
|
Return |
|
project
Returns or sets the project. If a project is specified, then the parser will only extract documentation that belongs to this project.
Syntax |
$Project = $self->project; $self->project( $Project ); |
Input |
|
Return |
|
replaceTag
replaces a tag like '
' or 'function'
Syntax |
$NewContent = $self->replaceTag( $TagContent, $Node, $LinkTemplate ); |
Input |
|
Return |
|
replaceTagLinks
Replaces all links in help tags of a result set
The links are searched recursively in all tags of a file. For each found
link the link parts are changed into a valid entry in the links array
(with path, file name, package name a.s.o.). To do this the passed flags
for building directories are used. After creating the entry it is searched
in the link entries. If found the link is converted using the links template
stored in $TemplDir/Links.html. While this is done the TLE's
- #Name: (Perl: Path and) name of the entry
- #DB: the database name
- #Class: The template class
All invalid occurences of '' are replaced with the according html text.
Syntax |
$self->replaceTagLinks( $hResult, $LinkTemplate ) |
Input |
|
sourceDir
Returns the source directory.
Syntax |
$SourceDir = $self->sourceDir; |
Return |
|
targetDir
Returns the target directory.
Syntax |
$TargetDir = $self->targetDir; |
Return |
|