You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Brown, Charles" <ch...@sensis.com> on 2004/10/05 16:09:58 UTC
extension function question
I have many, related, external functions and I want to service them all
from the execute() method of a single 'Function<name> : public Function'
class. However, I can not find anything in the parameters to the execute()
method that tells me which function is being called. I want to do something
like;
XObjectPtr MyFunction::execute( .... ) {
char* functionName = ????;
if ( strcmp( functionName, "foo" ) == 0 ) {
// do foo stuff
} else if ( strcmp( functionName, "bar" ) == 0 ) {
// do bar stuff
} else
// do error stuff
}
Can you point me to where I can grab the function name?
Thanks.
--
Charles Brown e-mail charles.brown@sensis.com
<ma...@sensis.com>
Lead Software Engineer, DPP phone 315.445.5744
Sensis Corporation fax 315.234.9400
5793 Widewaters Pkwy intra http://cbrown <http://cbrown/>
DeWitt, NY 13214 USA www http://www.sensis.com
<http://www.sensis.com/>
Re: extension function question
Posted by da...@us.ibm.com.
> I have many, related, external functions and I want to service them all
from the execute()
> method of a single 'Function<name> : public Function' class. However, I
can not find
> anything in the parameters to the execute() method that tells me which
function is being
> called. I want to do something like;
...
> Can you point me to where I can grab the function name?
There is no access to the function name from the call itself. You will
have to create a Function-derived class for each extension function you
want to implement.
Dave