<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">###############################################################################
#
#   Class: NaturalDocs::SymbolTable::ReferenceTarget
#
###############################################################################
#
#   A class for storing information about a reference target.
#
###############################################################################

# This file is part of Natural Docs, which is Copyright (C) 2003-2008 Greg Valure
# Natural Docs is licensed under the GPL

use strict;
use integer;

package NaturalDocs::SymbolTable::ReferenceTarget;


###############################################################################
# Group: Implementation

#
#   Constants: Members
#
#   The class is implemented as a blessed arrayref.  The following constants are its members.
#
#       SYMBOL  - The target &lt;SymbolString&gt;.
#       FILE        - The &lt;FileName&gt; the target is defined in.
#       TYPE       - The target &lt;TopicType&gt;.
#       PROTOTYPE - The target's prototype, or undef if none.
#       SUMMARY    - The target's summary, or undef if none.
#

# DEPENDENCY: New() depends on the order of these constants.  If they change, New() has to be updated.
use constant SYMBOL =&gt; 0;
use constant FILE =&gt; 1;
use constant TYPE =&gt; 2;
use constant PROTOTYPE =&gt; 3;
use constant SUMMARY =&gt; 4;

###############################################################################
# Group: Functions


#
#   Function: New
#
#   Creates and returns a new object.
#
#   Parameters:
#
#       symbol - The target &lt;SymbolString&gt;.
#       file       - The &lt;FileName&gt; the target is defined in.
#       type     - The &lt;TopicType&gt; of the target symbol.
#       prototype - The target's prototype.  Set to undef if not defined or not applicable.
#       summary - The target's summary.  Set to undef if not defined or not applicable.
#
sub New #(symbol, file, type, prototype, summary)
    {
    # DEPENDENCY: This code depends on the order of the member constants.

    my $package = shift;

    my $object = [ @_ ];
    bless $object, $package;

    return $object;
    };


# Function: Symbol
# Returns the target's &lt;SymbolString&gt;.
sub Symbol
    {  return $_[0]-&gt;[SYMBOL];  };

# Function: File
# Returns the &lt;FileName&gt; the target is defined in.
sub File
    {  return $_[0]-&gt;[FILE];  };

# Function: Type
# Returns the target's &lt;TopicType&gt;.
sub Type
    {  return $_[0]-&gt;[TYPE];  };

# Function: Prototype
# Returns the target's prototype, or undef if not defined or not applicable.
sub Prototype
    {  return $_[0]-&gt;[PROTOTYPE];  };

# Function: Summary
# Returns the target's summary, or undef if not defined or not applicable.
sub Summary
    {  return $_[0]-&gt;[SUMMARY];  };

1;
</pre></body></html>