Added LGPL standard comment, and copyright notices where necessary.
[wine] / tools / winapi / c_function.pm
1 #
2 # Copyright 1999, 2000, 2001 Patrik Stridvall
3 #
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.
8 #
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.
13 #
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 #
18
19 package c_function;
20
21 use strict;
22
23 sub new {
24     my $proto = shift;
25     my $class = ref($proto) || $proto;
26     my $self  = {};
27     bless ($self, $class);
28
29     return $self;
30 }
31
32 sub file {
33     my $self = shift;
34     my $file = \${$self->{FILE}};
35
36     local $_ = shift;
37
38     if(defined($_)) { $$file = $_; }
39     
40     return $$file;
41 }
42
43 sub begin_line {
44     my $self = shift;
45     my $begin_line = \${$self->{BEGIN_LINE}};
46
47     local $_ = shift;
48
49     if(defined($_)) { $$begin_line = $_; }
50     
51     return $$begin_line;
52 }
53
54 sub begin_column {
55     my $self = shift;
56     my $begin_column = \${$self->{BEGIN_COLUMN}};
57
58     local $_ = shift;
59
60     if(defined($_)) { $$begin_column = $_; }
61     
62     return $$begin_column;
63 }
64
65 sub end_line {
66     my $self = shift;
67     my $end_line = \${$self->{END_LINE}};
68
69     local $_ = shift;
70
71     if(defined($_)) { $$end_line = $_; }
72     
73     return $$end_line;
74 }
75
76 sub end_column {
77     my $self = shift;
78     my $end_column = \${$self->{END_COLUMN}};
79
80     local $_ = shift;
81
82     if(defined($_)) { $$end_column = $_; }
83     
84     return $$end_column;
85 }
86
87 sub linkage {
88     my $self = shift;
89     my $linkage = \${$self->{LINKAGE}};
90
91     local $_ = shift;
92
93     if(defined($_)) { $$linkage = $_; }
94     
95     return $$linkage;
96 }
97
98 sub return_type {
99     my $self = shift;
100     my $return_type = \${$self->{RETURN_TYPE}};
101
102     local $_ = shift;
103
104     if(defined($_)) { $$return_type = $_; }
105     
106     return $$return_type;
107 }
108
109 sub calling_convention {
110     my $self = shift;
111     my $calling_convention = \${$self->{CALLING_CONVENTION}};
112
113     local $_ = shift;
114
115     if(defined($_)) { $$calling_convention = $_; }
116     
117     return $$calling_convention;
118 }
119
120 sub name {
121     my $self = shift;
122     my $name = \${$self->{NAME}};
123
124     local $_ = shift;
125
126     if(defined($_)) { $$name = $_; }
127     
128     return $$name;
129 }
130
131 sub argument_types {
132     my $self = shift;
133     my $argument_types = \${$self->{ARGUMENT_TYPES}};
134
135     local $_ = shift;
136
137     if(defined($_)) { $$argument_types = $_; }
138     
139     return $$argument_types;
140 }
141
142 sub argument_names {
143     my $self = shift;
144     my $argument_names = \${$self->{ARGUMENT_NAMES}};
145
146     local $_ = shift;
147
148     if(defined($_)) { $$argument_names = $_; }
149     
150     return $$argument_names;
151 }
152
153 sub statements_line {
154     my $self = shift;
155     my $statements_line = \${$self->{STATEMENTS_LINE}};
156
157     local $_ = shift;
158
159     if(defined($_)) { $$statements_line = $_; }
160     
161     return $$statements_line;
162 }
163
164 sub statements_column {
165     my $self = shift;
166     my $statements_column = \${$self->{STATEMENTS_COLUMN}};
167
168     local $_ = shift;
169
170     if(defined($_)) { $$statements_column = $_; }
171     
172     return $$statements_column;
173 }
174
175 sub statements {
176     my $self = shift;
177     my $statements = \${$self->{STATEMENTS}};
178
179     local $_ = shift;
180
181     if(defined($_)) { $$statements = $_; }
182     
183     return $$statements;
184 }
185
186 1;