A
a_agaga
I would have one more question related to a problem, about which I have
discussed earlier:
http://groups.google.fi/group/comp....07f69/3907f29eaecd75c3?hl=fi#3907f29eaecd75c3
I would need to call a private method from a public method this way:
class wrapper_c
{
public:
int method1()
{
return intermediateMethod<int>(&wrapper_c::finalMethod1);
}
But I would not want to write to each methodX the names of the
finalMethodX
(the names of the finalMethodXs, which the methodXs should call).
Is there any mechanism (just) to derive the name of the finalMethodX
from methodX?
(And then call the finalMethdoX from methodX.)
Is it possible?
I would like to do something like this:
int method1()
{
return
intermediateMethod<int>(&wrapper_c::nameDerivedFrom__FUNCTION__);
}
int method2()
{
return
intermediateMethod<int>(&wrapper_c::nameDerivedFrom__FUNCTION__);
}
( I would not like to write a different finalMethodX name to different
methods...)
I mentioned the __FUNCTION__, just to try to make my question more
understandable.
I am interested about any kinds of solutions. It does not need to use
the __FUNCTION__ (macro).
I do not wish to make any separate lists / manual mappings between the
methodX and derivedMethodX methods.
Thank you!
discussed earlier:
http://groups.google.fi/group/comp....07f69/3907f29eaecd75c3?hl=fi#3907f29eaecd75c3
I would need to call a private method from a public method this way:
class wrapper_c
{
public:
int method1()
{
return intermediateMethod<int>(&wrapper_c::finalMethod1);
}
But I would not want to write to each methodX the names of the
finalMethodX
(the names of the finalMethodXs, which the methodXs should call).
Is there any mechanism (just) to derive the name of the finalMethodX
from methodX?
(And then call the finalMethdoX from methodX.)
Is it possible?
I would like to do something like this:
int method1()
{
return
intermediateMethod<int>(&wrapper_c::nameDerivedFrom__FUNCTION__);
}
int method2()
{
return
intermediateMethod<int>(&wrapper_c::nameDerivedFrom__FUNCTION__);
}
( I would not like to write a different finalMethodX name to different
methods...)
I mentioned the __FUNCTION__, just to try to make my question more
understandable.
I am interested about any kinds of solutions. It does not need to use
the __FUNCTION__ (macro).
I do not wish to make any separate lists / manual mappings between the
methodX and derivedMethodX methods.
Thank you!