HeaderDoc::Struct

Declared In:

Introduction

API object that that describes a data structure (struct or record).

Discussion

The Struct class stores information relating to a data structure declaration.

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 Struct object.

clone

Duplicates this Struct object into another one.

fields

Gets/sets the array of fields that are associated with a struct or union.

isUnion

Gets/sets whether this is actually a union.

printObject

Prints this object for debugging purposes.

setDeclaration

Sets the declaration.


_initialize


Initializes an instance of a Struct object.

Parameters
self

The object to initialize.


clone


Duplicates this Struct object into another one.

sub clone 
Parameters
self

The object to clone.

clone

The victim object.


fields


Gets/sets the array of fields that are associated with a struct or union.

sub fields 
Parameters
self

This object.

VARS

The array value to set. (Optional)


isUnion


Gets/sets whether this is actually a union.

sub isUnion 
Parameters
self

This object.

isunion

The value to set. (Optional.)

Discussion

The same HeaderDoc class is used for both struct and union declarations. This allows you to tell one from the other.


printObject


Prints this object for debugging purposes.

Parameters
self

This object.


setDeclaration


Sets the declaration.

Parameters
self

This object.

declaration

The line array.


Member Data

FIELDS

An array of fields in this structure. See fields.

HeaderDoc::Struct::VERSION

The revision control revision number for this module.

ISUNION

Holds 1 if this object holds a union, 0 if it holds a struct. See isUnion.


FIELDS


An array of fields in this structure. See fields.

$self->{FIELDS}

HeaderDoc::Struct::VERSION


The revision control revision number for this module.

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

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


ISUNION


Holds 1 if this object holds a union, 0 if it holds a struct. See isUnion.

$self->{ISUNION}