Click here to Skip to main content
15,896,329 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.7M   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::PublishingService 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_publishing_service.html">PublishingService</a></div>
<h1>RCF::PublishingService Class Reference</h1><!-- doxytag: class="RCF::PublishingService" --><!-- doxytag: inherits="RCF::I_Service" --><code>#include &lt;<a class="el" href="_publishing_service_8hpp-source.html">PublishingService.hpp</a>&gt;</code>
<p>
<p>Inheritance diagram for RCF::PublishingService:
<p><center><img src="class_r_c_f_1_1_publishing_service.png" usemap="#RCF::PublishingService_map" border="0" alt=""></center>
<map name="RCF::PublishingService_map">
<area href="class_r_c_f_1_1_i___service.html" alt="RCF::I_Service" shape="rect" coords="0,0,145,24">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Service for implementing the publish 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&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_publishing_service.html#03592605de6353b383ee928582fbbdf6">beginPublish</a> (const std::string &amp;publisherName=&quot;&quot;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates and stores a publisher object, i.e.  <a href="#03592605de6353b383ee928582fbbdf6"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Interface&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Interface::RcfClient &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_publishing_service.html#0d511a7e255ee8ff24ca1b52166e9d3d">publish</a> (const std::string &amp;publisherName=&quot;&quot;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Obtains a reference to the requested publisher object.  <a href="#0d511a7e255ee8ff24ca1b52166e9d3d"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Interface&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_publishing_service.html#31cfef834e59e59c9cde3f156048b84a">endPublish</a> (const std::string &amp;publisherName=&quot;&quot;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shuts down the given publisher object.  <a href="#31cfef834e59e59c9cde3f156048b84a"></a><br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="03592605de6353b383ee928582fbbdf6"></a><!-- doxytag: member="RCF::PublishingService::beginPublish" ref="03592605de6353b383ee928582fbbdf6" args="(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&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top">bool RCF::PublishingService::beginPublish           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>publisherName</em> = <code>&quot;&quot;</code>          </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>
Creates and stores a publisher object, i.e. 
<p>
a RcfClient&lt;Interface&gt; object with an underlying multicasting transport. <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 to publish. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>publisherName</em>&nbsp;</td><td>Name through which this publisher will be accessed. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>True if ok, false otherwise. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="31cfef834e59e59c9cde3f156048b84a"></a><!-- doxytag: member="RCF::PublishingService::endPublish" ref="31cfef834e59e59c9cde3f156048b84a" args="(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&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top">bool RCF::PublishingService::endPublish           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>publisherName</em> = <code>&quot;&quot;</code>          </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>
Shuts down the given publisher object. 
<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 publisher object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>publisherName</em>&nbsp;</td><td>Name of the publisher object. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>True if ok, false otherwise. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="0d511a7e255ee8ff24ca1b52166e9d3d"></a><!-- doxytag: member="RCF::PublishingService::publish" ref="0d511a7e255ee8ff24ca1b52166e9d3d" args="(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&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top">Interface::RcfClient &amp; RCF::PublishingService::publish           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>publisherName</em> = <code>&quot;&quot;</code>          </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>
Obtains a reference to the requested publisher object. 
<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 publisher object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>publisherName</em>&nbsp;</td><td>Name of the publisher object. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Reference to the publisher object. </dd></dl>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_publishing_service_8hpp-source.html">PublishingService.hpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 19 19:02:38 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