SheafSystem  0.0.0.0
deep_size.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Interface for deep_size functions
19 
20 #ifndef DEEP_SIZE_H
21 #define DEEP_SIZE_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef STD_CSTDDEF_H
28 #include "SheafSystem/std_cstddef.h"
29 #endif
30 
31 #ifndef STD_UNORDERED_MAP_H
32 #include "SheafSystem/std_unordered_map.h"
33 #endif
34 
35 #ifndef STD_MAP_H
36 #include "SheafSystem/std_map.h"
37 #endif
38 
39 #ifndef STD_STRING_H
40 #include "SheafSystem/std_string.h"
41 #endif
42 
43 #ifndef STD_LIST_H
44 #include "SheafSystem/std_list.h"
45 #endif
46 
47 namespace sheaf
48 {
49 
53 template <typename M>
55 {
56 public:
57 
61  static size_t items_deep_size(const M& xp);
62 };
63 
67 template <typename M>
69 {
70 public:
71 
75  static size_t items_deep_size(const M& xp);
76 };
77 
81 template <typename M>
83 {
84  public:
85 
89  static size_t items_deep_size(const M& xp);
90 };
91 
95 template <typename M>
97 {
98  public:
99 
103  static size_t items_deep_size(const M& xp);
104 };
105 
109 template <typename M>
111 {
112  public:
113 
117  static size_t items_deep_size(const M& xp);
118 };
119 
124 template <typename K, typename V, typename S, typename H, typename E, typename A>
125 size_t deep_size(const unordered::unordered_multimap<K, V, H, E, A>& xp, bool xinclude_shallow);
126 
131 template <typename K, typename V, typename S, typename H, typename E, typename A>
132 size_t deep_size(const unordered::unordered_map<K, V, H, E, A>& xp, bool xinclude_shallow);
133 
138 template <typename K, typename V, typename S>
139 size_t
140 deep_size(const std::map<K, V>& xp, bool xinclude_shallow);
141 
146 template <typename T>
147 size_t
148 deep_size(const std::list<T>& xp, bool xinclude_shallow);
149 
153 template <typename T>
154 size_t
155 deep_size(const T& xvalue, bool xinclude_shallow);
156 
161 SHEAF_DLL_SPEC
162 size_t
163 deep_size(const std::string& xp, bool xinclude_shallow);
164 
165 } // namespace sheaf
166 
167 #endif // ifndef DEEP_SIZE_H
168 
Call deep_size on the dereferenced pointer of the value.
Definition: deep_size.h:68
static size_t items_deep_size(const M &xp)
The deep_size of the items in xp.
Call deep_size on the key.
Definition: deep_size.h:82
Do not call deep_size on either the key or value.
Definition: deep_size.h:54
SHEAF_DLL_SPEC size_t deep_size(const dof_descriptor_array &xp, bool xinclude_shallow=true)
The deep size of the referenced object of type dof_descriptor_array.
Call deep_size on the value.
Definition: deep_size.h:96
Call deep_size on the key and the value.
Definition: deep_size.h:110
Namespace for the sheaves component of the sheaf system.