1 # ======================================================================
2 # AppearanceTemplate.pm
3 # Copyright 2003, Sony Online Entertainment
5 # ======================================================================
7 package AppearanceTemplate
;
10 use CustomizationVariableCollector
;
13 # ======================================================================
14 # AppearanceTemplate potentially-public variables.
15 # ======================================================================
17 # our $relativePathName;
19 # ======================================================================
20 # Setup variables that can be imported by Exporter into user modules.
21 # ======================================================================
23 use vars
qw(@ISA @EXPORT_OK $VERSION);
28 # These symbols are okay to export if specifically requested.
29 @EXPORT_OK = qw(&install);
31 # ======================================================================
32 # AppearanceTemplate private variables.
33 # ======================================================================
36 my $treeFileRelativeName;
38 # ======================================================================
39 # AppearanceTemplate public functions.
40 # ======================================================================
44 # Register handler with CustomizationVariableCollector
45 CustomizationVariableCollector
::registerHandler
("APT ", \
&processIff
);
48 # ======================================================================
49 # AppearanceTemplate private functions
50 # ======================================================================
56 die "bad iff arg specified" if ref($iff) ne "Iff";
58 $treeFileRelativeName = shift;
59 die "bad tree file relative name" if !defined($treeFileRelativeName);
60 print "AppearanceTemplate: processing file [$treeFileRelativeName]\n" if $debug;
62 # Ensure we're in the proper form.
63 return 0 unless $iff->getCurrentName() eq "APT ";
65 $iff->enterForm("APT ");
67 my $version = $iff->getCurrentName();
68 if ($version eq '0000')
74 print STDERR
"AppearanceTemplate: unsupported version tag [$version].";
78 $iff->exitForm("APT ");
80 print "AppearanceTemplate: finished processing file [$treeFileRelativeName]\n" if $debug;
86 # ----------------------------------------------------------------------
90 print "process_0000(): begin\n" if $debug;
93 die 'bad $iff arg' if ref($iff) ne 'Iff';
95 $iff->enterForm('0000');
96 $iff->enterChunk('NAME');
98 my $appearanceTemplateName = $iff->read_string();
99 CustomizationVariableCollector
::logAssetLink
($treeFileRelativeName, $appearanceTemplateName);
101 $iff->exitChunk('NAME');
102 $iff->exitForm('0000');
104 print "process_0000(): end\n" if $debug;
107 # ======================================================================