Overview

Namespaces

  • None
  • Peg
    • Cli
      • Commands
    • Config
    • Custom
      • Command
        • Action
          • Generate
          • Parse
      • CommandLine
      • Config
      • Localization
      • Utilities
    • Lib
      • Definitions
        • Element
      • Generator
      • Lexers
      • Plugins
      • Signals
        • Data
          • Definitions
          • Lexers
        • Type
  • PHP

Classes

  • ClassElement
  • ClassVariable
  • Constant
  • Enumeration
  • FunctionElement
  • GlobalVariable
  • Header
  • NamespaceElement
  • Overload
  • Parameter
  • ReturnType
  • TypeComponents
  • TypeDef
  • VariableType
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Parameter

Represents a function or class method parameter.

Peg\Lib\Definitions\Element\VariableType
Extended by Peg\Lib\Definitions\Element\Parameter
Namespace: Peg\Lib\Definitions\Element
Located at src/Definitions/Element/Parameter.php
Methods summary
public
# __construct( string $name, string $type, string $default_value = "", string $description = "" )

Create a parameter element from a declaration specification for the type.

Create a parameter element from a declaration specification for the type.

Parameters

$name
string
$name Name of the parameter.
$type
string
$type Parameter type by specification, eg: const int*
$default_value
string
$default_value Default value of the parameter.
$description
string
$description

Overrides

Peg\Lib\Definitions\Element\VariableType::__construct()
public string
# GetDeclarationCode( )

Converts the parameter specifications to c/c++ code that can be added when generating a function/method declaration, eg: const int* num = 0

Converts the parameter specifications to c/c++ code that can be added when generating a function/method declaration, eg: const int* num = 0

Returns

string

Overrides

Peg\Lib\Definitions\Element\VariableType::GetDeclarationCode()
Properties summary
public string $name
#

Holds the name of the element

Holds the name of the element

public string $default_value
#

The default value of the parameter.

The default value of the parameter.

public Peg\Lib\Definitions\Element\Overload $overload
#

Reference to the overload owner.

Reference to the overload owner.

Properties inherited from Peg\Lib\Definitions\Element\VariableType
$description, $indirection_level, $is_array, $is_const, $is_pointer, $is_reference, $is_unsigned, $original_type, $type
PEG Api API documentation generated by ApiGen 2.8.0