2002-03-10 00:29:33 +01:00
|
|
|
#
|
|
|
|
# Copyright 1999, 2000, 2001 Patrik Stridvall
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-03-10 00:29:33 +01:00
|
|
|
#
|
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
package function;
|
|
|
|
|
|
|
|
use strict;
|
2020-07-22 00:10:10 +02:00
|
|
|
use warnings 'all';
|
2001-07-11 19:27:45 +02:00
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub new($) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $proto = shift;
|
|
|
|
my $class = ref($proto) || $proto;
|
|
|
|
my $self = {};
|
|
|
|
bless ($self, $class);
|
|
|
|
|
|
|
|
return $self;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub file($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $file = \${$self->{FILE}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$file = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$file;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub debug_channels($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $debug_channels = \${$self->{DEBUG_CHANNELS}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$debug_channels = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$debug_channels;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub documentation_line($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $documentation_line = \${$self->{DOCUMENTATION_LINE}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$documentation_line = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$documentation_line;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub documentation($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $documentation = \${$self->{DOCUMENTATION}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$documentation = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$documentation;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub function_line($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $function_line = \${$self->{FUNCTION_LINE}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$function_line = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$function_line;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub linkage($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $linkage = \${$self->{LINKAGE}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$linkage = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$linkage;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub return_type($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $return_type = \${$self->{RETURN_TYPE}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$return_type = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$return_type;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub calling_convention($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $calling_convention = \${$self->{CALLING_CONVENTION}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$calling_convention = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$calling_convention;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub internal_name($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $internal_name = \${$self->{INTERNAL_NAME}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$internal_name = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$internal_name;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub argument_types($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $argument_types = \${$self->{ARGUMENT_TYPES}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$argument_types = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$argument_types;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub argument_names($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $argument_names = \${$self->{ARGUMENT_NAMES}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$argument_names = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$argument_names;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub argument_documentations($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $argument_documentations = \${$self->{ARGUMENT_DOCUMENTATIONS}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$argument_documentations = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$argument_documentations;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub statements_line($$) {
|
2001-08-09 23:35:38 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $statements_line = \${$self->{STATEMENTS_LINE}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$statements_line = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-08-09 23:35:38 +02:00
|
|
|
return $$statements_line;
|
|
|
|
}
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub statements($$) {
|
2001-07-11 19:27:45 +02:00
|
|
|
my $self = shift;
|
|
|
|
my $statements = \${$self->{STATEMENTS}};
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(defined($_)) { $$statements = $_; }
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-07-11 19:27:45 +02:00
|
|
|
return $$statements;
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|