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 VariableType

Represents a variable type.

Direct known subclasses

Peg\Lib\Definitions\Element\ClassVariable, Peg\Lib\Definitions\Element\GlobalVariable, Peg\Lib\Definitions\Element\Parameter, Peg\Lib\Definitions\Element\ReturnType, Peg\Lib\Definitions\Element\TypeDef
Namespace: Peg\Lib\Definitions\Element
Located at src/Definitions/Element/VariableType.php
Methods summary
public
# __construct( string $type, string $description = "" )

Create a variable type.

Create a variable type.

Parameters

$type
string
$type Parameter type by specification, eg: const int*
$description
string
$description
public string
# GetDeclarationCode( )

Converts the type specifications to c/c++ code that can be added when generating code. eg: const int*

Converts the type specifications to c/c++ code that can be added when generating code. eg: const int*

Returns

string
Properties summary
public string $type
#

Type of the variable without modifiers (eg: int, double, char, etc...)

Type of the variable without modifiers (eg: int, double, char, etc...)

public string $original_type
#

Original type of the variable with all modifiers as passed on constructor.

Original type of the variable with all modifiers as passed on constructor.

public boolean $is_const
#

Flag that indicates if the parameter is constant (const).

Flag that indicates if the parameter is constant (const).

public boolean $is_unsigned
#

Flag that indicates if the variable is unsigned.

Flag that indicates if the variable is unsigned.

public boolean $is_reference
#

Flag that indicates if the variable is a reference (&).

Flag that indicates if the variable is a reference (&).

public boolean $is_pointer
#

Flag that indicates if the variable is a pointer reference (*).

Flag that indicates if the variable is a pointer reference (*).

public integer $indirection_level
#

Amount of pointers indirection (*).

Amount of pointers indirection (*).

public boolean $is_array
#

Flag that indicates if the variable is an array ([]).

Flag that indicates if the variable is an array ([]).

public string $description
#

Description of the element.

Description of the element.

PEG Api API documentation generated by ApiGen 2.8.0