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.
Initializes an instance of a TypeHelper object.
Parameters
-
self
The object to initialize.
Creates a new TypeHelper object.
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.
Used in blockParseOutside to avoid interpretation of
a name object more than once.
The name of the class that this one extends (if applicable).
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.
The name of the abstract class that this class implements
(if applicable).
A string that tells where in blockParseReturnState
that this name object was created.
The name parsed from the declaration.
A list of possible types for this name. (For example, a
function matches with either the @function
or @method tag in a HeaderDoc comment.
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.
The primary (outer) type parsed from the declaration.
Last Updated: Saturday, August 06, 2016
|