From e42c493d0c294ccb0a314c8447818c8d613195df Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Thu, 17 Jan 2008 12:56:19 +0000 Subject: removed olds docs --- .../Modules/NaturalDocs/SymbolTable/File.pm | 186 --------------------- 1 file changed, 186 deletions(-) delete mode 100644 docs/doctool/Modules/NaturalDocs/SymbolTable/File.pm (limited to 'docs/doctool/Modules/NaturalDocs/SymbolTable/File.pm') diff --git a/docs/doctool/Modules/NaturalDocs/SymbolTable/File.pm b/docs/doctool/Modules/NaturalDocs/SymbolTable/File.pm deleted file mode 100644 index 712a9322..00000000 --- a/docs/doctool/Modules/NaturalDocs/SymbolTable/File.pm +++ /dev/null @@ -1,186 +0,0 @@ -############################################################################### -# -# Package: NaturalDocs::SymbolTable::File -# -############################################################################### -# -# A class representing a file, keeping track of what symbols and references are defined in it. -# -############################################################################### - -# This file is part of Natural Docs, which is Copyright (C) 2003-2005 Greg Valure -# Natural Docs is licensed under the GPL - -use strict; -use integer; - -package NaturalDocs::SymbolTable::File; - - -############################################################################### -# Group: Implementation - -# -# Constants: Members -# -# The class is implemented as a blessed arrayref. The following constants are its members. -# -# SYMBOLS - An existence hashref of the it defines. -# REFERENCES - An existence hashref of the in the file. -# - -# DEPENDENCY: New() depends on the order of these constants. If they change, New() has to be updated. -use constant SYMBOLS => 0; -use constant REFERENCES => 1; - - -############################################################################### -# Group: Modification Functions - - -# -# Function: New -# -# Creates and returns a new object. -# -sub New - { - my $package = shift; - - # Let's make it safe, since normally you can pass values to New. Having them just be ignored would be an obscure error. - if (scalar @_) - { die "You can't pass values to NaturalDocs::SymbolTable::File->New()\n"; }; - - # DEPENDENCY: This code depends on the order of the member constants. - my $object = [ { }, { } ]; - bless $object, $package; - - return $object; - }; - - -# -# Function: AddSymbol -# -# Adds a definition. -# -# Parameters: -# -# symbol - The being added. -# -sub AddSymbol #(symbol) - { - my ($self, $symbol) = @_; - $self->[SYMBOLS]{$symbol} = 1; - }; - - -# -# Function: DeleteSymbol -# -# Removes a definition. -# -# Parameters: -# -# symbol - The to delete. -# -sub DeleteSymbol #(symbol) - { - my ($self, $symbol) = @_; - delete $self->[SYMBOLS]{$symbol}; - }; - - -# -# Function: AddReference -# -# Adds a reference definition. -# -# Parameters: -# -# referenceString - The being added. -# -sub AddReference #(referenceString) - { - my ($self, $referenceString) = @_; - $self->[REFERENCES]{$referenceString} = 1; - }; - - -# -# Function: DeleteReference -# -# Removes a reference definition. -# -# Parameters: -# -# referenceString - The to delete. -# -sub DeleteReference #(referenceString) - { - my ($self, $referenceString) = @_; - delete $self->[REFERENCES]{$referenceString}; - }; - - - -############################################################################### -# Group: Information Functions - - -# -# Function: HasAnything -# -# Returns whether the file has any symbol or reference definitions at all. -# -sub HasAnything - { - return (scalar keys %{$_[0]->[SYMBOLS]} || scalar keys %{$_[0]->[REFERENCES]}); - }; - -# -# Function: Symbols -# -# Returns an array of all the defined in this file. If none, returns an empty array. -# -sub Symbols - { - return keys %{$_[0]->[SYMBOLS]}; - }; - - -# -# Function: References -# -# Returns an array of all the defined in this file. If none, returns an empty array. -# -sub References - { - return keys %{$_[0]->[REFERENCES]}; - }; - - -# -# Function: DefinesSymbol -# -# Returns whether the file defines the passed or not. -# -sub DefinesSymbol #(symbol) - { - my ($self, $symbol) = @_; - return exists $self->[SYMBOLS]{$symbol}; - }; - - -# -# Function: DefinesReference -# -# Returns whether the file defines the passed or not. -# -sub DefinesReference #(referenceString) - { - my ($self, $referenceString) = @_; - return exists $self->[REFERENCES]{$referenceString}; - }; - -1; -- cgit 1.4.1