Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > d9faa203c2b0b6fbb179d93daaea81b7 > files > 1365

libdtn-devel-2.6.0-1mdv2009.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>DTN Reference Implementation: dtn::Scheme 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.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</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="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="namespacedtn.html">dtn</a>::<a class="el" href="classdtn_1_1Scheme.html">Scheme</a>
  </div>
</div>
<div class="contents">
<h1>dtn::Scheme Class Reference</h1><!-- doxytag: class="dtn::Scheme" --><code>#include &lt;<a class="el" href="Scheme_8h-source.html">Scheme.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for dtn::Scheme:</div>
<div class="dynsection">

<p><center><img src="classdtn_1_1Scheme.png" usemap="#dtn::Scheme_map" border="0" alt=""></center>
<map name="dtn::Scheme_map">
<area href="classdtn_1_1DTNScheme.html" alt="dtn::DTNScheme" shape="rect" coords="0,56,130,80">
<area href="classdtn_1_1SessionScheme.html" alt="dtn::SessionScheme" shape="rect" coords="140,56,270,80">
<area href="classdtn_1_1StringScheme.html" alt="dtn::StringScheme" shape="rect" coords="280,56,410,80">
<area href="classdtn_1_1TCAScheme.html" alt="dtn::TCAScheme" shape="rect" coords="420,56,550,80">
<area href="classdtn_1_1WildcardScheme.html" alt="dtn::WildcardScheme" shape="rect" coords="560,56,690,80">
</map>
</div>

<p>
<a href="classdtn_1_1Scheme-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
The base class for various endpoint id schemes. 
<p>
The class provides two pure virtual methods -- <a class="el" href="classdtn_1_1Scheme.html#fe5c727a96aa6cd6bec8c731df4e868e" title="Validate that the SSP within the given URI is legitimate for this scheme.">validate()</a> and <a class="el" href="classdtn_1_1Scheme.html#93f324d766daa8cd2755602a7214e4b3" title="Match the pattern to the endpoint id in a scheme-specific manner.">match()</a> -- that are overridden by the various scheme implementations. 
<p>Definition at line <a class="el" href="Scheme_8h-source.html#l00037">37</a> of file <a class="el" href="Scheme_8h-source.html">Scheme.h</a>.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <br>
<a class="el" href="classdtn_1_1EndpointID.html#43d537f639ac64ca9b401701dae46f28">EndpointID::singleton_info_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1Scheme.html#e97c48351bee3d0a80705c87d376f935">singleton_info_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy of the EndpointID's type structure for determining if the endpoint is, is not, or may be a singleton.  <a href="#e97c48351bee3d0a80705c87d376f935"></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">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1Scheme.html#166f2c9cb5c6314339cb04bc7b6d4e12">~Scheme</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor -- should be called only at shutdown time.  <a href="#166f2c9cb5c6314339cb04bc7b6d4e12"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1Scheme.html#fe5c727a96aa6cd6bec8c731df4e868e">validate</a> (const <a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> &amp;uri, <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> is_pattern=false)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Validate that the SSP within the given URI is legitimate for this scheme.  <a href="#fe5c727a96aa6cd6bec8c731df4e868e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1Scheme.html#93f324d766daa8cd2755602a7214e4b3">match</a> (const <a class="el" href="classdtn_1_1EndpointIDPattern.html">EndpointIDPattern</a> &amp;pattern, const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> &amp;eid)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Match the pattern to the endpoint id in a scheme-specific manner.  <a href="#93f324d766daa8cd2755602a7214e4b3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1Scheme.html#b8f2bda7ebae467357cfcabaa83291f3">append_service_tag</a> (<a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> *uri, const char *tag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Append the given service tag to the uri in a scheme-specific manner.  <a href="#b8f2bda7ebae467357cfcabaa83291f3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1Scheme.html#99de37a76641edced89cada4a931d8bc">append_service_wildcard</a> (<a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> *uri)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Append wildcard to the uri in a scheme-specific manner.  <a href="#99de37a76641edced89cada4a931d8bc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1Scheme.html#f64a5f6076446bf906a3dd00cae05abb">remove_service_tag</a> (<a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> *uri)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reduce URI to node ID in a scheme specific manner.  <a href="#f64a5f6076446bf906a3dd00cae05abb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classdtn_1_1EndpointID.html#43d537f639ac64ca9b401701dae46f28">singleton_info_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1Scheme.html#c7b3e53d5f176d3ae1a710407d443d9c">is_singleton</a> (const <a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> &amp;uri)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if the given URI is a singleton endpoint id.  <a href="#c7b3e53d5f176d3ae1a710407d443d9c"></a><br></td></tr>
</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="e97c48351bee3d0a80705c87d376f935"></a><!-- doxytag: member="dtn::Scheme::singleton_info_t" ref="e97c48351bee3d0a80705c87d376f935" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classdtn_1_1EndpointID.html#43d537f639ac64ca9b401701dae46f28">EndpointID::singleton_info_t</a> <a class="el" href="classdtn_1_1EndpointID.html#43d537f639ac64ca9b401701dae46f28">dtn::Scheme::singleton_info_t</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Copy of the EndpointID's type structure for determining if the endpoint is, is not, or may be a singleton. 
<p>

<p>Definition at line <a class="el" href="Scheme_8h-source.html#l00104">104</a> of file <a class="el" href="Scheme_8h-source.html">Scheme.h</a>.</p>

</div>
</div><p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="166f2c9cb5c6314339cb04bc7b6d4e12"></a><!-- doxytag: member="dtn::Scheme::~Scheme" ref="166f2c9cb5c6314339cb04bc7b6d4e12" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::Scheme::~Scheme           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor -- should be called only at shutdown time. 
<p>

<p>Definition at line <a class="el" href="Scheme_8cc-source.html#l00029">29</a> of file <a class="el" href="Scheme_8cc-source.html">Scheme.cc</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="fe5c727a96aa6cd6bec8c731df4e868e"></a><!-- doxytag: member="dtn::Scheme::validate" ref="fe5c727a96aa6cd6bec8c731df4e868e" args="(const URI &amp;uri, bool is_pattern=false)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::Scheme::validate           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>uri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td>
          <td class="paramname"> <em>is_pattern</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Validate that the SSP within the given URI is legitimate for this scheme. 
<p>
If the 'is_pattern' paraemeter is true, then the ssp is being validated as an <a class="el" href="classdtn_1_1EndpointIDPattern.html" title="A Distinct class for endpoint patterns (i.e.">EndpointIDPattern</a>.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if valid </dd></dl>

<p>Implemented in <a class="el" href="classdtn_1_1DTNScheme.html#095ee5db359f77a6442c69b4dadeafa8">dtn::DTNScheme</a>, <a class="el" href="classdtn_1_1SessionScheme.html#73877d73e51dfce51ca522f638817547">dtn::SessionScheme</a>, <a class="el" href="classdtn_1_1StringScheme.html#787afa84df43777ce71f93d8278649f8">dtn::StringScheme</a>, <a class="el" href="classdtn_1_1TCAScheme.html#0bc054acac3be9c5ec5ab96a50d94a34">dtn::TCAScheme</a>, and <a class="el" href="classdtn_1_1WildcardScheme.html#be5ae8e53fe50292a37c8587b43c1a78">dtn::WildcardScheme</a>.</p>

<p>Referenced by <a class="el" href="EndpointID_8cc-source.html#l00044">dtn::EndpointID::validate()</a>.</p>

</div>
</div><p>
<a class="anchor" name="93f324d766daa8cd2755602a7214e4b3"></a><!-- doxytag: member="dtn::Scheme::match" ref="93f324d766daa8cd2755602a7214e4b3" args="(const EndpointIDPattern &amp;pattern, const EndpointID &amp;eid)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::Scheme::match           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointIDPattern.html">EndpointIDPattern</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>eid</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Match the pattern to the endpoint id in a scheme-specific manner. 
<p>

<p>Implemented in <a class="el" href="classdtn_1_1DTNScheme.html#d9776a303d6bf98aa687d87b81e7c6ba">dtn::DTNScheme</a>, <a class="el" href="classdtn_1_1SessionScheme.html#eccc3a1f59dcb182e7fd75e42f80d47b">dtn::SessionScheme</a>, <a class="el" href="classdtn_1_1StringScheme.html#fe152c14aa867e29a65a859c3f84641e">dtn::StringScheme</a>, <a class="el" href="classdtn_1_1TCAScheme.html#beaf090ef7539d09c0db2cc00d580279">dtn::TCAScheme</a>, and <a class="el" href="classdtn_1_1WildcardScheme.html#0e57f8ccab3b9a1fa46ddc3ec68d0d21">dtn::WildcardScheme</a>.</p>

<p>Referenced by <a class="el" href="EndpointID_8cc-source.html#l00197">dtn::EndpointIDPattern::match()</a>.</p>

</div>
</div><p>
<a class="anchor" name="b8f2bda7ebae467357cfcabaa83291f3"></a><!-- doxytag: member="dtn::Scheme::append_service_tag" ref="b8f2bda7ebae467357cfcabaa83291f3" args="(URI *uri, const char *tag)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::Scheme::append_service_tag           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> *&nbsp;</td>
          <td class="paramname"> <em>uri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>tag</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Append the given service tag to the uri in a scheme-specific manner. 
<p>
By default, the scheme is not capable of this.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if this scheme is capable of service tags and the tag is a legal one, false otherwise. </dd></dl>

<p>Reimplemented in <a class="el" href="classdtn_1_1DTNScheme.html#9205f67fec17221ee9330f6429b68f07">dtn::DTNScheme</a>, and <a class="el" href="classdtn_1_1TCAScheme.html#b77d42e824c16a24055df4cefec21e13">dtn::TCAScheme</a>.</p>

<p>Definition at line <a class="el" href="Scheme_8h-source.html#l00067">67</a> of file <a class="el" href="Scheme_8h-source.html">Scheme.h</a>.</p>

<p>Referenced by <a class="el" href="EndpointID_8cc-source.html#l00080">dtn::EndpointID::append_service_tag()</a>.</p>

</div>
</div><p>
<a class="anchor" name="99de37a76641edced89cada4a931d8bc"></a><!-- doxytag: member="dtn::Scheme::append_service_wildcard" ref="99de37a76641edced89cada4a931d8bc" args="(URI *uri)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::Scheme::append_service_wildcard           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> *&nbsp;</td>
          <td class="paramname"> <em>uri</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Append wildcard to the uri in a scheme-specific manner. 
<p>
The default scheme is not capable of this.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if this scheme is capable of wildcards and the wildcard is successfully appended, else false. </dd></dl>

<p>Reimplemented in <a class="el" href="classdtn_1_1DTNScheme.html#8d29ee348701edcd354ac3fc173cc1ce">dtn::DTNScheme</a>.</p>

<p>Definition at line <a class="el" href="Scheme_8h-source.html#l00081">81</a> of file <a class="el" href="Scheme_8h-source.html">Scheme.h</a>.</p>

<p>Referenced by <a class="el" href="EndpointID_8cc-source.html#l00105">dtn::EndpointID::append_service_wildcard()</a>.</p>

</div>
</div><p>
<a class="anchor" name="f64a5f6076446bf906a3dd00cae05abb"></a><!-- doxytag: member="dtn::Scheme::remove_service_tag" ref="f64a5f6076446bf906a3dd00cae05abb" args="(URI *uri)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::Scheme::remove_service_tag           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> *&nbsp;</td>
          <td class="paramname"> <em>uri</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Reduce URI to node ID in a scheme specific manner. 
<p>
The default scheme is not capable of this.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if this scheme is capable of this reduction and the reduction is successful, else false. </dd></dl>

<p>Reimplemented in <a class="el" href="classdtn_1_1DTNScheme.html#86827b62ac5f4adf10a8e4990693c374">dtn::DTNScheme</a>.</p>

<p>Definition at line <a class="el" href="Scheme_8h-source.html#l00094">94</a> of file <a class="el" href="Scheme_8h-source.html">Scheme.h</a>.</p>

<p>Referenced by <a class="el" href="EndpointID_8cc-source.html#l00130">dtn::EndpointID::remove_service_tag()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c7b3e53d5f176d3ae1a710407d443d9c"></a><!-- doxytag: member="dtn::Scheme::is_singleton" ref="c7b3e53d5f176d3ae1a710407d443d9c" args="(const URI &amp;uri)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classdtn_1_1EndpointID.html#43d537f639ac64ca9b401701dae46f28">singleton_info_t</a> dtn::Scheme::is_singleton           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedtn.html#0b3883e065c5b300f2581971eee1c009">URI</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>uri</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if the given URI is a singleton endpoint id. 
<p>

<p>Implemented in <a class="el" href="classdtn_1_1DTNScheme.html#cbd04018552014b3c574726f911e7d7a">dtn::DTNScheme</a>, <a class="el" href="classdtn_1_1SessionScheme.html#48c7c84c686a42c06345d1ebfa6e7c37">dtn::SessionScheme</a>, <a class="el" href="classdtn_1_1StringScheme.html#49383a4e03422db7ea9d8d62b88f03ce">dtn::StringScheme</a>, <a class="el" href="classdtn_1_1TCAScheme.html#3b8a8d50b0a4103b7875491ab1bcb3e1">dtn::TCAScheme</a>, and <a class="el" href="classdtn_1_1WildcardScheme.html#a5586c41dcfb9eb4291aa88ce848e7d2">dtn::WildcardScheme</a>.</p>

<p>Referenced by <a class="el" href="EndpointID_8cc-source.html#l00154">dtn::EndpointID::is_singleton()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Scheme_8h-source.html">Scheme.h</a><li><a class="el" href="Scheme_8cc-source.html">Scheme.cc</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:53 2008 for DTN Reference Implementation by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>