~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to vala/valatypesymbol.vala

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-28 07:58:01 UTC
  • mfrom: (1.5.5 upstream) (7.3.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100728075801-18u9cg5hv5oety6m
Tags: 0.9.4-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 * code or imported from an external library with a Vala API file.
30
30
 */
31
31
public abstract class Vala.TypeSymbol : Symbol {
32
 
        public Comment? comment { get; set; }
33
 
 
34
 
        private List<string> cheader_filenames = new ArrayList<string> ();
35
 
 
36
32
        public TypeSymbol (string? name, SourceReference? source_reference = null, Comment? comment = null) {
37
 
                base (name, source_reference);
38
 
                this.comment = comment;
 
33
                base (name, source_reference, comment);
39
34
        }
40
35
 
41
36
        /**
227
222
                return null;
228
223
        }
229
224
 
230
 
        public override List<string> get_cheader_filenames () {
231
 
                // parent_symbol can be null on incremental parsing
232
 
                if (cheader_filenames.size == 0 && parent_symbol != null) {
233
 
                        /* default to header filenames of the namespace */
234
 
                        foreach (string filename in parent_symbol.get_cheader_filenames ()) {
235
 
                                add_cheader_filename (filename);
236
 
                        }
237
 
 
238
 
                        if (cheader_filenames.size == 0 && source_reference != null && !external_package) {
239
 
                                // don't add default include directives for VAPI files
240
 
                                cheader_filenames.add (source_reference.file.get_cinclude_filename ());
241
 
                        }
242
 
                }
243
 
                return cheader_filenames;
244
 
        }
245
 
 
246
 
        /**
247
 
         * Adds a filename to the list of C header filenames users of this data
248
 
         * type must include.
249
 
         *
250
 
         * @param filename a C header filename
251
 
         */
252
 
        public void add_cheader_filename (string filename) {
253
 
                cheader_filenames.add (filename);
254
 
        }
255
 
 
256
225
        /**
257
226
         * Checks whether this data type is equal to or a subtype of the
258
227
         * specified data type.