HeaderDoc::MinorAPIElement

Declared In:

Introduction

API object that describes an API element that is documented only as part of another API element.

Discussion

The MinorAPIElement class stores information relating to a field in a structure or type declaration, a constant in an enumeration, or a parameter (parsed or tagged) to a function or callback typedef.

This class is a subclass of HeaderElement. The majority of related fields and functions can be found there.



Member Functions

_initialize

Initializes an instance of a MinorAPIElement object.

addKeyAndValueInUserDict

Adds key-value pairs to the user dictionary (and returns it).

addToUserDictArray

Adds values to the user dictionary array (and returns it).

apiuid

Returns a custom API reference for function parameters, struct fields, and so on.

appleRefIsDoc

Sets or gets a state flag.

autodeclaration

Gets/sets the AUTODECLARATION value.

clone

Duplicates this MinorAPIElement object into another one.

declaration

Gets/sets the legacy text declaration.

declarationInHTML

Gets the HTML declaration.

group

Sets the group.

hidden

Gets/sets whether this parameter is hidden.

position

Gets/sets the position of this parameter.

printObject

Prints this object for debugging purposes.

tagname

Gets/sets the Objective-C label for a parameter.

type

Gets/sets what type of parameter this is.

userDictArray

Gets/sets the user dictionary array.


_initialize


Initializes an instance of a MinorAPIElement object.

Parameters
self

The object to initialize.


addKeyAndValueInUserDict


Adds key-value pairs to the user dictionary (and returns it).

Parameters
self

This MinorAPIElement object.

...

The objects to add.

Discussion

Used for miscellaneous data.


addToUserDictArray


Adds values to the user dictionary array (and returns it).

Parameters
self

This MinorAPIElement object.

...

The objects to add.

Discussion

Used for miscellaneous data, such as the parameters within a typedef struct of callbacks stored as an array to preserve order.


apiuid


Returns a custom API reference for function parameters, struct fields, and so on.

sub apiuid 
Discussion

Overrides the function in HeaderElement because these minor API elements need lots of special treatment. In particular, this function only overrides the behavior if the main function does not return anything. This is necessary because some other data types use the MinorAPIElement class in nonstandard ways.


appleRefIsDoc


Sets or gets a state flag.

Parameters
value
Discussion

The APPLEREFISDOC state flag controls whether to use a language-specific or doc-specific apple_ref marker for a doc block.

This version overrides the appleRefIsDoc method in HeaderDoc::HeaderElement because of the complexity of working with minor API elements that live in normal (non-API-owner) objects.


autodeclaration


Gets/sets the AUTODECLARATION value.

Parameters
self

This MinorAPIElement object.

AUTODECLARATION

The new value to set.

Discussion

For special declarations (Perl instance variables, function-local variables, and so on), declaration functions return a synthesized declaration based on the AUTODECLARATION parameter. This function supports that.


clone


Duplicates this MinorAPIElement object into another one.

sub clone 
Parameters
self

The object to clone.

clone

The victim object.


declaration


Gets/sets the legacy text declaration.

Parameters
self

This MinorAPIElement object.

Discussion

For special declarations (Perl instance variables, function-local variables, and so on), returns a synthesized declaration from AUTODECLARATION. Otherwise, hands off the request to the superclass, HeaderElement.


declarationInHTML


Gets the HTML declaration.

Parameters
self

This MinorAPIElement object.

Discussion

For special declarations (Perl instance variables, function-local variables, and so on), returns a synthesized declaration from AUTODECLARATION. Otherwise, hands off the request to the superclass, HeaderElement.


group


Sets the group.

sub group 
Discussion

This overrides the declaration in HeaderElement.pm because we want the groups for local variables to be separate and distinct from normal function/data type/variable groups unless the owning object really is an APIOwner subclass.


hidden


Gets/sets whether this parameter is hidden.

sub hidden 
Parameters
self

This MinorAPIElement object.

HIDDEN

The new value. (Optional.)

Discussion

Parsed parameters merged in from other places are not emitted in the XML output. Set to 1 for those parameters. Otherwise, set to 0 or leave unset.


position


Gets/sets the position of this parameter.

sub position 
Parameters
self

This MinorAPIElement object.

POSITION

The new position. (Optional.)

Discussion

The first parameter has position 0, the second has position 1, and so on.


printObject


Prints this object for debugging purposes.

Parameters
self

This object.


tagname


Gets/sets the Objective-C label for a parameter.

sub tagname 
Parameters
self

This MinorAPIElement object.

TAGNAME

The new name. (Optional.)


type


Gets/sets what type of parameter this is.

sub type 
Parameters
self

This MinorAPIElement object.

TYPE

The new value. (Optional.)

Discussion

These values are one of:

  • (empty string)

  • callback

  • funcPtr


userDictArray


Gets/sets the user dictionary array.

Parameters
self

This MinorAPIElement object.

Discussion

Used for miscellaneous data, such as the parameters within a typedef struct of callbacks stored as an array to preserve order.


Member Data

AUTODECLARATION

A flag that is set to 1 for certain special declarations (Perl instance variables or other variables created by the @var tag in class markup) to indicate that the discussion functions should return a synthesized declaration rather than anything from the parse tree.

HeaderDoc::MinorAPIElement::VERSION

The revision control revision number for this module.

HIDDEN

Indicates that this should not be emitted in HTML. Used in inherited bits.

POSITION

The position of this element in the declaration. See position.

TAGNAME

The label for an Objective-C method parameter.

TYPE

The type of minor API element. See type.

USERDICT

A bunch of arbitrary key-value pairs in sorted order. See addKeyAndValueInUserDict.

USERDICTARRAY

A bunch of key-value pairs in sorted order. See addToUserDictArray.


AUTODECLARATION


A flag that is set to 1 for certain special declarations (Perl instance variables or other variables created by the @var tag in class markup) to indicate that the discussion functions should return a synthesized declaration rather than anything from the parse tree.

$self->{AUTODECLARATION}

HeaderDoc::MinorAPIElement::VERSION


The revision control revision number for this module.

$HeaderDoc::MinorAPIElement::VERSION = '$Revision: 1306444400 $';  
Discussion

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


HIDDEN


Indicates that this should not be emitted in HTML. Used in inherited bits.

$self->{HIDDEN}

POSITION


The position of this element in the declaration. See position.

$self->{POSITION}

TAGNAME


The label for an Objective-C method parameter.

$self->{TAGNAME}

TYPE


The type of minor API element. See type.

$self->{TYPE}

USERDICT


A bunch of arbitrary key-value pairs in sorted order. See addKeyAndValueInUserDict.

$self->{USERDICT}

USERDICTARRAY


A bunch of key-value pairs in sorted order. See addToUserDictArray.

$self->{USERDICTARRAY}