]> git.llucax.com Git - software/bife/bife-all.git/commitdiff
We are back with a functional revision.
authorLeandro Lucarella <llucax@gmail.com>
Mon, 23 Jun 2003 03:27:16 +0000 (03:27 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Mon, 23 Jun 2003 03:27:16 +0000 (03:27 +0000)
- bife module is now called core and moved out from modules dir.
- Fixed Parser to autoinclude files.
- Root lost its sense since 'use' attribute lost it sense with Parser
  autoinclude (now the parser manages all needed includes). It might
  be gone in the future.
- Updated example (it's working again).
- Updated Makefiles (need some more work).

25 files changed:
core/BIFE/Container.php [moved from modules/bife/BIFE/Container.php with 100% similarity]
core/BIFE/Fallback.php [moved from modules/bife/BIFE/Fallback.php with 100% similarity]
core/BIFE/Parser.php [moved from modules/bife/BIFE/Parser.php with 91% similarity]
core/BIFE/Root.php [moved from modules/bife/BIFE/Root.php with 97% similarity]
core/BIFE/Widget.php [moved from modules/bife/BIFE/Widget.php with 100% similarity]
core/HTML/Template/HIT.php [moved from modules/bife/HTML/Template/HIT.php with 100% similarity]
core/Makefile [moved from modules/bife/Makefile with 73% similarity]
core/bife.xmi [moved from modules/bife/bife.xmi with 95% similarity]
core/xmi2code.config [moved from modules/bife/xmi2code.config with 100% similarity]
examples/index.php
examples/index.xbf
examples/photo.xbf
modules/album/BIFE/Album/Pager.php
modules/album/BIFE/Album/Photo.php
modules/album/BIFE/Album/Thumbs.php
modules/album/Makefile
modules/album/album.xmi
modules/basic/BIFE/Copy.php
modules/basic/BIFE/Generic.php
modules/basic/BIFE/Page.php
modules/basic/Makefile
modules/basic/basic.xmi
modules/menu/BIFE/Menu/Menu.php
modules/menu/Makefile
modules/menu/menu.xmi

similarity index 91%
rename from modules/bife/BIFE/Parser.php
rename to core/BIFE/Parser.php
index cf0b851cfdca4dfc8151a2b21a52196496253784..83b39a3c4a3619c231fce3a04cfca1f84e0afb6c 100644 (file)
@@ -37,31 +37,31 @@ class BIFE_Parser {
      * Top level widget.
      *
      * @var    BIFE_Root $root
-     * @access public
+     * @access protected
      */
-    var $root;
+    var $root = null;
 
     /**
      * XML parser resource.
      *
      * @var    resource $parser
-     * @access public
+     * @access protected
      */
-    var $parser;
+    var $parser = null;
 
     /**
      * BIFE widgets stack.
      *
      * @var    array $stack
-     * @access public
+     * @access protected
      */
-    var $stack;
+    var $stack = array();
 
     /**
      * Fallback class to use in case that a widget class is not found.
      *
      * @var    string $fallback
-     * @access public
+     * @access protected
      */
     var $fallback = '';
 
@@ -73,6 +73,14 @@ class BIFE_Parser {
      */
     var $cache = '/tmp';
 
+    /**
+     * Files required by the parsed XML file.
+     *
+     * @var    array $requires
+     * @access protected
+     */
+    var $requires = array();
+
     // ~X2C
 
     // +X2C Operation 30
@@ -103,8 +111,6 @@ class BIFE_Parser {
      */
     function __construct($fallback = '', $cache = '/tmp') // ~X2C
     {
-        $this->stack    = array();
-        $this->root     = null;
         $this->parser   = xml_parser_create();
         $this->fallback = $fallback;
         $this->cache    = $cache;
@@ -140,12 +146,18 @@ class BIFE_Parser {
      */
     function startElement($parser, $name, $attrs) // ~X2C
     {
-        $class = "BIFE_$name";
+        $class = 'bife_' . strtolower(strtr($name, ':', '_'));
         if (!class_exists($class)) {
-            @include_once 'BIFE/' . ucfirst(strtolower($name)) . '.php';
+            $inc = 'BIFE/' .
+                strtr(ucwords(strtr(strtolower($name), ':', ' ')), ' ', '/') .
+                '.php';
+            if (@include_once $inc) {
+                $this->includes[] = $inc;
+            }
         }
         if (class_exists($class)) {
             $obj =& new $class($attrs);
+            // XXX - Does this check make sense?
             if (!is_a($obj, 'bife_widget')) {
                 trigger_error("Class '$class' is not a BIFE_Widget.", E_USER_WARNING);
             }
@@ -246,10 +258,9 @@ class BIFE_Parser {
         if ($this->cache) {
             $cache = $this->cache . '/' . 'bife_parser_cache' . strtr(realpath($filename), '/', '_');
             if (@filemtime($cache) > @filemtime($filename)) {
-                // FIXME - replace with file_get_contents()
                 $file = file($cache);
                 foreach(unserialize(trim(array_shift($file))) as $required) {
-                    require_once $required;
+                    include_once $required;
                 }
                 return unserialize(join('', $file));
             }
@@ -265,7 +276,7 @@ class BIFE_Parser {
         fclose($fp);
         if ($this->cache) {
             $fp = fopen($cache, 'w');
-            fputs($fp, serialize($this->root->getRequiredFiles()) . "\n");
+            fputs($fp, serialize($this->includes) . "\n");
             fputs($fp, serialize($this->root));
             fclose($fp);
         }
@@ -273,7 +284,6 @@ class BIFE_Parser {
     }
     // -X2C
 
-
     // +X2C Operation 74
     /**
      * Parse a XML string with a complete and valid XML document.
@@ -292,4 +302,4 @@ class BIFE_Parser {
 
 } // -X2C Class :Parser
 
-?>
\ No newline at end of file
+?>
similarity index 97%
rename from modules/bife/BIFE/Root.php
rename to core/BIFE/Root.php
index 5ce9f8f375a74775afd566f6cc771f5b4e4f1728..cc4e74d8bd18e452d84f99a715f0ca7e2e65b931 100644 (file)
@@ -74,6 +74,7 @@ class BIFE_Root extends BIFE_Container {
      */
     function __construct($attrs) // ~X2C
     {
+        /*
         if (@$attrs['USE']) {
             foreach (split(':', $attrs['USE']) as $require) {
                 require_once "BIFE/$require.php";
@@ -81,13 +82,14 @@ class BIFE_Root extends BIFE_Container {
             }
             unset($attrs['USE']);
         }
+        */
         parent::__construct($attrs);
     }
     // -X2C
 
     // +X2C Operation 150
     /**
-     * Gets required files.
+     * Gets required files. (FIXME - DEPRECATED)
      *
      * @return array
      * @access public
@@ -100,4 +102,4 @@ class BIFE_Root extends BIFE_Container {
 
 } // -X2C Class :Root
 
-?>
\ No newline at end of file
+?>
similarity index 73%
rename from modules/bife/Makefile
rename to core/Makefile
index 8e6010432710a505ffcd5eb2c461e6fad07e19a9..ed9979c2564d83417c91b7a3c2444a316ac811b4 100644 (file)
 # $Id$
 #
 
+VERSION=0.10
+MODULE_FILE=BIFE.php
+MODULE_NAME=Core
+PHP_FILES=$(filter-out $(MODULE_FILE),$(subst ./,,$(shell find -name '*.php')))
+X2C_TEMPLATE=../xmi2code.tpl.php
+
+all: $(MODULE_FILE)
+
 code: bife.xmi xmi2code.config
        @xmi2code
 
-clean-code:
+code-clean:
        @find -name '*.bak' | xargs rm -vf
 
-clean: clean-code
-
+$(MODULE_FILE): code $(PHP_FILES) $(X2C_TEMPLATE)
+       @( \
+               ( \
+                       cat $(X2C_TEMPLATE) | \
+                       grep -v '@@date' | \
+                       grep -v '$$Id' | \
+                       egrep -v '^//$$' \
+               ); \
+               echo '//'; \
+               echo -n '// BIFE $(MODULE_NAME) (version $(VERSION)) - '; \
+               date; \
+               echo '//'; \
+               ( \
+                       cat $(PHP_FILES) | \
+                       grep -v require_once | \
+                       grep -v '?>' | \
+                       grep -v '<?php' | \
+                       egrep -v '^\s*//' \
+               ); \
+               echo -n '?>' \
+       ) > $(MODULE_FILE)
similarity index 95%
rename from modules/bife/bife.xmi
rename to core/bife.xmi
index 095b32cc40ad9a269ca2d51beaee9e340a9dfd89..d324b80f267737283b766dadace4e9aff63395fb 100644 (file)
@@ -5,11 +5,11 @@
    <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
    <XMI.exporterVersion>1.1</XMI.exporterVersion>
   </XMI.documentation>
-  <XMI.model xmi.name="bife" href="/home/luca/website/www/test/bife/doc/uml/bife.xmi" />
+  <XMI.model xmi.name="bife" href="/home/luca/website/www/test/bife/core/bife.xmi" />
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
-  <docsettings viewid="2" documentation="Parse XML data getting widgets." uniqueid="155" />
+  <docsettings viewid="2" documentation="Parse XML data getting widgets." uniqueid="156" />
   <umlobjects>
    <UML:Class stereotype="" package="BIFE" xmi.id="3" abstract="1" documentation="Base widget class." name="Widget" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="126" type="void" abstract="0" documentation="Constructor." name="BIFE_Widget" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="74" type="&amp;BIFE_Root" abstract="0" documentation="Parse a XML string with a complete and valid XML document." name="parseString" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="XML data to parse." name="data" static="0" scope="200" />
     </UML:Operation>
-    <UML:Attribute stereotype="" package="" xmi.id="26" value="" type="BIFE_Root" abstract="0" documentation="Top level widget." name="root" static="0" scope="200" />
-    <UML:Attribute stereotype="" package="" xmi.id="27" value="" type="resource" abstract="0" documentation="XML parser resource." name="parser" static="0" scope="200" />
-    <UML:Attribute stereotype="" package="" xmi.id="29" value="" type="array" abstract="0" documentation="BIFE widgets stack." name="stack" static="0" scope="200" />
-    <UML:Attribute stereotype="" package="" xmi.id="84" value="''" type="string" abstract="0" documentation="Fallback class to use in case that a widget class is not found." name="fallback" static="0" scope="200" />
+    <UML:Attribute stereotype="" package="" xmi.id="26" value="null" type="BIFE_Root" abstract="0" documentation="Top level widget." name="root" static="0" scope="202" />
+    <UML:Attribute stereotype="" package="" xmi.id="27" value="null" type="resource" abstract="0" documentation="XML parser resource." name="parser" static="0" scope="202" />
+    <UML:Attribute stereotype="" package="" xmi.id="29" value="array()" type="array" abstract="0" documentation="BIFE widgets stack." name="stack" static="0" scope="202" />
+    <UML:Attribute stereotype="" package="" xmi.id="84" value="''" type="string" abstract="0" documentation="Fallback class to use in case that a widget class is not found." name="fallback" static="0" scope="202" />
     <UML:Attribute stereotype="" package="" xmi.id="148" value="'/tmp'" type="string" abstract="0" documentation="XML cache directory. Empty if no cahching must be done (for current dir use '.')." name="cache" static="0" scope="202" />
+    <UML:Attribute stereotype="" package="" xmi.id="156" value="array()" type="array" abstract="0" documentation="Files required by the parsed XML file." name="requires" static="0" scope="202" />
    </UML:Class>
    <UML:Class stereotype="" package="BIFE" xmi.id="61" abstract="1" documentation="Fallback widget to use when no specific widget is implemented." name="Fallback" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="62" type="void" abstract="0" documentation="Constructor." name="BIFE_Fallback" static="0" scope="200" >
@@ -95,7 +96,7 @@
     <UML:Operation stereotype="" package="" xmi.id="88" type="void" abstract="0" documentation="Constructor." name="__construct" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
     </UML:Operation>
-    <UML:Operation stereotype="" package="" xmi.id="150" type="array" abstract="0" documentation="Gets required files." name="getRequiredFiles" static="0" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="150" type="array" abstract="0" documentation="Gets required files. (FIXME - DEPRECATED)" name="getRequiredFiles" static="0" scope="200" />
     <UML:Attribute stereotype="" package="" xmi.id="149" value="array()" type="array" abstract="0" documentation="Root widget's required files." name="required" static="0" scope="202" />
    </UML:Class>
    <UML:Class stereotype="" package="HTML/Template" xmi.id="130" abstract="0" documentation="Hooks vs. IT (HIT) is a simple template implementation, based on hooks and IT template systems." name="HIT" static="0" scope="200" >
@@ -145,7 +146,7 @@ Parse a template appending the results to an internal buffer. If $vars is an arr
      <UML:ConceptWidget usesdiagramfillcolour="0" width="127" showattsigs="601" usesdiagramusefillcolour="0" x="91" linecolour="#ff0000" y="150" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" usefillcolor="1" showattributes="1" xmi.id="5" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="118" showattsigs="601" usesdiagramusefillcolour="0" x="31" linecolour="#ff0000" y="319" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="60" usefillcolor="1" showattributes="1" xmi.id="61" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="168" showattsigs="601" usesdiagramusefillcolour="0" x="191" linecolour="#ff0000" y="319" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="75" usefillcolor="1" showattributes="1" xmi.id="85" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="156" showattsigs="601" usesdiagramusefillcolour="0" x="301" linecolour="#ff0000" y="20" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="225" usefillcolor="1" showattributes="1" xmi.id="25" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="168" showattsigs="601" usesdiagramusefillcolour="0" x="301" linecolour="#ff0000" y="20" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="240" usefillcolor="1" showattributes="1" xmi.id="25" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations>
@@ -194,7 +195,7 @@ Parse a template appending the results to an internal buffer. If $vars is an arr
        <listitem open="0" type="815" id="63" label="__construct" />
        <listitem open="0" type="814" id="129" label="name" />
       </listitem>
-      <listitem open="0" type="813" id="25" label="Parser" >
+      <listitem open="1" type="813" id="25" label="Parser" >
        <listitem open="0" type="815" id="30" label="BIFE_Parser" />
        <listitem open="0" type="815" id="31" label="__construct" />
        <listitem open="0" type="815" id="32" label="__destruct" />
@@ -206,6 +207,7 @@ Parse a template appending the results to an internal buffer. If $vars is an arr
        <listitem open="0" type="815" id="37" label="parseFile" />
        <listitem open="0" type="815" id="74" label="parseString" />
        <listitem open="0" type="814" id="27" label="parser" />
+       <listitem open="0" type="814" id="156" label="requires" />
        <listitem open="0" type="814" id="26" label="root" />
        <listitem open="0" type="814" id="29" label="stack" />
        <listitem open="0" type="815" id="33" label="startElement" />
index 72fc369c8482815194032845db035dc8d5dba43d..f7abe2b739d6994d18cb44294108f299e5531dcb 100644 (file)
 // $Id$
 //
 
+$incs = array(
+    '../core',
+    '../modules/album',
+    '../modules/basic',
+    '../modules/menu',
+//    '../modules/',
+);
 $tmp = ini_get('include_path');
-ini_set('include_path', "../src:$tmp");
+ini_set('include_path', join(':', $incs) . ":$tmp");
 unset($tmp);
 umask('002');
 
 require_once 'HTML/Template/HIT.php';
 require_once 'BIFE/Parser.php';
 require_once 'BIFE/Copy.php';
-require_once 'BIFE/Page.php';
-require_once 'BIFE/Title.php';
 require_once 'BIFE/Link.php';
-#require_once 'BIFE/Album.php';
-#require_once 'BIFE/AlbumPhoto.php';
-#require_once 'BIFE.php';
 
 $file = isset($_REQUEST['BIFE']) ? $_REQUEST['BIFE'] : 'index.xbf';
 
index 61383a8aec18ad3555397f405a551bc25b6dccf9..4ace0c30055e6ecf4f73d0361fa298b2ef69405c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Page title="Hola mundo!" menu="true" use="Album">
+<Page title="Hola mundo!" menu="true">
     <Title>Datos!</Title>
     <H3>Photo album</H3>
-    <Album dir="../.." columns="8"/>
+    <Album:Thumbs dir="../.." columns="8"/>
     <HR color="blue" size="3"/>
 </Page>
index 5ead3eee611d15721768864f8288c162f47222b1..ba7f57c6d0044da052114dde8e5c52c4cad3c827 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Page title="Foto" use="AlbumPhoto">
-    <AlbumPhoto/>
+    <Album:Photo/>
 </Page>
index 76bb71a7263b783cc16858b545c65b54c7bd2088..577ce969404d458fcd3d174070de6359c5420e91 100644 (file)
@@ -29,7 +29,7 @@
 
 
 // +X2C includes
-require_once 'BIFE.php';
+require_once 'BIFE/Widget.php';
 // ~X2C
 
 // +X2C Class 151 :Pager
index 6569eb83b5af9b330a263ffc6f2b14e640f47529..15682553e37d5ab9999a974f8aada76fb7181e7e 100644 (file)
@@ -27,7 +27,7 @@
 //
 
 // +X2C includes
-require_once 'BIFE.php';
+require_once 'BIFE/Widget.php';
 // ~X2C
 
 // +X2C Class 103 :Photo
index f79e5255fb1d3e9a11fecebbd5f17e9b959cceb4..7c5ddeca284f4283e440dc3aa96c97d0f7a52ad5 100644 (file)
@@ -27,7 +27,7 @@
 //
 
 // +X2C includes
-require_once 'BIFE.php';
+require_once 'BIFE/Widget.php';
 // ~X2C
 
 require_once 'Image/Transform.php';
index fd3a19d9deca93eb563db97fe8985b93a37ff50c..63584a1f8fe01cdd44e76153fae720ee6de6f231 100644 (file)
 # $Id$
 #
 
-code: album.xmi xmi2code.config
+MODULE=album
+
+code: $(MODULE).xmi xmi2code.config
        @xmi2code
 
-clean-code:
+code-clean:
        @find -name '*.bak' | xargs rm -vf
 
-clean: clean-code
-
index 3626421bf84f6b0b11e25b50f6caae73c69444b9..455bba5a41894709db3238a461d0a6af3ac5e441 100644 (file)
@@ -12,8 +12,7 @@
   <docsettings viewid="114" documentation="Parse XML data getting widgets." uniqueid="155" />
   <umlobjects>
    <UML:Class stereotype="" package="BIFE" xmi.id="3" abstract="1" documentation="Base widget class.
-x2c:extern
-x2c:include: BIFE.php" name="Widget" static="0" scope="200" />
+x2c:extern" name="Widget" static="0" scope="200" />
    <UML:Class stereotype="" package="BIFE/Album" xmi.id="20" abstract="0" documentation="Photo album widget. [TODO: Make a better explanation]" name="Thumbs" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="22" type="void" abstract="0" documentation="Constructor." name="BIFE_Album_Thumbs" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
index 28491be053a0f9680d4be560c88ad78c16e2941d..f58dec1cb03e80a84842e0e3bfdab6eaf3a885b6 100644 (file)
@@ -27,7 +27,7 @@
 //
 
 // +X2C includes
-require_once 'BIFE.php';
+require_once 'BIFE/Fallback.php';
 // ~X2C
 
 // +X2C Class 76 :Copy
index 5cac4c218b6e4a996b7c5bbd671aef2a39dfb7b6..bbda5bdc52cc6256ee46461395d6c9182a7a541b 100644 (file)
@@ -27,7 +27,7 @@
 //
 
 // +X2C includes
-require_once 'BIFE.php';
+require_once 'BIFE/Container.php';
 // ~X2C
 
 // +X2C Class 7 :Generic
index a83aaafa1e1738c6889145af77df45aed44d6314..0bff2f950508b5d2c94cb9b027ab2d4deae5dc31 100644 (file)
@@ -27,7 +27,7 @@
 //
 
 // +X2C includes
-require_once 'BIFE.php';
+require_once 'BIFE/Root.php';
 // ~X2C
 
 // +X2C Class 14 :Page
index d2889c82dbbdd11f8eaf71d571ddd6f4d4b96210..1aa829af92e0cf91f787f7cafec6eeb66d0a4833 100644 (file)
 # $Id$
 #
 
-code: basic.xmi xmi2code.config
+MODULE=basic
+
+code: $(MODULE).xmi xmi2code.config
        @xmi2code
 
-clean-code:
+code-clean:
        @find -name '*.bak' | xargs rm -vf
 
-clean: clean-code
-
index 43917ffe030861b9b394fb91028b6f8f05369570..b1e52f4462e27c1b0aeac45ac3acd03f6588bf72 100644 (file)
@@ -5,15 +5,14 @@
    <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
    <XMI.exporterVersion>1.1</XMI.exporterVersion>
   </XMI.documentation>
-  <XMI.model xmi.name="basic" href="/home/luca/website/www/test/bife/doc/uml/basic.xmi" />
+  <XMI.model xmi.name="basic" href="/home/luca/website/www/test/bife/modules/basic/basic.xmi" />
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
   <docsettings viewid="113" documentation="Parse XML data getting widgets." uniqueid="155" />
   <umlobjects>
    <UML:Class stereotype="" package="BIFE" xmi.id="5" abstract="1" documentation="Base container widget class.
-x2c:extern
-x2c:include: BIFE.php" name="Container" static="0" scope="200" />
+x2c:extern" name="Container" static="0" scope="200" />
    <UML:Class stereotype="" package="BIFE" xmi.id="7" abstract="1" documentation="This is a generic and simple BIFE_Container implementation." name="Generic" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="10" type="void" abstract="0" documentation="Constructor." name="BIFE_Generic" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
@@ -51,8 +50,7 @@ x2c:include: BIFE.php" name="Container" static="0" scope="200" />
     </UML:Operation>
    </UML:Class>
    <UML:Class stereotype="" package="BIFE" xmi.id="61" abstract="1" documentation="Fallback widget to use when no specific widget is implemented.
-x2c:extern
-x2c:include: BIFE.php" name="Fallback" static="0" scope="200" />
+x2c:extern" name="Fallback" static="0" scope="200" />
    <UML:Class stereotype="" package="BIFE" xmi.id="76" abstract="0" documentation="Fallback widget that copies the XML." name="Copy" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="79" type="void" abstract="0" documentation="Constructor." name="BIFE_Copy" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Widget name." name="name" static="0" scope="200" />
@@ -67,8 +65,7 @@ x2c:include: BIFE.php" name="Fallback" static="0" scope="200" />
     </UML:Operation>
    </UML:Class>
    <UML:Class stereotype="" package="BIFE" xmi.id="85" abstract="1" documentation="Root container class.
-x2c:extern
-x2c:include: BIFE.php" name="Root" static="0" scope="200" />
+x2c:extern" name="Root" static="0" scope="200" />
    <UML:Class stereotype="" package="BIFE" xmi.id="110" abstract="0" documentation="Link to another page." name="Link" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="111" type="void" abstract="0" documentation="Constructor." name="BIFE_Link" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
index e4a3b8de685aeaa1984e8e606d54e0ebca87b2a5..0c3d4ef50996f82ea2058fa6aa2483379f1a1c00 100644 (file)
@@ -29,7 +29,7 @@
 
 
 // +X2C includes
-require_once 'BIFE.php';
+require_once 'BIFE/Widget.php';
 // ~X2C
 
 // +X2C Class 115 :Menu
index 9d04db65719ca79162ffb7bea6ee4d455fc1a972..3aedb0097f16d8ad5642a7fa917c0cf9f8887eb4 100644 (file)
 # $Id$
 #
 
-code: menu.xmi xmi2code.config
+MODULE=menu
+
+code: $(MODULE).xmi xmi2code.config
        @xmi2code
 
-clean-code:
+code-clean:
        @find -name '*.bak' | xargs rm -vf
 
-clean: clean-code
-
index 57cb17068344a79e954ab42ad80098de61d0f064..5fb8ff5c5290cf40953657a9400c567edf43a5ce 100644 (file)
@@ -12,8 +12,7 @@
   <docsettings viewid="116" documentation="Parse XML data getting widgets." uniqueid="156" />
   <umlobjects>
    <UML:Class stereotype="" package="BIFE" xmi.id="3" abstract="1" documentation="Base widget class.
-x2c:extern
-x2c:include: BIFE.php" name="Widget" static="0" scope="200" />
+x2c:extern" name="Widget" static="0" scope="200" />
    <UML:Class stereotype="" package="BIFE/Menu" xmi.id="115" abstract="0" documentation="Dynamic Menu." name="Menu" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="121" type="void" abstract="0" documentation="Constructor." name="BIFE_Menu_Menu" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
@@ -31,14 +30,14 @@ x2c:extern" name="HIT" static="0" scope="200" />
   <diagrams>
    <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="0" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="116" documentation="" type="402" showops="1" showpackage="1" name="Menu Classes" localid="30000" showstereotype="0" showscope="1" font="Helvetica,9,-1,5,48,0,0,0,0,0" linecolor="#ff0000" >
     <widgets>
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="145" showattsigs="601" usesdiagramusefillcolour="0" x="61" linecolour="#ff0000" y="138" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="67" usefillcolor="1" showattributes="1" xmi.id="115" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="145" showattsigs="601" usesdiagramusefillcolour="0" x="50" linecolour="#ff0000" y="137" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="67" usefillcolor="1" showattributes="1" xmi.id="115" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="90" showattsigs="600" usesdiagramusefillcolour="0" x="77" linecolour="#ff0000" y="51" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="25" usefillcolor="1" showattributes="0" xmi.id="3" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="3" widgetaid="115" documentation="" type="500" >
       <linepath>
-       <startpoint startx="133" starty="138" />
+       <startpoint startx="122" starty="137" />
        <endpoint endx="122" endy="76" />
       </linepath>
      </UML:AssocWidget>