ns_list = ns_list.sort();
// let's try and load them, so we find out early what will fail.
print("loading library to make sure it works.");
-ns_list.forEach(function(ns_name) {
- var core = imports.gi[ns_name];
-});
+var classes = {};
-print("Looping throught namespaces");
-var ns_idx = [];
-ns_list.forEach(function(ns_name)
-{
-
- //if (ns_idx.length) { return ;/* do one - for testing */ }
-
+ns_list.forEach(function(ns_name) {
var core = imports.gi[ns_name];
- var idx = { name: ns_name};
- print("START:" + ns_name);
-
var ns = NameSpace.ns(ns_name); // fetch all the elements in namespace...
- // as a type => list of them..
-
-
-
-
-
-
-
-
ns['objects'].forEach( function(n) {
+ var odata = NameSpace.factory('Class', ns_name, n);
+ classes[odata.alias] = odata;
- print('NameSpace.factory(Class,'+ns_name+'.'+n+')');
- var odata = NameSpace.factory('Class', ns_name, n);
- print(JSON.stringify(odata.childClasses,null,4));
});
ns['interfaces'].forEach( function(n) {
-
- print('NameSpace.factory(Interface,'+ns_name+'.'+n+')');
- var odata = NameSpace.factory('Interface', ns_name, n);
- print(JSON.stringify(odata.implementedBy,null,4));
+ var odata =NameSpace.factory('Interface', ns_name, n);
+ classes[odata.alias] = odata;
});
- // what we are interested in..
-
-
+});
+
+
+print("Looping throught namespaces");
+var ns_idx = [];
+var implementations = {};
+
+for (cls in classes) {
+ var odata = classes[cls];
+ implementations[odata.alias] = odata.titleType == 'Class' ? odata.childClasses : odata.implementedBy;
+ for(method in odata.methods) {
+ print(method);
+ }
-});
+
+}
+
+print(JSON.stringify(implementations,null,4));
\ No newline at end of file