Lines Matching full:container

30 // For a range within a container of pointers, calls delete (non-array version)
48 // For a range within a container of pairs, calls delete (non-array version) on
52 // container may call the hash function on the iterator when it is advanced,
66 // For a range within a container of pairs, calls delete (non-array version) on
79 // For a range within a container of pairs, calls delete.
93 // Counts the number of instances of val in a container.
94 template <typename Container, typename T>
96 typename Container::const_iterator>::difference_type
97 STLCount(const Container& container, const T& val) { in STLCount() argument
98 return std::count(container.begin(), container.end(), val); in STLCount()
121 // STLDeleteElements() deletes all the elements in an STL container and clears
122 // the container. This function is suitable for use with a vector, set,
123 // hash_set, or any other STL container which defines sensible begin(), end(),
126 // If container is NULL, this function is a no-op.
129 // STLElementDeleter (defined below), which ensures that your container's
132 void STLDeleteElements(T* container) { in STLDeleteElements() argument
133 if (!container) in STLDeleteElements()
135 STLDeleteContainerPointers(container->begin(), container->end()); in STLDeleteElements()
136 container->clear(); in STLDeleteElements()
139 // Given an STL container consisting of (key, value) pairs, STLDeleteValues
140 // deletes all the "value" components and clears the container. Does nothing
143 void STLDeleteValues(T* container) { in STLDeleteValues() argument
144 if (!container) in STLDeleteValues()
146 STLDeleteContainerPairSecondPointers(container->begin(), container->end()); in STLDeleteValues()
147 container->clear(); in STLDeleteValues()
162 // Given a pointer to an STL container this class will delete all the element
167 STLElementDeleter<T>(T* container) : container_(container) {} in container_() argument
174 // Given a pointer to an STL container this class will delete all the value
179 STLValueDeleter<T>(T* container) : container_(container) {} in container_() argument
203 // Returns true if the container is sorted.
204 template <typename Container>
205 bool STLIsSorted(const Container& cont) { in STLIsSorted()
206 // Note: Use reverse iterator on container to ensure we only require in STLIsSorted()
209 std::less<typename Container::value_type>()) in STLIsSorted()
250 // Returns true if the sorted container |a1| contains all elements of the sorted
251 // container |a2|.