ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Scram/ScramFunctions.pm
(Generate patch)

Comparing COMP/SCRAM/src/Scram/ScramFunctions.pm (file contents):
Revision 1.4 by williamc, Wed Aug 30 09:47:39 2000 UTC vs.
Revision 1.6 by williamc, Wed Sep 6 08:14:46 2000 UTC

# Line 18 | Line 18
18   # areatoolbox(ConfigArea) : return the toolbox of the specified area
19   # setuptoolsinarea($area[,$toolname[,$toolversion[,toolfile]) : setup
20   # arch()                : get/set the architecture string
21 + # scramobjectinterface(Class)  : print out the interface of a scram class
22  
23   package Scram::ScramFunctions;
24   use URL::URLcache;
# Line 31 | Line 32 | sub new {
32          $self={};
33          bless $self, $class;
34          # -- default settings
35 <        $self->{cachedir}=$ENV{HOME}."/.SCRAM/globalcache";
35 >        $self->{cachedir}=$ENV{HOME}."/.scramrc/globalcache";
36          $self->{scramprojectsdbdir}=$ENV{SCRAM_LOOKUPDB};
37          return $self;
38   }
# Line 233 | Line 234 | sub arch {
234            :$self->{arch};
235   }
236  
237 + sub scramobjectinterface {
238 +        my $self=shift;
239 +        my $class=shift;
240 +
241 +        my $file;
242 +        ($file=$class."\.pm")=~s/::/\//g;
243 +        $file=$ENV{TOOL_HOME}."/".$file;
244 +
245 +        if ( ! -f $file ) {
246 +          $self->error("Unable to find $class in ".$ENV{TOOL_HOME});    
247 +        }
248 +        print "--------------------- $class ------------------\n";
249 +        my $fh=FileHandle->new();
250 +        $fh->open("<$file");
251 +        while ( <$fh> ) {
252 +           if ( $_=~/#\s*Interface/g ) {
253 +                $intregion=1;
254 +                next;
255 +           }
256 +           if ( $intregion ) { # if we are in the interface documentation
257 +            if ( ( $_!~/^#/ ) || ( $_=~/^#\s?-{40}/ ) ) { #moving out of Int doc
258 +                $intregion=0;
259 +                next;
260 +            }
261 +            print $_;
262 +            if ( $_=~/^#\s*(.*)\((.*)\)?:(.*)/ ) {
263 +             $interface=$1;
264 +             $args=$2;
265 +             $rest=$3;
266 +             next if ($interface eq "");
267 +             push @interfaces,$interface;
268 +             $interfaceargs{$interface}=$args;
269 +            }
270 +           }
271 +        }
272 +        print "\n";
273 +        undef $fh;
274 + }
275 +
276   # -------------- Support Routines ------------------------------
277  
278  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines