PDAL/PDAL — pull request #159 by c42f (2013-07-11 14:58:19+00:00)
Title: WIP: getDimension() optimizations

Work in progress - DO NOT MERGE!

Here's a pull request to track some additional changes in service of #153; the changes here are related to #157.

Summary:

* Move name-based getDimension() implementation to getDimensionPtr,
which returns a pointer rather than throwing exceptions, and also
takes const char* strings to avoid additional allocation.

* Move las point dimension caching to use getDimensionPtr for efficiency

* Make do with a single lookups of multi_index container by name, by
using equal_range early on.

* Fix potential bug in dimension inheritance by ensuring that we only
iterate over the discovered equal_range, rather than potentially
continuing to the end of the container.

TODO:

* UUID string parsing is BROKEN here - need a replacement for
boost::uuids::string_generator which doesn't routinely throw.

* The API changes aren't well thought through here - getDimensionPtr()
should probably replace getDimensionOptional()

* It's nasty having all those getDimension() variants - reduce them in
number using boost::string_ref ?