Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > eebc325dc36bd6e3b09b9b45133e42f8 > files > 2248

HippoDraw-devel-docs-1.21.1-10.fc13.i686.rpm

<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>HippoDraw Class Library</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="hippoApp.ico">
</head><body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_d71d549033b3d00bbeb107001643b90a.html">xml</a>
  </div>
</div>
<div class="contents">
<h1>XmlController.cxx</h1><a href="XmlController_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00012"></a>00012 <span class="comment">// for truncation warning</span>
<a name="l00013"></a>00013 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include &quot;msdevstudio/MSconfig.h&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#endif</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="XmlController_8h.html" title="XmlController class interface.">XmlController.h</a>&quot;</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;<a class="code" href="DataRepXML_8h.html" title="hippodraw::DataRepXML class interface">DataRepXML.h</a>&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="HiNTupleXML_8h.html" title="HiNTupleXML class interface.">HiNTupleXML.h</a>&quot;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="TupleCutXML_8h.html" title="TupleCutXML class interface.">TupleCutXML.h</a>&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="ViewBaseXML_8h.html" title="ViewBaseXML class interface.">ViewBaseXML.h</a>&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="XmlDocument_8h.html" title="XmlDocument class interface.">XmlDocument.h</a>&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="XmlElement_8h.html" title="XmlElement class interface.">XmlElement.h</a>&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="CutController_8h.html" title="hippodraw::CutController class interface">controllers/CutController.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="DataSource_8h.html" title="hippodraw::DataSource class interface.">datasrcs/DataSource.h</a>&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="DataSourceController_8h.html" title="DataSourceController class interface.">datasrcs/DataSourceController.h</a>&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="ViewBase_8h.html" title="hippodraw::ViewBase class interface">graphics/ViewBase.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;<a class="code" href="ViewFactory_8h.html" title="ViewFactory class interface.">graphics/ViewFactory.h</a>&quot;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;stdexcept&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;cassert&gt;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">using</span> std::map;
<a name="l00036"></a>00036 <span class="keyword">using</span> std::list;
<a name="l00037"></a>00037 <span class="keyword">using</span> std::string;
<a name="l00038"></a>00038 <span class="keyword">using</span> std::vector;
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="keyword">using namespace </span>hippodraw;
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 <a class="code" href="classhippodraw_1_1XmlDocument.html" title="An abstract base class of XML document element wrapper.">XmlDocument</a> * XmlController::m_xml_doc = 0;
<a name="l00043"></a>00043 
<a name="l00044"></a><a class="code" href="classhippodraw_1_1XmlController.html#acbaeb87ffa178710ba321f7c50aa697b">00044</a> XmlController::XmlController ( )
<a name="l00045"></a>00045   : m_pasteboard ( 0 ),
<a name="l00046"></a>00046     m_selectboard ( 0 ),
<a name="l00047"></a>00047     m_id ( 0 )
<a name="l00048"></a>00048 {
<a name="l00049"></a>00049   <a class="code" href="classhippodraw_1_1XmlController.html#a516cf012dec5f27bb1867bb4e5f15ecc" title="The singleton instance of the DataRepXML object.">m_datarep_xml</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1DataRepXML.html" title="A class that is does XML serialization and de-serialization of derived classes of...">DataRepXML</a> ( <span class="keyword">this</span> );
<a name="l00050"></a>00050   <a class="code" href="classhippodraw_1_1XmlController.html#a6a94c7e6584e77abcff500eca1163dbc" title="The singleton instance of the XML handler for data source.">m_ntuple</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1HiNTupleXML.html" title="A singleton class that is does XML serialization and deserialization of derived classes...">HiNTupleXML</a> ( <span class="keyword">this</span> );
<a name="l00051"></a>00051   <a class="code" href="classhippodraw_1_1XmlController.html#a74a455fe6f9d79262375f28d147ca7e4" title="The singleton instance of the XML handler for TupleCut objects.">m_tuple_cut_xml</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1TupleCutXML.html" title="A class that is does XML serialization and de-serialization of derived classes of...">TupleCutXML</a> ( <span class="keyword">this</span> );
<a name="l00052"></a>00052   <a class="code" href="classhippodraw_1_1XmlController.html#a63d86cee6c758d6baaed0f4949f935f5" title="The singleton instance of a ViewBaseXML object.">m_view</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1ViewBaseXML.html" title="A class XML creation and parsing of XmlElement for ViewBase class.">ViewBaseXML</a> ( <span class="keyword">this</span> );
<a name="l00053"></a>00053 }
<a name="l00054"></a>00054 
<a name="l00055"></a><a class="code" href="classhippodraw_1_1XmlController.html#a843b4709f95fb3c00914672259f2c163">00055</a> <a class="code" href="classhippodraw_1_1XmlController.html#a843b4709f95fb3c00914672259f2c163" title="The destructor.">XmlController::~XmlController</a> ( )
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057   <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a8d104e65f1e1da9e701da6fd3b42479f" title="The pasteboard object.">m_pasteboard</a>;
<a name="l00058"></a>00058   <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a516cf012dec5f27bb1867bb4e5f15ecc" title="The singleton instance of the DataRepXML object.">m_datarep_xml</a>;
<a name="l00059"></a>00059   <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a6a94c7e6584e77abcff500eca1163dbc" title="The singleton instance of the XML handler for data source.">m_ntuple</a>;
<a name="l00060"></a>00060   <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a74a455fe6f9d79262375f28d147ca7e4" title="The singleton instance of the XML handler for TupleCut objects.">m_tuple_cut_xml</a>;
<a name="l00061"></a>00061   <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a63d86cee6c758d6baaed0f4949f935f5" title="The singleton instance of a ViewBaseXML object.">m_view</a>;
<a name="l00062"></a>00062 }
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 <span class="keywordtype">void</span>
<a name="l00065"></a>00065 <a class="code" href="classhippodraw_1_1XmlController.html#a2acbc7b78cc179252e50fca3261414dc" title="Creates an DOM Document with name doc_name.">XmlController::</a>
<a name="l00066"></a><a class="code" href="classhippodraw_1_1XmlController.html#a2acbc7b78cc179252e50fca3261414dc">00066</a> <a class="code" href="classhippodraw_1_1XmlController.html#a2acbc7b78cc179252e50fca3261414dc" title="Creates an DOM Document with name doc_name.">createDocument</a> ( <span class="keyword">const</span> std::string &amp; doc_name )
<a name="l00067"></a>00067 {
<a name="l00068"></a>00068   <a class="code" href="classhippodraw_1_1XmlController.html#ab3ec13ffdff595cebbeff0e70ca4f4ae" title="Creates a new document.">newDocument</a> ( doc_name );
<a name="l00069"></a>00069   <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * root = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#a04ac45c092a130deb2b20ba2aedfa0c8" title="Creates a new DOM element wrapper object and returns a pointer to it.">createElement</a> ( doc_name );
<a name="l00070"></a>00070 
<a name="l00071"></a>00071   <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#a83724f872d9444cdc9b994f3399f1ad8" title="Appends the root element to the document.">appendChild</a> ( *root );
<a name="l00072"></a>00072   <span class="keyword">delete</span> root;
<a name="l00073"></a>00073 }
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70b" title="Return codes of opening file.">XmlController::Status</a> 
<a name="l00076"></a>00076 <a class="code" href="classhippodraw_1_1XmlController.html#ac332bc012ff2a5fb88fd976d22e8e721" title="Opens an existing DOM Document file filename.">XmlController::</a>
<a name="l00077"></a><a class="code" href="classhippodraw_1_1XmlController.html#ac332bc012ff2a5fb88fd976d22e8e721">00077</a> <a class="code" href="classhippodraw_1_1XmlController.html#ac332bc012ff2a5fb88fd976d22e8e721" title="Opens an existing DOM Document file filename.">openDocument</a> ( <span class="keyword">const</span> std::string &amp; filename )
<a name="l00078"></a>00078 {
<a name="l00079"></a>00079   <a class="code" href="classhippodraw_1_1XmlController.html#ab3ec13ffdff595cebbeff0e70ca4f4ae" title="Creates a new document.">newDocument</a> ( <span class="stringliteral">&quot;HippoDraw&quot;</span> );
<a name="l00080"></a>00080 
<a name="l00081"></a>00081   <a class="code" href="classhippodraw_1_1XmlDocument.html#a67a0db04d321a74b7e7fcfd3f1a3f70b" title="Status codes for opening an XML document.">XmlDocument::Status</a> rc = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#adf073430e5bb36d1dd66901456b5a7ef" title="Sets the content of the XML document from the text in the file filename.">setContent</a> ( filename );
<a name="l00082"></a>00082   <span class="keywordflow">if</span> ( rc == <a class="code" href="classhippodraw_1_1XmlDocument.html#a67a0db04d321a74b7e7fcfd3f1a3f70ba14d536aa4f10161dcf259ce15008a50c">XmlDocument::OpenError</a> ) <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70ba14d536aa4f10161dcf259ce15008a50c">OpenError</a>;
<a name="l00083"></a>00083   <span class="keywordflow">if</span> ( rc == <a class="code" href="classhippodraw_1_1XmlDocument.html#a67a0db04d321a74b7e7fcfd3f1a3f70baa3d32cd06318a977a4371605d6a4d84c">XmlDocument::ParseError</a> ) <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70baa3d32cd06318a977a4371605d6a4d84c">ParseError</a>;
<a name="l00084"></a>00084 
<a name="l00085"></a>00085   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70bafdfbdf3247bd36a1f17270d5cec74c9c">Success</a>;
<a name="l00086"></a>00086 }
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70b" title="Return codes of opening file.">XmlController::Status</a> 
<a name="l00089"></a>00089 <a class="code" href="classhippodraw_1_1XmlController.html#a5b5d71e87ef643d48d28b2ea1787e810" title="Attempts to open and parse the specified HippoDraw document.">XmlController::</a>
<a name="l00090"></a><a class="code" href="classhippodraw_1_1XmlController.html#a5b5d71e87ef643d48d28b2ea1787e810">00090</a> <a class="code" href="classhippodraw_1_1XmlController.html#a5b5d71e87ef643d48d28b2ea1787e810" title="Attempts to open and parse the specified HippoDraw document.">openFile</a> ( <span class="keyword">const</span> std::string &amp; filename )
<a name="l00091"></a>00091 {
<a name="l00092"></a>00092   <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70b" title="Return codes of opening file.">Status</a> status = <a class="code" href="classhippodraw_1_1XmlController.html#ac332bc012ff2a5fb88fd976d22e8e721" title="Opens an existing DOM Document file filename.">openDocument</a> ( filename );
<a name="l00093"></a>00093   <span class="keywordflow">if</span> ( status != <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70bafdfbdf3247bd36a1f17270d5cec74c9c">Success</a> ) <span class="keywordflow">return</span> status;
<a name="l00094"></a>00094 
<a name="l00095"></a>00095   <a class="code" href="classhippodraw_1_1XmlController.html#a9d63f3e5ef0b103ff2fc2b6b639e3f16" title="A list of reconstructed views.">m_views</a>.clear();
<a name="l00096"></a>00096   <a class="code" href="classhippodraw_1_1XmlController.html#a4ea984bbe14a7e56d1c410fc9d115e9b" title="A mapping from XML id to created data sources.">m_tuple_map</a>.clear ();
<a name="l00097"></a>00097   <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a>.clear ();
<a name="l00098"></a>00098 
<a name="l00099"></a>00099   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a3d05e16782daa4af654b5c742b82bbcc" title="Attempts to open ntuple files in the current document and put them into the map.">openNTuples</a> ();
<a name="l00100"></a>00100 }
<a name="l00101"></a>00101 
<a name="l00102"></a>00102 <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70b" title="Return codes of opening file.">XmlController::Status</a> 
<a name="l00103"></a>00103 <a class="code" href="classhippodraw_1_1XmlController.html#a3d05e16782daa4af654b5c742b82bbcc" title="Attempts to open ntuple files in the current document and put them into the map.">XmlController::</a>
<a name="l00104"></a><a class="code" href="classhippodraw_1_1XmlController.html#a3d05e16782daa4af654b5c742b82bbcc">00104</a> <a class="code" href="classhippodraw_1_1XmlController.html#a3d05e16782daa4af654b5c742b82bbcc" title="Attempts to open ntuple files in the current document and put them into the map.">openNTuples</a> ( )
<a name="l00105"></a>00105 {
<a name="l00106"></a>00106   <a class="code" href="classhippodraw_1_1XmlController.html#a61d5847a44aec76860318730fe92f701" title="A list of missing NTuples.">m_missing_tuples</a>.clear ();
<a name="l00107"></a>00107   <a class="code" href="classhippodraw_1_1XmlController.html#a08cad2b3649f3366229e1cfbf1f034b4" title="A vector of the ids in the Xml file of the missing NTuples.">m_missing_ids</a>.clear ();
<a name="l00108"></a>00108 
<a name="l00109"></a>00109   <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * root = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#a5b24d0de6521725b1e71107305d6f684" title="Returns the root document element.">documentElement</a> ();
<a name="l00110"></a>00110   list &lt; XmlElement * &gt; nodelist;
<a name="l00111"></a>00111   <a class="code" href="classhippodraw_1_1XmlController.html#a6a94c7e6584e77abcff500eca1163dbc" title="The singleton instance of the XML handler for data source.">m_ntuple</a>-&gt;<a class="code" href="classhippodraw_1_1BaseXML.html#a5341ca7744d304c2746a8f5564ce237b" title="Fills the nodelist with immediate child nodes of element with nodes that can be handled...">fillNodeList</a> ( root, nodelist );
<a name="l00112"></a>00112 
<a name="l00113"></a>00113   std::list &lt; XmlElement * &gt;::const_iterator first = nodelist.begin();
<a name="l00114"></a>00114 
<a name="l00115"></a>00115   <span class="keywordflow">while</span> ( first != nodelist.end() ) {
<a name="l00116"></a>00116     <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = *first++;
<a name="l00117"></a>00117     <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element-&gt;<a class="code" href="classhippodraw_1_1XmlElement.html#a6204675a4fca73c67cd422e7e76c1beb" title="Returns the ID of the element, if it has one.">getID</a> ();
<a name="l00118"></a>00118     <span class="keywordflow">try</span> {
<a name="l00119"></a>00119       <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ntuple = <a class="code" href="classhippodraw_1_1XmlController.html#a6a94c7e6584e77abcff500eca1163dbc" title="The singleton instance of the XML handler for data source.">m_ntuple</a>-&gt;<a class="code" href="classhippodraw_1_1HiNTupleXML.html#af39023c77b6e6c01ee8f4cc1d93ee915" title="Returns the DataSource corresponding to XmlElement.">getObject</a> ( *element );
<a name="l00120"></a>00120       <a class="code" href="classhippodraw_1_1XmlController.html#a4ea984bbe14a7e56d1c410fc9d115e9b" title="A mapping from XML id to created data sources.">m_tuple_map</a>[id] = ntuple;
<a name="l00121"></a>00121     }
<a name="l00122"></a>00122     <span class="keywordflow">catch</span> ( <span class="keyword">const</span> std::runtime_error &amp;  ) {
<a name="l00123"></a>00123       <span class="keyword">const</span> <span class="keywordtype">string</span> name = <a class="code" href="classhippodraw_1_1XmlController.html#a6a94c7e6584e77abcff500eca1163dbc" title="The singleton instance of the XML handler for data source.">m_ntuple</a>-&gt;<a class="code" href="classhippodraw_1_1HiNTupleXML.html#a2c0e8f4e41b1601b10a12e1cdd24386e" title="Returns the name of the HiNTuple object.">getName</a> ( *element );
<a name="l00124"></a>00124       <a class="code" href="classhippodraw_1_1XmlController.html#a61d5847a44aec76860318730fe92f701" title="A list of missing NTuples.">m_missing_tuples</a>.push_back ( name );
<a name="l00125"></a>00125       <a class="code" href="classhippodraw_1_1XmlController.html#a08cad2b3649f3366229e1cfbf1f034b4" title="A vector of the ids in the Xml file of the missing NTuples.">m_missing_ids</a>.push_back ( <span class="keywordtype">id</span> );
<a name="l00126"></a>00126     }
<a name="l00127"></a>00127   }
<a name="l00128"></a>00128   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1XmlController.html#a61d5847a44aec76860318730fe92f701" title="A list of missing NTuples.">m_missing_tuples</a>.empty () == true ) <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70bafdfbdf3247bd36a1f17270d5cec74c9c">Success</a>;
<a name="l00129"></a>00129 
<a name="l00130"></a>00130   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70bab22a9045957849f38c08710bc1b678b4">NTupleError</a>;
<a name="l00131"></a>00131 }
<a name="l00132"></a>00132 
<a name="l00133"></a>00133 <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70b" title="Return codes of opening file.">XmlController::Status</a>
<a name="l00134"></a>00134 <a class="code" href="classhippodraw_1_1XmlController.html#a8c351b39e278a7e9eca522e4cdb1ae84" title="Open the missing tuples updated by GUI.">XmlController::</a>
<a name="l00135"></a><a class="code" href="classhippodraw_1_1XmlController.html#a8c351b39e278a7e9eca522e4cdb1ae84">00135</a> <a class="code" href="classhippodraw_1_1XmlController.html#a8c351b39e278a7e9eca522e4cdb1ae84" title="Open the missing tuples updated by GUI.">openUpdatedNTuples</a> ( )
<a name="l00136"></a>00136 {
<a name="l00137"></a>00137   std::list &lt; string &gt;::iterator it;
<a name="l00138"></a>00138   <span class="keywordtype">int</span> i = 0;
<a name="l00139"></a>00139   <span class="keywordflow">for</span> ( it=<a class="code" href="classhippodraw_1_1XmlController.html#a61d5847a44aec76860318730fe92f701" title="A list of missing NTuples.">m_missing_tuples</a>.begin(); 
<a name="l00140"></a>00140         it!=<a class="code" href="classhippodraw_1_1XmlController.html#a61d5847a44aec76860318730fe92f701" title="A list of missing NTuples.">m_missing_tuples</a>.end(); ++it, ++i )
<a name="l00141"></a>00141     {
<a name="l00142"></a>00142       <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ntuple = <a class="code" href="classhippodraw_1_1XmlController.html#a6a94c7e6584e77abcff500eca1163dbc" title="The singleton instance of the XML handler for data source.">m_ntuple</a>-&gt;<a class="code" href="classhippodraw_1_1HiNTupleXML.html#af39023c77b6e6c01ee8f4cc1d93ee915" title="Returns the DataSource corresponding to XmlElement.">getObject</a> ( *it );
<a name="l00143"></a>00143       <span class="keywordflow">if</span> ( ntuple == 0 ) 
<a name="l00144"></a>00144         {
<a name="l00145"></a>00145           <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70bab22a9045957849f38c08710bc1b678b4">NTupleError</a>;
<a name="l00146"></a>00146         }
<a name="l00147"></a>00147       <span class="keywordflow">else</span> 
<a name="l00148"></a>00148         {
<a name="l00149"></a>00149           <span class="keywordtype">int</span> <span class="keywordtype">id</span> = <a class="code" href="classhippodraw_1_1XmlController.html#a08cad2b3649f3366229e1cfbf1f034b4" title="A vector of the ids in the Xml file of the missing NTuples.">m_missing_ids</a>[i];
<a name="l00150"></a>00150           <a class="code" href="classhippodraw_1_1XmlController.html#a4ea984bbe14a7e56d1c410fc9d115e9b" title="A mapping from XML id to created data sources.">m_tuple_map</a>[id] = ntuple;
<a name="l00151"></a>00151         }
<a name="l00152"></a>00152     }
<a name="l00153"></a>00153   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70bafdfbdf3247bd36a1f17270d5cec74c9c">Success</a>;
<a name="l00154"></a>00154 }
<a name="l00155"></a>00155 
<a name="l00156"></a>00156 
<a name="l00157"></a>00157 <span class="keywordtype">bool</span>
<a name="l00158"></a>00158 <a class="code" href="classhippodraw_1_1XmlController.html#a748572c6c989c3b18d307e9f4153dcbd" title="Returns true if global pasteboard is empty.">XmlController::</a>
<a name="l00159"></a><a class="code" href="classhippodraw_1_1XmlController.html#a748572c6c989c3b18d307e9f4153dcbd">00159</a> <a class="code" href="classhippodraw_1_1XmlController.html#a748572c6c989c3b18d307e9f4153dcbd" title="Returns true if global pasteboard is empty.">isPasteboardEmpty</a> ()
<a name="l00160"></a>00160 {
<a name="l00161"></a>00161   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a8d104e65f1e1da9e701da6fd3b42479f" title="The pasteboard object.">m_pasteboard</a> == 0;
<a name="l00162"></a>00162 }
<a name="l00163"></a>00163 
<a name="l00164"></a>00164 <span class="keyword">const</span> list &lt; ViewBase * &gt; &amp;
<a name="l00165"></a>00165 <a class="code" href="classhippodraw_1_1XmlController.html#a7b3ba368b4f596d61b6ec1ea3f807d12" title="Creates and returns a list of objects that was copied to the pasteboard.">XmlController::</a>
<a name="l00166"></a><a class="code" href="classhippodraw_1_1XmlController.html#a7b3ba368b4f596d61b6ec1ea3f807d12">00166</a> <a class="code" href="classhippodraw_1_1XmlController.html#a7b3ba368b4f596d61b6ec1ea3f807d12" title="Creates and returns a list of objects that was copied to the pasteboard.">getFromPasteboard</a> ( <a class="code" href="classhippodraw_1_1ViewFactory.html" title="The abstract base class for a factory that creates objects closely related to the...">ViewFactory</a> * factory,
<a name="l00167"></a>00167                     <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00168"></a>00168 {
<a name="l00169"></a>00169   <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a> = <a class="code" href="classhippodraw_1_1XmlController.html#a8d104e65f1e1da9e701da6fd3b42479f" title="The pasteboard object.">m_pasteboard</a>;
<a name="l00170"></a>00170 
<a name="l00171"></a>00171   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a162758d6fc86cc18fff67c81d7516da4" title="Restores the views in the current document.">getFromDocument</a> ( factory, views );
<a name="l00172"></a>00172 }
<a name="l00173"></a>00173 
<a name="l00174"></a>00174 <span class="keyword">const</span> list &lt; ViewBase * &gt; &amp;
<a name="l00175"></a>00175 <a class="code" href="classhippodraw_1_1XmlController.html#a740a787fd1bf33e727093f1c6974602c" title="Creates and returns objects that were copied to the selection copy.">XmlController::</a>
<a name="l00176"></a><a class="code" href="classhippodraw_1_1XmlController.html#a740a787fd1bf33e727093f1c6974602c">00176</a> <a class="code" href="classhippodraw_1_1XmlController.html#a740a787fd1bf33e727093f1c6974602c" title="Creates and returns objects that were copied to the selection copy.">getFromSelectionCopy</a> ( <a class="code" href="classhippodraw_1_1ViewFactory.html" title="The abstract base class for a factory that creates objects closely related to the...">ViewFactory</a> * factory,
<a name="l00177"></a>00177                        <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00178"></a>00178 {
<a name="l00179"></a>00179   <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a> = <a class="code" href="classhippodraw_1_1XmlController.html#a02a8ddc85f5a5365988eadaab6727c80" title="A copy of a selection.">m_selectboard</a>;
<a name="l00180"></a>00180 
<a name="l00181"></a>00181   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a162758d6fc86cc18fff67c81d7516da4" title="Restores the views in the current document.">getFromDocument</a> ( factory, views );
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183 
<a name="l00184"></a>00184 <span class="keyword">const</span> list &lt; ViewBase * &gt; &amp;
<a name="l00185"></a>00185 <a class="code" href="classhippodraw_1_1XmlController.html#a162758d6fc86cc18fff67c81d7516da4" title="Restores the views in the current document.">XmlController::</a>
<a name="l00186"></a><a class="code" href="classhippodraw_1_1XmlController.html#a162758d6fc86cc18fff67c81d7516da4">00186</a> <a class="code" href="classhippodraw_1_1XmlController.html#a162758d6fc86cc18fff67c81d7516da4" title="Restores the views in the current document.">getFromDocument</a> ( <a class="code" href="classhippodraw_1_1ViewFactory.html" title="The abstract base class for a factory that creates objects closely related to the...">ViewFactory</a> * factory, 
<a name="l00187"></a>00187                   <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00188"></a>00188 {
<a name="l00189"></a>00189   <a class="code" href="classhippodraw_1_1XmlController.html#a2d711c9886d79c7bb8c279635037bae0" title="Fills the NTuple map with NTuple objects currently in memory.">fillNTupleMap</a> ();
<a name="l00190"></a>00190   <a class="code" href="classhippodraw_1_1XmlController.html#af53de5865e68b74d4f000801fcbe728e" title="Fills the TupleCut map with TupleCut objecs contained in one in the list of views...">fillTupleCutMap</a> ( views );
<a name="l00191"></a>00191   <a class="code" href="classhippodraw_1_1XmlController.html#a2ac4d06d273cb2dfba9dd2659fe1ed1e" title="The factory to be used for creating views.">m_view_factory</a> = factory;
<a name="l00192"></a>00192 
<a name="l00193"></a>00193   <a class="code" href="classhippodraw_1_1XmlController.html#a523a93d0b1cb601c01d623ac55c9d1b9" title="De-serializes the ViewBase objects.">getViews</a> ();
<a name="l00194"></a>00194 
<a name="l00195"></a>00195   <a class="code" href="classhippodraw_1_1CutController.html" title="A singleton class that handles the application logic for cuts.">CutController</a> * controller = <a class="code" href="classhippodraw_1_1CutController.html#afdc46bf7a3ad3516a4f800bb2cce6e01" title="Returns the pointer to the singleton instance.">CutController::instance</a> ();
<a name="l00196"></a>00196   controller-&gt;<a class="code" href="classhippodraw_1_1CutController.html#a1fe0f3c5637b0c7d75a12441b2132e3c" title="Connects the DataRep object to its appropriate Cut Plotter.">connectDataRep</a> ( <a class="code" href="classhippodraw_1_1XmlController.html#a9d63f3e5ef0b103ff2fc2b6b639e3f16" title="A list of reconstructed views.">m_views</a>, views );
<a name="l00197"></a>00197 
<a name="l00198"></a>00198   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a9d63f3e5ef0b103ff2fc2b6b639e3f16" title="A list of reconstructed views.">m_views</a>;
<a name="l00199"></a>00199 }
<a name="l00200"></a>00200 
<a name="l00201"></a>00201 <span class="keyword">const</span> list &lt; ViewBase * &gt; &amp; 
<a name="l00202"></a><a class="code" href="classhippodraw_1_1XmlController.html#a4682f5e061cb45280c4e3d8a3111a9db">00202</a> <a class="code" href="classhippodraw_1_1XmlController.html#a523a93d0b1cb601c01d623ac55c9d1b9" title="De-serializes the ViewBase objects.">XmlController::getViews</a> ( <a class="code" href="classhippodraw_1_1ViewFactory.html" title="The abstract base class for a factory that creates objects closely related to the...">ViewFactory</a> * factory )
<a name="l00203"></a>00203 {
<a name="l00204"></a>00204   <a class="code" href="classhippodraw_1_1XmlController.html#a2ac4d06d273cb2dfba9dd2659fe1ed1e" title="The factory to be used for creating views.">m_view_factory</a> = factory;
<a name="l00205"></a>00205   <a class="code" href="classhippodraw_1_1XmlController.html#a523a93d0b1cb601c01d623ac55c9d1b9" title="De-serializes the ViewBase objects.">getViews</a> ();
<a name="l00206"></a>00206   <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>; <span class="comment">// done with it.</span>
<a name="l00207"></a>00207 
<a name="l00208"></a>00208   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a9d63f3e5ef0b103ff2fc2b6b639e3f16" title="A list of reconstructed views.">m_views</a>;
<a name="l00209"></a>00209 }
<a name="l00210"></a>00210 
<a name="l00211"></a>00211 <span class="keywordtype">bool</span> 
<a name="l00212"></a>00212 <a class="code" href="classhippodraw_1_1XmlController.html#a6c1763610e1beac3e7d9c293c30ba61f" title="Returns true if all the NTuple objects used by the views have been saved to or read...">XmlController::</a>
<a name="l00213"></a><a class="code" href="classhippodraw_1_1XmlController.html#a6c1763610e1beac3e7d9c293c30ba61f">00213</a> <a class="code" href="classhippodraw_1_1XmlController.html#a6c1763610e1beac3e7d9c293c30ba61f" title="Returns true if all the NTuple objects used by the views have been saved to or read...">areDataSourcesSaved</a> ( <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00214"></a>00214 {
<a name="l00215"></a>00215   <span class="keywordtype">bool</span> yes = <span class="keyword">true</span>;
<a name="l00216"></a>00216 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span>
<a name="l00217"></a>00217 <span class="preprocessor"></span>  std::
<a name="l00218"></a>00218 <span class="preprocessor">#endif</span>
<a name="l00219"></a>00219 <span class="preprocessor"></span>  vector &lt; const ViewBase * &gt; ::const_iterator first = views.begin ();
<a name="l00220"></a>00220   <span class="keywordflow">while</span> ( first != views.end () ) {
<a name="l00221"></a>00221     <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * view = *first++;
<a name="l00222"></a>00222     yes = <a class="code" href="classhippodraw_1_1XmlController.html#a63d86cee6c758d6baaed0f4949f935f5" title="The singleton instance of a ViewBaseXML object.">m_view</a>-&gt;<a class="code" href="classhippodraw_1_1ViewBaseXML.html#ad239e7913d617307586b9845287f7a0e" title="Returns true if all the NTuple objects used by the view have been save to or read...">areDataSourcesSaved</a> ( *view );
<a name="l00223"></a>00223     <span class="keywordflow">if</span> ( yes == <span class="keyword">false</span> ) <span class="keywordflow">break</span>;
<a name="l00224"></a>00224   }
<a name="l00225"></a>00225 
<a name="l00226"></a>00226   <span class="keywordflow">return</span> yes;
<a name="l00227"></a>00227 }
<a name="l00228"></a>00228 
<a name="l00229"></a>00229 <span class="keywordtype">bool</span> 
<a name="l00230"></a>00230 <a class="code" href="classhippodraw_1_1XmlController.html#a47495e9d944ef7dec40cb1d42e506cb6" title="Serializes the ViewBase objects in views and their appropriate subcomponents.">XmlController::</a>
<a name="l00231"></a><a class="code" href="classhippodraw_1_1XmlController.html#a47495e9d944ef7dec40cb1d42e506cb6">00231</a> <a class="code" href="classhippodraw_1_1XmlController.html#a47495e9d944ef7dec40cb1d42e506cb6" title="Serializes the ViewBase objects in views and their appropriate subcomponents.">serializeViews</a> ( <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00232"></a>00232 {
<a name="l00233"></a>00233   <a class="code" href="classhippodraw_1_1XmlController.html#a2acbc7b78cc179252e50fca3261414dc" title="Creates an DOM Document with name doc_name.">createDocument</a> ( <span class="stringliteral">&quot;HippoDraw&quot;</span> );
<a name="l00234"></a>00234 
<a name="l00235"></a>00235   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a> == 0 ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00236"></a>00236 
<a name="l00237"></a>00237   <a class="code" href="classhippodraw_1_1XmlController.html#a9ebf281b66b69b9bb4acdabf4b709d98" title="Adds ViewBase elements to the root of the document.">addViews</a> ( views );
<a name="l00238"></a>00238 
<a name="l00239"></a>00239   <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00240"></a>00240 }
<a name="l00241"></a>00241 
<a name="l00242"></a>00242 <span class="keywordtype">void</span>
<a name="l00243"></a>00243 <a class="code" href="classhippodraw_1_1XmlController.html#abb17c64cfefcbb9d77cbb5843bf543a0" title="Deletes each element in the map and clears the map.">XmlController::</a>
<a name="l00244"></a><a class="code" href="classhippodraw_1_1XmlController.html#abb17c64cfefcbb9d77cbb5843bf543a0">00244</a> <a class="code" href="classhippodraw_1_1XmlController.html#abb17c64cfefcbb9d77cbb5843bf543a0" title="Deletes each element in the map and clears the map.">clearDataSourceMap</a> ()
<a name="l00245"></a>00245 {
<a name="l00246"></a>00246   map &lt; const DataSource *, XmlElement * &gt; ::iterator first 
<a name="l00247"></a>00247     = <a class="code" href="classhippodraw_1_1XmlController.html#a19ad992a0335fccc4115850d9a67f9a8" title="The map of data sources to XmlElements for the current document.">m_data</a>.begin();
<a name="l00248"></a>00248   <span class="keywordflow">for</span> ( ; first != <a class="code" href="classhippodraw_1_1XmlController.html#a19ad992a0335fccc4115850d9a67f9a8" title="The map of data sources to XmlElements for the current document.">m_data</a>.end (); ++ first ) {
<a name="l00249"></a>00249     <span class="keyword">delete</span> first-&gt;second;
<a name="l00250"></a>00250   }
<a name="l00251"></a>00251 
<a name="l00252"></a>00252   <a class="code" href="classhippodraw_1_1XmlController.html#a19ad992a0335fccc4115850d9a67f9a8" title="The map of data sources to XmlElements for the current document.">m_data</a>.clear ();
<a name="l00253"></a>00253 }
<a name="l00254"></a>00254 
<a name="l00255"></a>00255 <span class="keywordtype">void</span>
<a name="l00256"></a>00256 <a class="code" href="classhippodraw_1_1XmlController.html#a5adf63737ec4ef4fc1c8c27cd033659a" title="Save the ViewBase objects in selview to a XML in memory document.">XmlController::</a>
<a name="l00257"></a><a class="code" href="classhippodraw_1_1XmlController.html#a5adf63737ec4ef4fc1c8c27cd033659a">00257</a> <a class="code" href="classhippodraw_1_1XmlController.html#a5adf63737ec4ef4fc1c8c27cd033659a" title="Save the ViewBase objects in selview to a XML in memory document.">saveToDocument</a> ( <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00258"></a>00258 {
<a name="l00259"></a>00259   <a class="code" href="classhippodraw_1_1XmlController.html#abb17c64cfefcbb9d77cbb5843bf543a0" title="Deletes each element in the map and clears the map.">clearDataSourceMap</a> ();
<a name="l00260"></a>00260   <a class="code" href="classhippodraw_1_1XmlController.html#aa27ddf7cb4477f62ce82e58657983170" title="The map of memory address to unique integer identifier.">m_addr_map</a>.clear();
<a name="l00261"></a>00261   <a class="code" href="classhippodraw_1_1XmlController.html#a47495e9d944ef7dec40cb1d42e506cb6" title="Serializes the ViewBase objects in views and their appropriate subcomponents.">serializeViews</a> ( views );
<a name="l00262"></a>00262 }
<a name="l00263"></a>00263 
<a name="l00264"></a>00264 <span class="keywordtype">void</span>
<a name="l00265"></a>00265 <a class="code" href="classhippodraw_1_1XmlController.html#a28482845b8e03cec1ba4f930e0bc5339" title="Saves the document represented by the list of ViewBase objects to the pasteboard...">XmlController::</a>
<a name="l00266"></a><a class="code" href="classhippodraw_1_1XmlController.html#a28482845b8e03cec1ba4f930e0bc5339">00266</a> <a class="code" href="classhippodraw_1_1XmlController.html#a28482845b8e03cec1ba4f930e0bc5339" title="Saves the document represented by the list of ViewBase objects to the pasteboard...">saveToPasteboard</a> ( <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; selviews )
<a name="l00267"></a>00267 {
<a name="l00268"></a>00268   <a class="code" href="classhippodraw_1_1XmlController.html#a5adf63737ec4ef4fc1c8c27cd033659a" title="Save the ViewBase objects in selview to a XML in memory document.">saveToDocument</a> ( selviews );
<a name="l00269"></a>00269 
<a name="l00270"></a>00270   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1XmlController.html#a8d104e65f1e1da9e701da6fd3b42479f" title="The pasteboard object.">m_pasteboard</a> != 0 ) <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a8d104e65f1e1da9e701da6fd3b42479f" title="The pasteboard object.">m_pasteboard</a>;
<a name="l00271"></a>00271   <a class="code" href="classhippodraw_1_1XmlController.html#a8d104e65f1e1da9e701da6fd3b42479f" title="The pasteboard object.">m_pasteboard</a> = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>;
<a name="l00272"></a>00272 }
<a name="l00273"></a>00273 
<a name="l00274"></a>00274 <span class="keywordtype">void</span>
<a name="l00275"></a>00275 <a class="code" href="classhippodraw_1_1XmlController.html#a9835de9c91983d98a126014201721e25" title="Saves the document represented by the list of ViewBase objects to the selection copy...">XmlController::</a>
<a name="l00276"></a><a class="code" href="classhippodraw_1_1XmlController.html#a9835de9c91983d98a126014201721e25">00276</a> <a class="code" href="classhippodraw_1_1XmlController.html#a9835de9c91983d98a126014201721e25" title="Saves the document represented by the list of ViewBase objects to the selection copy...">saveToSelectionCopy</a> ( <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00277"></a>00277 {
<a name="l00278"></a>00278   <a class="code" href="classhippodraw_1_1XmlController.html#a5adf63737ec4ef4fc1c8c27cd033659a" title="Save the ViewBase objects in selview to a XML in memory document.">saveToDocument</a> ( views );
<a name="l00279"></a>00279 
<a name="l00280"></a>00280   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1XmlController.html#a02a8ddc85f5a5365988eadaab6727c80" title="A copy of a selection.">m_selectboard</a> != 0 ) <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a02a8ddc85f5a5365988eadaab6727c80" title="A copy of a selection.">m_selectboard</a>;
<a name="l00281"></a>00281   <a class="code" href="classhippodraw_1_1XmlController.html#a02a8ddc85f5a5365988eadaab6727c80" title="A copy of a selection.">m_selectboard</a> = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>;
<a name="l00282"></a>00282 }
<a name="l00283"></a>00283 
<a name="l00284"></a>00284 <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70b" title="Return codes of opening file.">XmlController::Status</a>
<a name="l00285"></a>00285 <a class="code" href="classhippodraw_1_1XmlController.html#a82259a787227d9b3286fc29beded8b44" title="Saves the document represented by list of ViewBase objects to file with name filename...">XmlController::</a>
<a name="l00286"></a><a class="code" href="classhippodraw_1_1XmlController.html#a82259a787227d9b3286fc29beded8b44">00286</a> <a class="code" href="classhippodraw_1_1XmlController.html#a82259a787227d9b3286fc29beded8b44" title="Saves the document represented by list of ViewBase objects to file with name filename...">saveToFile</a> ( <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views, 
<a name="l00287"></a>00287              <span class="keyword">const</span> std::string &amp; filename )
<a name="l00288"></a>00288 {
<a name="l00289"></a>00289   <a class="code" href="classhippodraw_1_1XmlController.html#abb17c64cfefcbb9d77cbb5843bf543a0" title="Deletes each element in the map and clears the map.">clearDataSourceMap</a> ();
<a name="l00290"></a>00290   <a class="code" href="classhippodraw_1_1XmlController.html#aa27ddf7cb4477f62ce82e58657983170" title="The map of memory address to unique integer identifier.">m_addr_map</a>.clear();
<a name="l00291"></a>00291   <a class="code" href="classhippodraw_1_1XmlController.html#a47495e9d944ef7dec40cb1d42e506cb6" title="Serializes the ViewBase objects in views and their appropriate subcomponents.">serializeViews</a> ( views );
<a name="l00292"></a>00292   <a class="code" href="classhippodraw_1_1XmlDocument.html#a67a0db04d321a74b7e7fcfd3f1a3f70b" title="Status codes for opening an XML document.">XmlDocument::Status</a> status = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#ad7b961d2e6a7c54c37e136178d5a8c51" title="Saves the document to the file.">saveToFile</a> ( filename );
<a name="l00293"></a>00293   <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>;
<a name="l00294"></a>00294 
<a name="l00295"></a>00295   <span class="keywordflow">if</span> ( status != <a class="code" href="classhippodraw_1_1XmlDocument.html#a67a0db04d321a74b7e7fcfd3f1a3f70bafdfbdf3247bd36a1f17270d5cec74c9c">XmlDocument::Success</a> ) <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70ba14d536aa4f10161dcf259ce15008a50c">OpenError</a>;
<a name="l00296"></a>00296 
<a name="l00297"></a>00297   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a67a0db04d321a74b7e7fcfd3f1a3f70bafdfbdf3247bd36a1f17270d5cec74c9c">Success</a>;
<a name="l00298"></a>00298 }
<a name="l00299"></a>00299 
<a name="l00300"></a>00300 <span class="keywordtype">void</span> 
<a name="l00301"></a>00301 <a class="code" href="classhippodraw_1_1XmlController.html#a9ebf281b66b69b9bb4acdabf4b709d98" title="Adds ViewBase elements to the root of the document.">XmlController::</a>
<a name="l00302"></a><a class="code" href="classhippodraw_1_1XmlController.html#a9ebf281b66b69b9bb4acdabf4b709d98">00302</a> <a class="code" href="classhippodraw_1_1XmlController.html#a9ebf281b66b69b9bb4acdabf4b709d98" title="Adds ViewBase elements to the root of the document.">addViews</a> ( <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00303"></a>00303 {
<a name="l00304"></a>00304   <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * root = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#a5b24d0de6521725b1e71107305d6f684" title="Returns the root document element.">documentElement</a> ();
<a name="l00305"></a>00305 
<a name="l00306"></a>00306   std::vector &lt; const ViewBase * &gt;::const_iterator it = views.begin();
<a name="l00307"></a>00307   <span class="keywordflow">for</span> ( ; it != views.end(); ++it ) {
<a name="l00308"></a>00308     <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * elem = <a class="code" href="classhippodraw_1_1XmlController.html#a63d86cee6c758d6baaed0f4949f935f5" title="The singleton instance of a ViewBaseXML object.">m_view</a>-&gt;<a class="code" href="classhippodraw_1_1ViewBaseXML.html#a9511a02d3c63f37e6b31c8acf358c4ec" title="Returns a newly created XmlElement with attributes set for view.">createElement</a> ( **it );
<a name="l00309"></a>00309 
<a name="l00310"></a>00310     root-&gt;<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *elem );
<a name="l00311"></a>00311     <span class="keyword">delete</span> elem;
<a name="l00312"></a>00312   }
<a name="l00313"></a>00313   <span class="keyword">delete</span> root;
<a name="l00314"></a>00314 }
<a name="l00315"></a>00315 
<a name="l00316"></a><a class="code" href="classhippodraw_1_1XmlController.html#a03e6d999e0bcaddad4931e7e5a693ea1">00316</a> <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * <a class="code" href="classhippodraw_1_1XmlController.html#a03e6d999e0bcaddad4931e7e5a693ea1" title="Creates a new view for the current PlotterBase object and adds it to the list of...">XmlController::createView</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter )
<a name="l00317"></a>00317 {
<a name="l00318"></a>00318   <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * view = <a class="code" href="classhippodraw_1_1XmlController.html#a2ac4d06d273cb2dfba9dd2659fe1ed1e" title="The factory to be used for creating views.">m_view_factory</a>-&gt;<a class="code" href="classhippodraw_1_1ViewFactory.html#aaa895487d5ae0f454e95502c04301d37" title="Creates a view for the plotter.">createView</a> ( plotter );
<a name="l00319"></a>00319   <a class="code" href="classhippodraw_1_1XmlController.html#a9d63f3e5ef0b103ff2fc2b6b639e3f16" title="A list of reconstructed views.">m_views</a>.push_back ( view );
<a name="l00320"></a>00320 
<a name="l00321"></a>00321   <span class="keywordflow">return</span> view;
<a name="l00322"></a>00322 }
<a name="l00323"></a>00323 
<a name="l00324"></a>00324 <a class="code" href="classhippodraw_1_1FontBase.html" title="A abstract base class for font handling.">FontBase</a> *
<a name="l00325"></a>00325 <a class="code" href="classhippodraw_1_1XmlController.html#a9bb77cb2762438c24c221e2f36350691" title="Creates a empty QtFont object.">XmlController::</a>
<a name="l00326"></a><a class="code" href="classhippodraw_1_1XmlController.html#a9bb77cb2762438c24c221e2f36350691">00326</a> <a class="code" href="classhippodraw_1_1XmlController.html#a9bb77cb2762438c24c221e2f36350691" title="Creates a empty QtFont object.">createFont</a> ()<span class="keyword"> const</span>
<a name="l00327"></a>00327 <span class="keyword"></span>{
<a name="l00328"></a>00328   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a2ac4d06d273cb2dfba9dd2659fe1ed1e" title="The factory to be used for creating views.">m_view_factory</a> -&gt; <a class="code" href="classhippodraw_1_1XmlController.html#a9bb77cb2762438c24c221e2f36350691" title="Creates a empty QtFont object.">createFont</a> ();
<a name="l00329"></a>00329 }
<a name="l00330"></a>00330 
<a name="l00331"></a><a class="code" href="classhippodraw_1_1XmlController.html#a333f26031af40b965e0a73f8d93702d2">00331</a> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * <a class="code" href="classhippodraw_1_1XmlController.html#a333f26031af40b965e0a73f8d93702d2" title="Adds the DataSource to the document if it doesn&amp;#39;t already exist.">XmlController::addDataSource</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ntuple )
<a name="l00332"></a>00332 {
<a name="l00333"></a>00333   std::map &lt; const DataSource *, XmlElement * &gt;::const_iterator it
<a name="l00334"></a>00334     = <a class="code" href="classhippodraw_1_1XmlController.html#a19ad992a0335fccc4115850d9a67f9a8" title="The map of data sources to XmlElements for the current document.">m_data</a>.find ( ntuple );
<a name="l00335"></a>00335   <span class="keywordflow">if</span> ( it != <a class="code" href="classhippodraw_1_1XmlController.html#a19ad992a0335fccc4115850d9a67f9a8" title="The map of data sources to XmlElements for the current document.">m_data</a>.end () ) {
<a name="l00336"></a>00336     <span class="keywordflow">return</span> it-&gt;second;
<a name="l00337"></a>00337   }
<a name="l00338"></a>00338   <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = <a class="code" href="classhippodraw_1_1XmlController.html#a6a94c7e6584e77abcff500eca1163dbc" title="The singleton instance of the XML handler for data source.">m_ntuple</a>-&gt;<a class="code" href="classhippodraw_1_1HiNTupleXML.html#a8dec0508ba556ce5ed589af1d50637ad" title="Returns a newly created XmlElement for DataSource.">createElement</a> ( *ntuple );
<a name="l00339"></a>00339 
<a name="l00340"></a>00340   <a class="code" href="classhippodraw_1_1XmlController.html#a19ad992a0335fccc4115850d9a67f9a8" title="The map of data sources to XmlElements for the current document.">m_data</a>[ntuple] = element;
<a name="l00341"></a>00341 
<a name="l00342"></a>00342   <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * root = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#a5b24d0de6521725b1e71107305d6f684" title="Returns the root document element.">documentElement</a> ();
<a name="l00343"></a>00343   root-&gt;<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element );
<a name="l00344"></a>00344   <span class="keyword">delete</span> root;
<a name="l00345"></a>00345   <span class="keywordflow">return</span> element;
<a name="l00346"></a>00346 }
<a name="l00347"></a>00347 
<a name="l00348"></a><a class="code" href="classhippodraw_1_1XmlController.html#a75120d57d28ca42ca1a380326b9cb73b">00348</a> <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * <a class="code" href="classhippodraw_1_1XmlController.html#a75120d57d28ca42ca1a380326b9cb73b" title="Returns pointer to data source from the xml reference ID.">XmlController::getDataSource</a> ( <span class="keywordtype">int</span> ref )
<a name="l00349"></a>00349 {
<a name="l00350"></a>00350   std::map &lt; int, const DataSource * &gt;::const_iterator it
<a name="l00351"></a>00351     = <a class="code" href="classhippodraw_1_1XmlController.html#a4ea984bbe14a7e56d1c410fc9d115e9b" title="A mapping from XML id to created data sources.">m_tuple_map</a>.find ( ref );
<a name="l00352"></a>00352   <span class="keywordflow">if</span> ( it == <a class="code" href="classhippodraw_1_1XmlController.html#a4ea984bbe14a7e56d1c410fc9d115e9b" title="A mapping from XML id to created data sources.">m_tuple_map</a>.end () ) {
<a name="l00353"></a>00353     <span class="keywordflow">return</span> 0;
<a name="l00354"></a>00354   }
<a name="l00355"></a>00355 
<a name="l00356"></a>00356   <span class="keywordflow">return</span> it-&gt;second;
<a name="l00357"></a>00357 }
<a name="l00358"></a>00358 
<a name="l00359"></a><a class="code" href="classhippodraw_1_1XmlController.html#aae07b9e4e44e5753159043fd53e32099">00359</a> <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TupleCut.html" title="The class expresses a cut on a DataSource, i.e.">TupleCut</a> * <a class="code" href="classhippodraw_1_1XmlController.html#aae07b9e4e44e5753159043fd53e32099" title="Returns pointer to the TupleCut from the xml reference Id.">XmlController::getTupleCut</a> ( <span class="keywordtype">int</span> ref )
<a name="l00360"></a>00360 {
<a name="l00361"></a>00361   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TupleCut.html" title="The class expresses a cut on a DataSource, i.e.">TupleCut</a> * cut = 0;
<a name="l00362"></a>00362 
<a name="l00363"></a>00363   std::map &lt; int, const TupleCut * &gt;::iterator it
<a name="l00364"></a>00364     = <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a>.find ( ref );
<a name="l00365"></a>00365   <span class="keywordflow">if</span> ( it == <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a>.end() &amp;&amp;
<a name="l00366"></a>00366        ref &gt;=0  ) {
<a name="l00367"></a>00367     it = <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a>.find ( -ref ); <span class="comment">// old multiDim TupleCut</span>
<a name="l00368"></a>00368   }
<a name="l00369"></a>00369   <span class="keywordflow">if</span> ( it != <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a>.end() ) {
<a name="l00370"></a>00370     cut = it-&gt;second;
<a name="l00371"></a>00371   }
<a name="l00372"></a>00372 
<a name="l00373"></a>00373   <span class="keywordflow">return</span> cut;
<a name="l00374"></a>00374 }
<a name="l00375"></a>00375 
<a name="l00376"></a><a class="code" href="classhippodraw_1_1XmlController.html#adeda718878d52ea3402baa955862dad9">00376</a> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * <a class="code" href="classhippodraw_1_1XmlController.html#adeda718878d52ea3402baa955862dad9" title="Returns a pointer to the DataRep from the xml reference Id.">XmlController::getDataRep</a> ( <span class="keywordtype">int</span> ref )
<a name="l00377"></a>00377 {
<a name="l00378"></a>00378   std::map &lt; int, DataRep * &gt;::iterator it
<a name="l00379"></a>00379     = <a class="code" href="classhippodraw_1_1XmlController.html#a39d2531309e68ae19f59bcb98f12a631" title="A mapping from DataRep Id to created DataRep.">m_datarep_map</a>.find ( ref );
<a name="l00380"></a>00380 
<a name="l00381"></a>00381   <span class="keywordflow">if</span> ( it == <a class="code" href="classhippodraw_1_1XmlController.html#a39d2531309e68ae19f59bcb98f12a631" title="A mapping from DataRep Id to created DataRep.">m_datarep_map</a>.end() ) <span class="keywordflow">return</span> 0;
<a name="l00382"></a>00382 
<a name="l00383"></a>00383   <span class="keywordflow">return</span> it-&gt;second;
<a name="l00384"></a>00384 }
<a name="l00385"></a>00385 
<a name="l00386"></a>00386 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> *
<a name="l00387"></a>00387 <a class="code" href="classhippodraw_1_1XmlController.html#a3259c772529c29192ddf916446a1d92b" title="Returns a pointer to the PlotterBase object from the XML refereed Id.">XmlController::</a>
<a name="l00388"></a><a class="code" href="classhippodraw_1_1XmlController.html#a3259c772529c29192ddf916446a1d92b">00388</a> <a class="code" href="classhippodraw_1_1XmlController.html#a3259c772529c29192ddf916446a1d92b" title="Returns a pointer to the PlotterBase object from the XML refereed Id.">getPlotter</a> ( <span class="keywordtype">int</span> ref )
<a name="l00389"></a>00389 {
<a name="l00390"></a>00390   std::map &lt; int, PlotterBase * &gt;::iterator it
<a name="l00391"></a>00391     = <a class="code" href="classhippodraw_1_1XmlController.html#a98ca0ecb48aec91c12788920de0da414" title="The mapping from PlotterBase Id to created PlotterBase.">m_plotter_map</a>.find ( ref );
<a name="l00392"></a>00392 
<a name="l00393"></a>00393   <span class="keywordflow">if</span> ( it == <a class="code" href="classhippodraw_1_1XmlController.html#a98ca0ecb48aec91c12788920de0da414" title="The mapping from PlotterBase Id to created PlotterBase.">m_plotter_map</a>.end() ) <span class="keywordflow">return</span> 0;
<a name="l00394"></a>00394 
<a name="l00395"></a>00395   <span class="keywordflow">return</span> it-&gt;second;
<a name="l00396"></a>00396 }
<a name="l00397"></a>00397 
<a name="l00398"></a>00398 <span class="keywordtype">void</span>
<a name="l00399"></a>00399 <a class="code" href="classhippodraw_1_1XmlController.html#a792dbd58d63d390527a14cfba552b160" title="Registers the plotter with id.">XmlController::</a>
<a name="l00400"></a><a class="code" href="classhippodraw_1_1XmlController.html#a792dbd58d63d390527a14cfba552b160">00400</a> <a class="code" href="classhippodraw_1_1XmlController.html#a792dbd58d63d390527a14cfba552b160" title="Registers the plotter with id.">registerPlotter</a> ( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter )
<a name="l00401"></a>00401 {
<a name="l00402"></a>00402   <a class="code" href="classhippodraw_1_1XmlController.html#a98ca0ecb48aec91c12788920de0da414" title="The mapping from PlotterBase Id to created PlotterBase.">m_plotter_map</a> [ id ] = plotter;
<a name="l00403"></a>00403 }
<a name="l00404"></a>00404 
<a name="l00405"></a>00405 <span class="keywordtype">void</span>
<a name="l00406"></a>00406 <a class="code" href="classhippodraw_1_1XmlController.html#a2d711c9886d79c7bb8c279635037bae0" title="Fills the NTuple map with NTuple objects currently in memory.">XmlController::</a>
<a name="l00407"></a><a class="code" href="classhippodraw_1_1XmlController.html#a2d711c9886d79c7bb8c279635037bae0">00407</a> <a class="code" href="classhippodraw_1_1XmlController.html#a2d711c9886d79c7bb8c279635037bae0" title="Fills the NTuple map with NTuple objects currently in memory.">fillNTupleMap</a> ()
<a name="l00408"></a>00408 {
<a name="l00409"></a>00409   <a class="code" href="classhippodraw_1_1XmlController.html#a4ea984bbe14a7e56d1c410fc9d115e9b" title="A mapping from XML id to created data sources.">m_tuple_map</a>.clear();
<a name="l00410"></a>00410   <a class="code" href="classhippodraw_1_1DataSourceController.html" title="A singleton class that is the interface between GUI and the DataSource objects.">DataSourceController</a> * controller = <a class="code" href="classhippodraw_1_1DataSourceController.html#a4d152e42bfc604fb12ca5656a68017a9" title="Returns the pointer to the singleton instance.">DataSourceController::instance</a> ();
<a name="l00411"></a>00411   vector &lt; DataSource * &gt; tuples;
<a name="l00412"></a>00412   controller-&gt;<a class="code" href="classhippodraw_1_1DataSourceController.html#a3fe8b75e838aa54efb5e63433c19e1c5" title="Clears and fills the vector with the registered DataSource objects.">getDataSources</a> ( tuples ); <span class="comment">// get all</span>
<a name="l00413"></a>00413 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span>
<a name="l00414"></a>00414 <span class="preprocessor"></span>  std::
<a name="l00415"></a>00415 <span class="preprocessor">#endif</span>
<a name="l00416"></a>00416 <span class="preprocessor"></span>  vector &lt; DataSource * &gt; ::const_iterator first = tuples.begin();
<a name="l00417"></a>00417   <span class="keywordflow">for</span> ( ; first != tuples.end(); ++first ) {
<a name="l00418"></a>00418     <span class="keyword">const</span> <span class="keywordtype">void</span> * addr = reinterpret_cast &lt; <span class="keyword">const</span> <span class="keywordtype">void</span> * &gt; ( *first );
<a name="l00419"></a>00419     <span class="keywordtype">int</span> ref = <a class="code" href="classhippodraw_1_1XmlController.html#a39536b7fd5431bbf0d211542ff5c5de9" title="Returns the unique integer identifier for given address.">getId</a> ( addr );
<a name="l00420"></a>00420     <a class="code" href="classhippodraw_1_1XmlController.html#a4ea984bbe14a7e56d1c410fc9d115e9b" title="A mapping from XML id to created data sources.">m_tuple_map</a>[ref] = *first;
<a name="l00421"></a>00421   }
<a name="l00422"></a>00422 }
<a name="l00423"></a>00423 
<a name="l00424"></a>00424 <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1XmlController.html#af53de5865e68b74d4f000801fcbe728e" title="Fills the TupleCut map with TupleCut objecs contained in one in the list of views...">XmlController::</a>
<a name="l00425"></a><a class="code" href="classhippodraw_1_1XmlController.html#af53de5865e68b74d4f000801fcbe728e">00425</a> <a class="code" href="classhippodraw_1_1XmlController.html#af53de5865e68b74d4f000801fcbe728e" title="Fills the TupleCut map with TupleCut objecs contained in one in the list of views...">fillTupleCutMap</a> ( <span class="keyword">const</span> std::vector &lt; const ViewBase * &gt; &amp; views )
<a name="l00426"></a>00426 {
<a name="l00427"></a>00427   <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a>.clear();
<a name="l00428"></a>00428   vector &lt; const TupleCut * &gt; cut_list;
<a name="l00429"></a>00429   <a class="code" href="classhippodraw_1_1CutController.html" title="A singleton class that handles the application logic for cuts.">CutController</a> * controller = <a class="code" href="classhippodraw_1_1CutController.html#afdc46bf7a3ad3516a4f800bb2cce6e01" title="Returns the pointer to the singleton instance.">CutController::instance</a> ();
<a name="l00430"></a>00430 
<a name="l00431"></a>00431   controller-&gt;<a class="code" href="classhippodraw_1_1CutController.html#ae88cb3f53426f8906b5193baf333df37" title="Fills the cut_map with the TupleCut objects contained the list of views, if any.">fillTupleCutList</a> ( views, cut_list );
<a name="l00432"></a>00432 
<a name="l00433"></a>00433   vector &lt; const TupleCut * &gt; :: iterator first = cut_list.begin ();
<a name="l00434"></a>00434   <span class="keywordflow">while</span> ( first != cut_list.end () ) {
<a name="l00435"></a>00435     <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TupleCut.html" title="The class expresses a cut on a DataSource, i.e.">TupleCut</a> * cut = *first++;
<a name="l00436"></a>00436     <span class="keywordtype">void</span> * addr = reinterpret_cast &lt; <span class="keywordtype">void</span> * &gt; ( &amp;cut );
<a name="l00437"></a>00437     <span class="keywordtype">int</span> <span class="keywordtype">id</span> = <a class="code" href="classhippodraw_1_1XmlController.html#a39536b7fd5431bbf0d211542ff5c5de9" title="Returns the unique integer identifier for given address.">getId</a> ( addr );
<a name="l00438"></a>00438     <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a> [ id ] = cut;
<a name="l00439"></a>00439   }
<a name="l00440"></a>00440 }
<a name="l00441"></a>00441 
<a name="l00442"></a><a class="code" href="classhippodraw_1_1XmlController.html#aa3374cb946f9f4716571cb99b3012cd1">00442</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1XmlController.html#aa3374cb946f9f4716571cb99b3012cd1" title="Creates all the DataRep objects and fills the reference map.">XmlController::getDataReps</a> ()
<a name="l00443"></a>00443 {
<a name="l00444"></a>00444   <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * root = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#a5b24d0de6521725b1e71107305d6f684" title="Returns the root document element.">documentElement</a> ();
<a name="l00445"></a>00445   list &lt; XmlElement * &gt; nodelist;
<a name="l00446"></a>00446   <a class="code" href="classhippodraw_1_1XmlController.html#a516cf012dec5f27bb1867bb4e5f15ecc" title="The singleton instance of the DataRepXML object.">m_datarep_xml</a>-&gt;<a class="code" href="classhippodraw_1_1BaseXML.html#a5341ca7744d304c2746a8f5564ce237b" title="Fills the nodelist with immediate child nodes of element with nodes that can be handled...">fillNodeList</a> ( root, nodelist );
<a name="l00447"></a>00447 
<a name="l00448"></a>00448 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span>
<a name="l00449"></a>00449 <span class="preprocessor"></span>  std::
<a name="l00450"></a>00450 <span class="preprocessor">#endif</span>
<a name="l00451"></a>00451 <span class="preprocessor"></span>  list &lt; XmlElement * &gt; ::const_iterator first = nodelist.begin();
<a name="l00452"></a>00452 
<a name="l00453"></a>00453   <span class="keywordflow">for</span> ( ; first != nodelist.end(); ++first ) {
<a name="l00454"></a>00454     <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = *first;
<a name="l00455"></a>00455     <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element-&gt;<a class="code" href="classhippodraw_1_1XmlElement.html#a6204675a4fca73c67cd422e7e76c1beb" title="Returns the ID of the element, if it has one.">getID</a> ();
<a name="l00456"></a>00456     <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = <a class="code" href="classhippodraw_1_1XmlController.html#a516cf012dec5f27bb1867bb4e5f15ecc" title="The singleton instance of the DataRepXML object.">m_datarep_xml</a>-&gt;<a class="code" href="classhippodraw_1_1DataRepXML.html#a8bbb59bb233b235d88a09352e16c3ac3" title="Returns a newly created object based on the XmlElement.">createObject</a> ( element );
<a name="l00457"></a>00457     <a class="code" href="classhippodraw_1_1XmlController.html#a39d2531309e68ae19f59bcb98f12a631" title="A mapping from DataRep Id to created DataRep.">m_datarep_map</a>[id] = rep;
<a name="l00458"></a>00458   }
<a name="l00459"></a>00459 
<a name="l00460"></a>00460 }
<a name="l00461"></a>00461 
<a name="l00462"></a><a class="code" href="classhippodraw_1_1XmlController.html#a2152dde126b320bdda40ad6efdef32c1">00462</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1XmlController.html#a2152dde126b320bdda40ad6efdef32c1" title="Creates all the TupleCut objects and fills the reference map.">XmlController::getTupleCuts</a> ()
<a name="l00463"></a>00463 {
<a name="l00464"></a>00464   <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * root = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#a5b24d0de6521725b1e71107305d6f684" title="Returns the root document element.">documentElement</a> ();
<a name="l00465"></a>00465   list &lt; XmlElement * &gt; nodelist;
<a name="l00466"></a>00466   <a class="code" href="classhippodraw_1_1XmlController.html#a74a455fe6f9d79262375f28d147ca7e4" title="The singleton instance of the XML handler for TupleCut objects.">m_tuple_cut_xml</a>-&gt;<a class="code" href="classhippodraw_1_1BaseXML.html#a5341ca7744d304c2746a8f5564ce237b" title="Fills the nodelist with immediate child nodes of element with nodes that can be handled...">fillNodeList</a> ( root, nodelist );
<a name="l00467"></a>00467 
<a name="l00468"></a>00468   <span class="comment">// std:: for MS VC++ 6.0</span>
<a name="l00469"></a>00469   std::list &lt; XmlElement * &gt;::const_iterator first = nodelist.begin();
<a name="l00470"></a>00470 
<a name="l00471"></a>00471   <span class="keywordflow">for</span> ( ; first != nodelist.end(); ++first ) {
<a name="l00472"></a>00472     <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = *first;
<a name="l00473"></a>00473     <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1XmlController.html#a74a455fe6f9d79262375f28d147ca7e4" title="The singleton instance of the XML handler for TupleCut objects.">m_tuple_cut_xml</a> -&gt; hasMultiDimTupleCut ( element ) ) {
<a name="l00474"></a>00474       vector &lt; TupleCut * &gt; cuts;
<a name="l00475"></a>00475       <a class="code" href="classhippodraw_1_1XmlController.html#a74a455fe6f9d79262375f28d147ca7e4" title="The singleton instance of the XML handler for TupleCut objects.">m_tuple_cut_xml</a> -&gt; getObjects ( element, cuts );
<a name="l00476"></a>00476       <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; cuts.size (); i++ ) {
<a name="l00477"></a>00477         <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element -&gt; getID ();
<a name="l00478"></a>00478         <span class="keywordflow">if</span> ( i == 1 ) <span class="keywordtype">id</span> = -id;
<a name="l00479"></a>00479         <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a>[id] = cuts[i];
<a name="l00480"></a>00480       }
<a name="l00481"></a>00481     }
<a name="l00482"></a>00482     <span class="keywordflow">else</span> {
<a name="l00483"></a>00483       <a class="code" href="classhippodraw_1_1TupleCut.html" title="The class expresses a cut on a DataSource, i.e.">TupleCut</a> * cut = <a class="code" href="classhippodraw_1_1XmlController.html#a74a455fe6f9d79262375f28d147ca7e4" title="The singleton instance of the XML handler for TupleCut objects.">m_tuple_cut_xml</a>-&gt;<a class="code" href="classhippodraw_1_1TupleCutXML.html#a65f5e7afa289a0bef9fe415b538598f7" title="Creates an TupleCut object and sets its properties from the XmlElement.">getObject</a> ( *element );
<a name="l00484"></a>00484       <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element-&gt;<a class="code" href="classhippodraw_1_1XmlElement.html#a6204675a4fca73c67cd422e7e76c1beb" title="Returns the ID of the element, if it has one.">getID</a> ();
<a name="l00485"></a>00485       <a class="code" href="classhippodraw_1_1XmlController.html#a675d136b1a4821f981f0bdcfe040750f" title="A mapping from XML id to created TupleCut.">m_tuple_cut_map</a>[id] = cut;
<a name="l00486"></a>00486     }
<a name="l00487"></a>00487   }
<a name="l00488"></a>00488 }
<a name="l00489"></a>00489 
<a name="l00490"></a><a class="code" href="classhippodraw_1_1XmlController.html#a523a93d0b1cb601c01d623ac55c9d1b9">00490</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1XmlController.html#a523a93d0b1cb601c01d623ac55c9d1b9" title="De-serializes the ViewBase objects.">XmlController::getViews</a> ( )
<a name="l00491"></a>00491 {
<a name="l00492"></a>00492   <a class="code" href="classhippodraw_1_1XmlController.html#a9d63f3e5ef0b103ff2fc2b6b639e3f16" title="A list of reconstructed views.">m_views</a>.clear();
<a name="l00493"></a>00493   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a> != 0 ) {
<a name="l00494"></a>00494     <a class="code" href="classhippodraw_1_1XmlController.html#a2152dde126b320bdda40ad6efdef32c1" title="Creates all the TupleCut objects and fills the reference map.">getTupleCuts</a> ();
<a name="l00495"></a>00495     <a class="code" href="classhippodraw_1_1XmlController.html#aa3374cb946f9f4716571cb99b3012cd1" title="Creates all the DataRep objects and fills the reference map.">getDataReps</a> ();
<a name="l00496"></a>00496 
<a name="l00497"></a>00497     <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * root = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">m_xml_doc</a>-&gt;<a class="code" href="classhippodraw_1_1XmlDocument.html#a5b24d0de6521725b1e71107305d6f684" title="Returns the root document element.">documentElement</a> ();
<a name="l00498"></a>00498     list &lt; XmlElement * &gt; nodelist;
<a name="l00499"></a>00499     <a class="code" href="classhippodraw_1_1XmlController.html#a63d86cee6c758d6baaed0f4949f935f5" title="The singleton instance of a ViewBaseXML object.">m_view</a>-&gt;<a class="code" href="classhippodraw_1_1BaseXML.html#a5341ca7744d304c2746a8f5564ce237b" title="Fills the nodelist with immediate child nodes of element with nodes that can be handled...">fillNodeList</a> ( root, nodelist );
<a name="l00500"></a>00500 
<a name="l00501"></a>00501     <span class="keywordflow">if</span> ( nodelist.empty () ) <span class="keywordflow">return</span>;
<a name="l00502"></a>00502 
<a name="l00503"></a>00503     <span class="comment">// std:: for MS VC++ 6.0</span>
<a name="l00504"></a>00504     std::list &lt; XmlElement * &gt;::const_iterator first = nodelist.begin ();
<a name="l00505"></a>00505     <span class="keywordflow">for</span> ( ; first != nodelist.end(); ++ first ) {
<a name="l00506"></a>00506       <a class="code" href="classhippodraw_1_1XmlController.html#a63d86cee6c758d6baaed0f4949f935f5" title="The singleton instance of a ViewBaseXML object.">m_view</a>-&gt;<a class="code" href="classhippodraw_1_1ViewBaseXML.html#a372f77f6a24c5dc1ad480d2ad8a3c67d" title="Creates an object derived from ViewBase.">getObjects</a> ( *first );
<a name="l00507"></a>00507     }
<a name="l00508"></a>00508 
<a name="l00509"></a>00509     <a class="code" href="classhippodraw_1_1XmlController.html#a63d86cee6c758d6baaed0f4949f935f5" title="The singleton instance of a ViewBaseXML object.">m_view</a> -&gt; connectPlotters ( root );
<a name="l00510"></a>00510   }
<a name="l00511"></a>00511 }
<a name="l00512"></a>00512 
<a name="l00513"></a>00513 <span class="keywordtype">int</span>
<a name="l00514"></a>00514 <a class="code" href="classhippodraw_1_1XmlController.html#a39536b7fd5431bbf0d211542ff5c5de9" title="Returns the unique integer identifier for given address.">XmlController::</a>
<a name="l00515"></a><a class="code" href="classhippodraw_1_1XmlController.html#a39536b7fd5431bbf0d211542ff5c5de9">00515</a> <a class="code" href="classhippodraw_1_1XmlController.html#a39536b7fd5431bbf0d211542ff5c5de9" title="Returns the unique integer identifier for given address.">getId</a> ( <span class="keyword">const</span> <span class="keywordtype">void</span> * addr )
<a name="l00516"></a>00516 {
<a name="l00517"></a>00517   <span class="keywordtype">int</span> <span class="keywordtype">id</span> = 0;
<a name="l00518"></a>00518   <a class="code" href="classhippodraw_1_1XmlController.html#a8de8c1479a6801e5a782a323cfd14ddf" title="The iterator for memory address to unique integer identifier.">AddrMapIterator_t</a> it = <a class="code" href="classhippodraw_1_1XmlController.html#aa27ddf7cb4477f62ce82e58657983170" title="The map of memory address to unique integer identifier.">m_addr_map</a>.find ( addr );
<a name="l00519"></a>00519   <span class="keywordflow">if</span> ( it == <a class="code" href="classhippodraw_1_1XmlController.html#aa27ddf7cb4477f62ce82e58657983170" title="The map of memory address to unique integer identifier.">m_addr_map</a>.end () ) { <span class="comment">// not found</span>
<a name="l00520"></a>00520     <span class="keywordtype">id</span> = <a class="code" href="classhippodraw_1_1XmlController.html#aad966617e7e050bedbead762727808a5" title="The next integer identifier to be generated.">m_id</a>;
<a name="l00521"></a>00521     <a class="code" href="classhippodraw_1_1XmlController.html#aa27ddf7cb4477f62ce82e58657983170" title="The map of memory address to unique integer identifier.">m_addr_map</a> [ addr ] = <a class="code" href="classhippodraw_1_1XmlController.html#aad966617e7e050bedbead762727808a5" title="The next integer identifier to be generated.">m_id</a>++;
<a name="l00522"></a>00522   }
<a name="l00523"></a>00523   <span class="keywordflow">else</span> { <span class="comment">// found</span>
<a name="l00524"></a>00524     <span class="keywordtype">id</span> = it -&gt; second;
<a name="l00525"></a>00525   }
<a name="l00526"></a>00526 
<a name="l00527"></a>00527   <span class="keywordflow">return</span> id;
<a name="l00528"></a>00528 }
<a name="l00529"></a>00529 
<a name="l00530"></a>00530 std::list &lt; std::string &gt; &amp;
<a name="l00531"></a>00531 <a class="code" href="classhippodraw_1_1XmlController.html#a54c19724b9b3194e5e9413f3f188bb41" title="Return a list of missing tuples.">XmlController::</a>
<a name="l00532"></a><a class="code" href="classhippodraw_1_1XmlController.html#a54c19724b9b3194e5e9413f3f188bb41">00532</a> <a class="code" href="classhippodraw_1_1XmlController.html#a54c19724b9b3194e5e9413f3f188bb41" title="Return a list of missing tuples.">getMissingTuples</a> ( )
<a name="l00533"></a>00533 {
<a name="l00534"></a>00534   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1XmlController.html#a61d5847a44aec76860318730fe92f701" title="A list of missing NTuples.">m_missing_tuples</a>;
<a name="l00535"></a>00535 }
</pre></div></div>
<hr size="1"><address style="align: right;"><small>
Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
</a> </small></address>
</body>
</html>