Skip to content

Commit 45aa761

Browse files
committed
Merge branch 'release/0_3_490'
2 parents d000a0f + 9047cb5 commit 45aa761

File tree

509 files changed

+36951
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

509 files changed

+36951
-0
lines changed

COPYRIGHT.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Copyright (C) 2009-2010 Lorenzo Caminiti.
2+
Use, modification, and distribution is subject to the
3+
Contract++ Software License, Version 1.0.
4+
(See accompanying file LICENSE_1_0.txt.)

LICENSE_1_0.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
(File: LICENSE_1_0.txt)
2+
3+
Contract Programming for C++ (Contract++) Software License, Version 1.0
4+
April 19th, 2009
5+
6+
Permission is hereby granted, free of charge, to any person or organization
7+
obtaining a copy of the software and accompanying documentation covered by
8+
this license (the "Software") to use, reproduce, display, distribute,
9+
execute, and transmit the Software, and to prepare derivative works of the
10+
Software, and to permit third-parties to whom the Software is furnished to
11+
do so, all subject to the following:
12+
13+
The copyright notices in the Software and this entire statement, including
14+
the above license grant, this restriction and the following disclaimer,
15+
must be included in all copies of the Software, in whole or in part, and
16+
all derivative works of the Software, unless such copies or derivative
17+
works are solely in the form of machine-executable object code generated by
18+
a source language processor.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
23+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
24+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
25+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26+
DEALINGS IN THE SOFTWARE.
27+

Makefile

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright (C) 2009-2010 Lorenzo Caminiti.
2+
# Use, modification, and distribution is subject to the
3+
# Contract++ Software License, Version 1.0.
4+
# (See accompanying file LICENSE_1_0.txt.)
5+
6+
# Default target.
7+
help:
8+
@echo "Contract Programming for C++ (Contract++)"
9+
@echo
10+
@echo "This library does not need to be built. It is composed of "
11+
@echo "C++ header files only (contained in the \"src/\" directory)."
12+
@echo "This make-file builds the library examples, tests, etc but"
13+
@echo "no the library itself."
14+
@echo
15+
@echo "make [OPTION]... example"
16+
@echo " Build example programs to \"build/example/\" and their"
17+
@echo " code documentation to \"codedoc/example/\"."
18+
@echo
19+
@echo "make [OPTION]... test"
20+
@echo " Build test programs to \"build/test/\" and their"
21+
@echo " code documentation to \"codedoc/test/\"."
22+
@echo
23+
@echo "make doc"
24+
@echo " Build libaray HTML documentation into \"doc/html/\" (requires"
25+
@echo " Boost.QuickBook to be installed and compiled on your system)."
26+
@echo
27+
@echo "make clean"
28+
@echo " Clean all (build, etc)."
29+
@echo
30+
@echo "OPTION"
31+
@echo " CXX=GCC Uses GNU C++ compiler 'g++' (e.g., for Linux)"
32+
@echo " CXX=MSVC Uses MS Visual C++ compiler (e.g., MSVC v8 for Cygwin)"
33+
@echo " block_inv=0 Turn off block invariants compilation and checking"
34+
@echo " class_inv=0 Turn off class invariants compilation and chekcing"
35+
@echo " pre=0 Turn off preconditions compilation and checking"
36+
@echo " post=0 Turn off postconditions compilation and checking"
37+
@echo " debug=1 Turn on debug symbols and log messages (internal)"
38+
exit 0
39+
40+
force_:
41+
42+
clean: force_
43+
rm -rf build/*
44+
45+
example: force_
46+
make -f example/Makefile
47+
48+
test: force_
49+
make -f test/Makefile
50+
51+
doc: force_
52+
# Requires Boost.QuickBook to be installed and compiled on your system.
53+
# Workaround: QuickBook uses all full paths but the ones relative to "boost/", Perl removes full path prefixes from HTML.
54+
cd ../boost-quickbook/doc && bjam --v2 && perl -p -i -e 'use Cwd; $$x=getcwd()."/qbk/src/contract"; s/$$x/contract/g' html/*.html html/contract/*.html
55+
# Copies documentation examples into doc/html directory.
56+
tmp="/tmp/contractpp-example.`date +%s`" && mkdir -p $$tmp && cp -R example $$tmp && find $$tmp -depth -name ".svn" -exec rm -rf {} \; && cp -R $$tmp/example doc/html
57+
clean_doc: force_
58+
rm -rf doc/html/*.html
59+
rm -rf doc/html/contract/*.html
60+
rm -rf doc/html/contract__/*.html
61+
find doc/html/example -depth -name "*.[hc]pp -exec rm -rf {} \;
62+

README.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
Contract Programming for C++ (Contract++)
3+
=========================================
4+
5+
See "doc/html/index.html" for the library documentation.
6+
7+
All Contract Programming features of the Eiffel programming language
8+
are supported by this library, among others:
9+
* Optional compilation and checking of invariants, preconditions,
10+
and postconditions.
11+
* Customizable actions on contract failure (terminate by default
12+
but it can throw, exit, etc).
13+
* Subcontracting for derived classes (with support for multiple
14+
inheritance).
15+
* Access to "old" variable values (before body execution) and
16+
return value "result" in postconditions.
17+
* Block invariants and loop variants.
18+
19+
Files organization:
20+
* All library source is in the "src/" directory.
21+
* Examples are in "example/" and test programs in "test/".
22+
* Run `make' in the main directory to see how to build examples, etc.
23+

bin/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Binary tools to support library maintainance.

bin/env-MSVC8.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# source this `$ source THIS_FILE'.
2+
3+
# Can be executed, for example under Cygwin, to setup enviroment to run
4+
# Microsoft Visual C++ command line compiler `cl.exe'.
5+
6+
msvc="E:\bin\Microsoft Visual Studio 8"
7+
echo "bin/env-MSVC8.sh: Assuming MVSC 8 installed at \"$msvc\" -- is this correct?"
8+
9+
# Setup Cygwin PATH.
10+
export PATH="$PATH:/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/IDE:/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/BIN:/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/Tools:/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/Tools/bin:/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/bin:/cygdrive/c/Program Files/Microsoft Visual Studio 8/SDK/v2.0/bin:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727:/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/VCPackages:/cygdrive/c/oracle/ora81/bin:/cygdrive/c/Program Files/Oracle/jre/1.1.7/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/c/Program Files/Windows Imaging/:"
11+
12+
# MSVC INCLUDE for this libray ./include, Boost 1.34.0, and MSVC 8.
13+
export INCLUDE="./include;C:\Program Files\boost\boost_1_34_0;$msvc\VC\ATLMFC\INCLUDE;$msvc\VC\INCLUDE;$msvc\VC\PlatformSDK\include;$msvc\SDK\v2.0\include;"
14+
15+
# MSVC LIB.
16+
export LIB="$msvc\VC\ATLMFC\LIB;$msvc\VC\LIB;$msvc\VC\PlatformSDK\lib;$msvc\SDK\v2.0\lib;"
17+
18+

bin/release

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/bin/bash
2+
3+
dbc_dir=`pwd`
4+
5+
# Preconditions.
6+
echo -en "Did you add the release notes in the documentation? (Y/n) "; read ci
7+
if [ "$ci" != "Y" ]; then
8+
echo -en "ERROR: You must add the release notes before releasing\n"
9+
exit 1;
10+
fi
11+
echo -en "Did you commit to SVN? (Y/n) "; read ci
12+
if [ "$ci" != "Y" ]; then
13+
echo -en "ERROR: You must commit before releasing\n"
14+
exit 1;
15+
fi
16+
17+
# Load release number.
18+
19+
old_major=`cat $dbc_dir/bin/release.dat | egrep "^Major: .*$" | sed 's/^Major: //'`
20+
old_minor=`cat $dbc_dir/bin/release.dat | egrep "^Minor: .*$" | sed 's/^Minor: //'`
21+
old_rev=`cat $dbc_dir/bin/release.dat | egrep "^Revision: .*$" | sed 's/^Revision: //'`
22+
23+
new_rev=`svn info | egrep "^Revision: .*$" | sed 's/^Revision: //'`
24+
25+
echo
26+
echo "release-number := major.minor.subversion-revision"
27+
echo -en "New major release number [old = $old_major]: "; read new_major
28+
if [ -z "$new_major" ]; then new_major=$old_major; fi
29+
echo -en "New minor release number [old = $old_minor]: "; read new_minor
30+
if [ -z "$new_minor" ]; then new_minor=$old_minor; fi
31+
echo -en "New revision: $new_rev (current SVN revision)\n"
32+
33+
name=contractpp_${new_major}_${new_minor}_${new_rev}
34+
35+
# Tar ball from trunk.
36+
echo
37+
echo "Exporting SVN repository..."
38+
cd /tmp
39+
svn export https://dbcpp.svn.sourceforge.net/svnroot/dbcpp/trunk $name
40+
tar czf $name.tar.gz $name
41+
42+
# Save release number.
43+
echo """# Lateset release-number := major.minor.subversion-revision
44+
Major: $new_major
45+
Minor: $new_minor
46+
Revision: $new_rev" > $dbc_dir/bin/release.dat
47+
48+
# Manual steps.
49+
echo -en """
50+
IMPORTANT: To complete the release do the following manual steps.
51+
52+
RELEASE FILE
53+
1. Log into 'http://sourceforge.net/projects/dbcpp/' as administrator.
54+
2. In the Summary page, click EDIT next to the download area.
55+
3. Left click on the gear next to the \"/releases\" directory.
56+
4. Click 'Upload here' and upload \"/tmp/$name.tar.gz\".
57+
5. Select the uploaded file and click Save (no need to specify label, etc).
58+
The latest uploaded file is automatically set to the download file.
59+
60+
DOCUMENTATION
61+
1. Open Places > Home and click on Go > Location.
62+
2. Enter 'sftp://<USER_NAME>,[email protected]' and type the password.
63+
3. Go to 'home/groups/d/db/dbcpp/htdocs' (website directory).
64+
4. Remove all files from this directory (old documentation).
65+
5. Copy (drag-n-drop) all files from 'trunk/doc/html/*' into the 'htdocs'
66+
directory opened via sftp.
67+
68+
DEVELOPMENT STATUS
69+
0. Update release status (Alpha, Beta, etc) but only if really necessary.
70+
1. Log into 'http://sourceforge.net/projects/dbcpp/' as administrator.
71+
2. In the Summary page, click EDIT next to the library title.
72+
3. Click Edit Trove Categorization (on the right).
73+
4. Edit the Development Status.
74+
75+
SUBVERSION
76+
1. Commit this sandbox to SVN -- local modiciations made by this script.
77+
"""
78+

bin/release.dat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Lateset release-number := major.minor.subversion-revision
2+
Major: 0
3+
Minor: 3
4+
Revision: 489

doc/Jamfile.v2

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright (C) 2009-2010 Lorenzo Caminiti.
2+
# Use, modification, and distribution is subject to the
3+
# Contract++ Software License, Version 1.0.
4+
# (See accompanying file LICENSE_1_0.txt.)
5+
6+
# To compile the documention:
7+
# 1. Boost source code must be compiled and installed on your system.
8+
# 2. Compiled Boost code must be at the same level as trunk.
9+
# 3. Create symbolic links in compiled Boost code directory to the trunk files.
10+
11+
import path ;
12+
import quickbook ;
13+
using boostbook ;
14+
using doxygen ;
15+
16+
path-constant here : . ;
17+
18+
doxygen reference
19+
:
20+
# This order does not matter (always alphabetic in doc).
21+
$(here)/qbk/src/contract.hpp
22+
[ glob $(here)/qbk/src/contract/*.hpp ]
23+
:
24+
# Most of these Doxygen options seem not to work... maybe they are overridden by Boost...
25+
<doxygen:param>CREATE_SUBDIRS=NO
26+
# Header files are included anyway -- user will get an error...
27+
<doxygen:param>VERBATIM_HEADERS=NO
28+
<doxygen:param>INLINE_SOURCES=NO
29+
# Full path is used anyway for anything but "boost/*"...
30+
<doxygen:param>FULL_PATH_NAMES=NO
31+
<doxygen:param>STRIP_FROM_PATH=$(here)/qbk/src/
32+
<doxygen:param>STRIP_FROM_INC_PATH=$(here)/qbk/src/
33+
# These options seem to work instead.
34+
<doxygen:param>EXTRACT_ALL=YES
35+
<doxygen:param>HIDE_UNDOC_MEMBERS=NO
36+
<doxygen:param>EXTRACT_PRIVATE=NO
37+
<doxygen:param>SEARCH_INCLUDES=NO
38+
# Special Doxygen commands required by this doc.
39+
<doxygen:param>ALIASES=" Params=\"<b>Parameters:</b> <table border="0">\" Param{2}=\"<tr><td><b><tt>\\1</tt></b></td><td>\\2</td></tr>\" EndParams=\"</table>\" Returns=\"<b>Returns:</b>\" Note=\"<b>Note:</b>\" Warning=\"<b>Warning:</b>\" See=\"<b>See:</b>\" "
40+
<reftitle>"Reference"
41+
;
42+
43+
xml contract
44+
:
45+
qbk/contract.qbk
46+
:
47+
<dependency>qbk/introduction.qbk
48+
<dependency>qbk/getting_started.qbk
49+
<dependency>qbk/tutorial.qbk
50+
<dependency>qbk/without_the_macros.qbk
51+
<dependency>qbk/throw_on_failure.qbk
52+
<dependency>qbk/contract_programming.qbk
53+
<dependency>qbk/examples.qbk
54+
<dependency>reference
55+
<dependency>qbk/bibliography.qbk
56+
<dependency>qbk/release_history.qbk
57+
<dependency>qbk/license.qbk
58+
<dependency>qbk/todo.qbk
59+
;
60+
61+
boostbook standalone
62+
:
63+
contract
64+
:
65+
<xsl:param>toc.max.depth=1
66+
<xsl:param>boost.root="."
67+
<xsl:param>html.stylesheet=doc/html/boostbook.css
68+
;
69+

doc/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The library documentation.

0 commit comments

Comments
 (0)