
Hi, I have a functor which is working, but its argument, which I don't know its type, I don't know what to do with it. I want to extract data out of it, I want to know is beginning and its end, I want to display the the content of the string character in my consol... but I can't retrieve this information. How could I archieve it ? What is the type of the argument relay to my function ? Is there a dOxygen like documentation (the one on the Boost site is great but a formal documentaton is also interesting). Where is the description and code source of this type ? Here is the code of my functor : struct counter{ counter() : j(0) {j = new int();} counter(const counter &model) : j(model.j) {} template <typename Token> bool operator()(Token const& t){// t is the argument I want to use ++i; ++(*j); std::ostringstream oss; oss << "global : " << i << " membre : " << *j;//typeid(t).name(); printf("%s\n", oss.str().c_str()); return true; } int* j;}; Thanks every one, cordialy,Guillaume Bersac237bis rue de Pessac33000 Bordeaux06.65.30.89.43

On Jun 23, 2013, at 2:59 PM, "... ..."
I have a functor which is working, but its argument, which I don't know its type, I don't know what to do with it. I want to extract data out of it, I want to know is beginning and its end, I want to display the the content of the string character in my consol... but I can't retrieve this information. How could I archieve it ? What is the type of the argument relay to my function ?
I see no reference to a Boost library here. This looks to be an off-topic C++ question for which I suggest StackOverflow.
Is there a dOxygen like documentation (the one on the Boost site is great but a formal documentaton is also interesting). Where is the description and code source of this type ?
Why would Boost have documentation for your functor?
Here is the code of my functor : struct counter{ counter() : j(0) {j = new int();} counter(const counter &model) : j(model.j) {} template <typename Token> bool operator()(Token const& t){// t is the argument I want to use ++i; ++(*j); std::ostringstream oss; oss << "global : " << i << " membre : " << *j;//typeid(t).name(); printf("%s\n", oss.str().c_str()); return true; } int* j;};
If you have a Boost specific question, and you need to post code, you'll need to figure out how to post it with better formatting. ___ Rob (Sent from my portable computation engine)
participants (2)
-
... ...
-
Rob Stewart