You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by bu...@apache.org on 2014/05/03 01:05:04 UTC

svn commit: r907850 - in /websites/staging/thrift/trunk/content: ./ lib/ocaml.html sitemap.html

Author: buildbot
Date: Fri May  2 23:05:04 2014
New Revision: 907850

Log:
Staging update by buildbot for thrift

Added:
    websites/staging/thrift/trunk/content/lib/ocaml.html
Modified:
    websites/staging/thrift/trunk/content/   (props changed)
    websites/staging/thrift/trunk/content/sitemap.html

Propchange: websites/staging/thrift/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri May  2 23:05:04 2014
@@ -1 +1 @@
-1592098
+1592099

Added: websites/staging/thrift/trunk/content/lib/ocaml.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/ocaml.html (added)
+++ websites/staging/thrift/trunk/content/lib/ocaml.html Fri May  2 23:05:04 2014
@@ -0,0 +1,182 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+    <meta content="en-us" http-equiv="Content-Language" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+    <link href="/static/images/favicon.ico" rel="shortcut icon" />
+    <link href="/static/css/style.css" rel="stylesheet" type="text/css" />
+    <link href="/static/css/codehilite.css" rel="stylesheet" type="text/css" />
+    <link href="/static/css/bootstrap.css" media="screen, projection" rel="stylesheet" type="text/css" />
+
+    <script src="/static/js/jquery.min.js"></script>
+	  <script src="/static/js/bootstrap-dropdown.js"></script>
+    <script src="/static/js/bootstrap-tab.js"></script>
+	
+    <title>Apache Thrift - </title>
+  </head>
+  <body>
+  	<div class="navbar">
+	<div class="navbar-inner">
+		<div class="container">
+			<a class="brand" href="/">Apache Thrift &trade;</a>
+			<div class="nav-collapse">
+				<ul class="nav pull-right">
+					<li>
+						<a href="/download">Download</a>
+					</li>
+					<li>
+						<a href="/docs">Documentation</a>
+					</li>
+					<li>
+						<a href="/developers">Developers</a>
+					</li>
+					<li>
+						<a href="/lib">Libraries</a>
+					</li>
+					<li>
+						<a href="/tutorial">Tutorials</a>
+					</li>
+					<li>
+						<a href="/test">Test Suite</a>
+					</li>
+					<li>
+						<a href="/about">About</a>
+					</li>
+					<li class="dropdown">
+						<a href="#" class="dropdown-toggle" data-toggle="dropdown">
+							Apache <b class="caret"></b>
+						</a>
+						<ul class="dropdown-menu">
+							<li>
+								<a href="http://www.apache.org/" target="_blank">Apache Home</a>
+							</li>
+							<li>
+								<a href="http://www.apache.org/licenses/" target="_blank">Apache License v2.0</a>
+							</li>
+							<li>
+								<a href="http://www.apache.org/foundation/sponsorship.html" target="_blank">Donate</a>
+							</li>
+							<li>
+								<a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a>
+							</li>
+							<li>
+								<a href="http://www.apache.org/security/" target="_blank">Security</a>
+							</li>
+						</ul>
+					</li>
+				</ul>
+			</div>
+		</div>
+	</div>
+</div>
+
+  	<div class="container">
+          <h1 id="apache-thrift-ocaml-libraries">Apache Thrift OCaml Libraries</h1>
+<h1 id="library">Library</h1>
+<p>The library abstract classes, exceptions, and general use functions
+are mostly jammed in Thrift.ml (an exception being
+TServer).</p>
+<p>Generally, classes are used, however they are often put in their own
+module along with other relevant types and functions. The classes
+often called t, exceptions are called E.</p>
+<p>Implementations live in their own files. There is TBinaryProtocol,
+TSocket, TThreadedServer, TSimpleServer, and TServerSocket.</p>
+<p>A note on making the library: Running make should create native, debug
+code libraries, and a toplevel.</p>
+<h2 id="struct-format">Struct format</h2>
+<p>Structs are turned into classes. The fields are all option types and
+are initially None. Write is a method, but reading is done by a
+separate function (since there is no such thing as a static
+class). The class type is t and is in a module with the name of the
+struct.</p>
+<h2 id="enum-format">enum format</h2>
+<p>Enums are put in their own module along with
+functions to_i and of_i which convert the ocaml types into ints. For
+example:</p>
+<p>enum Numberz
+{
+  ONE = 1,
+  TWO,
+  THREE,
+  FIVE = 5,
+  SIX,
+  EIGHT = 8
+}</p>
+<p>==&gt;</p>
+<p>module Numberz =
+struct
+type t =
+| ONE
+| TWO
+| THREE
+| FIVE
+| SIX
+| EIGHT</p>
+<p>let of_i = ...
+let to_i = ...
+end</p>
+<h2 id="typedef-format">typedef format</h2>
+<p>Typedef turns into the type declaration:
+typedef i64 UserId</p>
+<p>==&gt;</p>
+<p>type userid Int64.t</p>
+<h2 id="exception-format">exception format</h2>
+<p>The same as structs except that the module also has an exception type
+E of t that is raised/caught.</p>
+<p>For example, with an exception Xception,
+raise (Xception.E (new Xception.t))
+and
+try
+  ...
+with Xception.E e -&gt; ...</p>
+<h2 id="list-format">list format</h2>
+<p>Lists are turned into OCaml native lists.</p>
+<h2 id="mapset-formats">Map/Set formats</h2>
+<p>These are both turned into Hashtbl.t's. Set values are bool.</p>
+<h2 id="services">Services</h2>
+<p>The client is a class "client" parametrized on input and output
+protocols. The processor is a class parametrized on a handler. A
+handler is a class inheriting the iface abstract class. Unlike other
+implementations, client does not implement iface since iface functions
+must take option arguments so as to deal with the case where a client
+does not send all the arguments.
+<p class='snippet_footer'>
+  This snippet was generated by Apache Thrift's <strong>source tree docs</strong>:
+  <a href="http://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=lib/ocaml/README.md;hb=HEAD"</a>lib/ocaml/README.md</a>
+</p></p>
+	</div>
+	<div class="container">
+	<hr>
+	<footer class="footer">
+		<div class="row">
+			<div class="span3">
+				<h3>Links</h3>
+				<ul class="unstyled">
+					<li><a href="/download">Download</a></li>
+					<li><a href="/developers">Developers</a></li>
+					<li><a href="/tutorial">Tutorials</a></li>
+			    </ul>
+				<ul class="unstyled">
+					<li><a href="/sitemap">Sitemap</a></li>
+				</ul>
+			</div>
+			<div class="span3">
+				<h3>Get Involved</h3>
+				<ul class="unstyled">
+					<li><a href="/mailing">Mailing Lists</a></li>
+					<li><a href="http://issues.apache.org/jira/browse/THRIFT">Issue Tracking</a></li>
+					<li><a href="/docs/HowToContribute">How To Contribute</a></li>
+				</ul>	
+			</div>
+			<div class="span6">
+				<a href="http://www.apache.org/"><img src="/static/images/favicon.ico" /></a> Copyright 2014 <a href="http://www.apache.org/">Apache Software Foundation</a>. Licensed under the <a href="http://www.apache.org/licenses/">Apache License v2.0</a>. Apache, Apache Thrift, and the Apache feather logo are trademarks of The Apache Software Foundation.
+			</div>
+		</div>
+		
+	</footer>
+</div>
+
+  </body>
+</html>

Modified: websites/staging/thrift/trunk/content/sitemap.html
==============================================================================
--- websites/staging/thrift/trunk/content/sitemap.html (original)
+++ websites/staging/thrift/trunk/content/sitemap.html Fri May  2 23:05:04 2014
@@ -115,6 +115,7 @@
 <li><a href="/lib/java"></a></li>
 <li><a href="/lib/js"></a></li>
 <li><a href="/lib/nodejs"></a></li>
+<li><a href="/lib/ocaml"></a></li>
 <li><a href="/lib/perl"></a></li>
 <li><a href="/lib/php"></a></li>
 <li><a href="/lib/py"></a></li>