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
 1: <?php
 2: /**
 3:  * @author Jefferson González
 4:  * @license MIT
 5:  * @link http://github.com/peg-org/peg-src Source code.
 6:  */
 7: 
 8: namespace Peg\Lib\Definitions\Element;
 9: 
10: /**
11:  * Represents a C type definition (typedef).
12:  */
13: class TypeDef extends VariableType
14: {
15:     
16:     /**
17:      * Holds the name of the element
18:      * @var string
19:      */
20:     public $name;
21:     
22:     /**
23:      * Reference to the header containing this element.
24:      * @var \Peg\Lib\Definitions\Element\Header
25:      */
26:     public $header;
27:     
28:     /**
29:      * Reference to the namespace containing this element.
30:      * @var \Peg\Lib\Definitions\Element\NamespaceElement
31:      */
32:     public $namespace;
33:     
34:     /**
35:      * Create a typedef element. 
36:      * @param string $name Name of the parameter.
37:      * @param string $type Parameter type by specification, eg: const int*
38:      * @param string $description A description used to generate documentation.
39:      */
40:     public function __construct($name, $type, $description="")
41:     {
42:         parent::__construct($type, $description);
43:         
44:         $this->name = $name;
45:     }
46: 
47: }
PEG Api API documentation generated by ApiGen 2.8.0