return Res;
}
/*}}}*/
+// Configuration::FindVector - Find a vector of values /*{{{*/
+// ---------------------------------------------------------------------
+/* Returns a vector of config values under the given item */
+vector<string> Configuration::FindVector(const char *Name) const
+{
+ vector<string> Vec;
+ const Item *Top = Lookup(Name);
+ if (Top == NULL)
+ return Vec;
+
+ Item *I = Top->Child;
+ while(I != NULL)
+ {
+ Vec.push_back(I->Value);
+ I = I->Next;
+ }
+ return Vec;
+}
+ /*}}}*/
// Configuration::FindI - Find an integer value /*{{{*/
// ---------------------------------------------------------------------
/* */
#include <string>
+#include <vector>
#include <iostream>
using std::string;
string Find(const string Name,const char *Default = 0) const {return Find(Name.c_str(),Default);};
string FindFile(const char *Name,const char *Default = 0) const;
string FindDir(const char *Name,const char *Default = 0) const;
+ std::vector<string> FindVector(const string &Name) const;
+ std::vector<string> FindVector(const char *Name) const;
int FindI(const char *Name,int Default = 0) const;
int FindI(const string Name,int Default = 0) const {return FindI(Name.c_str(),Default);};
bool FindB(const char *Name,bool Default = false) const;
- activate DOT_MULTI_TARGETS, it is default on since doxygen 1.5.9
* buildlib/po4a_manpage.mak, doc/makefile, configure:
- simplify the makefiles needed for po4a manpages
+ * apt-pkg/contrib/configuration.cc:
+ - add a helper to easily get a vector of strings from the config
-- David Kalnischkies <kalnischkies@gmail.com> Fri, 28 Aug 2009 09:40:08 +0200