234 lines
12 KiB
HTML
234 lines
12 KiB
HTML
<!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.14 -->
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',false,false,'search.php','Search');
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></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> |
|
|
<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"> </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"> </td></tr>
|
|
<tr class="memitem:acc0b7276e09628f2b101ecf751aacd2a"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:acc0b7276e09628f2b101ecf751aacd2a"><td class="memTemplItemLeft" align="right" valign="top">T * </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"> </td></tr>
|
|
<tr class="memitem:a783fda85eeabe9c660881f236f162767"><td class="memItemLeft" align="right" valign="top">void </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"> </td></tr>
|
|
<tr class="memitem:acaa5a7fc7fa631e3006a42006d753f43"><td class="memItemLeft" align="right" valign="top">void </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"> </td></tr>
|
|
<tr class="memitem:a52e577fb0c4f2e3650928334fb621c2f"><td class="memItemLeft" align="right" valign="top">void </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"> </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 Hurricane 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 & Destructor Documentation</h2>
|
|
<a id="a6438e92e07db169a97ed3eba36788dc4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6438e92e07db169a97ed3eba36788dc4">◆ </a></span>Observable()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="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 id="acc0b7276e09628f2b101ecf751aacd2a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#acc0b7276e09628f2b101ecf751aacd2a">◆ </a></span>getObserver()</h2>
|
|
|
|
<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 id="a783fda85eeabe9c660881f236f162767"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a783fda85eeabe9c660881f236f162767">◆ </a></span>addObserver()</h2>
|
|
|
|
<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> * </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 id="acaa5a7fc7fa631e3006a42006d753f43"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#acaa5a7fc7fa631e3006a42006d753f43">◆ </a></span>removeObserver()</h2>
|
|
|
|
<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> * </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 id="a52e577fb0c4f2e3650928334fb621c2f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a52e577fb0c4f2e3650928334fb621c2f">◆ </a></span>notify()</h2>
|
|
|
|
<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 </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 class="reference">References <a class="el" href="classKatabatic_1_1BaseObserver.html#a52e577fb0c4f2e3650928334fb621c2f">BaseObserver::notify()</a>.</p>
|
|
|
|
<p class="reference">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.14 on Thu Oct 18 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 © 2008-2016 UPMC. All rights reserved</small></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|