]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
driver/*, libvaladoc: Move ChildSymbolRegistrar to libvaladoc
authorFlorian Brosch <flo.brosch@gmail.com>
Fri, 12 Aug 2011 20:29:46 +0000 (22:29 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Fri, 12 Aug 2011 20:30:40 +0000 (22:30 +0200)
17 files changed:
src/driver/0.10.x/Makefile.am
src/driver/0.10.x/driver.vala
src/driver/0.11.0/Makefile.am
src/driver/0.11.0/childsymbolregistrar.vala [deleted file]
src/driver/0.11.0/driver.vala
src/driver/0.11.x/Makefile.am
src/driver/0.11.x/childsymbolregistrar.vala [deleted file]
src/driver/0.11.x/driver.vala
src/driver/0.12.x/Makefile.am
src/driver/0.12.x/childsymbolregistrar.vala [deleted file]
src/driver/0.12.x/driver.vala
src/driver/0.13.x/Makefile.am
src/driver/0.13.x/childsymbolregistrar.vala [deleted file]
src/driver/0.13.x/driver.vala
src/libvaladoc/Makefile.am
src/libvaladoc/api/childsymbolregistrar.vala [moved from src/driver/0.10.x/childsymbolregistrar.vala with 86% similarity]
src/valadoc/valadoc.vala

index 9c5705185a5422a7460ae2834ef86feab09bef92..9c285fda44a1bb84c155f8aeeffbb08b3e282a82 100755 (executable)
@@ -30,7 +30,6 @@ driver_LTLIBRARIES =  \
 
 libdriver_la_VALASOURCES = \
        initializerbuilder.vala \
-       childsymbolregistrar.vala \
        symbolresolver.vala \
        treebuilder.vala \
        driver.vala \
index 75d4c6b5175142d63ab405c7ea369eeb16958385..6fc87d97a37719b9d8f03733d5b18b523a249be3 100755 (executable)
@@ -40,9 +40,6 @@ public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
                SymbolResolver resolver = new SymbolResolver (builder);
                tree.accept (resolver);
 
-               ChildSymbolRegistrar registrar = new ChildSymbolRegistrar ();
-               tree.accept (registrar);
-
                return tree;
        }
 }
index f577cb4ca931f408fe89225c2e2cafabd4b0ba77..4ceef450de913814f5aa45ed7823cc79b812c139 100755 (executable)
@@ -30,7 +30,6 @@ driver_LTLIBRARIES =  \
 
 libdriver_la_VALASOURCES = \
        initializerbuilder.vala \
-       childsymbolregistrar.vala \
        symbolresolver.vala \
        treebuilder.vala \
        driver.vala \
diff --git a/src/driver/0.11.0/childsymbolregistrar.vala b/src/driver/0.11.0/childsymbolregistrar.vala
deleted file mode 100644 (file)
index 2454242..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* childsymbolregistrar.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.ChildSymbolRegistrar : Visitor {
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               item.accept_children (this);                    
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       ((Interface) type_ref.data_type).register_related_interface (item);
-               }
-
-               if (item.base_type != null) {
-                       ((Class) item.base_type.data_type).register_derived_interface (item);
-               }
-
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       ((Interface) type_ref.data_type).register_implementation (item);
-               }
-
-               if (item.base_type != null)     {
-                       ((Class) item.base_type.data_type).register_child_class (item);
-               }
-
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               item.accept_all_children (this);
-       }
-}
-
index 75d4c6b5175142d63ab405c7ea369eeb16958385..6fc87d97a37719b9d8f03733d5b18b523a249be3 100755 (executable)
@@ -40,9 +40,6 @@ public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
                SymbolResolver resolver = new SymbolResolver (builder);
                tree.accept (resolver);
 
-               ChildSymbolRegistrar registrar = new ChildSymbolRegistrar ();
-               tree.accept (registrar);
-
                return tree;
        }
 }
index 6cc4c1ff4b321935d0796b12ca176590ba3660fe..6dfaf07d4a9a278c091a96f2e0568071a78e8a2e 100755 (executable)
@@ -30,7 +30,6 @@ driver_LTLIBRARIES =  \
 
 libdriver_la_VALASOURCES = \
        initializerbuilder.vala \
-       childsymbolregistrar.vala \
        symbolresolver.vala \
        treebuilder.vala \
        driver.vala \
diff --git a/src/driver/0.11.x/childsymbolregistrar.vala b/src/driver/0.11.x/childsymbolregistrar.vala
deleted file mode 100644 (file)
index 2454242..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* childsymbolregistrar.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.ChildSymbolRegistrar : Visitor {
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               item.accept_children (this);                    
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       ((Interface) type_ref.data_type).register_related_interface (item);
-               }
-
-               if (item.base_type != null) {
-                       ((Class) item.base_type.data_type).register_derived_interface (item);
-               }
-
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       ((Interface) type_ref.data_type).register_implementation (item);
-               }
-
-               if (item.base_type != null)     {
-                       ((Class) item.base_type.data_type).register_child_class (item);
-               }
-
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               item.accept_all_children (this);
-       }
-}
-
index 75d4c6b5175142d63ab405c7ea369eeb16958385..6fc87d97a37719b9d8f03733d5b18b523a249be3 100755 (executable)
@@ -40,9 +40,6 @@ public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
                SymbolResolver resolver = new SymbolResolver (builder);
                tree.accept (resolver);
 
-               ChildSymbolRegistrar registrar = new ChildSymbolRegistrar ();
-               tree.accept (registrar);
-
                return tree;
        }
 }
index 89fb0ab5d5bcb2b25fdd96c931b47adfcb699ced..b5544e2c2a700728c7edccd1c488133b3d25ae18 100755 (executable)
@@ -30,7 +30,6 @@ driver_LTLIBRARIES =  \
 
 libdriver_la_VALASOURCES = \
        initializerbuilder.vala \
-       childsymbolregistrar.vala \
        symbolresolver.vala \
        treebuilder.vala \
        driver.vala \
diff --git a/src/driver/0.12.x/childsymbolregistrar.vala b/src/driver/0.12.x/childsymbolregistrar.vala
deleted file mode 100644 (file)
index 2454242..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* childsymbolregistrar.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.ChildSymbolRegistrar : Visitor {
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               item.accept_children (this);                    
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       ((Interface) type_ref.data_type).register_related_interface (item);
-               }
-
-               if (item.base_type != null) {
-                       ((Class) item.base_type.data_type).register_derived_interface (item);
-               }
-
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       ((Interface) type_ref.data_type).register_implementation (item);
-               }
-
-               if (item.base_type != null)     {
-                       ((Class) item.base_type.data_type).register_child_class (item);
-               }
-
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               item.accept_all_children (this);
-       }
-}
-
index 75d4c6b5175142d63ab405c7ea369eeb16958385..6fc87d97a37719b9d8f03733d5b18b523a249be3 100755 (executable)
@@ -40,9 +40,6 @@ public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
                SymbolResolver resolver = new SymbolResolver (builder);
                tree.accept (resolver);
 
-               ChildSymbolRegistrar registrar = new ChildSymbolRegistrar ();
-               tree.accept (registrar);
-
                return tree;
        }
 }
index c9d267fd70b5c16ab9ca81bf38315dcc683601e1..282932a394ea6956c63177d0e9fceaa4079538fa 100755 (executable)
@@ -32,7 +32,6 @@ driver_LTLIBRARIES =  \
 
 libdriver_la_VALASOURCES = \
        initializerbuilder.vala \
-       childsymbolregistrar.vala \
        symbolresolver.vala \
        treebuilder.vala \
        driver.vala \
diff --git a/src/driver/0.13.x/childsymbolregistrar.vala b/src/driver/0.13.x/childsymbolregistrar.vala
deleted file mode 100644 (file)
index 2454242..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* childsymbolregistrar.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Valadoc.Api;
-using Gee;
-
-
-public class Valadoc.Drivers.ChildSymbolRegistrar : Visitor {
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_tree (Api.Tree item) {
-               item.accept_children (this);                    
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_package (Package item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_interface (Interface item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (var type_ref in interfaces) {
-                       ((Interface) type_ref.data_type).register_related_interface (item);
-               }
-
-               if (item.base_type != null) {
-                       ((Class) item.base_type.data_type).register_derived_interface (item);
-               }
-
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_class (Class item) {
-               Collection<TypeReference> interfaces = item.get_implemented_interface_list ();
-               foreach (TypeReference type_ref in interfaces) {
-                       ((Interface) type_ref.data_type).register_implementation (item);
-               }
-
-               if (item.base_type != null)     {
-                       ((Class) item.base_type.data_type).register_child_class (item);
-               }
-
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_struct (Struct item) {
-               item.accept_all_children (this);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public override void visit_property (Property item) {
-               item.accept_all_children (this);
-       }
-}
-
index 75d4c6b5175142d63ab405c7ea369eeb16958385..6fc87d97a37719b9d8f03733d5b18b523a249be3 100755 (executable)
@@ -40,9 +40,6 @@ public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
                SymbolResolver resolver = new SymbolResolver (builder);
                tree.accept (resolver);
 
-               ChildSymbolRegistrar registrar = new ChildSymbolRegistrar ();
-               tree.accept (registrar);
-
                return tree;
        }
 }
index aa9e01da548c66a24e8c72b97d0d99fe9fb88de2..9fba5482445671226e6849ef0b3d580d4fd629ca 100755 (executable)
@@ -44,6 +44,7 @@ libvaladoc_la_VALASOURCES = \
        api/attributeargument.vala \
        api/attribute.vala \
        api/array.vala \
+       api/childsymbolregistrar.vala \
        api/class.vala \
        api/constant.vala \
        api/delegate.vala \
similarity index 86%
rename from src/driver/0.10.x/childsymbolregistrar.vala
rename to src/libvaladoc/api/childsymbolregistrar.vala
index 2454242bff197fa3c65bc6b80fd831d436485761..c3288e0130075dc02b38f2fd419f2e3d8d4c80db 100644 (file)
@@ -24,26 +24,26 @@ using Valadoc.Api;
 using Gee;
 
 
-public class Valadoc.Drivers.ChildSymbolRegistrar : Visitor {
+public class Valadoc.Api.ChildSymbolRegistrar : Visitor {
        /**
         * {@inheritDoc}
         */
        public override void visit_tree (Api.Tree item) {
-               item.accept_children (this);                    
+               item.accept_children (this);
        }
 
        /**
         * {@inheritDoc}
         */
        public override void visit_package (Package item) {
-               item.accept_all_children (this);
+               item.accept_all_children (this, false);
        }
 
        /**
         * {@inheritDoc}
         */
        public override void visit_namespace (Namespace item) {
-               item.accept_all_children (this);
+               item.accept_all_children (this, false);
        }
 
        /**
@@ -59,7 +59,7 @@ public class Valadoc.Drivers.ChildSymbolRegistrar : Visitor {
                        ((Class) item.base_type.data_type).register_derived_interface (item);
                }
 
-               item.accept_all_children (this);
+               item.accept_all_children (this, false);
        }
 
        /**
@@ -75,21 +75,21 @@ public class Valadoc.Drivers.ChildSymbolRegistrar : Visitor {
                        ((Class) item.base_type.data_type).register_child_class (item);
                }
 
-               item.accept_all_children (this);
+               item.accept_all_children (this, false);
        }
 
        /**
         * {@inheritDoc}
         */
        public override void visit_struct (Struct item) {
-               item.accept_all_children (this);
+               item.accept_all_children (this, false);
        }
 
        /**
         * {@inheritDoc}
         */
        public override void visit_property (Property item) {
-               item.accept_all_children (this);
+               item.accept_all_children (this, false);
        }
 }
 
index bd4a5443914af62f828a2b7db679f162757ba56e..1697c9e0cefa3d498d00a33077ab79069ed35d8d 100755 (executable)
@@ -337,6 +337,9 @@ public class ValaDoc : Object {
                        return quit (reporter);
                }
 
+               // register child symbols:
+               Valadoc.Api.ChildSymbolRegistrar registrar = new Valadoc.Api.ChildSymbolRegistrar ();
+               doctree.accept (registrar);
 
                // process documentation
                Valadoc.DocumentationParser docparser = new Valadoc.DocumentationParser (settings, reporter, doctree, modules);