$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r58278 - in sandbox/example: . boost boost/example libs libs/example libs/example/doc
From: daniel_james_at_[hidden]
Date: 2009-12-10 17:49:34
Author: danieljames
Date: 2009-12-10 17:49:33 EST (Thu, 10 Dec 2009)
New Revision: 58278
URL: http://svn.boost.org/trac/boost/changeset/58278
Log:
An example of how a proposed boost library might be structured.
Added:
   sandbox/example/
   sandbox/example/Jamfile.v2   (contents, props changed)
   sandbox/example/boost/
   sandbox/example/boost/example/
   sandbox/example/boost/example/example.hpp   (contents, props changed)
   sandbox/example/libs/
   sandbox/example/libs/example/
   sandbox/example/libs/example/doc/
   sandbox/example/libs/example/doc/Jamfile.v2   (contents, props changed)
   sandbox/example/libs/example/doc/example.qbk   (contents, props changed)
   sandbox/example/project-root.jam   (contents, props changed)
Added: sandbox/example/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/example/Jamfile.v2	2009-12-10 17:49:33 EST (Thu, 10 Dec 2009)
@@ -0,0 +1,12 @@
+
+# Copyright 2008-2009 John Doe.
+# Distributed under the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+project example
+    : requirements
+        <include>.
+        <include>$(boost-root)
+    :
+        build-dir bin.v2
+    ;
\ No newline at end of file
Added: sandbox/example/boost/example/example.hpp
==============================================================================
--- (empty file)
+++ sandbox/example/boost/example/example.hpp	2009-12-10 17:49:33 EST (Thu, 10 Dec 2009)
@@ -0,0 +1,22 @@
+
+// Copyright (C) 2008-2009 John Doe
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/unordered for documentation
+
+namespace boost {
+    /**
+     * Example class.
+     */
+
+    template <class T>
+    class example {
+    public:
+        void foo();
+    };
+
+    template <class T>
+    void example<T>::foo() {
+    }
+}
\ No newline at end of file
Added: sandbox/example/libs/example/doc/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/example/libs/example/doc/Jamfile.v2	2009-12-10 17:49:33 EST (Thu, 10 Dec 2009)
@@ -0,0 +1,35 @@
+
+# Copyright 2008-2009 John Doe.
+# Distributed under the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+doxygen ref
+    :
+        [ glob ../../../boost/example/*.hpp ]
+    :
+        <doxygen:param>MACRO_EXPANSION=YES
+        <doxygen:param>EXPAND_ONLY_PREDEF=YES
+        <doxygen:param>GENERATE_TAGFILE=ref.tag
+    ;
+
+xml example
+    :
+        example.qbk
+    :
+        <dependency>ref
+    ;
+
+boostbook standalone
+    :
+        example
+    :
+        <dependency>css
+        <dependency>images
+    ;
+
+install css : [ glob $(BOOST_ROOT)/doc/src/*.css ]
+    : <location>html ;
+install images : [ glob $(BOOST_ROOT)/doc/src/images/*.png ]
+    : <location>html/images ;
+explicit css ;
+explicit images ;
Added: sandbox/example/libs/example/doc/example.qbk
==============================================================================
--- (empty file)
+++ sandbox/example/libs/example/doc/example.qbk	2009-12-10 17:49:33 EST (Thu, 10 Dec 2009)
@@ -0,0 +1,23 @@
+[library Boost.Example
+    [quickbook 1.5]
+    [authors [Doe, John]]
+    [copyright 2008 2009 John Doe]
+    [id example]
+    [dirname example]
+    [purpose 
+        Demonstrate quickbook and doxygen based documentation.
+    ]
+    [license
+        Distributed under the Boost Software License, Version 1.0.
+        (See accompanying file LICENSE_1_0.txt or copy at
+        [@http://www.boost.org/LICENSE_1_0.txt])
+    ]
+]
+
+[section:intro Introduction]
+
+This is just an example to demonstrate one way to structure a proposed library.
+
+[endsect]
+
+[xinclude ref.xml]
Added: sandbox/example/project-root.jam
==============================================================================
--- (empty file)
+++ sandbox/example/project-root.jam	2009-12-10 17:49:33 EST (Thu, 10 Dec 2009)
@@ -0,0 +1,42 @@
+#
+#   Copyright (c) 2006 João Abecasis
+#
+#   Distributed under the Boost Software License, Version 1.0. (See
+#   accompanying file LICENSE_1_0.txt or copy at
+#   http://www.boost.org/LICENSE_1_0.txt)
+#
+
+##
+##  IMPORTANT NOTE: This file MUST NOT be copied over a boost installation
+##
+
+path-constant top : . ;
+
+import modules ;
+import path ;
+
+local boost-root = [ modules.peek : BOOST_ROOT ] ;
+
+if ! $(boost-root)
+{
+    local boost-search-dirs = [ modules.peek : BOOST_BUILD_PATH ] ;
+
+    for local dir in $(boost-search-dirs)
+    {
+        if [ path.glob $(dir)/../../../ : boost/version.hpp ]
+        {
+            boost-root += $(dir)/../../../ ;
+        }
+    }
+
+    if $(boost-root)
+    {
+        boost-root = [ path.make $(boost-root[1]) ] ;
+    }
+    else
+    {
+        ECHO "Warning: couldn't find BOOST_ROOT in" $(boost-root) ;
+    }
+}
+
+path-constant BOOST_ROOT : $(boost-root) ;
\ No newline at end of file