couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r667882 - in /incubator/couchdb/branches/runtimeconfig: doc/ src/couchdb/ src/couchdb/test/
Date Sat, 14 Jun 2008 21:01:58 GMT
Author: jan
Date: Sat Jun 14 14:01:57 2008
New Revision: 667882

URL: http://svn.apache.org/viewvc?rev=667882&view=rev
Log:
Start documenting with edoc format. add preliminary edoc generation Makefile.

Added:
    incubator/couchdb/branches/runtimeconfig/doc/
    incubator/couchdb/branches/runtimeconfig/doc/Makefile
    incubator/couchdb/branches/runtimeconfig/doc/couch_config.html
    incubator/couchdb/branches/runtimeconfig/doc/edoc-info
    incubator/couchdb/branches/runtimeconfig/doc/erlang.png   (with props)
    incubator/couchdb/branches/runtimeconfig/doc/index.html
    incubator/couchdb/branches/runtimeconfig/doc/modules-frame.html
    incubator/couchdb/branches/runtimeconfig/doc/overview-summary.html
    incubator/couchdb/branches/runtimeconfig/doc/packages-frame.html
    incubator/couchdb/branches/runtimeconfig/doc/stylesheet.css
Modified:
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl
    incubator/couchdb/branches/runtimeconfig/src/couchdb/test/couch_config_test.erl

Added: incubator/couchdb/branches/runtimeconfig/doc/Makefile
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/Makefile?rev=667882&view=auto
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/doc/Makefile (added)
+++ incubator/couchdb/branches/runtimeconfig/doc/Makefile Sat Jun 14 14:01:57 2008
@@ -0,0 +1,4 @@
+SOURCEFILES=\""../src/couchdb/couch_config.erl\""
+all:
+	@echo "making docdir"
+	erl -noshell -run edoc_run files [$(SOURCEFILES)]

Added: incubator/couchdb/branches/runtimeconfig/doc/couch_config.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/couch_config.html?rev=667882&view=auto
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/doc/couch_config.html (added)
+++ incubator/couchdb/branches/runtimeconfig/doc/couch_config.html Sat Jun 14 14:01:57 2008
@@ -0,0 +1,189 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Module couch_config</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0"
cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html"
target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img
src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<hr>
+
+<h1>Module couch_config</h1>
+<ul class="index"><li><a href="#description">Description</a></li><li><a
href="#index">Function Index</a></li><li><a href="#functions">Function
Details</a></li></ul>Reads CouchDB's ini file and gets queried for configuration
parameters.
+
+<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
+<p><b>Authors:</b> Jan Lehnardt (<a href="mailto:jan@apache.org"><tt>jan@apache.org</tt></a>).</p>
+
+<h2><a name="description">Description</a></h2>Reads CouchDB's ini
file and gets queried for configuration parameters.
+       This module is initialized with a list of ini files that it
+       consecutively reads Key/Value pairs from and saves them in a ets table.
+       If more an one ini file is specified, the last one is used to write
+       changes that are made with store/2 back to that ini file.
+<h2><a name="index">Function Index</a></h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td
valign="top"><a href="#code_change-3">code_change/3</a></td><td></td></tr>
+<tr><td valign="top"><a href="#dump-0">dump/0</a></td><td></td></tr>
+<tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td></td></tr>
+<tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr>
+<tr><td valign="top"><a href="#init_value-2">init_value/2</a></td><td>Public
API function triggers initialization of a Key/Value pair.</td></tr>
+<tr><td valign="top"><a href="#load_ini_file-1">load_ini_file/1</a></td><td></td></tr>
+<tr><td valign="top"><a href="#load_ini_files-1">load_ini_files/1</a></td><td></td></tr>
+<tr><td valign="top"><a href="#lookup-1">lookup/1</a></td><td>Returns
the value that is stored under key::any() or null::atom() if no
+       such Key exists.</td></tr>
+<tr><td valign="top"><a href="#lookup-2">lookup/2</a></td><td>Returns
the value that is stored under key::any() or Default::any() if
+       no such Key exists.</td></tr>
+<tr><td valign="top"><a href="#lookup_and_register-2">lookup_and_register/2</a></td><td>Returns
the value that is stored under key::any() or null::atom() if no
+       such Key exists.</td></tr>
+<tr><td valign="top"><a href="#lookup_and_register-3">lookup_and_register/3</a></td><td>Returns
the value that is stored under key::any() or Default::any() if
+       such Key exists.</td></tr>
+<tr><td valign="top"><a href="#lookup_match-1">lookup_match/1</a></td><td>Lets
you look for a Key's Value specifying a pattern that gets passed
+       to ets::match().</td></tr>
+<tr><td valign="top"><a href="#lookup_match-2">lookup_match/2</a></td><td>Lets
you look for a Key's Value specifying a pattern that gets passed
+       to ets::match().</td></tr>
+<tr><td valign="top"><a href="#lookup_match_and_register-2">lookup_match_and_register/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#lookup_match_and_register-3">lookup_match_and_register/3</a></td><td></td></tr>
+<tr><td valign="top"><a href="#register-2">register/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#start_link-0">start_link/0</a></td><td>Start
the configuration module.</td></tr>
+<tr><td valign="top"><a href="#stop-0">stop/0</a></td><td>Stops
the configuration module.</td></tr>
+<tr><td valign="top"><a href="#store-2">store/2</a></td><td>Public
API function that triggers storage of a Key/Value pair into the
+       local ets table and writes it to the storage ini file.</td></tr>
+<tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#unset-1">unset/1</a></td><td></td></tr>
+</table>
+
+<h2><a name="functions">Function Details</a></h2>
+
+<h3 class="function"><a name="code_change-3">code_change/3</a></h3>
+<div class="spec">
+<p><tt>code_change() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="dump-0">dump/0</a></h3>
+<div class="spec">
+<p><tt>dump() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
+<div class="spec">
+<p><tt>handle_call() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
+<div class="spec">
+<p><tt>handle_cast() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
+<div class="spec">
+<p><tt>handle_info() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="init-1">init/1</a></h3>
+<div class="spec">
+<p><tt>init() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="init_value-2">init_value/2</a></h3>
+<div class="spec">
+<p><tt>init_value(Key::any(), Value::any()) -&gt; {ok, Tab}</tt></p>
+</div><p>Public API function triggers initialization of a Key/Value pair. Used
+       when setting values from the ini file. Works like store/2 but doesn't
+       write the Key/Value pair to the storage ini file.</p>
+
+<h3 class="function"><a name="load_ini_file-1">load_ini_file/1</a></h3>
+<div class="spec">
+<p><tt>load_ini_file() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="load_ini_files-1">load_ini_files/1</a></h3>
+<div class="spec">
+<p><tt>load_ini_files() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="lookup-1">lookup/1</a></h3>
+<div class="spec">
+<p><tt>lookup(Key::any()) -&gt; Value::any() | null</tt></p>
+</div><p>Returns the value that is stored under key::any() or null::atom() if
no
+       such Key exists.</p>
+
+<h3 class="function"><a name="lookup-2">lookup/2</a></h3>
+<div class="spec">
+<p><tt>lookup(Key::any(), Default::any()) -&gt; Value::any() | Default</tt></p>
+</div><p>Returns the value that is stored under key::any() or Default::any()
if
+       no such Key exists.</p>
+
+<h3 class="function"><a name="lookup_and_register-2">lookup_and_register/2</a></h3>
+<div class="spec">
+<p><tt>lookup_and_register(Key::any(), CallbackFunction::function()) -&gt;
Value::any() | null</tt></p>
+</div><p>Returns the value that is stored under key::any() or null::atom() if
no
+       such Key exists. Additionally, this functions registers
+       CallbackFunction::function() to be called if the value of Key::any()
+       is changed at a later point.</p>
+
+<h3 class="function"><a name="lookup_and_register-3">lookup_and_register/3</a></h3>
+<div class="spec">
+<p><tt>lookup_and_register(Key::any(), Default::any(), CallbackFunction::function())
-&gt; Value::any() | Default</tt></p>
+</div><p>Returns the value that is stored under key::any() or Default::any()
if
+       such Key exists. Additionally, this functions registers
+       CallbackFunction::function() to be called if the value of Key::any()
+       is changed at a later point.</p>
+
+<h3 class="function"><a name="lookup_match-1">lookup_match/1</a></h3>
+<div class="spec">
+<p><tt>lookup_match(Key::any()) -&gt; Value::any() | <a href="null.html#type-atom">null:atom()</a></tt></p>
+</div><p>Lets you look for a Key's Value specifying a pattern that gets passed
+       to ets::match(). Returns null::atom() if no Key is found.</p>
+
+<h3 class="function"><a name="lookup_match-2">lookup_match/2</a></h3>
+<div class="spec">
+<p><tt>lookup_match(Key::any(), Default::any()) -&gt; Value::any() | Default</tt></p>
+</div><p>Lets you look for a Key's Value specifying a pattern that gets passed
+       to ets::match(). Returns Default::any() if no Key is found</p>
+
+<h3 class="function"><a name="lookup_match_and_register-2">lookup_match_and_register/2</a></h3>
+<div class="spec">
+<p><tt>lookup_match_and_register() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="lookup_match_and_register-3">lookup_match_and_register/3</a></h3>
+<div class="spec">
+<p><tt>lookup_match_and_register() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="register-2">register/2</a></h3>
+<div class="spec">
+<p><tt>register() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="start_link-0">start_link/0</a></h3>
+<div class="spec">
+<p><tt>start_link() -&gt; {ok, Tab}</tt></p>
+</div><p>Start the configuration module</p>
+
+<h3 class="function"><a name="stop-0">stop/0</a></h3>
+<div class="spec">
+<p><tt>stop() -&gt; ok</tt></p>
+</div><p>Stops the configuration module</p>
+
+<h3 class="function"><a name="store-2">store/2</a></h3>
+<div class="spec">
+<p><tt>store(Key::any(), Value::any()) -&gt; {ok, Tab}</tt></p>
+</div><p>Public API function that triggers storage of a Key/Value pair into the
+       local ets table and writes it to the storage ini file.</p>
+
+<h3 class="function"><a name="terminate-2">terminate/2</a></h3>
+<div class="spec">
+<p><tt>terminate() -&gt; term()</tt></p>
+</div>
+
+<h3 class="function"><a name="unset-1">unset/1</a></h3>
+<div class="spec">
+<p><tt>unset() -&gt; term()</tt></p>
+</div>
+<hr>
+
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%"
border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a
href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a
href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang
logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Jun 14 2008, 22:56:08.</i></p>
+</body>
+</html>

Added: incubator/couchdb/branches/runtimeconfig/doc/edoc-info
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/edoc-info?rev=667882&view=auto
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/doc/edoc-info (added)
+++ incubator/couchdb/branches/runtimeconfig/doc/edoc-info Sat Jun 14 14:01:57 2008
@@ -0,0 +1,2 @@
+{packages,[]}.
+{modules,[couch_config]}.

Added: incubator/couchdb/branches/runtimeconfig/doc/erlang.png
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/erlang.png?rev=667882&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/couchdb/branches/runtimeconfig/doc/erlang.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/couchdb/branches/runtimeconfig/doc/index.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/index.html?rev=667882&view=auto
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/doc/index.html (added)
+++ incubator/couchdb/branches/runtimeconfig/doc/index.html Sat Jun 14 14:01:57 2008
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Overview</title>
+</head>
+<frameset cols="20%,80%">
+<frame src="modules-frame.html" name="modulesFrame" title="">
+
+<frame src="overview-summary.html" name="overviewFrame" title="">
+<noframes>
+<h2>This page uses frames</h2>
+<p>Your browser does not accept frames.
+<br>You should go to the <a href="overview-summary.html">non-frame version</a>
instead.
+</p>
+</noframes>
+</frameset>
+</html>
\ No newline at end of file

Added: incubator/couchdb/branches/runtimeconfig/doc/modules-frame.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/modules-frame.html?rev=667882&view=auto
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/doc/modules-frame.html (added)
+++ incubator/couchdb/branches/runtimeconfig/doc/modules-frame.html Sat Jun 14 14:01:57 2008
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Overview</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<h2 class="indextitle">Modules</h2>
+<table width="100%" border="0" summary="list of modules">
+<tr><td><a href="couch_config.html" target="overviewFrame" class="module">couch_config</a></td></tr></table>
+</body>
+</html>
\ No newline at end of file

Added: incubator/couchdb/branches/runtimeconfig/doc/overview-summary.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/overview-summary.html?rev=667882&view=auto
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/doc/overview-summary.html (added)
+++ incubator/couchdb/branches/runtimeconfig/doc/overview-summary.html Sat Jun 14 14:01:57
2008
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Overview</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0"
cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html"
target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img
src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<h1>Overview</h1>
+
+<hr>
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%"
border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a
href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a
href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang
logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Jun 14 2008, 22:56:08.</i></p>
+</body>
+</html>

Added: incubator/couchdb/branches/runtimeconfig/doc/packages-frame.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/packages-frame.html?rev=667882&view=auto
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/doc/packages-frame.html (added)
+++ incubator/couchdb/branches/runtimeconfig/doc/packages-frame.html Sat Jun 14 14:01:57 2008
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Overview</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<h2 class="indextitle">Packages</h2>
+<table width="100%" border="0" summary="list of packages"></table>
+</body>
+</html>
\ No newline at end of file

Added: incubator/couchdb/branches/runtimeconfig/doc/stylesheet.css
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/doc/stylesheet.css?rev=667882&view=auto
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/doc/stylesheet.css (added)
+++ incubator/couchdb/branches/runtimeconfig/doc/stylesheet.css Sat Jun 14 14:01:57 2008
@@ -0,0 +1,55 @@
+/* standard EDoc style sheet */
+body {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+      	margin-left: .25in;
+       	margin-right: .2in;
+       	margin-top: 0.2in;
+       	margin-bottom: 0.2in;
+       	color: #000000;
+       	background-color: #ffffff;
+}
+h1,h2 {
+ 	margin-left: -0.2in;
+}
+div.navbar {
+	background-color: #add8e6;
+	padding: 0.2em;
+}
+h2.indextitle {
+	padding: 0.4em;
+	background-color: #add8e6;
+}
+h3.function,h3.typedecl {
+	background-color: #add8e6;
+ 	padding-left: 1em;
+}
+div.spec {
+ 	margin-left: 2em;
+	background-color: #eeeeee;
+}
+a.module,a.package {
+	text-decoration:none
+}
+a.module:hover,a.package:hover {
+	background-color: #eeeeee;
+}
+ul.definitions {
+	list-style-type: none;
+}
+ul.index {
+	list-style-type: none;
+	background-color: #eeeeee;
+}
+
+/*
+ * Minor style tweaks
+ */
+ul {
+	list-style-type: square;
+}
+table {
+	border-collapse: collapse;
+}
+td {
+	padding: 3
+}

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl?rev=667882&r1=667881&r2=667882&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl Sat Jun 14 14:01:57
2008
@@ -10,11 +10,16 @@
 % License for the specific language governing permissions and limitations under
 % the License.
 
+%% @doc Reads CouchDB's ini file and gets queried for configuration parameters.
+%%      This module is initialized with a list of ini files that it 
+%%      consecutively reads Key/Value pairs from and saves them in a ets table. 
+%%      If more an one ini file is specified, the last one is used to write 
+%%      changes that are made with store/2 back to that ini file.
+%% @author Jan Lehnardt <jan@apache.org>
+
 -module(couch_config).
 -include("couch_db.hrl").
 
--define(DEFAULT_INI, "couch.ini").
-
 -behaviour(gen_server).
 -export([start_link/0, init/1, stop/0,
     handle_call/3, handle_cast/2, handle_info/2, 
@@ -27,25 +32,64 @@
     dump/0, init_value/2, unset/1, load_ini_file/1, 
     load_ini_files/1]).
 
+%% @spec start_link() -> {ok, Tab}
+%% @doc Start the configuration module
 start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).    
 
+%% @spec stop() -> ok
+%% @doc Stops the configuration module
 stop() ->
     ok.
 
+%% @spec init_value(Key::any(), Value::any()) -> {ok, Tab}
+%% @doc Public API function triggers initialization of a Key/Value pair. Used 
+%%      when setting values from the ini file. Works like store/2 but doesn't
+%%      write the Key/Value pair to the storage ini file.
 init_value(Key, Value) -> gen_server:call(?MODULE, {init_value, Key, Value}).
+
+%% @spec store(Key::any(), Value::any()) -> {ok, Tab}
+%% @doc Public API function that triggers storage of a Key/Value pair into the
+%%      local ets table and writes it to the storage ini file.
 store(Key, Value) -> gen_server:call(?MODULE, {store, [{Key, Value}]}).
 
+%% @spec lookup(Key::any()) -> Value::any() | null
+%% @doc Returns the value that is stored under key::any() or null::atom() if no
+%%      such Key exists.
 lookup(Key) -> gen_server:call(?MODULE, {lookup, Key}).
+
+%% @spec lookup(Key::any(), Default::any()) -> Value::any() | Default
+%% @doc Returns the value that is stored under key::any() or Default::any() if
+%%      no such Key exists.
 lookup(Key, Default) -> gen_server:call(?MODULE, {lookup, Key, Default}).
 
+%% @spec lookup_and_register(Key::any(), CallbackFunction::function()) ->
+%%         Value::any() | null
+%% @doc Returns the value that is stored under Key::any() or null::atom() if no
+%%      such Key exists. Additionally, this functions registers 
+%%      CallbackFunction::function() to be called if the value of Key::any()
+%%      is changed at a later point.
 lookup_and_register(Key, CallbackFunction) -> 
     gen_server:call(?MODULE, {lookup_and_register, Key, CallbackFunction}).
 
+%% @spec lookup_and_register(
+%%         Key::any(),
+%%         Default::any(),
+%%         CallbackFunction::function()) -> Value::any() | Default
+%% @doc Returns the value that is stored under Key::any() or Default::any() if
+%%      such Key exists. Additionally, this functions registers 
+%%      CallbackFunction::function() to be called if the value of Key::any()
+%%      is changed at a later point.
 lookup_and_register(Key, Default, CallbackFunction) ->
     gen_server:call(?MODULE, {lookup_and_register, Key, Default, CallbackFunction}).
 
+%% @spec lookup_match(Key::any()) -> Value::any() | null:atom()
+%% @doc Lets you look for a Key's Value specifying a pattern that gets passed 
+%%      to ets::match(). Returns null::atom() if no Key is found.
 lookup_match(Key) -> gen_server:call(?MODULE, {lookup_match, Key}).
 
+%% @spec lookup_match(Key::any(), Default::any()) -> Value::any() | Default
+%% @doc Lets you look for a Key's Value specifying a pattern that gets passed 
+%%      to ets::match(). Returns Default::any() if no Key is found
 lookup_match(Key, Default) -> gen_server:call(?MODULE, {lookup_match, Key, Default}).
 
 lookup_match_and_register(Key, CallbackFunction) ->

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/test/couch_config_test.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/test/couch_config_test.erl?rev=667882&r1=667881&r2=667882&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/test/couch_config_test.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/test/couch_config_test.erl Sat Jun
14 14:01:57 2008
@@ -17,19 +17,19 @@
 % test storing different types and see if they come back
 % the same way there put in.
 store_tuples() ->
-    basic_store(key, value).
+    store(key, value).
   
 store_strings() ->
-    basic_store("key", "value").
+    store("key", "value").
 
 store_numbers() ->
-    basic_store("number_key", 12345).
+    store("number_key", 12345).
 
 store_tuple_key() ->
-    basic_store({key, subkey}, value).
+    store({key, subkey}, value).
 
     
-basic_store(Key, Value) ->
+store(Key, Value) ->
     couch_config:start_link(),
 
     couch_config:init_value(Key, Value),



Mime
View raw message