Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > 006f25f0acc4b3df764eea70a130a63f > files > 207

gnome-chemistry-utils-devel-0.13.5-4.mga2.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>The Gnome Chemistry Utils: gcp::Operation Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">The Gnome Chemistry Utils&#160;<span id="projectnumber">0.13.5</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacegcp.html">gcp</a>      </li>
      <li class="navelem"><a class="el" href="classgcp_1_1Operation.html">Operation</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">gcp::Operation Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="gcp::Operation" -->
<p><code>#include &lt;<a class="el" href="operation_8h_source.html">gcp/operation.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for gcp::Operation:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classgcp_1_1Operation.png" usemap="#gcp::Operation_map" alt=""/>
  <map id="gcp::Operation_map" name="gcp::Operation_map">
<area href="classgcp_1_1AddOperation.html" alt="gcp::AddOperation" shape="rect" coords="0,56,134,80"/>
<area href="classgcp_1_1DeleteOperation.html" alt="gcp::DeleteOperation" shape="rect" coords="144,56,278,80"/>
<area href="classgcp_1_1ModifyOperation.html" alt="gcp::ModifyOperation" shape="rect" coords="288,56,422,80"/>
</map>
 </div></div>

<p><a href="classgcp_1_1Operation-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Operation.html#ac011147054c6ef84c9f58e5022598faf">Operation</a> (<a class="el" href="classgcp_1_1Document.html">Document</a> *pDoc, unsigned long ID)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Operation.html#a28f5207dfb9c9f0f586f98d687f12600">Undo</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Operation.html#a56848b25e63e60453b3273a12eed901e">Redo</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Operation.html#ae713d95b1c4d6487a02ca6d3176b4f13">AddObject</a> (<a class="el" href="classgcu_1_1Object.html">gcu::Object</a> *pObject, unsigned type=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Operation.html#ab4e256613f7cb52a85cc4fc077b7fdf9">AddNode</a> (xmlNodePtr node, unsigned type=0)</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Operation.html#a0cc4ca5b232a38642980fff597611e83">Add</a> (unsigned type=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Operation.html#a4666a4ff04bf033791b3c7cad89eeedf">Delete</a> (unsigned type=0)</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">xmlNodePtr *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Operation.html#a2e4bb51639a31e1f434566acebe12fad">m_Nodes</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Base operation class for the Undo/Redo framework. This class is virtual since some methods are pure virtual. </p>

<p>Definition at line <a class="el" href="operation_8h_source.html#l00061">61</a> of file <a class="el" href="operation_8h_source.html">operation.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac011147054c6ef84c9f58e5022598faf"></a><!-- doxytag: member="gcp::Operation::Operation" ref="ac011147054c6ef84c9f58e5022598faf" args="(Document *pDoc, unsigned long ID)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gcp::Operation::Operation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgcp_1_1Document.html">Document</a> *&#160;</td>
          <td class="paramname"><em>pDoc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>ID</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pDoc</td><td>a document. </td></tr>
    <tr><td class="paramname">ID</td><td>a unique operation ID for the document and the session.</td></tr>
  </table>
  </dd>
</dl>
<p>Creates a new operation. Operations should always created by calls to <a class="el" href="classgcp_1_1Document.html#a9929825e838d4b3e16a033e9393b4fa6">Document::GetNewOperation()</a>. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0cc4ca5b232a38642980fff597611e83"></a><!-- doxytag: member="gcp::Operation::Add" ref="a0cc4ca5b232a38642980fff597611e83" args="(unsigned type=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcp::Operation::Add </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>type</em> = <code>0</code></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>a number indicationg the role of the stored objects.</td></tr>
  </table>
  </dd>
</dl>
<p>The <em>type</em> argument is only significant for the <a class="el" href="classgcp_1_1ModifyOperation.html">gcp::ModifyOperation</a> class where 0 represent the state of the objects before the operation, and 1 the state of the objects after the operation.</p>
<p>Adds the stored objects to the document owning the operation. </p>

</div>
</div>
<a class="anchor" id="ab4e256613f7cb52a85cc4fc077b7fdf9"></a><!-- doxytag: member="gcp::Operation::AddNode" ref="ab4e256613f7cb52a85cc4fc077b7fdf9" args="(xmlNodePtr node, unsigned type=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void gcp::Operation::AddNode </td>
          <td>(</td>
          <td class="paramtype">xmlNodePtr&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>type</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">node</td><td>an xml node related to the changes. </td></tr>
    <tr><td class="paramname">type</td><td>a number indicationg the role of the stored objects.</td></tr>
  </table>
  </dd>
</dl>
<p>The <em>type</em> argument is only significant for the <a class="el" href="classgcp_1_1ModifyOperation.html">gcp::ModifyOperation</a> class where 0 represent the state of the objects before the operation, and 1 the state of the objects after the operation.</p>
<p>Adds the node to the document owning the operation. This might be used when Objects are not available such as when editing text. </p>

</div>
</div>
<a class="anchor" id="ae713d95b1c4d6487a02ca6d3176b4f13"></a><!-- doxytag: member="gcp::Operation::AddObject" ref="ae713d95b1c4d6487a02ca6d3176b4f13" args="(gcu::Object *pObject, unsigned type=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void gcp::Operation::AddObject </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgcu_1_1Object.html">gcu::Object</a> *&#160;</td>
          <td class="paramname"><em>pObject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>type</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pObject</td><td>an Object affected by the changes. </td></tr>
    <tr><td class="paramname">type</td><td>a number indicationg the role of the stored objects.</td></tr>
  </table>
  </dd>
</dl>
<p>The <em>type</em> argument is only significant for the <a class="el" href="classgcp_1_1ModifyOperation.html">gcp::ModifyOperation</a> class where 0 represent the state of the objects before the operation, and 1 the state of the objects after the operation.</p>
<p>Adds an object to the operation. Typically, modifying an object whould need code like: </p>
<div class="fragment"><pre class="fragment">        Object *obj;
        <span class="comment">// Initialize the object pointer so that it points to a valid object</span>
                ...
        Document *doc = obj-&gt;GetDocument ();
        <a class="code" href="classgcp_1_1Operation.html#ac011147054c6ef84c9f58e5022598faf">Operation</a> *op = doc-&gt;GetNewOperation (<a class="code" href="namespacegcp.html#aa8e6482c44ad2980e2054f056212c34faa40c4e6a93decefec7ed4bdb3f39299d">GCP_MODIFY_OPERATION</a>);
        op-&gt;AddObject (obj, 0);
        <span class="comment">// Modify the object</span>
                ...
        op-&gt;AddObject (obj, 1);
        doc-&gt;FinishOperation ();
</pre></div> 
</div>
</div>
<a class="anchor" id="a4666a4ff04bf033791b3c7cad89eeedf"></a><!-- doxytag: member="gcp::Operation::Delete" ref="a4666a4ff04bf033791b3c7cad89eeedf" args="(unsigned type=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcp::Operation::Delete </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>type</em> = <code>0</code></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>a number indicationg the role of the stored objects.</td></tr>
  </table>
  </dd>
</dl>
<p>The <em>type</em> argument is only significant for the <a class="el" href="classgcp_1_1ModifyOperation.html">gcp::ModifyOperation</a> class where 0 represent the state of the objects before the operation, and 1 the state of the objects after the operation.</p>
<p>Deletes the stored objects to the document owning the operation. </p>

</div>
</div>
<a class="anchor" id="a56848b25e63e60453b3273a12eed901e"></a><!-- doxytag: member="gcp::Operation::Redo" ref="a56848b25e63e60453b3273a12eed901e" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void gcp::Operation::Redo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Redo the changes represented by this operation. </p>

<p>Implemented in <a class="el" href="classgcp_1_1AddOperation.html#aaf12ab044554080715aecc3e5bc3082c">gcp::AddOperation</a>, <a class="el" href="classgcp_1_1DeleteOperation.html#a73f44294304cdc254798ff628ba2a8ea">gcp::DeleteOperation</a>, and <a class="el" href="classgcp_1_1ModifyOperation.html#ac59a5f760a739b5f189fb13b69e45184">gcp::ModifyOperation</a>.</p>

</div>
</div>
<a class="anchor" id="a28f5207dfb9c9f0f586f98d687f12600"></a><!-- doxytag: member="gcp::Operation::Undo" ref="a28f5207dfb9c9f0f586f98d687f12600" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void gcp::Operation::Undo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Undo the changes represented by this operation. </p>

<p>Implemented in <a class="el" href="classgcp_1_1AddOperation.html#ad61d355fff6d754064e55c74fe907d06">gcp::AddOperation</a>, <a class="el" href="classgcp_1_1DeleteOperation.html#a50475f9addf33577065aabfe008c4abb">gcp::DeleteOperation</a>, and <a class="el" href="classgcp_1_1ModifyOperation.html#a1ea02ee5adf214f88d33c2c1ae8e2187">gcp::ModifyOperation</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a2e4bb51639a31e1f434566acebe12fad"></a><!-- doxytag: member="gcp::Operation::m_Nodes" ref="a2e4bb51639a31e1f434566acebe12fad" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">xmlNodePtr* <a class="el" href="classgcp_1_1Operation.html#a2e4bb51639a31e1f434566acebe12fad">gcp::Operation::m_Nodes</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The xml nodes storing the changes. </p>

<p>Definition at line <a class="el" href="operation_8h_source.html#l00145">145</a> of file <a class="el" href="operation_8h_source.html">operation.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="operation_8h_source.html">operation.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Nov 11 2011 18:01:07 for The Gnome Chemistry Utils by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>