MCPcopy Create free account
hub / github.com/Icinga/icinga2 / Remove

Method Remove

lib/base/array.cpp:167–178  ·  view source on GitHub ↗

* Removes the specified index from the array. * * @param index The index. */

Source from the content-addressed store, hash-verified

165 * @param index The index.
166 */
167void Array::Remove(SizeType index)
168{
169 ObjectLock olock(this);
170
171 if (m_Frozen)
172 BOOST_THROW_EXCEPTION(std::invalid_argument("Array must not be modified."));
173
174 if (index >= m_Data.size())
175 BOOST_THROW_EXCEPTION(std::invalid_argument("Index to remove must be within bounds."));
176
177 m_Data.erase(m_Data.begin() + index);
178}
179
180/**
181 * Removes the item specified by the iterator from the array.

Callers 15

CreateObjectConfigMethod · 0.45
ArrayRemoveFunction · 0.45
NamespaceRemoveFunction · 0.45
DictionaryRemoveFunction · 0.45
ClearExtensionMethod · 0.45
RestoreAttributeMethod · 0.45
HashValueMethod · 0.45
ScriptFuncMethod · 0.45
ExecuteCommandMethod · 0.45
CheckResultAPIHandlerMethod · 0.45

Calls 3

sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected