Overview Usage Performance Notes Links | tst 0.68 - 23 Jan 2009 |
A Structured Associative Container is a specialization of the C++ 98 standard concept Sorted Associative Container, with extended interface.
The template parameters are similar to that of the Associated Containers:
structured_set<Key, Comp, Alloc>;
structured_map<Key, Value, Comp, Alloc>;
where:
Key
type is itself a container (eg a std::string
or std::wstring
)Comp
is a comparison operator that imposes a sort order on Key::value_type
elements Key
is string, Comp
compares char
, if Key
is wstring
, Comp
applies to wchar_t
).Value
can be any Assignable typeAlloc
is an allocator that manages all memory allocation for the container.
The Comp
and the Alloc
types have default template arguments.
In other words Structured containers are like Sorted Associative Containers, BUT
std::basic_string<CharT>
is compatible with this requirement.Comp
(comparator) template argument to operate on key_type::value_type
elements (rather than on key_type
itself). Like Sorted Associative comparator, the Comp
type shall define a less-like comparison, a Strict Weak Ordering of key-elements.Associated types
key_compare
type is also provided, but is defined in terms of char_compare
. In consequence it allows searches involving subparts of keys, ie with shared prefix and/or with shared middle parts.
In the first iteration, additional searches are provided as methods on the containers. This will be changed to use free functions operating on subkey_iterator
. The deprecated search methods will still be provided as convenience functions; to migrate your code from present version to the new interface, will mean moving the object name to the first argument, but also to respecify the search_results_list type. (This sloppy-hackish type is by itself reason not to keep the method interface)
See Structured search overview and ternary_tree Structure search section.
ternary_tree 0.68 -- by rasmus ekman -- Page generated with Doxygen 1.5.6 on 23 Jan 2009 |