Changeset 20798 for lang/cplusplus

Show
Ignore:
Timestamp:
10/05/08 16:53:59 (2 months ago)
Author:
tokuhirom
Message:

show synopsis & description

Location:
lang/cplusplus/llv8call/trunk
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/llv8call/trunk/ext/sqlite3/sqlite3.cc

    r20753 r20798  
    2525//   http://www.python.org/dev/peps/pep-0249/ 
    2626//   http://www.python.jp/doc/contrib/peps/pep-0249.txt 
     27 
     28/** DESCRIPTION: 
     29 * 
     30 * SQLite3 is embeddable RDBMS =) 
     31 * 
     32 */ 
     33 
     34/** SYNOPSIS: 
     35 * 
     36 * v8ext.LoadBinary("org.coderepos.sqlite3"); 
     37 * var db = new SQLite3(":memory:"); 
     38 * var cursor = db.Cursor(); 
     39 * cursor.Execute("SELECT COUNT(*) FROM foo"); 
     40 * p( cursor.FetchOne()[0] ); 
     41 * cursor.Close(); 
     42 * db.Close(); 
     43 * 
     44 */ 
    2745 
    2846#include "sqlite3.h" 
  • lang/cplusplus/llv8call/trunk/manual/ext/clearsilver/clearsilver.html

    r20792 r20798  
    1515    <div class="main container"> 
    1616        <h1>llv8call docs</h1> 
     17 
     18         
    1719 
    1820         
  • lang/cplusplus/llv8call/trunk/manual/ext/fs/dir.html

    r20796 r20798  
    1515    <div class="main container"> 
    1616        <h1>llv8call docs</h1> 
     17 
     18         
    1719 
    1820         
  • lang/cplusplus/llv8call/trunk/manual/ext/fs/file.html

    r20792 r20798  
    1515    <div class="main container"> 
    1616        <h1>llv8call docs</h1> 
     17 
     18         
    1719 
    1820         
  • lang/cplusplus/llv8call/trunk/manual/ext/libmemcached/libmemcached.html

    r20792 r20798  
    1515    <div class="main container"> 
    1616        <h1>llv8call docs</h1> 
     17 
     18         
    1719 
    1820         
  • lang/cplusplus/llv8call/trunk/manual/ext/shttpd/shttpd.html

    r20792 r20798  
    1515    <div class="main container"> 
    1616        <h1>llv8call docs</h1> 
     17 
     18         
    1719 
    1820         
  • lang/cplusplus/llv8call/trunk/manual/ext/sqlite3/sqlite3.html

    r20792 r20798  
    1616        <h1>llv8call docs</h1> 
    1717 
     18         
     19            <div class="description">SQLite3 is embeddable RDBMS =) 
     20</div> 
     21         
     22 
     23         
     24            <pre>v8ext.LoadBinary("org.coderepos.sqlite3"); 
     25var db = new SQLite3(":memory:"); 
     26var cursor = db.Cursor(); 
     27cursor.Execute("SELECT COUNT(*) FROM foo"); 
     28p( cursor.FetchOne()[0] ); 
     29cursor.Close(); 
     30db.Close(); 
     31</pre> 
    1832         
    1933 
  • lang/cplusplus/llv8call/trunk/tools/makedoc/make-docs.js

    r20795 r20798  
    2121        var modules = []; 
    2222        var currentmodule; 
    23         var mode = "SYNOPSIS"; 
    2423        var parser; 
     24        var sections = {}; 
    2525        var parser_normal; 
    26         var synopsis = ''; 
    27         var parser_synopsis = function (line) { 
    28             if (line.match(/\*\//)) { 
    29                 parser = parser_normal; 
    30             } else if (line.match(/^\s*\*\s*(.+)/)) { 
    31                 synopsis += RegExp.$1 + "\n"; 
    32             } 
     26        var section_parser_generator = function (name) { 
     27            return function (line) { 
     28                if (line.match(/\*\//)) { 
     29                    parser = parser_normal; 
     30                } else if (line.match(/^\s*\*\s*(.+)/)) { 
     31                    if (!sections[name]) { sections[name] = '' } 
     32                    sections[name] += RegExp.$1 + "\n"; 
     33                } 
     34            }; 
    3335        }; 
    3436        parser_normal = function (line) { 
     
    3739                currentmodule['CLASSNAME'] = RegExp.$1; 
    3840                modules.push(currentmodule); 
    39             } else if (line.match(/\/\*\*\s*SYNOPSIS/)) { 
    40                 parser = parser_synopsis; 
     41            } else if (line.match(/\/\*\*\s*(SYNOPSIS|DESCRIPTION)/)) { 
     42                parser = section_parser_generator(RegExp.$1); 
    4143            } else if (line.match(/CLASS(?:_WITH_CONSTRUCTOR)?\(/)) { 
    42                 currentmodule = {"CCV" : [], "CM" : [], "IM" : [], "CLASSNAME" : "", "SYNOPSIS":"" }; 
     44                currentmodule = {"CCV" : [], "CM" : [], "IM" : [], "CLASSNAME" : "" }; 
    4345            } else if (line.match(/BIND_([IC]M)\("([^"]+)"/)) { 
    4446                currentmodule[RegExp.$1].push(RegExp.$2); 
     
    5254        } 
    5355        file.Close(); 
    54         return {"modules":modules, "synopsis":synopsis}; 
     56        return {"modules":modules, "sections":sections}; 
    5557    }; 
    5658 
     
    6668            hdf.AddArray(basekey + ".IM",  entry["IM"]); 
    6769        } 
    68         hdf.SetValue("data.synopsis", data.synopsis); 
     70        if(data.sections.SYNOPSIS) { 
     71            hdf.SetValue("data.sections.SYNOPSIS", data.sections.SYNOPSIS); 
     72        } 
     73        if(data.sections.DESCRIPTION) { 
     74            hdf.SetValue("data.sections.DESCRIPTION", data.sections.DESCRIPTION); 
     75        } 
    6976        // p(hdf.DumpStr(undefined, 0)); 
    7077        var cs = new clearsilver.CS(hdf); 
  • lang/cplusplus/llv8call/trunk/tools/makedoc/tmpl/doc.cs

    r20792 r20798  
    1616        <h1>llv8call docs</h1> 
    1717 
    18         <?cs if:data.synopsis ?> 
    19             <pre><?cs var:data.synopsis ?></pre> 
     18        <?cs if:data.sections.DESCRIPTION ?> 
     19            <div class="description"><?cs var:data.sections.DESCRIPTION ?></div> 
     20        <?cs /if ?> 
     21 
     22        <?cs if:data.sections.SYNOPSIS ?> 
     23            <pre><?cs var:data.sections.SYNOPSIS ?></pre> 
    2024        <?cs /if ?> 
    2125