Adobe Source Libraries 2.0.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
storage.hpp
Go to the documentation of this file.
1/*
2 Copyright 2008 Adobe Systems Incorporated
3 Distributed under the Boost Software License - Version 1.0 (see the accompanying file LICENSE
4 or a copy at https://stlab.github.io/adobe_source_libraries/licenses.html)
5*/
6
7/**************************************************************************************************/
8
9#ifndef ADOBE_STORAGE_HPP
10#define ADOBE_STORAGE_HPP
11
12#include <adobe/config.hpp>
13
15
16/**************************************************************************************************/
17
18namespace adobe {
19
20template <typename T> // T models Container
22
23class block_tag {};
24class contiguous_tag : public block_tag {};
25class node_tag {};
26
27template <typename T, typename A>
28struct storage_category<std::vector<T, A>> {
30};
31
32template <typename T, typename A>
33struct storage_category<std::deque<T, A>> {
34 typedef block_tag type;
35};
36
37template <typename T, typename A>
38struct storage_category<std::list<T, A>> {
39 typedef node_tag type;
40};
41
42template <typename T, typename C, typename A>
43struct storage_category<std::set<T, C, A>> {
44 typedef node_tag type;
45};
46
47template <typename T, typename C, typename A>
48struct storage_category<std::multiset<T, C, A>> {
49 typedef node_tag type;
50};
51
52template <typename K, typename T, typename C, typename A>
53struct storage_category<std::map<K, T, C, A>> {
54 typedef node_tag type;
55};
56
57template <typename K, typename T, typename C, typename A>
58struct storage_category<std::multimap<K, T, C, A>> {
59 typedef node_tag type;
60};
61
62} // namespace adobe
63
64/**************************************************************************************************/
65
66#endif
67
68/**************************************************************************************************/
STL namespace.