2025-07-24 11:10:45 -04:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=11" / >
< meta name = "generator" content = "Doxygen 1.13.2" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > GridFire: PyNetworkFileParser 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 >
< script type = "text/javascript" src = "clipboard.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "navtreedata.js" > < / script >
< script type = "text/javascript" src = "navtree.js" > < / script >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "cookie.js" > < / script >
< 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 >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< link href = "doxygen-awesome.css" rel = "stylesheet" type = "text/css" / >
< link href = "doxygen-awesome-sidebar-only.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 id = "projectrow" >
< td id = "projectalign" >
2025-11-04 14:04:26 -05:00
< div id = "projectname" > GridFire< span id = "projectnumber" >   v0.7.0-alpha< / span >
2025-07-24 11:10:45 -04:00
< / div >
< div id = "projectbrief" > General Purpose Nuclear Network< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
< / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
< / script >
< 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:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
< / script >
< div id = "main-nav" > < / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(function(){initNavTree('class_py_network_file_parser.html',''); initResizable(true); });
/* @license-end */
< / script >
< div id = "doc-content" >
<!-- 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" >
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" > < / div >
< div class = "SRStatus" id = "Loading" > Loading...< / div >
< div class = "SRStatus" id = "Searching" > Searching...< / div >
< div class = "SRStatus" id = "NoMatches" > No Matches< / div >
< / div >
< / div >
< / div >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#pri-methods" > Private Member Functions< / a > |
< a href = "class_py_network_file_parser-members.html" > List of all members< / a > < / div >
< div class = "headertitle" > < div class = "title" > PyNetworkFileParser Class Reference< span class = "mlabels" > < span class = "mlabel final" > final< / span > < / span > < / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
2025-07-31 10:54:31 -04:00
< p > < code > #include < py_io.h> < / code > < / p >
2025-07-24 11:10:45 -04:00
< div class = "dynheader" >
Inheritance diagram for PyNetworkFileParser:< / div >
< div class = "dyncontent" >
2025-11-06 09:16:40 -05:00
< div class = "center" > < iframe scrolling = "no" frameborder = "0" src = "class_py_network_file_parser__inherit__graph.svg" width = "167" height = "126" > < p > < b > This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.< / b > < / p > < / iframe > < / div >
< center > < span class = "legend" > [< a target = "top" href = "graph_legend.html" > legend< / a > ]< / span > < / center > < / div >
< div class = "dynheader" >
Collaboration diagram for PyNetworkFileParser:< / div >
< div class = "dyncontent" >
< div class = "center" > < iframe scrolling = "no" frameborder = "0" src = "class_py_network_file_parser__coll__graph.svg" width = "167" height = "126" > < p > < b > This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.< / b > < / p > < / iframe > < / div >
< center > < span class = "legend" > [< a target = "top" href = "graph_legend.html" > legend< / a > ]< / span > < / center > < / div >
2025-07-24 11:10:45 -04:00
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "pri-methods" name = "pri-methods" > < / a >
Private Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:afe09d1e5b07110e62cf4c6ec713cff54" id = "r_afe09d1e5b07110e62cf4c6ec713cff54" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "namespacegridfire_1_1io.html#abcbdcbd13cfa8c9fbe1b48e8ee2cc352" > gridfire::io::ParsedNetworkData< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#afe09d1e5b07110e62cf4c6ec713cff54" > parse< / a > (const std::string & filename) const override< / td > < / tr >
< tr class = "memdesc:afe09d1e5b07110e62cf4c6ec713cff54" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Parses a network file and returns the parsed data. < br / > < / td > < / tr >
< tr class = "separator:afe09d1e5b07110e62cf4c6ec713cff54" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "inherited" name = "inherited" > < / a >
Additional Inherited Members< / h2 > < / td > < / tr >
< tr class = "inherit_header pub_methods_classgridfire_1_1io_1_1_network_file_parser" > < td colspan = "2" onclick = "javascript:dynsection.toggleInherit('pub_methods_classgridfire_1_1io_1_1_network_file_parser')" > < img src = "closed.png" alt = "-" / >   Public Member Functions inherited from < a class = "el" href = "classgridfire_1_1io_1_1_network_file_parser.html" > gridfire::io::NetworkFileParser< / a > < / td > < / tr >
< tr class = "memitem:a9b4095d06fad5df3805c92ae97b3eab3 inherit pub_methods_classgridfire_1_1io_1_1_network_file_parser" id = "r_a9b4095d06fad5df3805c92ae97b3eab3" > < td class = "memItemLeft" align = "right" valign = "top" > virtual  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classgridfire_1_1io_1_1_network_file_parser.html#a9b4095d06fad5df3805c92ae97b3eab3" > ~NetworkFileParser< / a > ()=default< / td > < / tr >
< tr class = "memdesc:a9b4095d06fad5df3805c92ae97b3eab3 inherit pub_methods_classgridfire_1_1io_1_1_network_file_parser" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Virtual destructor for the base class. < br / > < / td > < / tr >
< tr class = "separator:a9b4095d06fad5df3805c92ae97b3eab3 inherit pub_methods_classgridfire_1_1io_1_1_network_file_parser" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
2025-07-31 10:54:31 -04:00
< h2 class = "groupheader" > Member Function Documentation< / h2 >
2025-07-24 11:10:45 -04:00
< a id = "afe09d1e5b07110e62cf4c6ec713cff54" name = "afe09d1e5b07110e62cf4c6ec713cff54" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#afe09d1e5b07110e62cf4c6ec713cff54" > ◆   < / a > < / span > parse()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "namespacegridfire_1_1io.html#abcbdcbd13cfa8c9fbe1b48e8ee2cc352" > gridfire::io::ParsedNetworkData< / a > PyNetworkFileParser::parse < / td >
< td > (< / td >
< td class = "paramtype" > const std::string & < / td > < td class = "paramname" > < span class = "paramname" > < em > filename< / em > < / span > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel override" > override< / span > < span class = "mlabel private" > private< / span > < span class = "mlabel virtual" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Parses a network file and returns the parsed data. < / p >
< p > This is a pure virtual function that must be implemented by derived classes. It takes a filename as input and returns a < code > ParsedNetworkData< / code > struct containing the information extracted from the file.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > filename< / td > < td > The path to the network file to parse. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A < code > ParsedNetworkData< / code > struct containing the parsed reaction data.< / dd > < / dl >
< dl class = "exception" > < dt > Exceptions< / dt > < dd >
< table class = "exception" >
< tr > < td class = "paramname" > std::runtime_error< / td > < td > If the file cannot be opened or a parsing error occurs.< / td > < / tr >
< / table >
< / dd >
< / dl >
< p > < b > Usage< / b > < / p > < div class = "fragment" > < div class = "line" > std::unique_ptr< NetworkFileParser> parser = std::make_unique< SimpleReactionListFileParser> ();< / div >
< div class = "line" > < span class = "keywordflow" > try< / span > {< / div >
< div class = "line" > ParsedNetworkData data = parser-> parse(< span class = "stringliteral" > " my_reactions.txt" < / span > );< / div >
< div class = "line" > < span class = "keywordflow" > for< / span > (< span class = "keyword" > const< / span > < span class = "keyword" > auto< / span > & reaction_name : data.reactionPENames) {< / div >
< div class = "line" > < span class = "comment" > // ... process reaction name< / span > < / div >
< div class = "line" > }< / div >
< div class = "line" > } < span class = "keywordflow" > catch< / span > (< span class = "keyword" > const< / span > std::runtime_error& e) {< / div >
< div class = "line" > < span class = "comment" > // ... handle error< / span > < / div >
< div class = "line" > }< / div >
< / div > <!-- fragment -->
< p > Implements < a class = "el" href = "classgridfire_1_1io_1_1_network_file_parser.html#a66e8e724c903d6ef4dd1c8103276bdbf" > gridfire::io::NetworkFileParser< / a > .< / p >
< / div >
< / div >
< hr / > The documentation for this class was generated from the following files:< ul >
2025-07-31 10:54:31 -04:00
< li > src/python/io/trampoline/< a class = "el" href = "py__io_8h.html" > py_io.h< / a > < / li >
< li > src/python/io/trampoline/< a class = "el" href = "py__io_8cpp.html" > py_io.cpp< / a > < / li >
2025-07-24 11:10:45 -04:00
< / ul >
< / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" > < a class = "el" href = "class_py_network_file_parser.html" > PyNetworkFileParser< / a > < / li >
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.13.2 < / li >
< / ul >
< / div >
< / body >
< / html >