Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release > by-pkgid > 76b88bbbfb99252881dc482bb5095243 > files > 86

colorer-take5-docs-0-0.beta5.4mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Colorer-take5 Library: InputSource Class Reference</title>
<link href="../styles/styles.css" rel="stylesheet" type="text/css">
<link href="../styles/doc.css" rel="stylesheet" type="text/css">
<link rel="icon" href="../images/logo-small-api.png"/>
</head>
<body>
<div align='center'>
<a href="../index.html">Home</a> |
<a href="modules.html">Modules</a> |
<a href="hierarchy.html">Class Hierarchy</a> |
<a href="classes.html">Alphabetical List</a> |
<a href="annotated.html">Compound List</a> |
<a href="pages.html">Related Pages</a>
</div>
<!-- Generated by Doxygen 1.4.6 -->
<h1>InputSource Class Reference<br>
<small>
[<a class="el" href="group__common__io.html">IO core interfaces</a>]</small>
</h1><!-- doxytag: class="InputSource" --><p>Inheritance diagram for InputSource:
<p><center><img src="classInputSource.png" usemap="#InputSource_map" border="0" alt=""></center>
<map name="InputSource_map">
<area href="classFileInputSource.html" alt="FileInputSource" shape="rect" coords="0,56,121,80">
<area href="classHTTPInputSource.html" alt="HTTPInputSource" shape="rect" coords="131,56,252,80">
<area href="classJARInputSource.html" alt="JARInputSource" shape="rect" coords="262,56,383,80">
<area href="classSharedInputSource.html" alt="SharedInputSource" shape="rect" coords="393,56,514,80">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract byte input source. 
<p>
Supports derivation of input source, using specified relative of absolute paths. 
<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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c2604dd452c9183207f0bf6a1b4d7e9"></a><!-- doxytag: member="InputSource::getLocation" ref="1c2604dd452c9183207f0bf6a1b4d7e9" args="() const =0" -->
virtual const <a class="el" href="classString.html">String</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#1c2604dd452c9183207f0bf6a1b4d7e9">getLocation</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Current stream location. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const byte *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#dfe8e9c36eadec40a57660a1d292a5f4">openStream</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens stream and returns array of readed bytes.  <a href="#dfe8e9c36eadec40a57660a1d292a5f4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#f94c98dfe147ffacf2e2c201a10245d8">closeStream</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Explicitly closes stream and frees all resources.  <a href="#f94c98dfe147ffacf2e2c201a10245d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#af3e5123cc5c6d0d7b5a20ac44759aba">length</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return length of opened stream.  <a href="#af3e5123cc5c6d0d7b5a20ac44759aba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classInputSource.html">InputSource</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#a04d68da2478a48e836e5d96a4cf5308">createRelative</a> (const <a class="el" href="classString.html">String</a> *relPath)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates inherited <a class="el" href="classInputSource.html">InputSource</a> with the same type relatively to the current.  <a href="#a04d68da2478a48e836e5d96a4cf5308"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classInputSource.html">InputSource</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#37af3f4ab320c6a0d1e1da11074a1e42">newInstance</a> (const <a class="el" href="classString.html">String</a> *path)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tries statically create instance of <a class="el" href="classInputSource.html">InputSource</a> object, according to passed <code>path</code> string.  <a href="#37af3f4ab320c6a0d1e1da11074a1e42"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classInputSource.html">InputSource</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#12f0031a69c4ed86f2c74beb555ed98d">newInstance</a> (const <a class="el" href="classString.html">String</a> *path, <a class="el" href="classInputSource.html">InputSource</a> *base)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Statically creates instance of <a class="el" href="classInputSource.html">InputSource</a> object, possibly based on parent source stream.  <a href="#12f0031a69c4ed86f2c74beb555ed98d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classString.html">String</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#96f51faf1ac113d3c92f0d10c50c3f0b">getAbsolutePath</a> (const <a class="el" href="classString.html">String</a> *basePath, const <a class="el" href="classString.html">String</a> *relPath)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns new <a class="el" href="classString.html">String</a>, created from linking of <code>basePath</code> and <code>relPath</code> parameters.  <a href="#96f51faf1ac113d3c92f0d10c50c3f0b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06fec9a9120268f9909ae7ea2873cf98"></a><!-- doxytag: member="InputSource::isRelative" ref="06fec9a9120268f9909ae7ea2873cf98" args="(const String *path)" -->
static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInputSource.html#06fec9a9120268f9909ae7ea2873cf98">isRelative</a> (const <a class="el" href="classString.html">String</a> *path)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks, if passed path relative or not. <br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="dfe8e9c36eadec40a57660a1d292a5f4"></a><!-- doxytag: member="InputSource::openStream" ref="dfe8e9c36eadec40a57660a1d292a5f4" args="()=0" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual const byte* InputSource::openStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Opens stream and returns array of readed bytes. 
<p>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInputSourceException.html">InputSourceException</a></em>&nbsp;</td><td>If some IO-errors occurs. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="f94c98dfe147ffacf2e2c201a10245d8"></a><!-- doxytag: member="InputSource::closeStream" ref="f94c98dfe147ffacf2e2c201a10245d8" args="()=0" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual void InputSource::closeStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Explicitly closes stream and frees all resources. 
<p>
Stream could be reopened. <dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInputSourceException.html">InputSourceException</a></em>&nbsp;</td><td>If stream is already closed. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="af3e5123cc5c6d0d7b5a20ac44759aba"></a><!-- doxytag: member="InputSource::length" ref="af3e5123cc5c6d0d7b5a20ac44759aba" args="() const =0" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual int InputSource::length           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return length of opened stream. 
<p>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInputSourceException.html">InputSourceException</a></em>&nbsp;</td><td>If stream is closed. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="37af3f4ab320c6a0d1e1da11074a1e42"></a><!-- doxytag: member="InputSource::newInstance" ref="37af3f4ab320c6a0d1e1da11074a1e42" args="(const String *path)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classInputSource.html">InputSource</a> * InputSource::newInstance           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classString.html">String</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>path</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Tries statically create instance of <a class="el" href="classInputSource.html">InputSource</a> object, according to passed <code>path</code> string. 
<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>path</em>&nbsp;</td><td>Could be relative file location, absolute file, http uri, jar uri. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="12f0031a69c4ed86f2c74beb555ed98d"></a><!-- doxytag: member="InputSource::newInstance" ref="12f0031a69c4ed86f2c74beb555ed98d" args="(const String *path, InputSource *base)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classInputSource.html">InputSource</a> * InputSource::newInstance           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classString.html">String</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="classInputSource.html">InputSource</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>base</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Statically creates instance of <a class="el" href="classInputSource.html">InputSource</a> object, possibly based on parent source stream. 
<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>base</em>&nbsp;</td><td>Base stream, used to resolve relative paths. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>path</em>&nbsp;</td><td>Could be relative file location, absolute file, http uri, jar uri. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="96f51faf1ac113d3c92f0d10c50c3f0b"></a><!-- doxytag: member="InputSource::getAbsolutePath" ref="96f51faf1ac113d3c92f0d10c50c3f0b" args="(const String *basePath, const String *relPath)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classString.html">String</a> * InputSource::getAbsolutePath           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classString.html">String</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>basePath</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <a class="el" href="classString.html">String</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>relPath</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns new <a class="el" href="classString.html">String</a>, created from linking of <code>basePath</code> and <code>relPath</code> parameters. 
<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>basePath</em>&nbsp;</td><td>Base path. Can be relative or absolute. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>relPath</em>&nbsp;</td><td>Relative path, used to append to basePath and construct new path. Can be <b>absolute</b> </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a04d68da2478a48e836e5d96a4cf5308"></a><!-- doxytag: member="InputSource::createRelative" ref="a04d68da2478a48e836e5d96a4cf5308" args="(const String *relPath)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual <a class="el" href="classInputSource.html">InputSource</a>* InputSource::createRelative           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classString.html">String</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>relPath</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates inherited <a class="el" href="classInputSource.html">InputSource</a> with the same type relatively to the current. 
<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>relPath</em>&nbsp;</td><td>Relative URI part. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>

<br><br>
<center><small>
Colorer-take5 Library. Copyright &copy; 1999-2006 Igor Russkih.<br>
Generated at Fri Nov 24 17:13:13 2006 by doxygen 1.4.6.
</small><center>
    </BODY>
  </HTML>