Return found configuration section when asked to check or create one.
git-svn-id: http://voip.null.ro/svn/yate@3303 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
2e2c0545e8
commit
6aa91970b2
|
@ -112,6 +112,13 @@ void Configuration::clearSection(const char* sect)
|
|||
m_sections.clear();
|
||||
}
|
||||
|
||||
// Make sure a section with a given name exists, create it if required
|
||||
NamedList* Configuration::createSection(const String& sect)
|
||||
{
|
||||
ObjList* o = makeSectHolder(sect);
|
||||
return o ? static_cast<NamedList*>(o->get()) : 0;
|
||||
}
|
||||
|
||||
void Configuration::clearKey(const String& sect, const String& key)
|
||||
{
|
||||
NamedList *l = getSection(sect);
|
||||
|
|
|
@ -145,9 +145,9 @@ public:
|
|||
/**
|
||||
* Makes sure a section with a given name exists, creates if required
|
||||
* @param sect Name of section to check or create
|
||||
* @return The section's content or NULL if no such section
|
||||
*/
|
||||
inline void createSection(const String& sect)
|
||||
{ if (sect) makeSectHolder(sect); }
|
||||
NamedList* createSection(const String& sect);
|
||||
|
||||
/**
|
||||
* Deletes a key/value pair
|
||||
|
|
Loading…
Reference in New Issue