Saturday, April 12, 2008

STLSoft 1.10 preview

There're several things that've been waiting to go into the 1.10 release for quite a while - some over 2 years! - and it's beyond ridiculous.

So, from the end of this week onwards, I'm going to make a preview release of the next version of the library available alongside the main release. The first version of this will contain only the platformstl::properties_file component, whic his needed for the soon-to-be-released alpha release of the much-delayed FastFormat library.

This simple but sophisticated properties file reader class provides a non-mutable vector like interface, along the following lines:

class properties_file
{
public: /// Member Types
  typedef stlsoft::string_view view_type;
  typedef values_map_type::value_type value_type;
  typedef values_map_type::const_iterator const_iterator;
  typedef size_t size_type;

public: /// Construction
  explicit properties_file(char const* fileName);

public: /// Accessors
  view_type operator [](char const* propertyName) const;

  size_type size() const;

  const_iterator begin() const;
  const_iterator end() const;

  . . .
};




The only exotic part of it is the use of stlsoft::string_view, rather than a string value type. I'll discuss this in more depth in a future post; for now you can rest assured that it's to do with not allocating any memory we don't need to. ;-)

No comments: