Boost logo

Boost :

Subject: Re: [boost] Boost.Spirit how to use token in functor
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2013-06-24 05:07:24


On Jun 23, 2013, at 2:59 PM, "... ..." <bersac_1_at_[hidden]> wrote:

> 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)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk