Thursday, March 4, 2010

Pantheios 1.0.1 beta 195 released: enhanced pantheios::w2m inserter

The latest release of Pantheios provides enhanced flexibility for the pantheios::w2m inserter class. As well as passing wide C-strings, as in:

  void f(wchar_t const* s)
  {
    pan::log_DEBUG("f(s=", pan::w2m(s), ")");
    . . .
  }

the new facilities allow passing wide string class instances, as in:

  void f(std::string const& s)
  {
    pan::log_DEBUG("f(s=", pan::w2m(s), ")");
    . . .
  }


and

  void f(stlsoft::simple_wstring const& s)
  {
    pan::log_DEBUG("f(s=", pan::w2m(s), ")");
    . . .
  }


Previously, the log statement would have to explicitly elicit the C-string pointer and the length, as in:


  void f(stlsoft::simple_wstring const& s)
  {
    pan::log_DEBUG("f(s=", pan::w2m(s.data(), s.length()), ")");
    . . .
  }


Obviously, this is far less expressive than the new facilities.

2 comments:

  1. Thanks for the Pantheios library Matt. Simply one of the best pieces of software I have come across. I wonder if you have a tutorial/sample that shows how to use the inserter classes from a fixed back-end DLL (that you illustrate here: http://sourceforge.net/projects/pantheios/forums/forum/647484/topic/1639420). Thanks.

    ReplyDelete
  2. Hi

    Thanks for the feedback. (And apologies for not writing sooner.)

    Unfortunately, for most of this year I have been incredibly busy on a commercial engagement. That ends in four weeks' time, after which I will be doing a lot of work to do a non-beta release of Pantheios, including new logo, website, packaging, and much tutorial information.

    Matt

    ReplyDelete