ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Interface.pm
Revision: 1.4
Committed: Mon Aug 28 08:35:11 2000 UTC (24 years, 8 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: V1_pre0, HEAD
Branch point for: SCRAM_V1_BRANCH
Changes since 1.3: +0 -0 lines
State: FILE REMOVED
Error occurred while calculating annotation data.
Log Message:
remove Interface.pm

File Contents

# Content
1 package Interface;
2 require 5.001;
3 require Exporter;
4 require BuildFile;
5 @ISA = qw(Exporter);
6 @EXPORT = qw( GetClass $ClassDir $Class);
7
8 sub GetClass {
9 my $dirname = shift;
10 $Class="DEFAULT";
11 $ClassDir="";
12
13 #return if $dirname eq "";
14 @DIRA=split /\//, $dirname;
15
16 $thispath=".";
17 # bootstrap from project buildfile if it exists
18 BuildFile::CheckBuildFile($ENV{projconfigdir});
19
20 my @ClassPaths=split /:/, $BuildFile::BlockClassPath;
21 foreach $BClassPath ( @ClassPaths ) {
22 next if ( $BClassPath eq "");
23 push @LoBCA, [ split /\//, $BClassPath ];
24 }
25 for ( $i=0; $i<=$#DIRA; $i++ ) {
26 $thispath=$thispath."/".$DIRA[$i];
27 if ( ($ClassName=BuildFile::CheckBuildFile($thispath)) ne "" ) {
28 $Class=$ClassName;
29 $ClassDir=$thispath;
30 }
31 # TODO --- Must test against position of last new BlockCaseA
32 # Need to reset array LoBCA to the New BlockPath
33 # - merge and replace options
34 #
35 else {
36 foreach $BlockClassA ( @LoBCA ) {
37 if ( $$BlockClassA[0]=~/^$DIRA[$i]\+/ ) {
38 $$BlockClassA[0]=~s/^$DIRA[$i]//;
39 }
40 if ( $$BlockClassA[0]=~/^\+/ ) {
41 ($Class=$$BlockClassA[0])=~s/^\+//;
42 $ClassDir=$thispath;
43 shift @$BlockClassA;
44 }
45 else {
46 @$BlockClassA=();
47 }
48 }
49 }
50 }
51 $ClassDir=~s/^\.\///;
52 }