Boost logo

Boost :

From: John Torjo (john.groups_at_[hidden])
Date: 2008-04-03 22:04:10


Manuel Jung wrote:
> Hi John,
>
> thanks for the code. But im still missing one point. How do i access the
> data in the std::vector? I understand that it is in a shared pointer now.
> The context obeject is not accessible from outside.
> I have done this:
>
> to_string To_String;
>
> And than added this to my logger destinations:
>
> g_l()->writer().add_destination( To_String );
>
>
This is fine.
To access the vector, just add a member function of to_string.

const std::vector<std::string> & strings() const { return context().strs; }

Best,
John

-- 
http://John.Torjo.com -- C++ expert
http://blog.torjo.com
... call me only if you want things done right

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