Merge branch 'yurial-public-exceptions' of https://github.com/yurial/libconfig
[platform/upstream/libconfig.git] / doc / libconfig.texi
index 52dca20..efd6929 100644 (file)
@@ -6,8 +6,8 @@
 @setfilename libconfig.info
 @settitle libconfig
 
-@set edition 1.4.9
-@set update-date 28 September 2012
+@set edition 1.5
+@set update-date 26 May 2014
 @set subtitle-text A Library For Processing Structured Configuration Files
 @set author-text Mark A.@: Lindner
 
@@ -839,6 +839,15 @@ setting was not found.
 
 @end deftypefun
 
+@deftypefun {config_setting_t *} config_setting_lookup (@w{const config_setting_t * @var{setting}}, @w{const char * @var{path}})
+
+This function locates a setting by a path @var{path} relative to
+the setting @var{setting}. It returns a pointer to the
+@code{config_setting_t} structure on success, or @code{NULL} if the
+setting was not found.
+
+@end deftypefun
+
 @deftypefun int config_setting_get_int (@w{const config_setting_t * @var{setting}})
 @deftypefunx {long long} config_setting_get_int64 (@w{const config_setting_t * @var{setting}})
 @deftypefunx double config_setting_get_float (@w{const config_setting_t * @var{setting}})
@@ -1146,17 +1155,45 @@ common base exception @code{ConfigException}.
 A @code{SettingTypeException} is thrown when the type of a setting's
 value does not match the type requested.
 
+@deftypemethod SettingTypeException {} SettingTypeException (@w{const Setting &@var{setting}})
+@deftypemethodx SettingTypeException {} SettingTypeException (@w{const Setting &@var{setting}}, @w{int @var{index}})
+@deftypemethodx SettingTypeException {} SettingTypeException (@w{const Setting &@var{setting}}, @w{const char *@var{name}})
+
+These methods construct @code{SettingTypeException} objects for the given @var{setting} and/or member @var{index} or @var{name}.
+
+@end deftypemethod
+
 @tindex SettingNotFoundException
 A @code{SettingNotFoundException} is thrown when a setting is not found.
 
+@deftypemethod SettingNotFoundException {} SettingNotFoundException (@w{const Setting &@var{setting}}, @w{int @var{index}})
+@deftypemethodx SettingNotFoundException {} SettingNotFoundException (@w{const Setting &@var{setting}}, @w{const char *@var{name}})
+@deftypemethodx SettingNotFoundException {} SettingNotFoundException (@w{const char *@var{path}})
+
+These methods construct @code{SettingTypeException} objects for the given @var{setting} and member @var{index} or @var{name}, or path @var{path}.
+
+@end deftypemethod
+
 @tindex SettingNameException
 A @code{SettingNameException} is thrown when an attempt is made to add
 a new setting with a non-unique or invalid name.
 
+@deftypemethod SettingNameException {} SettingNameException (@w{const Setting &@var{setting}}, @w{const char *@var{name}})
+
+This method constructs a @code{SettingNameExcpetion} object for the given @var{setting} and member name @var{name}.
+
+@end deftypemethod
+
 @tindex ParseException
 A @code{ParseException} is thrown when a parse error occurs while
 reading a configuration from a stream.
 
+@deftypemethod ParseException {} ParseException (@w{const char *@var{file}}, @w{int @var{line}}, @w{const char *@var{error}})
+
+This method constructs a @code{ParseException} object with the given filename @var{file}, line number @var{line}, and error message @var{error}.
+
+@end deftypemethod
+
 @tindex FileIOException
 A @code{FileIOException} is thrown when an I/O error occurs while
 reading/writing a configuration from/to a file.
@@ -1542,6 +1579,15 @@ configuration.
 
 @end deftypemethod
 
+@deftypemethod Setting {Setting &} lookup (@w{const char * @var{path}})
+@deftypemethodx Setting {Setting &} lookup (@w{const std::string &@var{path}})
+
+This function locates a setting by a path @var{path} relative to
+this setting. If requested setting is not found, a
+@code{SettingNotFoundException} is thrown.
+
+@end deftypemethod
+
 @deftypemethod Setting bool lookupValue (@w{const char *@var{name}}, @w{bool &@var{value}})
 @deftypemethodx Setting bool lookupValue (@w{const std::string &@var{name}}, @w{bool &@var{value}})