CodeGen
[ class tree: CodeGen ] [ index: CodeGen ] [ all elements ]

Class: CodeGen_Extension

Source Location: /CodeGen-1.0.7/CodeGen/Extension.php

Class Overview


Extension generator class


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005-2008 Hartmut Holzgraefe

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 47]
Extension generator class


[ Top ]


Class Variables

$acfragments = array("top"=>array(),"bottom"=>array())

[line 223]

acinclude fragments
  • Access: protected

Type:   array


[ Top ]

$authors = array()

[line 124]

The authors contributing to this extension
  • Access: protected

Type:   array


[ Top ]

$changelog =  ""

[line 141]

Release changelog
  • Access: protected

Type:   string


[ Top ]

$code = array()

[line 174]

Code snippets
  • Access: protected

Type:   array


[ Top ]

$codegen =

[line 231]

CodeGen_Tool_Code instance for internal use
  • Access: public

Type:   object


[ Top ]

$configfragments = array("top"=>array(),"bottom"=>array())

[line 214]

config.m4 fragments
  • Access: protected

Type:   array


[ Top ]

$defines = array()

[line 196]

Up front #defines
  • Access: protected

Type:   array


[ Top ]

$description =  ""

[line 84]

extension description
  • Access: protected

Type:   string


[ Top ]

$dirpath =  "."

[line 150]

Basedir for all created files
  • Access: public

Type:   string


[ Top ]

$headers = array()

[line 167]

External header files
  • Access: protected

Type:   array


[ Top ]

$language =  "c"

[line 107]

The implementation language

Currently we support "c" and "cpp"

  • Access: protected

Type:   string


[ Top ]

$libs = array()

[line 159]

External libraries
  • Access: protected

Type:   array


[ Top ]

$license =  null

[line 91]

The license for this extension
  • Access: protected

Type:   object


[ Top ]

$makefragments = array()

[line 205]

Makefile fragments
  • Access: protected

Type:   array


[ Top ]

$name =  "unknown"

[line 68]

The extensions basename (C naming rules apply)
  • Access: protected

Type:   string


[ Top ]

$packageFiles = array()

[line 181]

The package files created by this extension
  • Access: protected

Type:   array


[ Top ]

$platform =  null

[line 116]

The target platform for this extension

Possible values are "unix", "win" and "all"

  • Access: protected

Type:   string


[ Top ]

$prefix =  ""

[line 132]

Name prefix for functions etc.
  • Access: protected

Type:   string


[ Top ]

$release =  null

[line 98]

The release info for this extension
  • Access: protected

Type:   object


[ Top ]

$summary =  "The unknown extension"

[line 76]

The extensions descriptive name
  • Access: protected

Type:   string


[ Top ]

$version =  ""

[line 188]

Version requested by input if any
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 240]

CodeGen_Extension __construct( )

The constructor
  • Access: public

[ Top ]

addAcIncludeFragment   [line 744]

void addAcIncludeFragment( string $text, [ $position = "top"])

Add acinclude.m4 fragment
  • Access: public

Parameters:

string   $text   — 
   $position   — 

[ Top ]

addAuthor   [line 388]

void addAuthor( object a $author)

Add an author or maintainer to the extension
  • Access: public

Parameters:

object a   $author   —  maintainer object

[ Top ]

addCode   [line 499]

void addCode( string $role, string $position, string $code)

Add verbatim code snippet to extension
  • Access: public

Parameters:

string   $role   —  which file to put the code to
string   $position   —  where in the file the code should be put
string   $code   —  the actual code

[ Top ]

addConfigFragment   [line 728]

void addConfigFragment( string $text, [ $position = "top"])

Add config.m4 fragment
  • Access: public

Parameters:

string   $text   — 
   $position   — 

[ Top ]

addDefine   [line 697]

void addDefine( string $name, string $value, string $comment)

Add up front define
  • Access: public

Parameters:

string   $name   —  #define name
string   $value   —  value
string   $comment   —  comment

[ Top ]

addHeader   [line 535]

void addHeader( CodeGen_Dependency_Header $header, [ $catchDuplicates = true])

Add toplevel header file dependancy
  • Var: header filename

Parameters:

CodeGen_Dependency_Header   $header   — 
   $catchDuplicates   — 

[ Top ]

addLib   [line 516]

void addLib( CodeGen_Dependency_Lib $lib)

Add toplevel library dependancy
  • Var: library basename

Parameters:

CodeGen_Dependency_Lib   $lib   — 

[ Top ]

addMakeFragment   [line 715]

void addMakeFragment( string $text)

Add makefile fragment
  • Access: public

Parameters:

string   $text   — 

[ Top ]

addPackageFile   [line 618]

bool addPackageFile( string $type, string $path, [string $dir = ""])

Add a package file by type and path
  • Return: success state
  • Access: public

Parameters:

string   $type   —  type
string   $path   —  path
string   $dir   —  optional target dir

[ Top ]

addSourceFile   [line 643]

void addSourceFile( string $name, [string $dir = ""])

Add a source file to be copied to the extension dir
  • Access: public

Parameters:

string   $name   —  path
string   $dir   —  optional target dir

[ Top ]

cCodeEditorSettings   [line 831]

string cCodeEditorSettings( )

Generate Editor settings block for C source files
  • Return: Editor settings comment block
  • Access: public

[ Top ]

copyright   [line 61]

string copyright( )

Copyright message
  • Abstract:
  • Access: public

[ Top ]

docEditorSettings   [line 852]

string docEditorSettings( [int $level = 3])

Generate Editor settings block for documentation files
  • Return: Editor settings comment block
  • Access: public

Parameters:

int   $level   —  Directory nesting depth of target file (default: 3)

[ Top ]

getAuthors   [line 406]

void getAuthors( array 0)

Get Extension Maintainers
  • Access: public

Parameters:

array   0   —  Array of maintainer objects

[ Top ]

getChangelog   [line 275]

string getChangelog( )

changelog getter
  • Access: public

[ Top ]

getLanguage   [line 361]

string getLanguage( )

Get programming language

[ Top ]

getLicense   [line 457]

object getLicense( )

Get license
  • Access: public

[ Top ]

getName   [line 301]

string getName( )

Get extension base name

[ Top ]

getPrefix   [line 486]

string getPrefix( )

Get extension name prefix

[ Top ]

getRelease   [line 431]

object getRelease( )

Get release info
  • Access: public

[ Top ]

getVersion   [line 574]

string getVersion( )

Get requested version

[ Top ]

haveVersion   [line 604]

bool haveVersion( string $version)

Check requested version

Parameters:

string   $version   —  version

[ Top ]

runExtra   [line 862]

void runExtra( string $what)

Run extra commands on generated source

Parameters:

string   $what   —  token identifying what to run

[ Top ]

setChangelog   [line 262]

bool setChangelog( string $changelog)

Set method for changelog
  • Return: true on success
  • Access: public

Parameters:

string   $changelog   —  changelog

[ Top ]

setDescription   [line 324]

void setDescription( string $text)

Set extension documentation text
  • Access: public

Parameters:

string   $text   —  long description

[ Top ]

setLanguage   [line 336]

void setLanguage( string $lang)

Set the programming language to produce code for
  • Access: public

Parameters:

string   $lang   —  programming language name

[ Top ]

setLicense   [line 444]

void setLicense( object $license)

Set license
  • Access: public

Parameters:

object   $license   — 

[ Top ]

setName   [line 286]

void setName( string $name)

Set extension base name
  • Access: public

Parameters:

string   $name   —  name

[ Top ]

setPlatform   [line 372]

void setPlatform( string $type)

Set target platform for generated code
  • Access: public

Parameters:

string   $type   —  platform name

[ Top ]

setPrefix   [line 471]

void setPrefix( string $prefix)

Set extension name prefix (for functions etc.)
  • Access: public

Parameters:

string   $prefix   —  name

[ Top ]

setRelease   [line 418]

void setRelease( $release)

Set release info
  • Access: public

Parameters:

   $release   — 

[ Top ]

setSummary   [line 312]

void setSummary( string $text)

Set extension summary text
  • Access: public

Parameters:

string   $text   —  short summary

[ Top ]

setVersion   [line 584]

void setVersion( string $version)

Set requested version

Parameters:

string   $version   — 

[ Top ]

version   [line 54]

string version( )

Current version number
  • Abstract:
  • Access: public

[ Top ]

writeDotCvsignore   [line 760]

void writeDotCvsignore( string 0)

Write .cvsignore entries
  • Access: public

Parameters:

string   0   —  directory to write to

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.