2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* giscanner/Makefile.am:
+ * giscanner/gidlparser.py:
+ * giscanner/gidlwriter.py:
+ * giscanner/girwriter.py:
+ * giscanner/glibtransformer.py:
+ * giscanner/gobjecttreebuilder.py:
+ * giscanner/transformer.py:
+ * giscanner/treebuilder.py:
+ * tools/g-ir-scanner:
+ Rename treebuilder to transformer and
+ gobjectreebuilder to glibtransformer.
+
+2008-04-25 Johan Dahlin <jdahlin@async.com.br>
+
+ * giscanner/Makefile.am:
* giscanner/__init__.py:
* giscanner/cgobject.py:
* giscanner/gidlparser.py:
gidlparser.py \
gidlwriter.py \
girwriter.py \
- gobjecttreebuilder.py \
+ glibtransformer.py \
odict.py \
sourcescanner.py \
- treebuilder.py \
+ transformer.py \
xmlwriter.py
_giscanner_la_CFLAGS = \
from xml.etree.ElementTree import parse
-from .gobjecttreebuilder import GLibObject
+from .glibtransformer import GLibObject
class GIDLParser(object):
from __future__ import with_statement
-from .gobjecttreebuilder import (GLibBoxed, GLibEnum, GLibEnumMember,
- GLibFlags, GLibObject, GLibInterface)
-from .treebuilder import Callback, Class, Enum, Function, Interface
+from .glibtransformer import (GLibBoxed, GLibEnum, GLibEnumMember,
+ GLibFlags, GLibObject, GLibInterface)
+from .transformer import Callback, Class, Enum, Function, Interface
from .xmlwriter import XMLWriter
from __future__ import with_statement
-from .gobjecttreebuilder import (GLibBoxed, GLibEnum, GLibEnumMember,
- GLibFlags, GLibObject, GLibInterface)
-from .treebuilder import Callback, Class, Enum, Function, Interface
+from .glibtransformer import (GLibBoxed, GLibEnum, GLibEnumMember,
+ GLibFlags, GLibObject, GLibInterface)
+from .transformer import Callback, Class, Enum, Function, Interface
from .xmlwriter import XMLWriter
from . import cgobject
from .odict import odict
-from .treebuilder import (Callback, Class, Enum, Function, Interface,
+from .transformer import (Callback, Class, Enum, Function, Interface,
Member, Node, Parameter, Property, Return, Struct)
# Copied from h2defs.py
self.parameters = []
-class GObjectTreeBuilder(object):
+class GLibTransformer(object):
def __init__(self, namespace_name):
self._namespace_name = namespace_name
self._output_ns = odict()
self.name, self.retval, self.parameters)
-class TreeBuilder(object):
+class Transformer(object):
def __init__(self, generator):
self.generator = generator
self.nodes = []
sys.path.insert(0, '.')
-from giscanner.gobjecttreebuilder import GObjectTreeBuilder
+from giscanner.glibtransformer import GLibTransformer
from giscanner.sourcescanner import SourceScanner
-from giscanner.treebuilder import TreeBuilder
+from giscanner.transformer import Transformer
+
def main(args):
parser = optparse.OptionParser('%prog [options] sources')
ss.parse_files(filenames)
ss.parse_macros()
- builder = GObjectTreeBuilder(options.namespace)
+ builder = GLibTransformer(options.namespace)
if options.library:
builder.load_library(options.library)
for include in options.includes:
builder.register_include(include)
- builder.parse(TreeBuilder(ss).get_nodes())
+ builder.parse(Transformer(ss).get_nodes())
if options.format == 'gir':
from giscanner.girwriter import GIRWriter