| 1 | |||
| 2 | # | ||
| 3 | # Interface Definition Language (OMG IDL CORBA v3.0) | ||
| 4 | # | ||
| 5 | # C Language Mapping Specification, New Edition June 1999 | ||
| 6 | # | ||
| 7 | |||
| 8 | package CORBA::C::IncSkelVisitor; | ||
| 9 | |||
| 10 | use strict; | ||
| 11 | use warnings; | ||
| 12 | |||
| 13 | our $VERSION = '2.60'; | ||
| 14 | |||
| 15 | use CORBA::C::IncludeVisitor; | ||
| 16 | use base qw(CORBA::C::IncludeVisitor); | ||
| 17 | |||
| 18 | use File::Basename; | ||
| 19 | |||
| 20 | sub new { | ||
| 21 | my $proto = shift; | ||
| 22 | my $class = ref($proto) || $proto; | ||
| 23 | my $self = {}; | ||
| 24 | bless $self, $class; | ||
| 25 | my ($parser, $incpath, $prefix) = @_; | ||
| 26 | $self->{incpath} = $incpath || q{}; | ||
| 27 | $prefix = 'skel_' unless (defined $prefix); | ||
| 28 | $self->{prefix} = $prefix; | ||
| 29 | $self->{srcname} = $parser->YYData->{srcname}; | ||
| 30 | $self->{srcname_size} = $parser->YYData->{srcname_size}; | ||
| 31 | $self->{srcname_mtime} = $parser->YYData->{srcname_mtime}; | ||
| 32 | $self->{symbtab} = $parser->YYData->{symbtab}; | ||
| 33 | $self->{inc} = {}; | ||
| 34 | $self->{use_define} = 1; | ||
| 35 | $self->{reposit} = 1; | ||
| 36 | my $filename = $prefix . basename($self->{srcname}, '.idl') . '.h'; | ||
| 37 | $self->open_stream($filename); | ||
| 38 | $self->{filename} = $filename; | ||
| 39 | $self->{done_hash} = {}; | ||
| 40 | $self->{num_key} = 'num_incskel_c'; | ||
| 41 | return $self; | ||
| 42 | } | ||
| 43 | |||
| 44 | 1; | ||
| 45 |