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
27 my $class = ref($proto) || $proto;
29 bless ($self, $class);
36 # Property setter / getter functions (each does both)
41 my ($self, $filename) = @_;
42 $self->{file
} = $filename if (defined $filename);
48 my ($self, $begin_line) = @_;
49 $self->{begin_line
} = $begin_line if (defined $begin_line);
50 return $self->{begin_line
};
55 my ($self, $begin_column) = @_;
56 $self->{begin_column
} = $begin_column if (defined $begin_column);
57 return $self->{begin_column
};
62 my ($self, $end_line) = @_;
63 $self->{end_line
} = $end_line if (defined $end_line);
64 return $self->{end_line
};
69 my ($self, $end_column) = @_;
70 $self->{end_column
} = $end_column if (defined $end_column);
71 return $self->{end_column
};
76 my ($self, $linkage) = @_;
77 $self->{linkage
} = $linkage if (defined $linkage);
78 return $self->{linkage
};
83 my ($self, $return_type) = @_;
84 $self->{return_type
} = $return_type if (defined $return_type);
85 return $self->{return_type
};
88 sub calling_convention
($;$)
90 my ($self, $calling_convention) = @_;
91 $self->{calling_convention
} = $calling_convention if (defined $calling_convention);
92 return $self->{calling_convention
};
97 my ($self, $name) = @_;
98 $self->{name
} = $name if (defined $name);
102 sub argument_types
($;$)
104 my ($self, $argument_types) = @_;
105 $self->{argument_types
} = $argument_types if (defined $argument_types);
106 return $self->{argument_types
};
109 sub argument_names
($;$)
111 my ($self, $argument_names) = @_;
112 $self->{argument_names
} = $argument_names if (defined $argument_names);
113 return $self->{argument_names
};
116 sub statements_line
($;$)
118 my ($self, $statements_line) = @_;
119 $self->{statements_line
} = $statements_line if (defined $statements_line);
120 return $self->{statements_line
};
123 sub statements_column
($;$)
125 my ($self, $statements_column) = @_;
126 $self->{statements_column
} = $statements_column if (defined $statements_column);
127 return $self->{statements_column
};
132 my ($self, $statements) = @_;
133 $self->{statements
} = $statements if (defined $statements);
134 return $self->{statements
};