coriolis/katabatic/doc/html/classKatabatic_1_1Observabl...

233 lines
12 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Katabatic Documentation</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="SoC.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<h1 id="pagetop" class="header">Katabatic - Routing Toolbox</h1>
<!--
<center class="header">
<table class="header">
<tr>
<td><a href="customSummary.html">Summary</a></td>
<td><a href="namespaces.html">Namespaces</a></td>
<td><a href="customHierarchy.html">Class Hierarchy</a></td>
<td><a href="annotated.html">Classes</a></td>
<td><a href="functions.html">Member Index</a></td>
</tr>
</table>
</center>
-->
<br>
<body onload="javascript:toggleLevel(1)">
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</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>
</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="namespaceKatabatic.html">Katabatic</a></li><li class="navelem"><a class="el" href="classKatabatic_1_1Observable.html">Observable</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="classKatabatic_1_1Observable-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">Observable Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classKatabatic_1_1Observer.html" title="Observer Design Pattern, Observer part. ">Observer</a> Design Pattern, Subject part.
<a href="classKatabatic_1_1Observable.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6438e92e07db169a97ed3eba36788dc4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKatabatic_1_1Observable.html#a6438e92e07db169a97ed3eba36788dc4">Observable</a> ()</td></tr>
<tr class="separator:a6438e92e07db169a97ed3eba36788dc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc0b7276e09628f2b101ecf751aacd2a"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:acc0b7276e09628f2b101ecf751aacd2a"><td class="memTemplItemLeft" align="right" valign="top">T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classKatabatic_1_1Observable.html#acc0b7276e09628f2b101ecf751aacd2a">getObserver</a> ()</td></tr>
<tr class="separator:acc0b7276e09628f2b101ecf751aacd2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a783fda85eeabe9c660881f236f162767"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKatabatic_1_1Observable.html#a783fda85eeabe9c660881f236f162767">addObserver</a> (<a class="el" href="classKatabatic_1_1BaseObserver.html">BaseObserver</a> *)</td></tr>
<tr class="separator:a783fda85eeabe9c660881f236f162767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaa5a7fc7fa631e3006a42006d753f43"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKatabatic_1_1Observable.html#acaa5a7fc7fa631e3006a42006d753f43">removeObserver</a> (<a class="el" href="classKatabatic_1_1BaseObserver.html">BaseObserver</a> *)</td></tr>
<tr class="separator:acaa5a7fc7fa631e3006a42006d753f43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52e577fb0c4f2e3650928334fb621c2f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKatabatic_1_1Observable.html#a52e577fb0c4f2e3650928334fb621c2f">notify</a> (unsigned int flags)</td></tr>
<tr class="separator:a52e577fb0c4f2e3650928334fb621c2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classKatabatic_1_1Observer.html" title="Observer Design Pattern, Observer part. ">Observer</a> Design Pattern, Subject part. </p>
<p><a class="el" href="classKatabatic_1_1Observable.html" title="Observer Design Pattern, Subject part. ">Observable</a> is the implementation of the <em>subject</em> part of the <a class="el" href="classKatabatic_1_1Observer.html" title="Observer Design Pattern, Observer part. ">Observer</a> design pattern. For the time beeing it's a simplificated version that allows only one <a class="el" href="classKatabatic_1_1Observer.html" title="Observer Design Pattern, Observer part. ">Observer</a> to watch the subject.</p>
<p><a class="el" href="classKatabatic_1_1Observable.html" title="Observer Design Pattern, Subject part. ">Observable</a> is designed to be an attribute of the subject, not one of it's base class.</p>
<p>This implantation is completly generic and has nothing specific to <a class="el" href="namespaceKatabatic.html" title="The namespace dedicated to Katabatic. ">Katabatic</a>. It may be moved sometimes in <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/namespaceHurricane.html">Hurricane</a> at Property level in <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/classHurricane_1_1DBo.html">Hurricane::DBo</a>.</p>
<p><b>Note to Myself:</b> <a class="el" href="classKatabatic_1_1Observer.html" title="Observer Design Pattern, Observer part. ">Observer</a> pattern is the one behind signal/slots. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6438e92e07db169a97ed3eba36788dc4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classKatabatic_1_1Observable.html">Observable</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default and only constructor. The copy constructor is disabled (made private and unimplemented). </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="acc0b7276e09628f2b101ecf751aacd2a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">T * getObserver </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><b>Returns:</b> The (only) observer, <code>NULL</code> if there is none. It is the object of which the <a class="el" href="classKatabatic_1_1Observer.html" title="Observer Design Pattern, Observer part. ">Observer</a> is an attribute, that is, it's <em>owner</em>, and not the <a class="el" href="classKatabatic_1_1Observer.html" title="Observer Design Pattern, Observer part. ">Observer</a> itself which is returned. </p>
</div>
</div>
<a class="anchor" id="a783fda85eeabe9c660881f236f162767"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void addObserver </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classKatabatic_1_1BaseObserver.html">BaseObserver</a> *&#160;</td>
<td class="paramname"><em>observer</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds an observer. If more than one is added, throw an error. </p>
</div>
</div>
<a class="anchor" id="acaa5a7fc7fa631e3006a42006d753f43"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void removeObserver </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classKatabatic_1_1BaseObserver.html">BaseObserver</a> *&#160;</td>
<td class="paramname"><em>observer</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Removes an observer. If the observer do not belong to this observable, throw an exception. </p>
</div>
</div>
<a class="anchor" id="a52e577fb0c4f2e3650928334fb621c2f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void notify </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>flags</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Used by the subject to signal a change in it's state to the observers. The <code>flags</code> parameter can be used to indicates what kind of change is occuring. Values for <code>flags</code> are defined between the subject and the observers. </p>
<p>References <a class="el" href="classKatabatic_1_1BaseObserver.html#a52e577fb0c4f2e3650928334fb621c2f">BaseObserver::notify()</a>.</p>
<p>Referenced by <a class="el" href="classKatabatic_1_1AutoSegment.html#a6a98d2e5839b880893703ad45db4e4c4">AutoSegment::_invalidate()</a>, <a class="el" href="classKatabatic_1_1AutoSegment.html#a3715b38135ca24745f610bebd3407c10">AutoSegment::_postCreate()</a>, <a class="el" href="classKatabatic_1_1AutoSegment.html#a7c13d9795eafd477994961f8a0d962d0">AutoSegment::_preDestroy()</a>, and <a class="el" href="classKatabatic_1_1AutoSegment.html#a88ac40c065bce0ff97792d18b41b6a67">AutoSegment::revalidate()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Observer_8h_source.html">Observer.h</a></li>
<li>Observer.dox</li>
</ul>
</div><!-- contents -->
<br>
<hr>
<table class="footer1">
<tr>
<td class="LFooter"><small>Generated by doxygen 1.8.5 on Mon Oct 1 2018</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr>
</table>
<table class="footer2">
<tr>
<td class="LFooter">Katabatic - Routing Toolbox</td>
<td class="RFooter"><small>Copyright &#169; 2008-2016 UPMC. All rights reserved</small></td>
</tr>
</table>
</body>
</html>