Wednesday, April 28, 2010

Joining string collections

Problem: Join a collection of strings, with a given separator

Answer: Use stlsoft::string_concatenator()

Related Chapter: Extended STL, volume 1 chapter 40

Example:

  typedef std::string           string_t;
  typedef std::vector<string_t> strings_t;

  strings_t patterns;

  patterns.push_back("*.cpp");
  patterns.push_back("*.cxx");
  patterns.push_back("*.hpp");
  patterns.push_back("*.hxx");

  string_t result;

  std::copy(coll.begin(), coll.end()
          , stlsoft::string_concatenator(result, "|"));

  assert("*.cpp|*.cxx|*.hpp|*.hxx" == result);

Sunday, January 3, 2010

Extended STL (volume 1) Inventions: Introductions

As I've done for Imperfect C++, I'm going to enumerate the inventions (as opposed to techniques, or already established technologies) introduced in Extended STL (volume 1). Specifically, what are the (C++) programming components/techniques/technologies that I invented that are documented in the book.

I will make a series of posts covering the inventions, including:
  • element reference categories, including the By-Value Temporary Reference
  • Argument-dependent Return-type Variance (ARV)
  • External Iterator Invalidation
  • examination of the separation of Reversibilitty and Bidirectionality
  • UNIXSTL's glob_sequence
  • UNIXSTL's readdir_sequence
  • InetSTL's findfile_sequence
  • InetSTL's ftpdir_sequence
  • WinSTL's findfile_sequence
  • WinSTL's listbox_sequence and combobox_sequence
  • WinSTL's pid_sequence
  • WinSTL's process_module_sequence
  • MFCSTL's CArray_cadaptor
  • MFCSTL's CArray_iadaptor
  • WinSTL's child_window_sequence
  • WinSTL's zorder_iterator
  • PlatformSTL's environment_map
  • STLSoft's string_tokeniser
  • COMSTL's enumerator_sequence
  • COMSTL's collection_sequence
  • ACESTL's message_queue_sequence
  • STLSoft's ostream_iterator
  • STLSoft's cstring_concatenator_iterator
  • STLSoft's string_concatenator_iterator
  • STLSoft's member_selector_iterator
  • STLSoft's adapted_iterator_traits
  • STLSoft's filter_iterator
  • STLSoft's transform_iterator

Over time, I'll post short examples/explanations regarding each of these.

Friday, November 20, 2009

Extended STL online content

I thought it'd be useful to list the available online resources for Extended STL:

The Book:
Front Matter:
Sample Chapters:

Related Articles:


 I'll update this list from time to time as I remember more ...

Saturday, November 7, 2009

Welcome to the "Extended STL" blog!

Just a first "hello" to all readers of Extended STL, and of this blog. I've created this blog for three reasons:


  • To announce news regarding the book (such as reprints, reviews, and so on) and other books (including the books I'm currently working on)
  • To highlight, or discuss further, issues highlighted within the book
  • To discuss new issues, libraries, techniques and tools that I think may be of interest to the readers of Extended STL
Thanks for listening

Matt