This class helps to find a cfg location with the best match from the given order.
More...
template<class _T>
class dds::misc::CFindCfgFile< _T >
This class helps to find a cfg location with the best match from the given order.
- Note
- Example: The example shows how to look for the basch cfg. file in the following order: "/etc/rtt", "/etc/bashrc", "testtesttest", "$HOME/.bashrc", "/test/test/bashrc" The first found cfg file will be returned by GetCfg method. All environment variables in the paths will be extended.
{
CFindCfgFile<string> cfg;
cfg.SetOrder
("/etc/rtt")
("/etc/bashrc")
("testtesttest")
("$HOME/.bashrc")
("/test/test/bashrc");
string val;
cfg.GetCfg( &val );
}