2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FBaseColAllElementsDeleter.h
19 * @brief This is the header file for the %AllElementsDeleter struct.
21 * This header file contains the declarations of the %AllElementsDeleter struct.
23 #ifndef _FBASE_COL_ALL_ELEMENTS_DELETER_H_
24 #define _FBASE_COL_ALL_ELEMENTS_DELETER_H_
26 namespace Tizen { namespace Base { namespace Collection
29 * @struct AllElementsDeleter
30 * @brief This function object provides a resource clean-up function for collection.
32 * The %AllElementsDeleter struct provides a resource clean-up function for collection. This can be used with unique_ptr as a custom deleter.
36 struct AllElementsDeleter
39 * Deletes every element of the collection and the collection itself.
43 * @param[in] c The collection to clean up
44 * @remarks The collection should be destructible and support the RemoveAll(bool) method.
45 * IList, IMap, and IMultiMap support this concept.
47 template< typename Collection >
48 void operator ()(Collection* c)
56 #endif // _FBASE_COL_ALL_ELEMENTS_DELETER_H_