2018-08-10 02:50:42 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
< meta name = "generator" content = "Doxygen 1.8.14" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > xdgcfg: xdgcfg Class Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
2019-08-02 13:33:50 +02:00
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
2018-08-10 02:50:42 +02:00
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
< td id = "projectalign" style = "padding-left: 0.5em;" >
< div id = "projectname" > xdgcfg
2019-08-02 13:33:50 +02:00
  < span id = "projectnumber" > 0.4.1< / span >
2018-08-10 02:50:42 +02:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
2019-08-02 13:33:50 +02:00
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
< / script >
2018-08-10 02:50:42 +02:00
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(function() {
2019-08-02 13:33:50 +02:00
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
2018-08-10 02:50:42 +02:00
});
/* @license-end */< / script >
< div id = "main-nav" > < / div >
2019-08-02 13:33:50 +02:00
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
2018-08-10 02:50:42 +02:00
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "classxdgcfg-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > xdgcfg Class Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:ab6fc4f07be696a779d26317a5a7a8b54" > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classxdgcfg.html#ab6fc4f07be696a779d26317a5a7a8b54" > xdgcfg< / a > (const string & filename, const string & subdir=" " )< / td > < / tr >
< tr class = "memdesc:ab6fc4f07be696a779d26317a5a7a8b54" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Checks if subdir is present, creates it if necessary. < a href = "#ab6fc4f07be696a779d26317a5a7a8b54" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ab6fc4f07be696a779d26317a5a7a8b54" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2019-07-21 23:12:08 +02:00
< tr class = "memitem:a60584df7badfddce574df3cc1b9fce85" > < td class = "memItemLeft" align = "right" valign = "top" > uint_fast8_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classxdgcfg.html#a60584df7badfddce574df3cc1b9fce85" > read< / a > ()< / td > < / tr >
< tr class = "memdesc:a60584df7badfddce574df3cc1b9fce85" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Read the file. < a href = "#a60584df7badfddce574df3cc1b9fce85" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a60584df7badfddce574df3cc1b9fce85" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:addb7dd29dc725fef54820aab38b42e30" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classxdgcfg.html#addb7dd29dc725fef54820aab38b42e30" > write< / a > ()< / td > < / tr >
< tr class = "memdesc:addb7dd29dc725fef54820aab38b42e30" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Write the file. < a href = "#addb7dd29dc725fef54820aab38b42e30" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:addb7dd29dc725fef54820aab38b42e30" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2019-08-02 13:33:50 +02:00
< tr class = "memitem:ac07980ed9c75aded9db7d9a56e9e7dbf" > < td class = "memItemLeft" align = "right" valign = "top" > libconfig::Config &   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classxdgcfg.html#ac07980ed9c75aded9db7d9a56e9e7dbf" > get_cfg< / a > ()< / td > < / tr >
< tr class = "memdesc:ac07980ed9c75aded9db7d9a56e9e7dbf" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns a reference to the config as libconfig::Config. < a href = "#ac07980ed9c75aded9db7d9a56e9e7dbf" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ac07980ed9c75aded9db7d9a56e9e7dbf" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a27f788427081434a6bcbd6724a93e3d1" > < td class = "memItemLeft" align = "right" valign = "top" > const fs::path  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classxdgcfg.html#a27f788427081434a6bcbd6724a93e3d1" > get_filepath< / a > () const< / td > < / tr >
< tr class = "memdesc:a27f788427081434a6bcbd6724a93e3d1" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns the complete filepath. < a href = "#a27f788427081434a6bcbd6724a93e3d1" > More...< / a > < br / > < / td > < / tr >
2018-08-11 09:04:57 +02:00
< tr class = "separator:a27f788427081434a6bcbd6724a93e3d1" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2019-08-02 13:33:50 +02:00
< tr class = "memitem:a982f773bb644c465bed6144dca44c98f" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classxdgcfg.html#a982f773bb644c465bed6144dca44c98f" > set_verbose< / a > (bool verbose)< / td > < / tr >
< tr class = "memdesc:a982f773bb644c465bed6144dca44c98f" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Sets verbosity. < a href = "#a982f773bb644c465bed6144dca44c98f" > More...< / a > < br / > < / td > < / tr >
2019-07-21 23:12:08 +02:00
< tr class = "separator:a982f773bb644c465bed6144dca44c98f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2019-08-02 13:33:50 +02:00
< tr class = "memitem:aa1c726d62d1194036a19bd2b7e79f531" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classxdgcfg.html#aa1c726d62d1194036a19bd2b7e79f531" > get_verbose< / a > () const< / td > < / tr >
< tr class = "memdesc:aa1c726d62d1194036a19bd2b7e79f531" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns verbosity. < a href = "#aa1c726d62d1194036a19bd2b7e79f531" > More...< / a > < br / > < / td > < / tr >
2019-07-21 23:12:08 +02:00
< tr class = "separator:aa1c726d62d1194036a19bd2b7e79f531" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-08-10 02:50:42 +02:00
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < dl > < dt > < b > Examples: < / b > < / dt > < dd > < a class = "el" href = "example_8cpp-example.html#_a0" > example.cpp< / a > .< / dd >
< / dl > < / div > < h2 class = "groupheader" > Constructor & Destructor Documentation< / h2 >
< a id = "ab6fc4f07be696a779d26317a5a7a8b54" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ab6fc4f07be696a779d26317a5a7a8b54" > ◆ < / a > < / span > xdgcfg()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > xdgcfg::xdgcfg < / td >
< td > (< / td >
< td class = "paramtype" > const string &   < / td >
< td class = "paramname" > < em > filename< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const string &   < / td >
< td class = "paramname" > < em > subdir< / em > = < code > " " < / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
2019-08-02 13:33:50 +02:00
< span class = "mlabels" > < span class = "mlabel" > explicit< / span > < / span > < / td >
2018-08-10 02:50:42 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Checks if subdir is present, creates it if necessary. < / p >
< p > Example: < / p > < div class = "fragment" > < div class = "line" > < a class = "code" href = "classxdgcfg.html" > xdgcfg< / a > config(< span class = "stringliteral" > " test.cfg" < / span > , < span class = "stringliteral" > " subdirectory" < / span > );< / div > < / div > <!-- fragment --> < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > filename< / td > < td > The name of the file, including extension < / td > < / tr >
< tr > < td class = "paramname" > subdir< / td > < td > The subdir (optional) < / td > < / tr >
< / table >
< / dd >
< / dl >
2019-08-02 13:33:50 +02:00
< div class = "fragment" > < div class = "line" > < a name = "l00009" > < / a > < span class = "lineno" > 9< / span >   : _cfg()< / div > < div class = "line" > < a name = "l00010" > < / a > < span class = "lineno" > 10< / span >   , _verbose(< span class = "keyword" > false< / span > )< / div > < div class = "line" > < a name = "l00011" > < / a > < span class = "lineno" > 11< / span >   {< / div > < div class = "line" > < a name = "l00012" > < / a > < span class = "lineno" > 12< / span >   xdgHandle xdg;< / div > < div class = "line" > < a name = "l00013" > < / a > < span class = "lineno" > 13< / span >   xdgInitHandle(& xdg);< / div > < div class = "line" > < a name = "l00014" > < / a > < span class = "lineno" > 14< / span >   _filepath = xdgConfigHome(& xdg);< / div > < div class = "line" > < a name = "l00015" > < / a > < span class = "lineno" > 15< / span >   xdgWipeHandle(& xdg);< / div > < div class = "line" > < a name = "l00016" > < / a > < span class = "lineno" > 16< / span >   < / div > < div class = "line" > < a name = "l00017" > < / a > < span class = "lineno" > 17< / span >   < span class = "keywordflow" > if< / span > (!subdir.empty())< / div > < div class = "line" > < a name = "l00018" > < / a > < span class = "lineno" > 18< / span >   {< / div > < div class = "line" > < a name = "l00019" > < / a > < span class = "lineno" > 19< / span >   _filepath /= subdir;< / div > < div class = "line" > < a name = "l00020" > < / a > < span class = "lineno" > 20< / span >   }< / div > < div class = "line" > < a name = "l00021" > < / a > < span class = "lineno" > 21< / span >   < span class = "keywordflow" > if< / span > (!fs::exists(_filepath))< / div > < div class = "line" > < a name = "l00022" > < / a > < span class = "lineno" > 22< / span >   {< / div > < div class = "line" > < a name = "l00023" > < / a > < span class = "lineno" > 23< / span >   fs::create_directories(_filepath);< / div > < div class = "line" > < a name = "l00024" > < / a > < span class = "lineno" > 24< / span >   }< / div > < div class = "line" > < a name = "l00025" > < / a > < span class = "lineno" > 25< / span >   _filepath /= filename;< / div > < div class = "line" > < a name = "l00026" > < / a > < span class = "lineno" > 26< / span >   }< / div > < / div > <!-- fragment -->
2018-08-10 02:50:42 +02:00
< / div >
< / div >
< h2 class = "groupheader" > Member Function Documentation< / h2 >
2019-08-02 13:33:50 +02:00
< a id = "ac07980ed9c75aded9db7d9a56e9e7dbf" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ac07980ed9c75aded9db7d9a56e9e7dbf" > ◆ < / a > < / span > get_cfg()< / h2 >
2018-08-10 02:50:42 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2019-08-02 13:33:50 +02:00
< td class = "memname" > libconfig::Config & xdgcfg::get_cfg < / td >
2018-08-10 02:50:42 +02:00
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns a reference to the config as libconfig::Config. < / p >
2019-08-02 13:33:50 +02:00
< p > Example: < / p > < div class = "fragment" > < div class = "line" > libconfig::Config & cfg = config.get_cfg();< / div > < / div > <!-- fragment --> < dl > < dt > < b > Examples: < / b > < / dt > < dd > < a class = "el" href = "example_8cpp-example.html#a3" > example.cpp< / a > .< / dd >
< / dl > < div class = "fragment" > < div class = "line" > < a name = "l00076" > < / a > < span class = "lineno" > 76< / span >   {< / div > < div class = "line" > < a name = "l00077" > < / a > < span class = "lineno" > 77< / span >   < span class = "keywordflow" > return< / span > _cfg;< / div > < div class = "line" > < a name = "l00078" > < / a > < span class = "lineno" > 78< / span >   }< / div > < / div > <!-- fragment -->
< / div >
< / div >
< a id = "a27f788427081434a6bcbd6724a93e3d1" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a27f788427081434a6bcbd6724a93e3d1" > ◆ < / a > < / span > get_filepath()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > const fs::path xdgcfg::get_filepath < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns the complete filepath. < / p >
< div class = "fragment" > < div class = "line" > < a name = "l00081" > < / a > < span class = "lineno" > 81< / span >   {< / div > < div class = "line" > < a name = "l00082" > < / a > < span class = "lineno" > 82< / span >   < span class = "keywordflow" > return< / span > _filepath;< / div > < div class = "line" > < a name = "l00083" > < / a > < span class = "lineno" > 83< / span >   }< / div > < / div > <!-- fragment -->
< / div >
< / div >
< a id = "aa1c726d62d1194036a19bd2b7e79f531" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aa1c726d62d1194036a19bd2b7e79f531" > ◆ < / a > < / span > get_verbose()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool xdgcfg::get_verbose < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns verbosity. < / p >
< div class = "fragment" > < div class = "line" > < a name = "l00091" > < / a > < span class = "lineno" > 91< / span >   {< / div > < div class = "line" > < a name = "l00092" > < / a > < span class = "lineno" > 92< / span >   < span class = "keywordflow" > return< / span > _verbose;< / div > < div class = "line" > < a name = "l00093" > < / a > < span class = "lineno" > 93< / span >   }< / div > < / div > <!-- fragment -->
2018-08-10 02:50:42 +02:00
< / div >
< / div >
2019-07-21 23:12:08 +02:00
< a id = "a60584df7badfddce574df3cc1b9fce85" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a60584df7badfddce574df3cc1b9fce85" > ◆ < / a > < / span > read()< / h2 >
2018-08-10 02:50:42 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2019-07-21 23:12:08 +02:00
< td class = "memname" > uint_fast8_t xdgcfg::read < / td >
2018-08-10 02:50:42 +02:00
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Read the file. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > 0 on success, 1 on I/O error, 2 on parse error. < / dd > < / dl >
< dl > < dt > < b > Examples: < / b > < / dt > < dd>< a class = "el" href = "example_8cpp-example.html#a2" > example.cpp< / a > .< / dd >
2019-08-02 13:33:50 +02:00
< / dl > < div class = "fragment" > < div class = "line" > < a name = "l00029" > < / a > < span class = "lineno" > 29< / span >   {< / div > < div class = "line" > < a name = "l00030" > < / a > < span class = "lineno" > 30< / span >   < span class = "keywordflow" > try< / span > < / div > < div class = "line" > < a name = "l00031" > < / a > < span class = "lineno" > 31< / span >   {< / div > < div class = "line" > < a name = "l00032" > < / a > < span class = "lineno" > 32< / span >   _cfg.readFile(_filepath.c_str());< / div > < div class = "line" > < a name = "l00033" > < / a > < span class = "lineno" > 33< / span >   }< / div > < div class = "line" > < a name = "l00034" > < / a > < span class = "lineno" > 34< / span >   < span class = "keywordflow" > catch< / span > (< span class = "keyword" > const< / span > libconfig::FileIOException & e)< / div > < div class = "line" > < a name = "l00035" > < / a > < span class = "lineno" > 35< / span >   {< / div > < div class = "line" > < a name = "l00036" > < / a > < span class = "lineno" > 36< / span >   < span class = "keywordflow" > if< / span > (_verbose)< / div > < div class = "line" > < a name = "l00037" > < / a > < span class = "lineno" > 37< / span >   {< / div > < div class = "line" > < a name = "l00038" > < / a > < span class = "lineno" > 38< / span >   cerr < < < span class = "stringliteral" > " I/O error while reading " < / span > < < _filepath< / div > < div class = "line" > < a name = "l00039" > < / a > < span class = "lineno" > 39< / span >   < < < span class = "stringliteral" > " - " < / span > < < e.what() < < endl;< / div > < div class = "line" > < a name = "l00040" > < / a > < span class = "lineno" > 40< / span >   }< / div > < div class = "line" > < a name = "l00041" > < / a > < span class = "lineno" > 41< / span >   < span class = "keywordflow" > return< / span > 1;< / div > < div class = "line" > < a name = "l00042" > < / a > < span class = "lineno" > 42< / span >   }< / div > < div class = "line" > < a name = "l00043" > < / a > < span class = "lineno" > 43< / span >   < span class = "keywordflow" > catch< / span > (< span class = "keyword" > const< / span > libconfig::ParseException & e)< / div > < div class = "line" > < a name = "l00044" > < / a > < span class = "lineno" > 44< / span >   {< / div > < div class = "line" > < a name = "l00045" > < / a > < span class = "lineno" > 45< / span >   < span class = "keywordflow" > if< / span > (_verbose)< / div > < div class = "line" > < a name = "l00046" > < / a > < span class = "lineno" > 46< / span >   {< / div > < div class = "line" > < a name = "l00047" > < / a > < span class = "lineno" > 47< / span >   cerr < < < span class = "stringliteral" > " Parse error at " < / span > < < e.getFile() < < < span class = "stringliteral" > " :" < / span > < < e.getLine()< / div > < div class = "line" > < a name = "l00048" > < / a > < span class = "lineno" > 48< / span >   < < < span class = "stringliteral" > " - " < / span > < < e.getError() < < endl;< / div > < div class = "line" > < a name = "l00049" > < / a > < span class = "lineno" > 49< / span >   }< / div > < div class = "line" > < a name = "l00050" > < / a > < span class = "lineno" > 50< / span >   < span class = "keywordflow" > return< / span > 2;< / div > < div class = "line" > < a name = "l00051" > < / a > < span class = "lineno" > 51< / span >   }< / div > < div class = "line" > < a name = "l00052" > < / a > < span class = "lineno" > 52< / span >   < / div > < div class = "line" > < a name = "l00053" > < / a > < span class = "lineno" > 53< / span >   < span class = "keywordflow" > return< / span > 0;< / div > < div class = "line" > < a name = "l00054" > < / a > < span class = "lineno" > 54< / span >   }< / div > < / div > <!-- fragment -->
< / div >
< / div >
< a id = "a982f773bb644c465bed6144dca44c98f" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a982f773bb644c465bed6144dca44c98f" > ◆ < / a > < / span > set_verbose()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void xdgcfg::set_verbose < / td >
< td > (< / td >
< td class = "paramtype" > bool  < / td >
< td class = "paramname" > < em > verbose< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Sets verbosity. < / p >
< dl > < dt > < b > Examples: < / b > < / dt > < dd > < a class = "el" href = "example_8cpp-example.html#a1" > example.cpp< / a > .< / dd >
< / dl > < div class = "fragment" > < div class = "line" > < a name = "l00086" > < / a > < span class = "lineno" > 86< / span >   {< / div > < div class = "line" > < a name = "l00087" > < / a > < span class = "lineno" > 87< / span >   _verbose = verbose;< / div > < div class = "line" > < a name = "l00088" > < / a > < span class = "lineno" > 88< / span >   }< / div > < / div > <!-- fragment -->
2018-08-10 02:50:42 +02:00
< / div >
< / div >
2019-07-21 23:12:08 +02:00
< a id = "addb7dd29dc725fef54820aab38b42e30" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#addb7dd29dc725fef54820aab38b42e30" > ◆ < / a > < / span > write()< / h2 >
2018-08-10 02:50:42 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2019-07-21 23:12:08 +02:00
< td class = "memname" > bool xdgcfg::write < / td >
2018-08-10 02:50:42 +02:00
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Write the file. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > < code > true< / code > on success < / dd > < / dl >
2019-08-02 13:33:50 +02:00
< dl > < dt > < b > Examples: < / b > < / dt > < dd > < a class = "el" href = "example_8cpp-example.html#a4" > example.cpp< / a > .< / dd >
< / dl > < div class = "fragment" > < div class = "line" > < a name = "l00057" > < / a > < span class = "lineno" > 57< / span >   {< / div > < div class = "line" > < a name = "l00058" > < / a > < span class = "lineno" > 58< / span >   < span class = "keywordflow" > try< / span > < / div > < div class = "line" > < a name = "l00059" > < / a > < span class = "lineno" > 59< / span >   {< / div > < div class = "line" > < a name = "l00060" > < / a > < span class = "lineno" > 60< / span >   _cfg.writeFile(_filepath.c_str());< / div > < div class = "line" > < a name = "l00061" > < / a > < span class = "lineno" > 61< / span >   }< / div > < div class = "line" > < a name = "l00062" > < / a > < span class = "lineno" > 62< / span >   < span class = "keywordflow" > catch< / span > (< span class = "keyword" > const< / span > libconfig::FileIOException & e)< / div > < div class = "line" > < a name = "l00063" > < / a > < span class = "lineno" > 63< / span >   {< / div > < div class = "line" > < a name = "l00064" > < / a > < span class = "lineno" > 64< / span >   < span class = "keywordflow" > if< / span > (_verbose)< / div > < div class = "line" > < a name = "l00065" > < / a > < span class = "lineno" > 65< / span >   {< / div > < div class = "line" > < a name = "l00066" > < / a > < span class = "lineno" > 66< / span >   cerr < < < span class = "stringliteral" > " I/O error while writing " < / span > < < _filepath< / div > < div class = "line" > < a name = "l00067" > < / a > < span class = "lineno" > 67< / span >   < < < span class = "stringliteral" > " - " < / span > < < e.what() < < endl;< / div > < div class = "line" > < a name = "l00068" > < / a > < span class = "lineno" > 68< / span >   }< / div > < div class = "line" > < a name = "l00069" > < / a > < span class = "lineno" > 69< / span >   < span class = "keywordflow" > return< / span > < span class = "keyword" > false< / span > ;< / div > < div class = "line" > < a name = "l00070" > < / a > < span class = "lineno" > 70< / span >   }< / div > < div class = "line" > < a name = "l00071" > < / a > < span class = "lineno" > 71< / span >   < / div > < div class = "line" > < a name = "l00072" > < / a > < span class = "lineno" > 72< / span >   < span class = "keywordflow" > return< / span > < span class = "keyword" > true< / span > ;< / div > < div class = "line" > < a name = "l00073" > < / a > < span class = "lineno" > 73< / span >   }< / div > < / div > <!-- fragment -->
2018-08-10 02:50:42 +02:00
< / div >
< / div >
2019-08-02 13:33:50 +02:00
< hr / > The documentation for this class was generated from the following files:< ul >
< li > include/< a class = "el" href = "xdgcfg_8hpp_source.html" > xdgcfg.hpp< / a > < / li >
< li > src/xdgcfg.cpp< / li >
2018-08-10 02:50:42 +02:00
< / ul >
< / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
Generated by   < a href = "http://www.doxygen.org/index.html" >
< img class = "footer" src = "doxygen.png" alt = "doxygen" / >
< / a > 1.8.14
< / small > < / address >
< / body >
< / html >