Added possibility to extract a parameter from NamedList.

git-svn-id: http://yate.null.ro/svn/yate/trunk@5398 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
andrei 2013-02-12 09:57:37 +00:00
parent f06d62838b
commit 454e425816
2 changed files with 4 additions and 3 deletions

View File

@ -127,13 +127,13 @@ NamedList& NamedList::clearParam(const String& name, char childSep)
}
// Remove a specific parameter
NamedList& NamedList::clearParam(NamedString* param)
NamedList& NamedList::clearParam(NamedString* param, bool delParam)
{
if (!param)
return *this;
ObjList* o = m_params.find(param);
if (o)
o->remove();
o->remove(delParam);
XDebug(DebugInfo,"NamedList::clearParam(%p) found=%p",param,o);
return *this;
}

View File

@ -3800,9 +3800,10 @@ public:
/**
* Remove a specific parameter
* @param param Pointer to parameter to remove
* @param delParam True to destroy the parameter
* @return Reference to this NamedList
*/
NamedList& clearParam(NamedString* param);
NamedList& clearParam(NamedString* param, bool delParam = true);
/**
* Copy a parameter from another NamedList, clears it if not present there