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

Class: CodeGen_Element

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

Class Overview


Abstract base class for all code elements


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005-2008 Hartmut Holzgraefe

Variables

Methods


Child classes:

CodeGen_Dependency_Lib
Class representing a library dependencyp
CodeGen_Dependency_Header
Class representing a header file dependency

Inherited Variables

Inherited Methods


Class Details

[line 33]
Abstract base class for all code elements


[ Top ]


Class Variables

$description =  ""

[line 94]

A long description
  • Access: protected

Type:   string


[ Top ]

$ifCondition =  ""

[line 115]

Conditional compile condition
  • Access: protected

Type:   string


[ Top ]

$name =  "unknown"

[line 40]

The function name
  • Access: protected

Type:   string


[ Top ]

$summary =  ""

[line 72]

A short description
  • Access: protected

Type:   string


[ Top ]



Method Detail

addIfCondition   [line 132]

void addIfCondition( string $code)

ifCondition adder

Parameters:

string   $code     preprocessor #if condition

[ Top ]

cCode   [line 227]

string cCode( string $name)

Generate C code for element
  • Return: C code
  • Access: public

Parameters:

string   $name     Extension name

[ Top ]

cCodeFooter   [line 251]

string cCodeFooter( string $name)

Generate C code footer block for all elements of this class
  • Return: C code
  • Access: public

Parameters:

string   $name     Extension name

[ Top ]

cCodeHeader   [line 239]

string cCodeHeader( string $name)

Generate C code header block for all elements of this class
  • Return: C code
  • Access: public

Parameters:

string   $name     Extension name

[ Top ]

docEntry   [line 275]

string docEntry( string $extension)

Generate documentation code for element
  • Return: documentation content
  • Access: public

Parameters:

string   $extension     id basename for extension

[ Top ]

docFooter   [line 299]

string docFooter( string $name)

Generate documentation footer block for all elements of this class
  • Return: documentation fragment
  • Access: public

Parameters:

string   $name     Extension name

[ Top ]

docHeader   [line 287]

string docHeader( string $name)

Generate documentation header block for all elements of this class
  • Return: documentation fragment
  • Access: public

Parameters:

string   $name     Extension name

[ Top ]

getIfCondition   [line 155]

string getIfCondition( )

ifCondition getter

[ Top ]

getName   [line 61]

string getName( )

Name getter
  • Return: function name

Overridden in child classes as:

CodeGen_Dependency_Lib::getName()
basename getter
CodeGen_Dependency_Header::getName()
name getter

[ Top ]

hCode   [line 263]

string hCode( class $extension)

Generate C include file definitions for element
  • Return: C header code
  • Access: public

Overridden in child classes as:

CodeGen_Dependency_Header::hCode()
return header file code snippet

Parameters:

class   $extension     Extension extension we are owned by

[ Top ]

ifConditionEnd   [line 179]

string ifConditionEnd( )

Conditional compilation end

[ Top ]

ifConditionStart   [line 165]

string ifConditionStart( )

Conditional compilation start

[ Top ]

isKeyword   [line 197]

bool isKeyword( string $name)

Checks whether a string is a reserved name
  • Return: true if reserved
  • Access: public

Parameters:

string   $name     name

[ Top ]

isName   [line 211]

bool isName( string $name)

Checks whether a string is a valid C name
  • Return: true for valid names, false otherwise
  • Access: public

Parameters:

string   $name     The name to check

[ Top ]

setDescription   [line 102]

bool setDescription( string $text)

Description setter
  • Return: success status

Parameters:

string   $text     function description

[ Top ]

setIfCondition   [line 122]

void setIfCondition( string $code)

ifCondition setter

Parameters:

string   $code     preprocessor #if condition

[ Top ]

setName   [line 48]

bool setName( string $name)

Name setter
  • Return: success status

Parameters:

string   $name     function name

[ Top ]

setSummary   [line 80]

bool setSummary( string $text)

Summary setter
  • Return: success status

Parameters:

string   $text     function summary

[ Top ]


Documentation generated on Mon, 27 Sep 2010 12:00:04 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.