HeaderDoc::TypeHelper

Declared In:

Introduction

Describes the names and declaration types for a declaration.

Discussion

The TypeHelper class is a data structure for passing

around a combination of name and HeaderDoc object type data. It is primarily used in the interface between the blockParseReturnState and blockParseOutside functions in the BlockParse class.

The reason for this class is that some C data types are relatively complex. A typedef struct can have multiple comma-separated names at the end that are type names, plus a name at the beginning that is a struct. Thus, that single declaration has multiple names, each of which has a list of symbol types that can legally match against that name.



Member Functions

_initialize

Initializes an instance of a TypeHelper object.

new

Creates a new TypeHelper object.


_initialize


Initializes an instance of a TypeHelper object.

Parameters
self

The object to initialize.


new


Creates a new TypeHelper object.

sub new 
Parameters
param

A reference to the relevant package object (e.g. HeaderDoc::TypeHelper->new() to allocate a new instance of this class).


Member Data

ACTIVE

Used in blockParseOutside to avoid interpretation of a name object more than once.

EXTENDSCLASS

The name of the class that this one extends (if applicable).

HeaderDoc::TypeHelper::VERSION

The revision control revision number for this module.

IMPLEMENTSCLASS

The name of the abstract class that this class implements (if applicable).

INSERTEDAT

A string that tells where in blockParseReturnState that this name object was created.

NAME

The name parsed from the declaration.

POSSTYPES

A list of possible types for this name. (For example, a function matches with either the @function or @method tag in a HeaderDoc comment.

STARS

The number of leading '*' characters before this particular name. For example, char *k would have:

  • char in the TYPE field,

  • k in the NAME field, and

  • * in the STARS field.

TYPE

The primary (outer) type parsed from the declaration.


ACTIVE


Used in blockParseOutside to avoid interpretation of a name object more than once.

$self->{ACTIVE}

EXTENDSCLASS


The name of the class that this one extends (if applicable).

$self->{EXTENDSCLASS}

HeaderDoc::TypeHelper::VERSION


The revision control revision number for this module.

$HeaderDoc::TypeHelper::VERSION = '$Revision: 1298084579 $';  
Discussion

In the git repository, contains the number of seconds since January 1, 1970.


IMPLEMENTSCLASS


The name of the abstract class that this class implements (if applicable).

$self->{IMPLEMENTSCLASS}

INSERTEDAT


A string that tells where in blockParseReturnState that this name object was created.

$self->{INSERTEDAT}

NAME


The name parsed from the declaration.

$self->{NAME}

POSSTYPES


A list of possible types for this name. (For example, a function matches with either the @function or @method tag in a HeaderDoc comment.

$self->{POSSTYPES}

STARS


The number of leading '*' characters before this particular name. For example, char *k would have:

  • char in the TYPE field,

  • k in the NAME field, and

  • * in the STARS field.

$self->{STARS}

TYPE


The primary (outer) type parsed from the declaration.

$self->{TYPE}