Click here to Skip to main content
15,885,366 members
Articles / Programming Languages / C++

RCF - Interprocess Communication for C++

Rate me:
Please Sign up or sign in to vote.
4.94/5 (147 votes)
25 Oct 2011CPOL20 min read 4.6M   8.4K   331  
A server/client IPC framework, using the C++ preprocessor as an IDL compiler.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>RCF: RCF::SubscriptionService Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.5 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li id="current"><a href="annotated.html"><span>Data&nbsp;Structures</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 class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<div class="nav">
<b>RCF</b>::<a class="el" href="class_r_c_f_1_1_subscription_service.html">SubscriptionService</a></div>
<h1>RCF::SubscriptionService Class Reference</h1><!-- doxytag: class="RCF::SubscriptionService" --><!-- doxytag: inherits="RCF::I_Service" --><code>#include &lt;<a class="el" href="_subscription_service_8hpp-source.html">SubscriptionService.hpp</a>&gt;</code>
<p>
<p>Inheritance diagram for RCF::SubscriptionService:
<p><center><img src="class_r_c_f_1_1_subscription_service.png" usemap="#RCF::SubscriptionService_map" border="0" alt=""></center>
<map name="RCF::SubscriptionService_map">
<area href="class_r_c_f_1_1_i___service.html" alt="RCF::I_Service" shape="rect" coords="0,0,157,24">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Service for implementing the subscribe part of publish/subscribe functionality. 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Interface, typename Object&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_subscription_service.html#c4a57a40855dceeac36371e0edbd8f55">beginSubscribe</a> (Object &amp;object, const <a class="el" href="class_r_c_f_1_1_i___endpoint.html">I_Endpoint</a> &amp;publisherEndpoint, const std::string &amp;publisherName=&quot;&quot;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Begins a subscription to a remote publisher.  <a href="#c4a57a40855dceeac36371e0edbd8f55"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Interface, typename Object&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_subscription_service.html#febb04043295d0f9e469cae767c5aa3a">beginSubscribe</a> (Object &amp;object, ClientTransportAutoPtr clientTransportAutoPtr, const std::string &amp;publisherName=&quot;&quot;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Begins a subscription to a remote publisher.  <a href="#febb04043295d0f9e469cae767c5aa3a"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Interface, typename Object&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_subscription_service.html#395b7b656b0f48841b537f0cd9dd421d">endSubscribe</a> (Object &amp;object)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ends a subscription.  <a href="#395b7b656b0f48841b537f0cd9dd421d"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Interface, typename Object&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SubscriptionStatus&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_subscription_service.html#8a242f7e5ca78bf240ddc20e30df5735">getSubscriptionStatus</a> (Object &amp;object)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the status of the requested subscription.  <a href="#8a242f7e5ca78bf240ddc20e30df5735"></a><br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="febb04043295d0f9e469cae767c5aa3a"></a><!-- doxytag: member="RCF::SubscriptionService::beginSubscribe" ref="febb04043295d0f9e469cae767c5aa3a" args="(Object &amp;object, ClientTransportAutoPtr clientTransportAutoPtr, const std::string &amp;publisherName=&quot;&quot;)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="mdPrefix" colspan="4">
template&lt;typename Interface, typename Object&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top">bool RCF::SubscriptionService::beginSubscribe           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">Object &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>object</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>ClientTransportAutoPtr&nbsp;</td>
          <td class="mdname" nowrap> <em>clientTransportAutoPtr</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>publisherName</em> = <code>&quot;&quot;</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Begins a subscription to a remote publisher. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Interface</em>&nbsp;</td><td>RCF interface of the subscription. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Object</em>&nbsp;</td><td>Type of the subscriber object, must be compatible with Interface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>Subscriber object, that will receive published messages. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>clientTransportAutoPtr</em>&nbsp;</td><td>Client transport to be used to access the desired publishing service. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>publisherName</em>&nbsp;</td><td>Name of the publishing object to subscribe to. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="c4a57a40855dceeac36371e0edbd8f55"></a><!-- doxytag: member="RCF::SubscriptionService::beginSubscribe" ref="c4a57a40855dceeac36371e0edbd8f55" args="(Object &amp;object, const I_Endpoint &amp;publisherEndpoint, const std::string &amp;publisherName=&quot;&quot;)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="mdPrefix" colspan="4">
template&lt;typename Interface, typename Object&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top">bool RCF::SubscriptionService::beginSubscribe           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">Object &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>object</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <a class="el" href="class_r_c_f_1_1_i___endpoint.html">I_Endpoint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>publisherEndpoint</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>publisherName</em> = <code>&quot;&quot;</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Begins a subscription to a remote publisher. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Interface</em>&nbsp;</td><td>RCF interface of the subscription. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Object</em>&nbsp;</td><td>Type of the subscriber object, must be compatible with Interface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>Subscriber object, that will receive published messages. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>publisherEndpoint</em>&nbsp;</td><td>Endpoint describing the server where the desired publishing service is located. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>publisherName</em>&nbsp;</td><td>Name of the publishing object to subscribe to. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="395b7b656b0f48841b537f0cd9dd421d"></a><!-- doxytag: member="RCF::SubscriptionService::endSubscribe" ref="395b7b656b0f48841b537f0cd9dd421d" args="(Object &amp;object)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="mdPrefix" colspan="4">
template&lt;typename Interface, typename Object&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top">bool RCF::SubscriptionService::endSubscribe           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">Object &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>object</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Ends a subscription. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Interface</em>&nbsp;</td><td>RCF interface of the subscription. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Object</em>&nbsp;</td><td>Type of the subscription object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>Reference to the subscription object, for which to end the subscription. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="8a242f7e5ca78bf240ddc20e30df5735"></a><!-- doxytag: member="RCF::SubscriptionService::getSubscriptionStatus" ref="8a242f7e5ca78bf240ddc20e30df5735" args="(Object &amp;object)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="mdPrefix" colspan="4">
template&lt;typename Interface, typename Object&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top">SubscriptionStatus RCF::SubscriptionService::getSubscriptionStatus           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">Object &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>object</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the status of the requested subscription. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Interface</em>&nbsp;</td><td>RCF interface of the subscription. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Object</em>&nbsp;</td><td>Type of the subscription object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>Reference to the subscription object, for which to obtain the status. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>SubscriptionStatus structure. </dd></dl>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_subscription_service_8hpp-source.html">SubscriptionService.hpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 19 19:02:39 2006 for RCF by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Australia Australia
Software developer, from Sweden and now living in Canberra, Australia, working on distributed C++ applications. When he is not programming, Jarl enjoys skiing and playing table tennis. He derives immense satisfaction from referring to himself in third person.

Comments and Discussions