-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
620 changed files
with
87,726 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Copyright (C) 2008-2012 Lorenzo Caminiti | ||
Distributed under the Boost Software License, Version 1.0 | ||
(see accompanying file LICENSE_1_0.txt or a copy at | ||
http://www.boost.org/LICENSE_1_0.txt) | ||
Home at http://sourceforge.net/projects/contractpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
# Copyright (C) 2008-2012 Lorenzo Caminiti | ||
# Use, modification, and distribution is subject to the | ||
# Boost Software License, Version 1.0 (see accompanying file | ||
# LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt). | ||
# Documentation at http://contractpp.sourceforge.net. | ||
|
||
import os ; | ||
|
||
if ! [ os.environ BOOST_ROOT ] | ||
{ | ||
exit "Error: Set BOOST_ROOT environment variable to the Boost root directory" ; | ||
} | ||
local BOOST_ROOT = [ os.environ BOOST_ROOT ] ; | ||
echo "Using Boost libraries from:" $(BOOST_ROOT) ; | ||
|
||
use-project boost : $(BOOST_ROOT) ; | ||
|
||
project | ||
: requirements | ||
# Add this library headers to include path. | ||
<include>"./include" | ||
# Add Boost library headers to include path. | ||
<include>$(BOOST_ROOT) | ||
; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
Contract++ | ||
|
||
Contract Programming Library for C++ | ||
|
||
DESCRIPTION | ||
|
||
C++ Contract Programming (a.k.a. Design by Contract or DbC). | ||
All Eiffel features supported: subcontracting, postcondition old and result | ||
values, optional contract compilation, customizable action on assertion | ||
failure, block invariants, loop variants, etc. | ||
Plus virtual specifiers, concept checking, named parameters. | ||
See: http://contractpp.sourceforge.net | ||
|
||
FEATURES | ||
|
||
* Support for preconditions, postconditions, class invariants, block | ||
invariants, and loop variants. | ||
* Subcontract derived classes (with support for pure virtual functions and | ||
multiple inheritance). | ||
* Access expression old values and function return value in postconditions. | ||
* Optional compilation and checking of preconditions, postconditions, class | ||
invariants, block invariants, and loop variants. | ||
* Customizable actions on contract assertion failure (terminate by default but | ||
it can throw, exit, etc). | ||
* Virtual specifiers. | ||
* Concept checking. | ||
* Named parameters. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
# Copyright (C) 2008-2012 Lorenzo Caminiti | ||
# Distributed under the Boost Software License, Version 1.0 | ||
# (see accompanying file LICENSE_1_0.txt or a copy at | ||
# http://www.boost.org/LICENSE_1_0.txt) | ||
# Home at http://sourceforge.net/projects/contractpp | ||
|
||
import quickbook ; | ||
using boostbook ; | ||
|
||
doxygen reference | ||
: | ||
../include/contract/function.hpp | ||
../include/contract/constructor.hpp | ||
../include/contract/destructor.hpp | ||
../include/contract/class.hpp | ||
../include/contract/class_invariant.hpp | ||
../include/contract/body.hpp | ||
../include/contract/block_invariant.hpp | ||
../include/contract/loop_variant.hpp | ||
../include/contract/parameter.hpp | ||
../include/contract/oldof.hpp | ||
../include/contract/copy.hpp | ||
../include/contract/broken.hpp | ||
../include/contract/config.hpp | ||
../include/contract/limits.hpp | ||
: | ||
<reftitle>"Reference" | ||
<prefix>contract # Strip path prefix. | ||
<doxygen:param>PREDEFINED="DOXYGEN" | ||
<doxygen:param>QUIET=YES | ||
<doxygen:param>WARN_IF_UNDOCUMENTED=NO | ||
<doxygen:param>HIDE_UNDOC_MEMBERS=YES | ||
<doxygen:param>HIDE_UNDOC_CLASSES=YES | ||
<doxygen:param>SHORT_NAMES=NO | ||
<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>\" SeeAlso=\"<b>See also:</b>\" RefSect{2}=\"\\xmlonly<link linkend='contract__.\\1'>\\2</link>\\endxmlonly\" RefClass{1}=\"\\xmlonly<computeroutput><classname alt='\\1'>\\1</classname></computeroutput>\\endxmlonly\" RefFunc{1}=\"\\xmlonly<computeroutput><functionname alt='\\1'>\\1</functionname></computeroutput>\\endxmlonly\" RefMacro{1}=\"\\xmlonly<computeroutput><macroname alt='\\1'>\\1</macroname></computeroutput>\\endxmlonly\" RefEnum{1}=\"\\xmlonly<computeroutput><enumname alt='\\1'>\\1</enumname></computeroutput>\\endxmlonly\" " | ||
; | ||
|
||
xml contractpp : contractpp.qbk | ||
: <dependency>reference | ||
; | ||
|
||
boostbook multipage : contractpp | ||
: <location>html | ||
<xsl:param>toc.max.depth=1 | ||
<xsl:param>boost.defaults=Boost | ||
<xsl:param>boost.root=../../ | ||
<xsl:param>admon.graphics.path=../../doc/src/images/ | ||
<xsl:param>html.stylesheet=../../doc/src/boostbook.css | ||
; | ||
|
||
alias onepage : multipage : <format>onehtml ; | ||
|
||
alias bjampy : multipage onepage : <variant>release ; | ||
alias bjampy : multipage ; | ||
|
||
explicit bjampy onepage multipage contractpp reference ; | ||
|
||
echo """ | ||
Usage: python bjam.py [bjam-options-and-targets] | ||
Build documentation using Bjam via Python (to customize navbar, etc). | ||
|
||
WARNING: Use `python bjam.py release` to build also single page documentation. | ||
""" ; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
[/ Copyright (C) 2008-2012 Lorenzo Caminiti ] | ||
[/ Distributed under the Boost Software License, Version 1.0 ] | ||
[/ (see accompanying file LICENSE_1_0.txt or a copy at ] | ||
[/ http://www.boost.org/LICENSE_1_0.txt) ] | ||
[/ Home at http://sourceforge.net/projects/contractpp ] | ||
|
||
[section Acknowledgments] | ||
|
||
This section aims to recognize the contributions of /all/ the different people that participated directly or indirectly to the design and development of this library. | ||
|
||
Sincere thanks to my parents for their support with my education and my studies in computer science. | ||
|
||
Sincere thanks to Marina for her kindness and continuous support. | ||
|
||
Many thanks to Bertrand Meyer for his pioneering and thorough work on Contract Programming in __Meyer97__. | ||
|
||
Many thanks to Thorsten Ottosen for his work with __N1962__ (and previous revisions) and for clarifying the __N1962__ requirements directly with the library authors when needed. | ||
|
||
Many thanks to Andrzej Krzemienski for reviewing earlier versions of this library providing valuable insights, for exchanging ideas on implementing assertion requirements, and for suggesting to support named parameters. | ||
|
||
Many thanks to Vicente J. Botet Escriba for reviewing earlier versions of this library providing valuable insights and for suggesting to sue `contract::copy`. | ||
|
||
Thanks to Steven Watanabe for providing valuable insights on C++ and for hinting to use template meta-programming introspection to detect if a base class has a given member function (technique which turned out to be essential to fully automate subcontracting). | ||
|
||
Thanks to Dave Abrahams for providing valuable comments on the library syntax and especially on the syntax to support named parameters. | ||
|
||
Thanks to David Maley for having shared source code form his inspiring work in __Maley99__ on emulating Contract Programming in C++. | ||
|
||
Finally, many thanks to the entire __Boost__ community and [@http://lists.boost.org mailing list] for providing valuable comments about this library and great insights on the C++ programming language. | ||
|
||
[endsect] | ||
|
Oops, something went wrong.