Boost logo

Boost-Commit :

From: chintanraoh_at_[hidden]
Date: 2008-05-13 10:52:40


Author: chintanraoh
Date: 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
New Revision: 45327
URL: http://svn.boost.org/trac/boost/changeset/45327

Log:
basic project directory structure
Added:
   sandbox/SOC/2008/digital_searching/dsearch/
   sandbox/SOC/2008/digital_searching/dsearch/Jamfile (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/LICENSE_1_0.txt (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/boost/
   sandbox/SOC/2008/digital_searching/dsearch/boost-build.jam (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/
   sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch.hpp (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/dsearch.hpp (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/libs/
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/build/
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/doc/
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/Jamfile (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/example.cpp (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/src/
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/Jamfile (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/test_nothing.cpp (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/test_nothing_n.cpp (contents, props changed)
   sandbox/SOC/2008/digital_searching/dsearch/project-root.jam (contents, props changed)

Added: sandbox/SOC/2008/digital_searching/dsearch/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/Jamfile 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,13 @@
+# Copyright 2008 Chintan Rao H.
+# 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)
+
+
+use-project boost
+ : $(BOOST_ROOT)
+ ;
+
+project boost/dsearch
+ : build-dir bin.v2
+ ;

Added: sandbox/SOC/2008/digital_searching/dsearch/LICENSE_1_0.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/LICENSE_1_0.txt 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,23 @@
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.

Added: sandbox/SOC/2008/digital_searching/dsearch/boost-build.jam
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/boost-build.jam 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,10 @@
+# Copyright 2008 Chintan Rao H.
+# 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)
+
+
+# Set the BOOST_ROOT environment variable on your command-line or in the
+# environment to point at the root of your regular Boost installation.
+
+boost-build $(BOOST_ROOT)/tools/build/v2 ;

Added: sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch.hpp 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,13 @@
+// Copyright 2008 Chintan Rao H.
+// 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)
+
+
+#ifndef BOOST_DSEARCH_HPP
+#define BOOST_DSEARCH_HPP
+
+#include <boost/dsearch/dsearch.hpp>
+
+#endif // BOOST_DSEARCH_HPP
+

Added: sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/dsearch.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/dsearch.hpp 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,82 @@
+// Copyright 2008 Chintan Rao H.
+// 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)
+
+
+#ifndef BOOST_DSEARCH_DSEARCH_HPP
+#define BOOST_DSEARCH_DSEARCH_HPP
+
+namespace boost {
+namespace dsearch {
+
+/// The dsearch class does nothing.
+/** \ingroup group_nothing
+ \param T The type on which dsearch does nothing.
+ \warning This class does nothing.
+ \todo Make this class do something.
+ \bug This class does do something.
+
+ Since dsearch does nothing, it is not very useful.
+*/
+template<typename T
+#ifndef DOXYGEN_DOCS_ONLY
+ , typename Enable=void // maybe documentation doesn't need to know about this.
+#endif
+>
+class dsearch
+{
+public:
+ /// Default constructor.
+ /** This constructor actually does something. It sets the internal
+ counters to 0.
+ */
+ dsearch() : nothing_count(0), call_count(0) {}
+
+ /// This function does nothing with the passed parameter.
+ void nothing(T t)
+ {
+ nothing_count++;
+ call_count++;
+ }
+
+ /// This function does nothing with the passed parameter a specified number of times.
+ /** \param n Number of times nothing is done.
+
+ This function is equivalent to calling nothing n times.
+ */
+ void nothing(T t, unsigned n)
+ {
+ call_count++;
+ for (unsigned i=0; i<n; i++)
+ nothing(t);
+ call_count-=n;
+ }
+
+ /// This function can be used to determine how many times nothing has been done.
+ /** \returns count of how many times nothing has been done.
+ */
+ int get_nothing_count()
+ {
+ return nothing_count;
+ }
+ /// This function can be used to determine how many calls have been made to the object.
+ /** \returns count of how many times a method of this object has been called by the user.
+ */
+ int get_call_count()
+ {
+ return call_count;
+ }
+protected:
+ /// The number of times this object did nothing.
+ int nothing_count;
+private:
+ // Number of times the member function was called.
+ int call_count;
+};
+
+} // namespace dsearch
+} // namespace boost
+
+#endif // BOOST_DSEARCH_DSEARCH_HPP
+

Added: sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/Jamfile 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,13 @@
+# Copyright 2008 Chintan Rao H.
+# 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
+ : requirements
+ <include>../../..
+ <define>BOOST_ALL_NO_LIB=1
+ ;
+
+exe example : example.cpp ;

Added: sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/example.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/example.cpp 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,32 @@
+// Copyright 2008 Chintan Rao H.
+// 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)
+
+
+//[ dsearch_example
+
+#include <boost/dsearch.hpp>
+#include <boost/assert.hpp>
+
+void dsearch_example()
+{
+ boost::dsearch::dsearch<int> object;
+ int x = 0;
+
+ BOOST_ASSERT(object.get_nothing_count()==0);
+ object.nothing(x);
+ BOOST_ASSERT(object.get_nothing_count()==1);
+
+ BOOST_ASSERT(object.get_call_count()==1);
+ object.nothing(x,4);
+ BOOST_ASSERT(object.get_call_count()==2);
+ BOOST_ASSERT(object.get_nothing_count()==5);
+
+} // end void dsearch_example
+
+int main()
+{
+ dsearch_example();
+}
+//]

Added: sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/Jamfile 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,16 @@
+# Copyright 2008 Chintan Rao H.
+# 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)
+
+
+import testing ;
+
+project
+ : requirements
+ <include>../../..
+ <define>BOOST_ALL_NO_LIB=1
+ ;
+
+run test_nothing.cpp ;
+run test_nothing_n.cpp ;

Added: sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/test_nothing.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/test_nothing.cpp 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,20 @@
+// Copyright 2008 Chintan Rao H.
+// 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)
+
+
+#include <boost/dsearch.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+int test_main(int, char* [])
+{
+ boost::dsearch::dsearch<int> object;
+ int x = 0;
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),0);
+ object.nothing(x);
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),1);
+
+ return 0;
+};

Added: sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/test_nothing_n.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/test/test_nothing_n.cpp 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,21 @@
+// Copyright 2008 Chintan Rao H.
+// 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)
+
+
+#include <boost/dsearch.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+int test_main(int, char* [])
+{
+ boost::dsearch::dsearch<int> object;
+ int x = 0;
+ BOOST_CHECK_EQUAL(object.get_call_count(),0);
+ object.nothing(x,4);
+ BOOST_CHECK_EQUAL(object.get_call_count(),1);
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),4);
+
+ return 0;
+};

Added: sandbox/SOC/2008/digital_searching/dsearch/project-root.jam
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/project-root.jam 2008-05-13 10:52:39 EDT (Tue, 13 May 2008)
@@ -0,0 +1,9 @@
+# Copyright 2008 Chintan Rao H.
+# 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)
+
+
+import os ;
+
+path-constant BOOST_ROOT : [ os.environ BOOST_ROOT ] ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk