2 # Copyright 1999, 2000, 2001 Patrik Stridvall
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 my $class = ref($proto) || $proto;
28 bless ($self, $class);
35 # Property setter / getter functions (each does both)
40 my ($self, $filename) = @_;
41 $self->{file
} = $filename if (defined $filename);
47 my ($self, $begin_line) = @_;
48 $self->{begin_line
} = $begin_line if (defined $begin_line);
49 return $self->{begin_line
};
54 my ($self, $begin_column) = @_;
55 $self->{begin_column
} = $begin_column if (defined $begin_column);
56 return $self->{begin_column
};
61 my ($self, $end_line) = @_;
62 $self->{end_line
} = $end_line if (defined $end_line);
63 return $self->{end_line
};
68 my ($self, $end_column) = @_;
69 $self->{end_column
} = $end_column if (defined $end_column);
70 return $self->{end_column
};
75 my ($self, $linkage) = @_;
76 $self->{linkage
} = $linkage if (defined $linkage);
77 return $self->{linkage
};
82 my ($self, $return_type) = @_;
83 $self->{return_type
} = $return_type if (defined $return_type);
84 return $self->{return_type
};
87 sub calling_convention
($;$)
89 my ($self, $calling_convention) = @_;
90 $self->{calling_convention
} = $calling_convention if (defined $calling_convention);
91 return $self->{calling_convention
};
96 my ($self, $name) = @_;
97 $self->{name
} = $name if (defined $name);
101 sub argument_types
($;$)
103 my ($self, $argument_types) = @_;
104 $self->{argument_types
} = $argument_types if (defined $argument_types);
105 return $self->{argument_types
};
108 sub argument_names
($;$)
110 my ($self, $argument_names) = @_;
111 $self->{argument_names
} = $argument_names if (defined $argument_names);
112 return $self->{argument_names
};
115 sub statements_line
($;$)
117 my ($self, $statements_line) = @_;
118 $self->{statements_line
} = $statements_line if (defined $statements_line);
119 return $self->{statements_line
};
122 sub statements_column
($;$)
124 my ($self, $statements_column) = @_;
125 $self->{statements_column
} = $statements_column if (defined $statements_column);
126 return $self->{statements_column
};
131 my ($self, $statements) = @_;
132 $self->{statements
} = $statements if (defined $statements);
133 return $self->{statements
};