Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 6fd5939a63d29067c5ab016a476cd3df > files > 46

ocaml-extlib-1.5.1-3mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="OptParse.StdOpt.html">
<link rel="next" href="OptParse.OptParser.html">
<link rel="Up" href="OptParse.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Base64" rel="Chapter" href="Base64.html">
<link title="BitSet" rel="Chapter" href="BitSet.html">
<link title="Dllist" rel="Chapter" href="Dllist.html">
<link title="DynArray" rel="Chapter" href="DynArray.html">
<link title="Enum" rel="Chapter" href="Enum.html">
<link title="ExtArray" rel="Chapter" href="ExtArray.html">
<link title="ExtHashtbl" rel="Chapter" href="ExtHashtbl.html">
<link title="ExtList" rel="Chapter" href="ExtList.html">
<link title="ExtString" rel="Chapter" href="ExtString.html">
<link title="Global" rel="Chapter" href="Global.html">
<link title="IO" rel="Chapter" href="IO.html">
<link title="OptParse" rel="Chapter" href="OptParse.html">
<link title="Option" rel="Chapter" href="Option.html">
<link title="PMap" rel="Chapter" href="PMap.html">
<link title="RefList" rel="Chapter" href="RefList.html">
<link title="Std" rel="Chapter" href="Std.html">
<link title="UChar" rel="Chapter" href="UChar.html">
<link title="UTF8" rel="Chapter" href="UTF8.html">
<link title="Unzip" rel="Chapter" href="Unzip.html"><link title="Standard formatters" rel="Section" href="#6_Standardformatters">
<link title="Low-level formatting" rel="Section" href="#6_Lowlevelformatting">
<title>OptParse.Formatter</title>
</head>
<body>
<div class="navbar"><a href="OptParse.StdOpt.html">Previous</a>
&nbsp;<a href="OptParse.html">Up</a>
&nbsp;<a href="OptParse.OptParser.html">Next</a>
</div>
<center><h1>Module <a href="type_OptParse.Formatter.html">OptParse.Formatter</a></h1></center>
<br>
<pre><span class="keyword">module</span> Formatter: <code class="code">sig</code> <a href="OptParse.Formatter.html">..</a> <code class="code">end</code></pre>This module contains the types and functions for implementing
  custom usage message formatters.<br>
<hr width="100%">
<br><code><span class="keyword">type</span> <a name="TYPEt"></a><code class="type"></code>t = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>indent&nbsp;: <code class="type">unit -> unit</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Increase the indentation level.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>dedent&nbsp;: <code class="type">unit -> unit</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Decrease the indentation level.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>format_usage&nbsp;: <code class="type">string -> string</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Format usage string into style of this formatter.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>format_heading&nbsp;: <code class="type">string -> string</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Format heading into style of this formatter.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>format_description&nbsp;: <code class="type">string -> string</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Format description into style of this formatter.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>format_option&nbsp;: <code class="type">char list * string list -> string list -> string option -> string</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Format option into style of this formatter (see explanation below).</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}


<br>
This is the type of a formatter. The <code class="code">format_option</code> has
      signature <code class="code">format_option (snames,lnames) metavars help</code>, where
      <code class="code">snames</code> is a list of the short option names, <code class="code">lnames</code> is a
      list of the long option names, <code class="code">metavars</code> is a list of the
      metavars the option takes as arguments, and <code class="code">help</code> is the help
      string supplied by the user.<br>
<br>
<a name="6_Standardformatters"></a>
<h6>Standard formatters</h6><br>
<pre><span class="keyword">val</span> <a name="VALindented_formatter"></a>indented_formatter : <code class="type">?level:int Pervasives.ref -><br>       ?indent:int Pervasives.ref -><br>       ?indent_increment:int -><br>       ?max_help_position:int -><br>       ?width:int -> ?short_first:bool -> unit -> <a href="OptParse.Formatter.html#TYPEt">t</a></code></pre><div class="info">
Create an "indented" formatter with the given options.<br>
</div>
<div class="param_info"><code class="code">level</code> : Reference to the current indentation level. Its
      value reflects changes in indentation level.</div>
<div class="param_info"><code class="code">indent</code> : Reference to the current indentation amount. Its
      value reflects changes in indentation level.</div>
<div class="param_info"><code class="code">indent_increment</code> : Number of columns to indent by when
      more indentation is required.</div>
<div class="param_info"><code class="code">max_help_position</code> : Maximum starting column for the help
      messages relating to each option.</div>
<div class="param_info"><code class="code">width</code> : Total with of the usage messages printed.</div>
<div class="param_info"><code class="code">short_first</code> : List all the short option names first?</div>
<pre><span class="keyword">val</span> <a name="VALtitled_formatter"></a>titled_formatter : <code class="type">?level:int Pervasives.ref -><br>       ?indent:int Pervasives.ref -><br>       ?indent_increment:int -><br>       ?max_help_position:int -><br>       ?width:int -> ?short_first:bool -> unit -> <a href="OptParse.Formatter.html#TYPEt">t</a></code></pre><div class="info">
Creates a titled formatter which is quite similar to the
      indented formatter. See
      <a href="OptParse.Formatter.html#VALindented_formatter"><code class="code">OptParse.Formatter.indented_formatter</code></a> for a description of
      the options.<br>
</div>
<br>
<a name="6_Lowlevelformatting"></a>
<h6>Low-level formatting</h6><br>
<pre><span class="keyword">val</span> <a name="VALwrap"></a>wrap : <code class="type">?initial_indent:int -> ?subsequent_indent:int -> string -> int -> string list</code></pre><div class="info">
<code class="code">wrap text width</code> reflows the given text paragraph into lines
      of width at most <code class="code">width</code> (lines may exceed this if the are
      single words that exceed this limit).<br>
<b>Returns</b> a list of lines making up the reformatted paragraph.<br>
</div>
<div class="param_info"><code class="code">initial_indent</code> : Indentation of the first line.</div>
<div class="param_info"><code class="code">subsequent_indent</code> : Indentation of the following lines.</div>
<pre><span class="keyword">val</span> <a name="VALfill"></a>fill : <code class="type">?initial_indent:int -> ?subsequent_indent:int -> string -> int -> string</code></pre><div class="info">
See <a href="OptParse.Formatter.html#VALwrap"><code class="code">OptParse.Formatter.wrap</code></a>.<br>
<b>Returns</b> a string containing the reformatted paragraph.<br>
</div>
</body></html>