Files
contract/doc/contract.qbk
2016-08-03 06:22:29 -07:00

128 lines
8.2 KiB
Plaintext

[/ Copyright (C) 2008-2016 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).]
[/ See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html]
[library Boost.Contract
[quickbook 1.5]
[version 1.0]
[authors [Caminiti <email>lorcaminiti@gmail.com</email>, Lorenzo]]
[copyright 2008-2016 Lorenzo Caminiti]
[license 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])]
[/ purpose Contract Programming for C++]
[/ category Correctness and Testing]
]
[template file[dir name] '''<ulink url="../../'''[dir]'''/'''[name]'''">'''[^[name]]'''</ulink>''']
[def __substitution_principle__ [@http://en.wikipedia.org/wiki/Liskov_substitution_principle substitution principle]]
[def __Introduction__ [link boost_contract.introduction Introduction]]
[def __Getting_Started__ [link boost_contract.getting_started Getting Started]]
[def __Contract_Programming_Overview__ [link boost_contract.contract_programming_overview Contract Programming Overview]]
[def __Assertions__ [link boost_contract.contract_programming_overview.assertions Assertions]]
[def __Benefits_and_Costs__ [link boost_contract.contract_programming_overview.benefits_and_costs Benefits and Costs]]
[def __Function_Calls__ [link boost_contract.contract_programming_overview.function_calls Function Calls]]
[def __Public_Function_Calls__ [link boost_contract.contract_programming_overview.public_function_calls Public Function Calls]]
[def __Constructor_Calls__ [link boost_contract.contract_programming_overview.constructor_calls Constructor Calls]]
[def __Destructor_Calls__ [link boost_contract.contract_programming_overview.destructor_calls Destructor Calls]]
[def __Constant_Correctness__ [link boost_contract.contract_programming_overview.constant_correctness Constant-Correctness]]
[def __Specification_and_Implementation__ [link boost_contract.contract_programming_overview.specification_and_implementation Specification and Implementation]]
[def __Tutorial__ [link boost_contract.tutorial Tutorial]]
[def __Non_Member_Functions__ [link boost_contract.tutorial.non_member_functions Non-Member Functions]]
[def __Preconditions__ [link boost_contract.tutorial.preconditions Preconditions]]
[def __Postconditions__ [link boost_contract.tutorial.postconditions Postconditions]]
[def __Return_Value__ [link boost_contract.tutorial.return_value Return Value]]
[def __Old_Values__ [link boost_contract.tutorial.old_values Old Values]]
[def __Class_Invariants__ [link boost_contract.tutorial.class_invariants Class Invariants]]
[def __Static_Class_Invariants__ [link boost_contract.tutorial.class_invariants.static_class_invariants Static Class Invariants]]
[def __Constructors__ [link boost_contract.tutorial.constructors Constructors]]
[def __Destructors__ [link boost_contract.tutorial.destructors Destructors]]
[def __Public_Functions__ [link boost_contract.tutorial.public_functions Public Functions]]
[def __Virtual_Public_Functions__ [link boost_contract.tutorial.virtual_public_functions Virtual Public Functions]]
[def __Public_Function_Overrides__ [link boost_contract.tutorial.public_function_overrides__subcontracting_ Public Function Overrides]]
[def __Base_Classes__ [link boost_contract.tutorial.base_classes__subcontracting_ Base Classes]]
[def __Private_and_Protected_Functions__ [link boost_contract.tutorial.private_and_protected_functions Private and Protected Functions]]
[def __Advanced_Topics__ [link boost_contract.advanced_topics Advanced Topics]]
[def __Old_Values_at_Body__ [link boost_contract.advanced_topics.old_values_at_body Old Values at Body]]
[def __Optional_Return_Value__ [link boost_contract.advanced_topics.optional_return_value Optional Return Value]]
[def __Pure_Virtual_Public_Functions__ [link boost_contract.advanced_topics.pure_virtual_public_functions Pure Virtual Public Functions]]
[def __Named_Overrides__ [link boost_contract.advanced_topics.named_overrides Named Overrides]]
[def __Volatile_Class_Invariants__ [link boost_contract.advanced_topics.volatile_class_invariants Volatile Class Invariants]]
[def __Old_Value_Requirements__ [link boost_contract.advanced_topics.old_value_requirements Old Value Requirements]]
[def __Access_Specifiers__ [link boost_contract.advanced_topics.access_specifiers Access Specifiers]]
[def __Separate_Body_Implementation__ [link boost_contract.advanced_topics.separate_body_implementation Separate Body Implementation]]
[def __Throw_on_Failure__ [link boost_contract.advanced_topics.throw_on_failure Throw on Failure]]
[def __Disable_Contract_Checking__ [link boost_contract.advanced_topics.disable_contract_checking Disable Contract Checking]]
[def __No_Macros__ [link boost_contract.advanced_topics.no_macros__no_c__11_ No Macros]]
[def __No_Lambda_Functions__ [link boost_contract.advanced_topics.no_lambda_functions__no_c__11_ No Lambda Functions]]
[def __Reference__ [link boost_contract.reference Reference]]
[def __Examples__ [link boost_contract.examples Examples]]
[def __Annexes__ [link boost_contract.annexes Annexes]]
[def __Release_Notes__ [link boost_contract.release_notes Release Notes]]
[def __Bibliography__ [link boost_contract.bibliography Bibliography]]
[def __Acknowledgments__ [link boost_contract.acknowledgments Acknowledgments]]
[def __AND__ [link and_anchor [^['AND]]]]
[def __OR__ [link or_anchor [^['OR]]]]
[def __Bright04__ [link Bright04_anchor \[Bright04\]]]
[def __Bright04b__ [link Bright04b_anchor \[Bright04b\]]]
[def __C2__ [link C2_anchor \[C2\]]]
[def __Chrome02__ [link Chrome02_anchor \[Chrome02\]]]
[def __Cline90__ [link Cline90_anchor \[Cline90\]]]
[def __CodeContracts__ [link CodeContracts_anchor \[CodeContracts\]]]
[def __iContract__ [link iContract_anchor \[iContract\]]]
[def __Hoare73__ [link Hoare73_anchor \[Hoare73\]]]
[def __Jcontract__ [link Jcontract_anchor \[Jcontract\]]]
[def __Lindrud04__ [link Lindrud04_anchor \[Lindrud04\]]]
[def __Maley99__ [link Maley99_anchor \[Maley99\]]]
[def __Meyer97__ [link Meyer97_anchor \[Meyer97\]]]
[def __Mitchell02__ [link Mitchell02_anchor \[Mitchell02\]]]
[def __N1613__ [link N1613_anchor \[N1613\]]]
[def __N1866__ [link N1866_anchor \[N1866\]]]
[def __N1962__ [link N1962_anchor \[N1962\]]]
[def __N2081__ [link N2081_anchor \[N2081\]]]
[def __N2914__ [link N2914_anchor \[N2914\]]]
[def __SPARKAda__ [link SPARKAda_anchor \[SPARKAda\]]]
[def __SpecSharp__ [link SpecSharp_anchor \[SpecSharp\]]]
[def __Stroustrup94__ [link Stroustrup94_anchor \[Stroustrup94\]]]
[def __Stroustrup13__ [link Stroustrup13_anchor \[Stroustrup13\]]]
[def __Tandin04__ [link Tandin04_anchor \[Tandin04\]]]
[:['["Our field needs more formality, but the profession has not realized it yet.]]]
[:['-- Bertrand Meyer (see __Meyer97__ page 400)]]
This library implements
[@http://en.wikipedia.org/wiki/Design_by_contract Contract Programming] (a.k.a., Design by Contract or DbC)
[footnote
Design by Contract (DbC) is a registered trademark of [@http://en.wikipedia.org/wiki/Eiffel_Software Eiffel Software] and it was first introduced by the Eiffel programming language (see __Meyer97__).
]
for the C++ programming language.
All Contract Programming features are supported by this library: subcontracting, class invariants (also static and volatile), postconditions (with old and return values), preconditions, customizable actions on assertion failure (terminate, throw, etc.), optional compilation of assertion checking, disable assertion checking while already checking other assertions (to avoid infinite recursion), etc.
Hosted at: [@https://github.com/lcaminiti/boost-contract]
[note
In one of its previous revisions, this library passed Boost formal reviews and
it was accepted into the Boost libraries (see [@https://groups.google.com/forum/?fromgroups=#!topic/boost-list/jQ7OjAmos_Y]).
However, the authors have not had time yet to push this library into an official Boost release.
]
[include introduction.qbk]
[include getting_started.qbk]
[include contract_programming_overview.qbk]
[include tutorial.qbk]
[include advanced_topics.qbk]
[xinclude reference.xml]
[include examples.qbk]
[include release_notes.qbk]
[include bibliography.qbk]
[include acknowledgments.qbk]