Unverified Commit 6ef3723c authored by Mark Lindner's avatar Mark Lindner Committed by GitHub

Merge pull request #117 from xyproto/add-readFile-writeFile-signatures

Add inline functions for readFile and writeFile for std::string
parents f9dd22b5 1c4a4374
......@@ -1451,13 +1451,18 @@ The @code{write()} method writes the configuration to the given @var{stream}.
@end deftypemethod
@deftypemethod Config void readFile (@w{const char * @var{filename}})
@deftypemethodx Config void writeFile (@w{const char * @var{filename}}) const
@deftypemethodx Config void readFile (@w{const std::string &@var{filename}})
The @code{readFile()} method reads and parses a configuration from the
file named @var{filename}. A @code{ParseException} is thrown if a
parse error occurs. A @code{FileIOException} is thrown if the file
cannot be read.
@end deftypemethod
@deftypemethod Config void writeFile (@w{const char * @var{filename}})
@deftypemethodx Config void writeFile (@w{const std::string &@var{filename}})
The @code{writeFile()} method writes the configuration to the file
named @var{filename}. A @code{FileIOException} is thrown if the file cannot
be written.
......
......@@ -492,7 +492,12 @@ class LIBCONFIGXX_API Config
{ return(readString(str.c_str())); }
void readFile(const char *filename);
inline void readFile(const std::string &filename)
{ readFile(filename.c_str()); }
void writeFile(const char *filename);
inline void writeFile(const std::string &filename)
{ writeFile(filename.c_str()); }
Setting & lookup(const char *path) const;
inline Setting & lookup(const std::string &path) const
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment