#include <XrdOucGatherConf.hh>
◆ Level
Gather information from a config file.
- Note
- You must call this method or a successful useData() before calling any XrdOucTokenizer methods.
- Parameters
-
cfname | Path to the configuration file. |
lvl | Indicates how the gathered directives are to be saved: full_lines - the full directive line, including newline. trim_lines - Like full_lines but the prefix (i.e.characters the dot) are discarded. Useful only when gathering a single prefix. only_body Saves the body of each wanted directive as a space separated string blob. trim_body Like only_body but also includes the directive characters after the dot. Useful only when gathering a single prefix. |
parms | Optional pointer to initial configuration parameters. These may be present for plugins. |
- Returns
- > 0 Success, configuration data has been gathered.
-
= 0 Nothing was gathered.
-
< 0 Problem reading the config file, returned value is -errno.
Enumerator |
---|
full_lines | Complete lines.
|
trim_lines | Prefix trimmed lines.
|
only_body | Only directive bodies as a string blob.
|
trim_body | Prefix trimmed lines as a string blob.
|
◆ XrdOucGatherConf() [1/2]
XrdOucGatherConf::XrdOucGatherConf |
( |
const char * |
want, |
|
|
XrdSysError * |
errP = 0 |
|
) |
| |
Constructor #1
- Note
- This object collects relevant configuration directives ready to be processed by the inherited XrdOucTokenizer methods. All if-fi, set, and variable substitutions are performed.
- Parameters
-
want | A space separated list of directive prefixes (i.e. end with a dot) and actual directives that should be gathered. |
errP | Optional pointer to an error object. When supplied, gathered lines are echoed. Additionally, error messages are issued. supplied XrdSysError object or using std::cerr using a |
◆ XrdOucGatherConf() [2/2]
XrdOucGatherConf::XrdOucGatherConf |
( |
const char **& |
want, |
|
|
XrdSysError * |
errP = 0 |
|
) |
| |
Constructor #2
- Note
- This is the same as constructor #1 but uses vector to hold the wanted directives or directive prefixes.
- Parameters
-
want | A vector of strings of directive prefixes (i.e. end with a dot) and actual directives that should be gathered. The end of the vector is indicated by a nil pointer (e,g, const char *want[] = {"x.c", "y.", 0}; |
errP | Optional pointer to an error object. When supplied, gathered lines are echoed. Additionally, error messages are issued. supplied XrdSysError object or using std::cerr using a |
◆ ~XrdOucGatherConf()
XrdOucGatherConf::~XrdOucGatherConf |
( |
| ) |
|
◆ Gather()
int XrdOucGatherConf::Gather |
( |
const char * |
cfname, |
|
|
Level |
lvl, |
|
|
const char * |
parms = 0 |
|
) |
| |
◆ hasData()
bool XrdOucGatherConf::hasData |
( |
| ) |
|
Check if data is present.
- Returns
- True if data is present and false, otherwise.
◆ useData()
bool XrdOucGatherConf::useData |
( |
const char * |
data | ) |
|
Attempt to use pre-existing data.
- Parameters
-
data | Pointer to null terminated pre-existing data. |
- Returns
- False if the pointer is nil or points to a null string; true o/w.
◆ eDest
◆ gBuff
char* XrdOucGatherConf::gBuff |
|
private |
◆ Match
The documentation for this class was generated from the following file: