Hi y2hackers For a normal namespace I can do: for (unsigned int i=0; i < ns->symbolCount(); ++i) { SymbolEntryPtr s = ns->symbolEntry(i); Yes, I can also access the symbol table, which is the most useless structure as you can't iterate it and everything useful is private and everything useless is public ;-) But that iteration is enough to know the name of the symbols the namespace offers and their type (variable, function, etc). However, for a builtin., extern StaticDeclaration static_declarations; declaration_t *bi_dt = static_declarations.findDeclaration (qualified_name); and then create the call using the declaration YEBuiltin *bi_call = new YEBuiltin (bi_dt); IIRC from the declaration, I can get the symbol table, but as I said it is like getting nothing. Is there a way to get the symbol count and access every symbol somehow? Cheers! Duncan -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Friday 30 November 2007 11:43:52 Duncan Mac-Vicar Prett wrote:
extern StaticDeclaration static_declarations; declaration_t *bi_dt = static_declarations.findDeclaration (qualified_name);
I do can iterate the symbol table: (so I was wrong :-) ) static_declarations.symbolTable()->forEach(print_sym); (using a function) Which is ugly (because you need a functor if you want to accumulate values) but works. But I only get things like SCR, WFM, Pkg, sleep, y2debug, UI, etc So from there, I can't jump to the functions inside that declarations. That is not intuitive. As *findDeclaration (const char *name) const; does return a declaraton if you give "SCR::Read", I don't understand why forEach behaves that way. Duncan -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (1)
-
Duncan Mac-Vicar Prett