aboutsummaryrefslogtreecommitdiff
path: root/libcontextprovider/doc/html/class_context_provider_1_1_group.html
diff options
context:
space:
mode:
Diffstat (limited to 'libcontextprovider/doc/html/class_context_provider_1_1_group.html')
-rw-r--r--libcontextprovider/doc/html/class_context_provider_1_1_group.html279
1 files changed, 279 insertions, 0 deletions
diff --git a/libcontextprovider/doc/html/class_context_provider_1_1_group.html b/libcontextprovider/doc/html/class_context_provider_1_1_group.html
new file mode 100644
index 00000000..ca7c4317
--- /dev/null
+++ b/libcontextprovider/doc/html/class_context_provider_1_1_group.html
@@ -0,0 +1,279 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>libcontextprovider: ContextProvider::Group 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.5.8 -->
+<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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+ <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
+ <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+ <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+ </ul>
+ </div>
+ <div class="navpath"><a class="el" href="namespace_context_provider.html">ContextProvider</a>::<a class="el" href="class_context_provider_1_1_group.html">Group</a>
+ </div>
+</div>
+<div class="contents">
+<h1>ContextProvider::Group Class Reference</h1><!-- doxytag: class="ContextProvider::Group" -->Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> objects together.
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="group_8h-source.html">ContextProvider</a>&gt;</code>
+<p>
+
+<p>
+<a href="class_context_provider_1_1_group-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Signals</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#b0c2fe89e51597d807597ef5b17b8d84">firstSubscriberAppeared</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Emitted when the group of Context objects is subscribed to. <a href="#b0c2fe89e51597d807597ef5b17b8d84"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#494ce3334c4665e89ca651bd34fc7acb">lastSubscriberDisappeared</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Emitted when the group of Context objects is unsubscribed from. <a href="#494ce3334c4665e89ca651bd34fc7acb"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#dfdc508e85a6526c7e5201934b5ca9c5">Group</a> (QObject *parent=0)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contructs an empty <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> object with the given parent. <a href="#dfdc508e85a6526c7e5201934b5ca9c5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#66b1bd39a6d13e7623ea1213574a25f8">~Group</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#66b1bd39a6d13e7623ea1213574a25f8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#a4996d5fbeb27344439a2485f0de87e4">add</a> (const <a class="el" href="class_context_provider_1_1_property.html">Property</a> &amp;prop)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> object to the <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a>. <a href="#a4996d5fbeb27344439a2485f0de87e4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#f6ebd9e89ea1f543d33867fad44ba15e">isSubscribedTo</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true iff any <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> objects in the group are subscribed to. <a href="#f6ebd9e89ea1f543d33867fad44ba15e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">QSet&lt; const <a class="el" href="class_context_provider_1_1_property.html">Property</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#63bd74cceebb98ef6372b1040b971479">getProperties</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the set of properties currently belonging to the <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a>. <a href="#63bd74cceebb98ef6372b1040b971479"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_context_provider_1_1_group.html">Group</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#076cdbd5346aecee1b944451e5d6a5b8">operator&lt;&lt;</a> (const <a class="el" href="class_context_provider_1_1_property.html">Property</a> &amp;prop)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_context_provider_1_1_group.html">Group</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_group.html#28743608278b85f0dc0170d2c5774e3e">operator&lt;&lt;</a> (const <a class="el" href="class_context_provider_1_1_property.html">Property</a> *prop)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> objects together.
+<p>
+<a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> is useful in cases when multiple properties are provided by the same source, such as a hardware sensor. When any of these properties is subscribed to, the source needs to be turned on, and when none of these properties are subscribed to, the source needs to be turned off.<p>
+For example, <div class="fragment"><pre class="fragment"> Property location(<span class="stringliteral">"Location"</span>);
+ Property altitude(<span class="stringliteral">"Altitude"</span>);
+
+ <a class="code" href="class_context_provider_1_1_group.html#dfdc508e85a6526c7e5201934b5ca9c5" title="Contructs an empty Group object with the given parent.">Group</a> gps;
+ gps &lt;&lt; location &lt;&lt; altitude;
+
+ connect(gps, SIGNAL(<a class="code" href="class_context_provider_1_1_group.html#b0c2fe89e51597d807597ef5b17b8d84" title="Emitted when the group of Context objects is subscribed to.">firstSubscriberAppeared</a>()), <span class="keyword">this</span>, SLOT(turnGpsOn()));
+ connect(gps, SIGNAL(<a class="code" href="class_context_provider_1_1_group.html#494ce3334c4665e89ca651bd34fc7acb" title="Emitted when the group of Context objects is unsubscribed from.">lastSubscriberDisappeared</a>()), <span class="keyword">this</span>, SLOT(onGpsOff()));
+</pre></div><p>
+This way, the provider doesn't need to store the subscription statuses of the related keys.<p>
+Initially, none of the <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> objects related to a <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> are subscribed to. When some of them are subscribed to, <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> emits the firstSubscriberAppeared signal. When all of them are again unsubscribed, <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> emits the lastSubscriberDisappeared signal. <hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="dfdc508e85a6526c7e5201934b5ca9c5"></a><!-- doxytag: member="ContextProvider::Group::Group" ref="dfdc508e85a6526c7e5201934b5ca9c5" args="(QObject *parent=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">ContextProvider::Group::Group </td>
+ <td>(</td>
+ <td class="paramtype">QObject *&nbsp;</td>
+ <td class="paramname"> <em>parent</em> = <code>0</code> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [explicit]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Contructs an empty <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> object with the given parent.
+<p>
+
+</div>
+</div><p>
+<a class="anchor" name="66b1bd39a6d13e7623ea1213574a25f8"></a><!-- doxytag: member="ContextProvider::Group::~Group" ref="66b1bd39a6d13e7623ea1213574a25f8" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">ContextProvider::Group::~Group </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Destructor.
+<p>
+
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a4996d5fbeb27344439a2485f0de87e4"></a><!-- doxytag: member="ContextProvider::Group::add" ref="a4996d5fbeb27344439a2485f0de87e4" args="(const Property &amp;prop)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void ContextProvider::Group::add </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="class_context_provider_1_1_property.html">Property</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>property</em> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Adds a <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> object to the <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a>.
+<p>
+The <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> object needs to exist as long as the <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> object is in use.
+</div>
+</div><p>
+<a class="anchor" name="b0c2fe89e51597d807597ef5b17b8d84"></a><!-- doxytag: member="ContextProvider::Group::firstSubscriberAppeared" ref="b0c2fe89e51597d807597ef5b17b8d84" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void ContextProvider::Group::firstSubscriberAppeared </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [signal]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Emitted when the group of Context objects is subscribed to.
+<p>
+I.e., when none of them were subscribed to and now some of them were subscribed to.
+</div>
+</div><p>
+<a class="anchor" name="63bd74cceebb98ef6372b1040b971479"></a><!-- doxytag: member="ContextProvider::Group::getProperties" ref="63bd74cceebb98ef6372b1040b971479" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QSet&lt; const <a class="el" href="class_context_provider_1_1_property.html">Property</a> * &gt; ContextProvider::Group::getProperties </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Returns the set of properties currently belonging to the <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a>.
+<p>
+
+</div>
+</div><p>
+<a class="anchor" name="f6ebd9e89ea1f543d33867fad44ba15e"></a><!-- doxytag: member="ContextProvider::Group::isSubscribedTo" ref="f6ebd9e89ea1f543d33867fad44ba15e" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool ContextProvider::Group::isSubscribedTo </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Returns true iff any <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> objects in the group are subscribed to.
+<p>
+
+</div>
+</div><p>
+<a class="anchor" name="494ce3334c4665e89ca651bd34fc7acb"></a><!-- doxytag: member="ContextProvider::Group::lastSubscriberDisappeared" ref="494ce3334c4665e89ca651bd34fc7acb" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void ContextProvider::Group::lastSubscriberDisappeared </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [signal]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Emitted when the group of Context objects is unsubscribed from.
+<p>
+I.e., when some of them were subscribed to and now all of them were unsubscribed from.
+</div>
+</div><p>
+<a class="anchor" name="28743608278b85f0dc0170d2c5774e3e"></a><!-- doxytag: member="ContextProvider::Group::operator&lt;&lt;" ref="28743608278b85f0dc0170d2c5774e3e" args="(const Property *prop)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="class_context_provider_1_1_group.html">Group</a>&amp; ContextProvider::Group::operator&lt;&lt; </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="class_context_provider_1_1_property.html">Property</a> *&nbsp;</td>
+ <td class="paramname"> <em>prop</em> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+</div>
+</div><p>
+<a class="anchor" name="076cdbd5346aecee1b944451e5d6a5b8"></a><!-- doxytag: member="ContextProvider::Group::operator&lt;&lt;" ref="076cdbd5346aecee1b944451e5d6a5b8" args="(const Property &amp;prop)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="class_context_provider_1_1_group.html">Group</a>&amp; ContextProvider::Group::operator&lt;&lt; </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="class_context_provider_1_1_property.html">Property</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>prop</em> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="group_8h-source.html">group.h</a><li><a class="el" href="group_8cpp.html">group.cpp</a></ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Fri Oct 23 08:58:39 2009 for libcontextprovider by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
+</body>
+</html>