10 #define CLIB_CFGFILE_H 12 #define CFGFILE_USES_IOSTREAMS 0 14 #if CFGFILE_USES_IOSTREAMS 34 class VectorConfigElem;
40 virtual void display_error(
const std::string& msg,
bool show_curline =
true,
47 explicit ConfigFile(
const char* filename = NULL,
const char* allowed_types = NULL );
48 explicit ConfigFile(
const std::string& filename,
const char* allowed_types = NULL );
51 void open(
const char* i_filename );
56 const std::string& filename()
const;
57 time_t modified()
const;
58 unsigned element_line_start()
const;
62 void init(
const char* i_filename,
const char* allowed_types_str );
65 bool readline( std::string& strbuf );
70 virtual void display_error(
const std::string& msg,
bool show_curline =
true,
74 void register_allowed_type( const
char* allowed_type );
77 std::
string _filename;
79 #if CFGFILE_USES_IOSTREAMS
virtual void display_error(const std::string &msg, bool show_curline=true, const ConfigElemBase *elem=NULL, bool error=true) const =0
std::set< std::string, ci_cmp_pred > AllowedTypesCont
AllowedTypesCont allowed_types_
bool readline(Socket &sck, std::string &s, bool *timeout_exit, unsigned int timeout_secs, unsigned maxlen)