OSDN Git Service

getting_started.html を作成
authorSubaruG <subaru_g@users.sourceforge.jp>
Wed, 27 Jan 2010 15:50:38 +0000 (00:50 +0900)
committerSubaruG <subaru_g@users.sourceforge.jp>
Wed, 27 Jan 2010 15:50:38 +0000 (00:50 +0900)
html/doc.css [moved from html/index.css with 79% similarity]
html/getting_started.html
html/index.html
html/samples.html [new file with mode: 0644]

similarity index 79%
rename from html/index.css
rename to html/doc.css
index d42e821..6e7b5aa 100644 (file)
@@ -68,6 +68,10 @@ hr
   font-weight: normal;
   color: #666;
 }
+.weak
+{
+  font-size: smaller;
+}
 .weak a:link, del a:link, .insignificant a:visited
 {
   color: #33C;
@@ -105,3 +109,28 @@ p
   line-height: 1.2em;
   text-indent: 1em;
 }
+
+/* プログラム */
+pre.literal_block
+{
+  background-color: #FFF;
+  display: block;
+  margin: 1pc 2em 0pc 2em;
+  padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+  border: 1px solid #DDD;
+}
+/* 彩色 */
+.comment
+{
+  color: #090;
+}
+.quoted
+{
+  color: #900;
+}
+
+/* インデックスメニュー */
+.index ul
+{
+  list-style-type: none
+}
index e69de29..f6bf63b 100644 (file)
@@ -0,0 +1,159 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+    "http://www.w3.org/TR/html4/strict.dtd">
+
+<html lang="ja">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
+
+<title>銀天ライブラリ 導入方法</title>
+
+<link rel="stylesheet" href="doc.css" type="text/css">
+
+</head>
+<body>
+
+<h2>銀天ライブラリ 導入方法</h2>
+<div class=verinfo>Version 1.0.0   <span class=weak>( under construction )</span></div>
+
+<div class=index>
+<h3 id=index>目次</h3>
+<ul>
+<li><a href="#get_boost">0. Boost のインストール</a></li>
+<li><a href="#download">1. ダウンロード</a></li>
+<li><a href="#include_path">2. インクルードパスの設定</a></li>
+<li><a href="#simple_program">3. とりあえず使ってみる</a></li>
+<li><a href="#more_info">4. いろいろと使ってみる</a></li>
+<li><a href="#contact">5. 何か気づいたことがあれば</a></li>
+<li><a href="#footnotes">6. 脚注</a></li>
+</ul>
+</div>
+
+<div class=section id=get_boost>
+<h3>0. Boost のインストール</h3>
+
+<p>銀天ライブラリは内部で Boost C++ Libraries ( <a href="http://www.boost.org/" class=external>http://www.boost.org/</a> ) を使用しています。</p>
+<p>当ライブラリを導入する前に、お使いの環境に Boost の version 1.39.0 以降がインストールされていることを確認して下さい(<a href="#footnote01">確認方法</a>)。</p>
+
+<p>もし Boost がインストールされていないようなら、 <a href="http://www.boost.org/" class=external>公式ページ</a> の <a href="http://www.boost.org/more/getting_started/index.html" class=external>Getting Started</a> か、あるいは <a href="http://www.kmonos.net/alang/boost/" class=external>Let's Boost</a> の <a href="http://www.kmonos.net/alang/boost/install.html" class=external>インストール方法解説</a> を参考に、最新版の Boost をインストールしてください。<span class=weak>(銀天ライブラリを使わなくても Boost は便利ですよ!)</span></p>
+
+</div>
+
+<div class=section id=download>
+<h3>1. ダウンロード</h3>
+
+<p>銀天ライブラリのダウンロードページはこちらになります: <a href="http://sourceforge.jp/projects/gintenlib/" class=external>http://sourceforge.jp/projects/gintenlib/</a></p>
+<p>現在、正式にリリースされているアーカイブは存在しません。近日中に version 1.0.0 が完成する予定となっています。それまでは下記の Git リポジトリから入手して下さい。</p>
+
+<p>いちいちファイルをダウンロードするのが面倒だ、という方は、開発用の Git リポジトリから直接最新バージョンのライブラリを入手することもできます。</p>
+<p>適当なディレクトリで、以下のコマンドを入力して下さい。</p>
+<pre class=literal_block>
+git clone git://git.sourceforge.jp/gitroot/gintenlib/gintenlib.git
+</pre>
+<p>このコマンドにより、カレントディレクトリに新たに <strong>gintenlib</strong><strong>/</strong> ディレクトリが作られ、その中に銀天ライブラリの全てのファイル<span class=weak>(<a href="#gintenlib_tree">下の階層図</a>でいう <strong>gintenlib</strong><strong>/</strong> や <strong>html</strong><strong>/</strong> など)</span>がダウンロードされます。<span class=weak>(<a href="#gintenlib_tree">階層図</a>について、 Git から入手した場合、「ルートディレクトリ」の名前は <strong>gintenlib_X_X_X</strong><strong>/</strong> ではなく <strong>gintenlib</strong><strong>/</strong> になるので注意してください)</span></p>
+
+</div>
+
+<div class=section id=include_path>
+<h3>2. インクルードパスの設定</h3>
+
+<p>ダウンロードしたアーカイブを展開したディレクトリ<span class=weak>(あるいは Git リポジトリから取得したディレクトリ)</span>は、以下のような階層構造になっています:</p>
+<pre class=literal_block id=gintenlib_tree>
+<strong>gintenlib_1_0_0</strong><strong>/</strong> ...............銀天ライブラリの「ルートディレクトリ」
+    <strong>gintenlib</strong><strong>/</strong> .................銀天ライブラリのヘッダが格納される場所
+        <strong>assign.hpp</strong>
+        <strong>bool_comparable.hpp</strong>
+            ...
+    <strong>html</strong><strong>/</strong> ......................ドキュメントが格納される場所
+        <strong>index.html</strong> .............HTMLドキュメントのエントリ
+        <strong>getting_started.html</strong> ...このページ
+            ...
+    <strong>tests</strong><strong>/</strong> .....................テストコード
+        ...
+</pre>
+
+<p>銀天ライブラリは現在のところ、ヘッダのみで構成されたライブラリなので、使用に際して行うことは殆どありません。</p>
+<p>唯一すべきことは、<em>ライブラリのヘッダが格納された <strong>gintenlib</strong><strong>/</strong> ディレクトリを<strong>含む</strong>ディレクトリ</em><span class=weak>(通常は銀天ライブラリの「ルートディレクトリ」)</span>に対し、インクルードパスを通すことだけです。</p>
+
+<p>インクルードパスの通し方は、各開発環境によって異なりますので、ここでは省略します。</p>
+
+</div>
+
+<div class=section id=simple_program>
+<h3>3. とりあえず使ってみる</h3>
+<p>銀天ライブラリが正しくインストールされたことを確かめるため、ちょっとしたプログラムを書いてみましょう。</p>
+<p>以下のプログラムは、与えられたコンテナをカンマ区切りにしてストリーム出力する list_format ライブラリを用いて書いた、単純な HelloWorld の例です。</p>
+<pre class=literal_block>
+#include &lt;gintenlib/list_format.hpp&gt;
+#include &lt;iostream&gt;
+
+int main()
+{
+  const char* a[] = { <span class=quoted>"Hello"</span>, <span class=quoted>"Ginten Library!"</span> };
+  std::cout &lt;&lt; gintenlib::list_format( a, <span class=quoted>""</span>, <span class=quoted>", "</span>, <span class=quoted>"\n"</span> );
+}
+</pre>
+<p>適当なファイルに入力し、コンパイルしてみましょう。</p>
+<p>無事コンパイルされ、実行結果として以下のように出力されれば成功です。</p>
+<pre class=literal_block>
+Hello, Ginten Library!
+</pre>
+<p>銀天ライブラリの世界へようこそ!</p>
+
+</div>
+
+<div class=section id=more_info>
+<h3>4. いろいろと使ってみる</h3>
+
+<p><a href="libs/index.html">ライブラリ一覧</a> のページから興味のあるものを探して、実際に使ってみましょう。</p>
+<p>銀天ライブラリを使うことでどんなことが出来るのか、とりあえず手っ取り早く知りたい、という場合には、 <a href="samples.html">サンプルコード一覧</a> を眺めてみるのもよいでしょう。</p>
+
+</div>
+
+<div class=section id=contact>
+<h3>5. 何か気づいたことがあれば</h3>
+<p><a href="contact.html">作者</a>までご連絡下さい。</p>
+</div>
+
+
+<div class=section id=footnotes>
+<h3>6. 脚注</h3>
+
+<div class=section id=footnote01>
+<h4>Boost のバージョンの確認方法</h4>
+<p>以下のコードをコンパイルして実行してみてください。</p>
+<p>お使いの環境に Boost が導入されていれば、正しくコンパイルされ、実行結果として Boost のバージョンを得ることができます。</p>
+<pre class=literal_block>
+<span class=comment>// boost のバージョンを表示する</span>
+#include &lt;boost/version.hpp&gt;
+
+#include &lt;iostream&gt;
+#include &lt;boost/format.hpp&gt;
+
+int main()
+{
+  <span class=comment>// バージョンを調べる</span>
+  const int major = BOOST_VERSION / 100000,
+            minor = BOOST_VERSION / 100 % 1000,
+            patch = BOOST_VERSION % 100;
+
+  <span class=comment>// 出力</span>
+  std::cout &lt;&lt; boost::format(<span class=quoted>"version %1%.%2%.%3%\n"</span>)
+                  % major % minor % patch;
+  return 0;
+}
+</pre>
+<p>出力例</p>
+<pre class=literal_block>
+version 1.41.0
+</pre>
+</div> <!-- class=section id=footnote01 -->
+
+</div> <!-- class=section id=footnotes -->
+
+<p> </p>
+
+<div class=insignificant>Copyright (C) 2010 SubaruG, <a href="http://ginten.sakura.ne.jp/">http://ginten.sakura.ne.jp/</a></div>
+</body>
+</html>
index 9919783..1d2759c 100644 (file)
@@ -4,12 +4,12 @@
 <html lang="ja">
 <head>
 
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
 
 <title>Ginten C++ Libraries</title>
 
-<link rel="stylesheet" href="index.css" type="text/css" />
+<link rel="stylesheet" href="doc.css" type="text/css">
 
 </head>
 <body>
diff --git a/html/samples.html b/html/samples.html
new file mode 100644 (file)
index 0000000..e69de29