Compare commits
156
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06a30037c4 | ||
|
|
c67ce3ccc9 | ||
|
|
3e25f1a83a | ||
|
|
f62e4e3e4c | ||
|
|
808f006fc1 | ||
|
|
11c4dae0d6 | ||
|
|
1e650b99ca | ||
|
|
105f995860 | ||
|
|
5fee5a0262 | ||
|
|
e49ed73d25 | ||
|
|
ac65346e6d | ||
|
|
a396b67d6d | ||
|
|
826792c88e | ||
|
|
4e5c1c3074 | ||
|
|
6912a28ed7 | ||
|
|
5a2e484d39 | ||
|
|
bfbc3c52e4 | ||
|
|
94ce24a596 | ||
|
|
4876020a21 | ||
|
|
9986978784 | ||
|
|
6908e4a0d5 | ||
|
|
19293949d7 | ||
|
|
dadbb421f4 | ||
|
|
0f5dc0ef08 | ||
|
|
36f7174779 | ||
|
|
6010e45801 | ||
|
|
4e88a39c1a | ||
|
|
bf8cce28db | ||
|
|
6e4cd4fc03 | ||
|
|
0b4ca326a4 | ||
|
|
bd435e8eb7 | ||
|
|
b76da23fad | ||
|
|
565dc93892 | ||
|
|
b7ef44ad86 | ||
|
|
42cf781e5c | ||
|
|
884da8c598 | ||
|
|
5cf874392f | ||
|
|
47172a355f | ||
|
|
8df7213cbe | ||
|
|
46ec9c371e | ||
|
|
836f6868a0 | ||
|
|
8ebf4d9afe | ||
|
|
4b8daf6897 | ||
|
|
d6f0b8b269 | ||
|
|
8247c74138 | ||
|
|
59218c61bd | ||
|
|
9818db57d7 | ||
|
|
55c02678d2 | ||
|
|
d6f7047fc0 | ||
|
|
b89348d58b | ||
|
|
6ad24ce419 | ||
|
|
d869fe16be | ||
|
|
63194623dd | ||
|
|
2389faa028 | ||
|
|
63fbec4820 | ||
|
|
33a453c835 | ||
|
|
41b2492185 | ||
|
|
4d9004315e | ||
|
|
266115dcfd | ||
|
|
4f97c60e0b | ||
|
|
54a3fc849c | ||
|
|
04bacb88cb | ||
|
|
0984071008 | ||
|
|
f38234091d | ||
|
|
cdbc81c379 | ||
|
|
f4f47024bb | ||
|
|
2a63a9141d | ||
|
|
617e6ae896 | ||
|
|
1a3a3cc061 | ||
|
|
c0e3e2a29f | ||
|
|
921930f78f | ||
|
|
f9ed9415a7 | ||
|
|
cb525d2991 | ||
|
|
05658120b0 | ||
|
|
be1a4d3584 | ||
|
|
363c37c2c1 | ||
|
|
bebde46586 | ||
|
|
5da20cd03b | ||
|
|
b5645c2ae7 | ||
|
|
bd1db1a406 | ||
|
|
d3304ebe6b | ||
|
|
4bfc198d18 | ||
|
|
4196239412 | ||
|
|
4df52bdcba | ||
|
|
0932288218 | ||
|
|
e0e3d9a8bb | ||
|
|
d83ba687b3 | ||
|
|
4546e46ff2 | ||
|
|
a586251276 | ||
|
|
432742a03d | ||
|
|
713d96fa8a | ||
|
|
420438d5a4 | ||
|
|
0d859372be | ||
|
|
6876d169fa | ||
|
|
c8258eda90 | ||
|
|
752b47621c | ||
|
|
cf6fcce0e8 | ||
|
|
050a27c550 | ||
|
|
a902008193 | ||
|
|
9143cf98e5 | ||
|
|
02b496ef2d | ||
|
|
999df197af | ||
|
|
5ebdc42682 | ||
|
|
0370e4d120 | ||
|
|
4c01083499 | ||
|
|
11b012b88b | ||
|
|
3a6f599c77 | ||
|
|
c001886e21 | ||
|
|
4eb2253815 | ||
|
|
f2f05517b1 | ||
|
|
0e8cf1eed7 | ||
|
|
edd0368f5b | ||
|
|
8918f60787 | ||
|
|
b79d6dadcc | ||
|
|
38773aa871 | ||
|
|
a6ed902048 | ||
|
|
40b3309a4f | ||
|
|
59ee686326 | ||
|
|
8a8ed5f87d | ||
|
|
aa995f9efa | ||
|
|
df5b07f4d3 | ||
|
|
dc9c7e9cb7 | ||
|
|
3d9313613d | ||
|
|
a19e816e07 | ||
|
|
9e5cc5375e | ||
|
|
293a19614a | ||
|
|
03d65af913 | ||
|
|
6360bcc9bf | ||
|
|
6c009ef368 | ||
|
|
ed6bc8f4c0 | ||
|
|
3325715189 | ||
|
|
b1405a3b2e | ||
|
|
7cf6f1abea | ||
|
|
fd960e722e | ||
|
|
5ee0ce53cc | ||
|
|
baf25a6c0c | ||
|
|
96cb55f137 | ||
|
|
84537e34e3 | ||
|
|
9a3010daa0 | ||
|
|
cb5fb50938 | ||
|
|
867d25c2a0 | ||
|
|
821ab41e22 | ||
|
|
a232139f73 | ||
|
|
25e9577800 | ||
|
|
2b89c20de6 | ||
|
|
9df556a3ab | ||
|
|
391cc36780 | ||
|
|
f6698003b6 | ||
|
|
dc33334825 | ||
|
|
46495ce9d6 | ||
|
|
9f65b0898c | ||
|
|
4632b6f895 | ||
|
|
bf4ce638c9 | ||
|
|
03739ec46d | ||
|
|
da67209832 | ||
|
|
a433d185d4 |
@@ -1,16 +0,0 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: cppalliance/boost_superproject_build:20.04-v2
|
||||
parallelism: 2
|
||||
steps:
|
||||
- checkout
|
||||
- run: wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_common.py" -P ${HOME}
|
||||
- run: wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_release.py" -P ${HOME}
|
||||
- run: python3 ${HOME}/ci_boost_release.py checkout_post
|
||||
# - run: python3 ${HOME}/ci_boost_release.py dependencies_override
|
||||
- run: '[ "$CIRCLE_NODE_INDEX" != "0" ] || EOL=LF python3 ${HOME}/ci_boost_release.py test_pre'
|
||||
- run: '[ "$CIRCLE_NODE_INDEX" != "1" ] || EOL=CRLF python3 ${HOME}/ci_boost_release.py test_pre'
|
||||
- run: '[ "$CIRCLE_NODE_INDEX" != "0" ] || EOL=LF python3 ${HOME}/ci_boost_release.py test_override'
|
||||
- run: '[ "$CIRCLE_NODE_INDEX" != "1" ] || EOL=CRLF python3 ${HOME}/ci_boost_release.py test_override'
|
||||
@@ -1,202 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- feature/**
|
||||
tags:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
b2-posix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-11
|
||||
- os: macos-12
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Boost
|
||||
run: |
|
||||
./bootstrap.sh
|
||||
./b2 -d0 headers
|
||||
|
||||
- name: Build Boost
|
||||
run: |
|
||||
./b2 -j3 stage
|
||||
|
||||
- name: Install Boost
|
||||
run: |
|
||||
./b2 -j3 --prefix=$HOME/.local install
|
||||
|
||||
- name: Test Boost
|
||||
run: |
|
||||
cd status
|
||||
../b2 -j3 quick
|
||||
|
||||
b2-windows:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2019
|
||||
- os: windows-2022
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Boost
|
||||
shell: cmd
|
||||
run: |
|
||||
cmd /c bootstrap
|
||||
b2 -d0 headers
|
||||
|
||||
- name: Build Boost
|
||||
run: |
|
||||
./b2 -j3 stage
|
||||
|
||||
- name: Install Boost
|
||||
run: |
|
||||
./b2 -j3 install
|
||||
|
||||
- name: Test Boost
|
||||
run: |
|
||||
cd status
|
||||
../b2 -j3 quick
|
||||
|
||||
cmake-install-posix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-11
|
||||
- os: macos-12
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Configure Boost
|
||||
run: |
|
||||
mkdir __build__ && cd __build__
|
||||
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||
|
||||
- name: Build Boost
|
||||
run: |
|
||||
cd __build__
|
||||
cmake --build . -j 3
|
||||
|
||||
- name: Install Boost
|
||||
run: |
|
||||
cd __build__
|
||||
cmake --build . -j 3 --target install
|
||||
|
||||
cmake-install-windows:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2019
|
||||
- os: windows-2022
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Configure Boost
|
||||
run: |
|
||||
mkdir __build__ && cd __build__
|
||||
cmake -DBUILD_SHARED_LIBS=ON ..
|
||||
|
||||
- name: Build Boost
|
||||
run: |
|
||||
cd __build__
|
||||
cmake --build . -j 3
|
||||
|
||||
- name: Install Boost
|
||||
run: |
|
||||
cd __build__
|
||||
cmake --build . -j 3 --target install
|
||||
|
||||
cmake-test-posix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-11
|
||||
- os: macos-12
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Configure Boost
|
||||
run: |
|
||||
mkdir __build__ && cd __build__
|
||||
cmake -DBUILD_TESTING=ON ..
|
||||
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd __build__
|
||||
cmake --build . -j 3 --target tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd __build__
|
||||
ctest --output-on-failure --no-tests=error -j 3 -R quick
|
||||
|
||||
cmake-test-windows:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2019
|
||||
- os: windows-2022
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Configure Boost
|
||||
run: |
|
||||
mkdir __build__ && cd __build__
|
||||
cmake -DBUILD_TESTING=ON -DBOOST_EXCLUDE_LIBRARIES="convert;outcome" ..
|
||||
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd __build__
|
||||
cmake --build . -j 3 --target tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd __build__
|
||||
ctest --output-on-failure --no-tests=error -j 3 -R quick -C Debug
|
||||
@@ -1,60 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- boost-*
|
||||
|
||||
jobs:
|
||||
release-posix:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: ${{ github.ref_name }}
|
||||
submodules: true
|
||||
|
||||
- name: Cleanup
|
||||
shell: bash
|
||||
run: |
|
||||
find ${{ github.ref_name }} -name ".git" -prune -exec rm -rf {} +
|
||||
|
||||
- name: Create archives
|
||||
run: |
|
||||
tar -czf ${{ github.ref_name }}.tar.gz ${{ github.ref_name }}
|
||||
tar -cJf ${{ github.ref_name }}.tar.xz ${{ github.ref_name }}
|
||||
|
||||
- uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
${{ github.ref_name }}.tar.gz
|
||||
${{ github.ref_name }}.tar.xz
|
||||
|
||||
release-windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
needs: release-posix
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: ${{ github.ref_name }}
|
||||
submodules: true
|
||||
|
||||
- name: Cleanup
|
||||
shell: bash
|
||||
run: |
|
||||
find ${{ github.ref_name }} -name ".git" -prune -exec rm -rf {} +
|
||||
|
||||
- name: Create archives
|
||||
shell: cmd
|
||||
run: |
|
||||
7z a ${{ github.ref_name }}.zip ${{ github.ref_name }}
|
||||
7z a ${{ github.ref_name }}.7z ${{ github.ref_name }}
|
||||
|
||||
- uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
${{ github.ref_name }}.zip
|
||||
${{ github.ref_name }}.7z
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
/b2
|
||||
/b2.exe
|
||||
/bin.v2
|
||||
/bjam
|
||||
/bjam.exe
|
||||
/bootstrap.log
|
||||
/boost
|
||||
/dist
|
||||
/project-config.jam*
|
||||
/stage
|
||||
/stage_x64/
|
||||
/user-config.jam
|
||||
/.settings/
|
||||
/.project
|
||||
/.pydevproject
|
||||
+202
-753
File diff suppressed because it is too large
Load Diff
-143
@@ -1,143 +0,0 @@
|
||||
# Use, modification, and distribution are
|
||||
# subject to 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)
|
||||
#
|
||||
# Copyright Rene Rivera 2015-2016.
|
||||
# Copyright Peter Dimov 2017-2021.
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
dist: bionic
|
||||
|
||||
language: cpp
|
||||
|
||||
compiler: gcc
|
||||
|
||||
git:
|
||||
submodules: false
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- TRAVIS_EMPTY_JOB_WORKAROUND=true
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- env: TRAVIS_EMPTY_JOB_WORKAROUND=true
|
||||
|
||||
include:
|
||||
|
||||
- env: SCRIPT=ci_boost_release MODE=check
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- xsltproc
|
||||
|
||||
# Simple integrated status tests check.
|
||||
- env: SCRIPT=ci_boost_status
|
||||
|
||||
# Same, but using release layout
|
||||
- env: SCRIPT=ci_boost_status RELEASE=1
|
||||
|
||||
# Run 'quick' tests.
|
||||
- env: SCRIPT=ci_boost_status TARGET=quick TOOLSET=gcc CXXSTD=03,11,14
|
||||
compiler: g++
|
||||
|
||||
- env: SCRIPT=ci_boost_status TARGET=quick TOOLSET=clang CXXSTD=03,11,14
|
||||
compiler: clang++
|
||||
|
||||
# Build Boost
|
||||
- env: SCRIPT=ci_boost_build TOOLSET=gcc
|
||||
compiler: g++
|
||||
|
||||
# Build Boost with release layout
|
||||
- env: SCRIPT=ci_boost_build TOOLSET=gcc RELEASE=1
|
||||
compiler: g++
|
||||
|
||||
# Build Boost with CMake
|
||||
- env: CMAKE_BUILD=1
|
||||
dist: xenial
|
||||
compiler: g++
|
||||
|
||||
before_script: true
|
||||
before_install: true
|
||||
after_success: true
|
||||
after_failure: true
|
||||
after_script: true
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libzstd-dev
|
||||
|
||||
install:
|
||||
- git submodule update --init --jobs 3
|
||||
|
||||
script:
|
||||
- mkdir __build && cd __build
|
||||
- cmake -DBOOST_INSTALL_LAYOUT=tagged -DBUILD_SHARED_LIBS=ON ..
|
||||
- cmake --build .
|
||||
|
||||
# Install Boost with CMake
|
||||
- env: CMAKE_INSTALL=1
|
||||
compiler: g++
|
||||
|
||||
before_script: true
|
||||
before_install: true
|
||||
after_success: true
|
||||
after_failure: true
|
||||
after_script: true
|
||||
|
||||
install:
|
||||
- pip install --user cmake
|
||||
- git submodule update --init --jobs 3
|
||||
|
||||
script:
|
||||
- mkdir __build && cd __build
|
||||
- cmake -DBOOST_INSTALL_LAYOUT=tagged -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||
- cmake --build .
|
||||
- cmake --build . --target install
|
||||
|
||||
# Test Boost with CMake
|
||||
- env: CMAKE_TEST=1
|
||||
dist: bionic
|
||||
compiler: g++
|
||||
|
||||
before_script: true
|
||||
before_install: true
|
||||
after_success: true
|
||||
after_failure: true
|
||||
after_script: true
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- liblzma-dev
|
||||
- libzstd-dev
|
||||
|
||||
install:
|
||||
- git submodule update --init --jobs 3
|
||||
|
||||
script:
|
||||
- mkdir __build && cd __build
|
||||
- cmake -DBUILD_TESTING=ON ..
|
||||
- cmake --build . -j 3
|
||||
- cmake --build . --target tests -j 3 -- -k
|
||||
- ctest --output-on-failure -j 3 -R quick
|
||||
|
||||
before_install:
|
||||
# Fetch the scripts to do the actual building/testing.
|
||||
- git submodule update --init --jobs 3
|
||||
- |
|
||||
wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_common.py" -P ..
|
||||
wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/${SCRIPT}.py" -P ..
|
||||
|
||||
install: python "${TRAVIS_BUILD_DIR}/../${SCRIPT}.py" install
|
||||
before_script: python "${TRAVIS_BUILD_DIR}/../${SCRIPT}.py" before_script
|
||||
script: python "${TRAVIS_BUILD_DIR}/../${SCRIPT}.py" script
|
||||
after_success: python "${TRAVIS_BUILD_DIR}/../${SCRIPT}.py" after_success
|
||||
after_failure: python "${TRAVIS_BUILD_DIR}/../${SCRIPT}.py" after_failure
|
||||
after_script: python "${TRAVIS_BUILD_DIR}/../${SCRIPT}.py" after_script
|
||||
@@ -1,20 +0,0 @@
|
||||
# Copyright 2019, 2021 Peter Dimov
|
||||
# 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
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
# The default build type must be set before project()
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
project(Boost VERSION 1.84.0 LANGUAGES CXX)
|
||||
|
||||
set(BOOST_SUPERPROJECT_VERSION ${PROJECT_VERSION})
|
||||
set(BOOST_SUPERPROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/tools/cmake/include)
|
||||
|
||||
include(BoostRoot)
|
||||
@@ -1,8 +0,0 @@
|
||||
See ./index.html for information about this release. The "Getting Started"
|
||||
section is a useful starting place.
|
||||
|
||||
---------------------------
|
||||
Copyright Beman Dawes, 2008
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
See ./LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt
|
||||
@@ -0,0 +1,251 @@
|
||||
#~ Copyright 2003-2004, Rene Rivera.
|
||||
#~ Distributed under the Boost Software License, Version 1.0.
|
||||
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
if --help in $(ARGV)
|
||||
{
|
||||
ECHO "
|
||||
Usage:
|
||||
bjam [options] [install|stage]
|
||||
|
||||
* install Installs to the configured location(s).
|
||||
* stage Stages the build products only to common stage
|
||||
location.
|
||||
|
||||
Options:
|
||||
--help This message.
|
||||
|
||||
-sTOOLS=<toolsets> Indicates the tools to build with.
|
||||
|
||||
--layout=<layout> Determines what kind of build layout to use. This
|
||||
allows one to control the naming of the resulting
|
||||
libraries, and the locations of the installed
|
||||
files. Default is 'versioned'. Possible values:
|
||||
|
||||
versioned - Uses the Boost standard names
|
||||
which include version number for Boost the
|
||||
release and version and name of the
|
||||
compiler as part of the library names. Also
|
||||
installs the includes to a versioned
|
||||
sub-directory.
|
||||
|
||||
system - Builds an install without the
|
||||
Boost standard names, and does not install
|
||||
includes to a versioned sub-directory. This
|
||||
is intended for system integrators to build
|
||||
for packaging of distributions.
|
||||
|
||||
Locations:
|
||||
--prefix=PREFIX Install architecture independent files here.
|
||||
Default; C:\\Boost on Win32
|
||||
Default; /usr/local on Unix. Linux, etc.
|
||||
|
||||
--exec-prefix=EPREFIX Install architecture dependent files here.
|
||||
Default; PREFIX
|
||||
|
||||
--libdir=DIR Install libraries here.
|
||||
Default; EPREFIX/lib
|
||||
|
||||
--includedir=DIR Install source headers here.
|
||||
Default; PREFIX/include
|
||||
|
||||
--builddir=DIR Build in this location instead of building
|
||||
within the distribution tree. Recommended!
|
||||
|
||||
--stagedir=DIR When staging only, stage to the location.
|
||||
Default; ./stage
|
||||
|
||||
Features:
|
||||
--with-<library> Build, stage, or install the specified <library>
|
||||
If used, the default becomes to only build
|
||||
indicated libraries.
|
||||
|
||||
--without-<library> Do not build, stage, or install the specified
|
||||
<library>. By default all libraries attempt to
|
||||
build.
|
||||
|
||||
--with-python-root[=PYTHON_ROOT]
|
||||
Build Boost.Python libraries with the Python
|
||||
devel packages located at PYTHON_ROOT.
|
||||
Default PYTHON_ROOT; C:\\tools\\python on Win32.
|
||||
Default PYTHON_ROOT; /usr/local on Unix, Linux, etc.
|
||||
Default PYTHON_ROOT; /usr on Cygwin.
|
||||
|
||||
--with-pydebug Build Boost.Python libraries using the
|
||||
Python debug runtime.
|
||||
" ;
|
||||
EXIT "" ;
|
||||
}
|
||||
|
||||
local with-install = ;
|
||||
local with-stage = ;
|
||||
|
||||
# build only, or build+install
|
||||
if install in $(ARGV)
|
||||
{
|
||||
with-install = install ;
|
||||
with-stage = ;
|
||||
}
|
||||
|
||||
# stage only? (no install, only build and stage to a common dir)
|
||||
if stage in $(ARGV)
|
||||
{
|
||||
with-stage = stage ;
|
||||
with-install = ;
|
||||
}
|
||||
|
||||
# what kind of layout are we doing?
|
||||
local layout = [ MATCH "^--layout=(.*)" : $(ARGV) ] ;
|
||||
layout ?= versioned ;
|
||||
layout-$(layout) = true ;
|
||||
|
||||
# possible stage only location
|
||||
local stage-locate = [ MATCH "^--stagedir=(.*)" : $(ARGV) ] ;
|
||||
stage-locate ?= stage ;
|
||||
|
||||
# architecture independent files
|
||||
local boost-locate = [ unless $(with-stage) : [ MATCH "^--prefix=(.*)" : $(ARGV) ] : $(stage-locate) ] ;
|
||||
if $(NT) { boost-locate ?= C:\\Boost ; }
|
||||
else if $(UNIX) { boost-locate ?= /usr/local ; }
|
||||
|
||||
# architecture dependent files
|
||||
local exec-locate = [ MATCH "^--exec-prefix=(.*)" : $(ARGV) ] ;
|
||||
exec-locate ?= $(boost-locate) ;
|
||||
|
||||
# object code libraries
|
||||
local lib-locate = [ MATCH "^--libdir=(.*)" : $(ARGV) ] ;
|
||||
lib-locate ?= $(exec-locate)/lib ;
|
||||
|
||||
# where to build
|
||||
local all-locate = [ MATCH "^--builddir=(.*)" : $(ARGV) ] ;
|
||||
ALL_LOCATE_TARGET ?= $(all-locate) ;
|
||||
|
||||
# source header files
|
||||
local include-locate = [ MATCH "^--includedir=(.*)" : $(ARGV) ] ;
|
||||
include-locate ?= $(boost-locate)/include ;
|
||||
|
||||
# location of python
|
||||
local python-root = [ MATCH "^--with-python-root=(.*)" : $(ARGV) ] ;
|
||||
PYTHON_ROOT ?= $(python-root) ;
|
||||
|
||||
# variant for pydebug build
|
||||
local with-debug-python ;
|
||||
if --with-pydebug in $(ARGV)
|
||||
{
|
||||
with-debug-python = debug-python ;
|
||||
}
|
||||
|
||||
# libraries to disable building, etc.
|
||||
local without-libraries = [ MATCH "^--without-(.*)" : $(ARGV) ] ;
|
||||
|
||||
# libraries to enable
|
||||
local with-libraries ;
|
||||
for local arg in $(ARGV)
|
||||
{
|
||||
switch $(arg)
|
||||
{
|
||||
case --with-python-root=* : local _ ;
|
||||
case --with-pydebug : local _ ;
|
||||
|
||||
case --with-* :
|
||||
with-libraries += [ MATCH "^--with-(.*)" : $(arg) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
project-root ;
|
||||
|
||||
# bring in the rules for python
|
||||
import python ;
|
||||
|
||||
#
|
||||
local version-tag = [ MATCH "^([^.]+).([^.]+)" : $(BOOST_VERSION) ] ;
|
||||
version-tag = $(version-tag:J="_") ;
|
||||
|
||||
#
|
||||
install-subinclude
|
||||
[ MATCH ^(.*build[/\\:]$(JAMFILE))$ : [ glob-tree $(BOOST_ROOT)/libs : $(JAMFILE) ] ]
|
||||
: <exclude>$(without-libraries) <include>$(with-libraries) ;
|
||||
|
||||
local lib-sources = [ install-sources lib ] ;
|
||||
|
||||
if $(lib-sources)
|
||||
{
|
||||
local gNOWARN_INCOMPATIBLE_BUILDS = TRUE ;
|
||||
local gUNVERSIONED_VARIANT_TAG = [ cond $(layout-system) : TRUE ] ;
|
||||
|
||||
local lib-build =
|
||||
debug release
|
||||
[ cond $(with-debug-python) : debug-python ]
|
||||
[ cond $(NT) : <runtime-link>static/dynamic ]
|
||||
<threading>single/multi
|
||||
;
|
||||
local lib-target =
|
||||
[ cond $(with-install) : install : all ]
|
||||
[ cond $(with-stage) : stage : all ]
|
||||
;
|
||||
local lib-dest-files = [
|
||||
stage $(lib-locate:D=)
|
||||
:
|
||||
$(lib-sources)
|
||||
:
|
||||
<locate>$(lib-locate:D)
|
||||
common-variant-tag
|
||||
<target>$(lib-target)
|
||||
:
|
||||
$(lib-build)
|
||||
[ unless $(with-install) $(with-stage) : <suppress>true ]
|
||||
] ;
|
||||
if ! $(gIN_LIB_INCLUDE) && $(layout-versioned)
|
||||
{
|
||||
local unversioned-files ;
|
||||
if $(with-install) || $(with-stage)
|
||||
{
|
||||
if $(NT)
|
||||
{
|
||||
local version-files = [ MATCH "(.*[.]lib)" : $(lib-dest-files) ] ;
|
||||
local noversion-files ;
|
||||
for local version-file in $(version-files)
|
||||
{
|
||||
local noversion-file =
|
||||
[ MATCH "(.*)-[0-9_]+([.]lib)" : $(version-file) ] ;
|
||||
noversion-file = $(noversion-file[1])$(noversion-file[2]) ;
|
||||
MakeLocate $(noversion-file) : [ FDirName [ split-path $(lib-locate) ] ] ;
|
||||
HardLink $(noversion-file) : $(version-file) ;
|
||||
noversion-files += $(noversion-file) ;
|
||||
}
|
||||
declare-fake-targets $(lib-target) : $(noversion-files) ;
|
||||
}
|
||||
else if $(UNIX)
|
||||
{
|
||||
local so-version-files = [ MATCH "(.*[.]so[.0-9]+)" : $(lib-dest-files) ] ;
|
||||
so-version-files ?= [ MATCH "(.*[.]so)" : $(lib-dest-files) ] ;
|
||||
local version-files = $(so-version-files) [ MATCH "(.*[.]a)" : $(lib-dest-files) ] ;
|
||||
local noversion-files ;
|
||||
for local version-file in $(version-files)
|
||||
{
|
||||
local noversion-file =
|
||||
[ MATCH "(.*)-[0-9_]+([.]so)[.0-9]*" : $(version-file) ]
|
||||
[ MATCH "(.*)-[0-9_]+([.]a)" : $(version-file) ] ;
|
||||
noversion-file = $(noversion-file[1])$(noversion-file[2]) ;
|
||||
MakeLocate $(noversion-file) : [ FDirName [ split-path $(lib-locate) ] ] ;
|
||||
HardLink $(noversion-file) : $(version-file) ;
|
||||
noversion-files += $(noversion-file) ;
|
||||
}
|
||||
declare-fake-targets $(lib-target) : $(noversion-files) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage [ cond $(layout-versioned) : $(include-locate:D=)/boost-$(version-tag) : $(include-locate:D=) ]
|
||||
:
|
||||
[ glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* ]
|
||||
[ glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc ]
|
||||
:
|
||||
<locate>$(include-locate:D)
|
||||
<tree-subdirs>$(BOOST_ROOT)
|
||||
[ cond $(with-install) : <target>install : <target>all ]
|
||||
:
|
||||
[ unless $(with-install) : <suppress>true ]
|
||||
;
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
#
|
||||
# This is Boost Jamfile for Boost.Build V2.
|
||||
#
|
||||
# Pass --v2 option to bjam to use this file. For example:
|
||||
#
|
||||
# bjam --v2 link=static
|
||||
#
|
||||
|
||||
# TODO:
|
||||
# - handle boost version
|
||||
|
||||
|
||||
import modules ;
|
||||
import set ;
|
||||
import stage ;
|
||||
import package ;
|
||||
|
||||
constant BOOST_VERSION : 1.33.0 ;
|
||||
|
||||
project boost
|
||||
: requirements <include>.
|
||||
# disable auto-linking for all targets here,
|
||||
# primarily because it caused troubles with V2
|
||||
<define>BOOST_ALL_NO_LIB=1
|
||||
# Used to encode variant in target name. See the
|
||||
# 'tag' rule below.
|
||||
<tag>@$(__name__).tag
|
||||
: usage-requirements <include>.
|
||||
: build-dir bin.v2
|
||||
;
|
||||
|
||||
# Decides which libraries are to be installed by looking at --with-<library>
|
||||
# --without-<library> arguments. Returns the list of directories under "libs"
|
||||
# which must be built at installed.
|
||||
rule libraries-to-install ( existing-libraries * )
|
||||
{
|
||||
local argv = [ modules.peek : ARGV ] ;
|
||||
local with-parameter = [ MATCH --with-(.*) : $(argv) ] ;
|
||||
local without-parameter = [ MATCH --without-(.*) : $(argv) ] ;
|
||||
|
||||
# Do some checks
|
||||
if $(with-parameter) && $(without-parameter)
|
||||
{
|
||||
ECHO "error: both --with-<library> and --without-<library> specified" ;
|
||||
EXIT ;
|
||||
}
|
||||
|
||||
local wrong = [ set.difference $(with-parameter) : $(existing-libraries) ] ;
|
||||
if $(wrong)
|
||||
{
|
||||
ECHO "error: wrong library name '$(wrong[1])' in the --with-<library> option." ;
|
||||
EXIT ;
|
||||
}
|
||||
local wrong = [ set.difference $(without-parameter) : $(existing-libraries) ] ;
|
||||
if $(wrong)
|
||||
{
|
||||
ECHO "error: wrong library name '$(wrong[1])' in the --without-<library> option." ;
|
||||
EXIT ;
|
||||
}
|
||||
|
||||
if $(with-parameter)
|
||||
{
|
||||
return [ set.intersection $(existing-libraries) : $(with-parameter) ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
return [ set.difference $(existing-libraries) : $(without-parameter) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
# what kind of layout are we doing?
|
||||
layout = [ MATCH "^--layout=(.*)" : $(ARGV) ] ;
|
||||
layout ?= versioned ;
|
||||
layout-$(layout) = true ;
|
||||
|
||||
# possible stage only location
|
||||
local stage-locate = [ MATCH "^--stagedir=(.*)" : $(ARGV) ] ;
|
||||
stage-locate ?= stage ;
|
||||
|
||||
path-constant BOOST_STAGE_LOCATE : $(stage-locate) ;
|
||||
|
||||
|
||||
# location of python
|
||||
local python-root = [ MATCH "^--with-python-root=(.*)" : $(ARGV) ] ;
|
||||
PYTHON_ROOT ?= $(python-root) ;
|
||||
|
||||
# Select the libraries to install.
|
||||
libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ] ] ;
|
||||
libraries = [ libraries-to-install $(libraries) ] ;
|
||||
|
||||
|
||||
# This rule is called by Boost.Build to determine the name of
|
||||
# target. We use it to encode build variant, compiler name and
|
||||
# boost version in the target name
|
||||
rule tag ( name : type ? : property-set )
|
||||
{
|
||||
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
|
||||
{
|
||||
if $(layout) = versioned
|
||||
{
|
||||
name = [ stage.add-variant-and-compiler $(name)
|
||||
: $(type) : $(property-set) ] ;
|
||||
|
||||
local version-tag = [ MATCH "^([^.]+)[.]([^.]+)" : $(BOOST_VERSION[1]) ] ;
|
||||
version-tag = $(version-tag:J="_") ;
|
||||
|
||||
# On NT, library with version suffix won't be recognized
|
||||
# by linkers. On CYGWIN, we get strage duplicate symbol
|
||||
# errors when library is generated with version suffix.
|
||||
# On OSX, version suffix is not needed -- the linker expets
|
||||
# libFoo.1.2.3.dylib format.
|
||||
# AIX linkers don't accept version suffixes either.
|
||||
if [ $(property-set).get <os> ] in NT CYGWIN MACOSX AIX
|
||||
{
|
||||
return $(name:B)-$(version-tag)$(name:S) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $(name:B)-$(version-tag)$(name:S).$(BOOST_VERSION) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return [ stage.add-variant-and-compiler $(name)
|
||||
: $(type) : $(property-set) ] ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Install to system location.
|
||||
|
||||
local patterns = *.hpp *.ipp *.h *.inc ;
|
||||
local dirs = boost boost/* boost/*/* ;
|
||||
|
||||
# Complete install
|
||||
package.install install
|
||||
: <install-source-root>. # No specific requirements
|
||||
: # No binaries
|
||||
: libs/$(libraries)/build
|
||||
: [ glob $(dirs)/$(patterns) ]
|
||||
;
|
||||
|
||||
# Install just library.
|
||||
install stage : libs/$(libraries)/build
|
||||
: <location>$(stage-locate)
|
||||
;
|
||||
|
||||
# Just build the libraries, don't install them anywhere.
|
||||
# This is what happend with just "bjam --v2".
|
||||
alias build_all : libs/$(libraries)/build ;
|
||||
|
||||
# This rule should be called from libraries' Jamfiles and will
|
||||
# create two targets, "install" and "stage", that will install
|
||||
# or stage that library. The --prefix option is respected, by
|
||||
# --with and --without options, naturally, are ignored.
|
||||
#
|
||||
# - libraries -- list of library targets to install.
|
||||
rule boost-install ( libraries * )
|
||||
{
|
||||
package.install install
|
||||
: <dependency>/boost//install-headers
|
||||
: # No binaries
|
||||
: $(libraries)
|
||||
: # No headers, it's handled by the dependency
|
||||
;
|
||||
|
||||
install stage : $(libraries) : <location>$(BOOST_STAGE_LOCATE) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Make project ids of all libraries known.
|
||||
for local l in $(libraries)
|
||||
{
|
||||
use-project /boost/$(l) : libs/$(l)/build ;
|
||||
}
|
||||
|
||||
@@ -1,328 +0,0 @@
|
||||
# Copyright Vladimir Prus 2002-2006.
|
||||
# Copyright Dave Abrahams 2005-2006.
|
||||
# Copyright Rene Rivera 2005-2007.
|
||||
# Copyright Douglas Gregor 2005.
|
||||
#
|
||||
# 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)
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# b2 [options] [properties] [install|stage]
|
||||
#
|
||||
# Builds and installs Boost.
|
||||
#
|
||||
# Targets and Related Options:
|
||||
#
|
||||
# install Install headers and compiled library files to the
|
||||
# ======= configured locations (below).
|
||||
#
|
||||
# --prefix=<PREFIX> Install architecture independent files here.
|
||||
# Default: C:\Boost on Windows
|
||||
# Default: /usr/local on Unix, Linux, etc.
|
||||
#
|
||||
# --exec-prefix=<EPREFIX> Install architecture dependent files here.
|
||||
# Default: <PREFIX>
|
||||
#
|
||||
# --libdir=<LIBDIR> Install library files here.
|
||||
# Default: <EPREFIX>/lib
|
||||
#
|
||||
# --includedir=<HDRDIR> Install header files here.
|
||||
# Default: <PREFIX>/include
|
||||
#
|
||||
# --cmakedir=<CMAKEDIR> Install CMake configuration files here.
|
||||
# Default: <LIBDIR>/cmake
|
||||
#
|
||||
# --no-cmake-config Do not install CMake configuration files.
|
||||
#
|
||||
# stage Build and install only compiled library files to the
|
||||
# ===== stage directory.
|
||||
#
|
||||
# --stagedir=<STAGEDIR> Install library files here
|
||||
# Default: ./stage
|
||||
#
|
||||
# Other Options:
|
||||
#
|
||||
# --build-type=<type> Build the specified pre-defined set of variations of
|
||||
# the libraries. Note, that which variants get built
|
||||
# depends on what each library supports.
|
||||
#
|
||||
# -- minimal -- (default) Builds a minimal set of
|
||||
# variants. On Windows, these are static
|
||||
# multithreaded libraries in debug and release
|
||||
# modes, using shared runtime. On Linux, these are
|
||||
# static and shared multithreaded libraries in
|
||||
# release mode.
|
||||
#
|
||||
# -- complete -- Build all possible variations.
|
||||
#
|
||||
# --build-dir=DIR Build in this location instead of building within
|
||||
# the distribution tree. Recommended!
|
||||
#
|
||||
# --show-libraries Display the list of Boost libraries that require
|
||||
# build and installation steps, and then exit.
|
||||
#
|
||||
# --layout=<layout> Determine whether to choose library names and header
|
||||
# locations such that multiple versions of Boost or
|
||||
# multiple compilers can be used on the same system.
|
||||
#
|
||||
# -- versioned -- Names of boost binaries include
|
||||
# the Boost version number, name and version of
|
||||
# the compiler and encoded build properties. Boost
|
||||
# headers are installed in a subdirectory of
|
||||
# <HDRDIR> whose name contains the Boost version
|
||||
# number.
|
||||
#
|
||||
# -- tagged -- Names of boost binaries include the
|
||||
# encoded build properties such as variant and
|
||||
# threading, but do not including compiler name
|
||||
# and version, or Boost version. This option is
|
||||
# useful if you build several variants of Boost,
|
||||
# using the same compiler.
|
||||
#
|
||||
# -- system -- Binaries names do not include the
|
||||
# Boost version number or the name and version
|
||||
# number of the compiler. Boost headers are
|
||||
# installed directly into <HDRDIR>. This option is
|
||||
# intended for system integrators building
|
||||
# distribution packages.
|
||||
#
|
||||
# The default value is 'versioned' on Windows, and
|
||||
# 'system' on Unix.
|
||||
#
|
||||
# --buildid=ID Add the specified ID to the name of built libraries.
|
||||
# The default is to not add anything.
|
||||
#
|
||||
# --python-buildid=ID Add the specified ID to the name of built libraries
|
||||
# that depend on Python. The default is to not add
|
||||
# anything. This ID is added in addition to --buildid.
|
||||
#
|
||||
# --help This message.
|
||||
#
|
||||
# --with-<library> Build and install the specified <library>. If this
|
||||
# option is used, only libraries specified using this
|
||||
# option will be built.
|
||||
#
|
||||
# --without-<library> Do not build, stage, or install the specified
|
||||
# <library>. By default, all libraries are built.
|
||||
#
|
||||
# Properties:
|
||||
#
|
||||
# toolset=toolset Indicate the toolset to build with.
|
||||
#
|
||||
# variant=debug|release Select the build variant
|
||||
#
|
||||
# link=static|shared Whether to build static or shared libraries
|
||||
#
|
||||
# threading=single|multi Whether to build single or multithreaded binaries
|
||||
#
|
||||
# runtime-link=static|shared
|
||||
# Whether to link to static or shared C and C++
|
||||
# runtime.
|
||||
#
|
||||
|
||||
# TODO:
|
||||
# - handle boost version
|
||||
# - handle python options such as pydebug
|
||||
|
||||
import boostcpp ;
|
||||
import package ;
|
||||
|
||||
import sequence ;
|
||||
import xsltproc ;
|
||||
import set ;
|
||||
import path ;
|
||||
import link ;
|
||||
import notfile ;
|
||||
import virtual-target ;
|
||||
import "class" : new ;
|
||||
import property-set ;
|
||||
import threadapi-feature ;
|
||||
import option ;
|
||||
# Backslash because of `bcp --namespace`
|
||||
import tools/boost\_install/boost-install ;
|
||||
|
||||
path-constant BOOST_ROOT : . ;
|
||||
constant BOOST_VERSION : 1.84.0 ;
|
||||
constant BOOST_JAMROOT_MODULE : $(__name__) ;
|
||||
|
||||
# Allow subprojects to simply `import config : requires ;` to get access to the requires rule
|
||||
modules.poke : BOOST_BUILD_PATH : $(BOOST_ROOT)/libs/config/checks [ modules.peek : BOOST_BUILD_PATH ] ;
|
||||
|
||||
boostcpp.set-version $(BOOST_VERSION) ;
|
||||
|
||||
use-project /boost/architecture : libs/config/checks/architecture ;
|
||||
|
||||
local all-headers =
|
||||
[ MATCH .*libs/(.*)/include/boost : [ glob libs/*/include/boost libs/*/*/include/boost ] ] ;
|
||||
|
||||
for dir in $(all-headers)
|
||||
{
|
||||
link-directory $(dir)-headers : libs/$(dir)/include/boost : <location>. ;
|
||||
explicit $(dir)-headers ;
|
||||
}
|
||||
|
||||
if $(all-headers)
|
||||
{
|
||||
constant BOOST_MODULARLAYOUT : $(all-headers) ;
|
||||
}
|
||||
|
||||
project boost
|
||||
: requirements <include>.
|
||||
|
||||
[ boostcpp.architecture ]
|
||||
[ boostcpp.address-model ]
|
||||
|
||||
# Disable auto-linking for all targets here, primarily because it caused
|
||||
# troubles with V2.
|
||||
<define>BOOST_ALL_NO_LIB=1
|
||||
# Used to encode variant in target name. See the 'tag' rule below.
|
||||
<tag>@$(__name__).tag
|
||||
<conditional>@handle-static-runtime
|
||||
# Comeau does not support shared lib
|
||||
<toolset>como:<link>static
|
||||
<toolset>como-linux:<define>_GNU_SOURCE=1
|
||||
# When building docs within Boost, we want the standard Boost style
|
||||
<xsl:param>boost.defaults=Boost
|
||||
<conditional>@threadapi-feature.detect
|
||||
: usage-requirements <include>.
|
||||
: default-build
|
||||
<visibility>hidden
|
||||
<threading>multi
|
||||
: build-dir bin.v2
|
||||
;
|
||||
|
||||
# This rule is called by Boost.Build to determine the name of target. We use it
|
||||
# to encode the build variant, compiler name and boost version in the target
|
||||
# name.
|
||||
#
|
||||
rule tag ( name : type ? : property-set )
|
||||
{
|
||||
return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ;
|
||||
}
|
||||
|
||||
rule python-tag ( name : type ? : property-set )
|
||||
{
|
||||
return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ;
|
||||
}
|
||||
|
||||
rule handle-static-runtime ( properties * )
|
||||
{
|
||||
# Using static runtime with shared libraries is impossible on Linux, and
|
||||
# dangerous on Windows. Therefore, we disallow it. This might be drastic,
|
||||
# but it was disabled for a while without anybody complaining.
|
||||
|
||||
local argv = [ modules.peek : ARGV ] ;
|
||||
|
||||
if <link>shared in $(properties)
|
||||
&& <runtime-link>static in $(properties)
|
||||
# For CW, static runtime is needed so that std::locale works.
|
||||
&& ! ( <toolset>cw in $(properties) )
|
||||
&& ! --allow-shared-static in $(argv)
|
||||
{
|
||||
boostcpp.emit-shared-static-warning ;
|
||||
return <build>no ;
|
||||
}
|
||||
}
|
||||
|
||||
all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ]
|
||||
[ glob libs/*/build/Jamfile ] ] ;
|
||||
|
||||
all-libraries = [ sequence.unique $(all-libraries) ] ;
|
||||
# The function_types library has a Jamfile, but it's used for maintenance
|
||||
# purposes, there's no library to build and install.
|
||||
all-libraries = [ set.difference $(all-libraries) : function_types ] ;
|
||||
|
||||
# Setup convenient aliases for all libraries.
|
||||
|
||||
local rule explicit-alias ( id : targets + )
|
||||
{
|
||||
alias $(id) : $(targets) ;
|
||||
explicit $(id) ;
|
||||
}
|
||||
|
||||
# First, the complicated libraries: where the target name in Jamfile is
|
||||
# different from its directory name.
|
||||
explicit-alias prg_exec_monitor : libs/test/build//boost_prg_exec_monitor ;
|
||||
explicit-alias test_exec_monitor : libs/test/build//boost_test_exec_monitor ;
|
||||
explicit-alias unit_test_framework : libs/test/build//boost_unit_test_framework ;
|
||||
explicit-alias serialization : libs/serialization/build//boost_serialization ;
|
||||
explicit-alias wserialization : libs/serialization/build//boost_wserialization ;
|
||||
for local l in $(all-libraries)
|
||||
{
|
||||
if ! $(l) in test graph serialization headers
|
||||
{
|
||||
explicit-alias $(l) : libs/$(l)/build//boost_$(l) ;
|
||||
}
|
||||
}
|
||||
|
||||
# Log has an additional target
|
||||
explicit-alias log_setup : libs/log/build//boost_log_setup ;
|
||||
|
||||
rule do-nothing { }
|
||||
|
||||
rule generate-alias ( project name : property-set : sources * )
|
||||
{
|
||||
local action-name = [ $(property-set).get <action> ] ;
|
||||
local m = [ MATCH ^@(.*) : $(action-name) ] ;
|
||||
property-set = [ property-set.empty ] ;
|
||||
local action = [ new action $(sources) : $(m[1]) : $(property-set) ] ;
|
||||
local t = [ new notfile-target $(name) : $(project) : $(action) ] ;
|
||||
return [ virtual-target.register $(t) ] ;
|
||||
}
|
||||
|
||||
generate headers : $(all-headers)-headers : <generating-rule>@generate-alias <action>@do-nothing : : <include>. ;
|
||||
|
||||
#alias headers : $(all-headers)-headers : : : <include>. ;
|
||||
explicit headers ;
|
||||
|
||||
# Make project ids of all libraries known.
|
||||
for local l in $(all-libraries)
|
||||
{
|
||||
use-project /boost/$(l) : libs/$(l)/build ;
|
||||
}
|
||||
|
||||
if [ path.exists $(BOOST_ROOT)/tools/inspect/build ]
|
||||
{
|
||||
use-project /boost/tools/inspect : tools/inspect/build ;
|
||||
}
|
||||
|
||||
if [ path.exists $(BOOST_ROOT)/libs/wave/tool/build ]
|
||||
{
|
||||
use-project /boost/libs/wave/tool : libs/wave/tool/build ;
|
||||
}
|
||||
|
||||
# Make the boost-install rule visible in subprojects
|
||||
|
||||
# This rule should be called from libraries' Jamfiles and will create two
|
||||
# targets, "install" and "stage", that will install or stage that library. The
|
||||
# --prefix option is respected, but --with and --without options, naturally, are
|
||||
# ignored.
|
||||
#
|
||||
# - libraries -- list of library targets to install.
|
||||
|
||||
rule boost-install ( libraries * )
|
||||
{
|
||||
boost-install.boost-install $(libraries) ;
|
||||
}
|
||||
|
||||
# Creates a library target, adding autolink support and also creates
|
||||
# stage and install targets via boost-install, above.
|
||||
rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * )
|
||||
{
|
||||
autolink = <link>shared:<define>BOOST_$(name:U)_DYN_LINK=1 ;
|
||||
name = boost_$(name) ;
|
||||
lib $(name)
|
||||
: $(sources)
|
||||
: $(requirements) $(autolink)
|
||||
: $(default-build)
|
||||
: $(usage-requirements) $(autolink)
|
||||
;
|
||||
boost-install $(name) ;
|
||||
}
|
||||
|
||||
|
||||
# Declare special top-level targets that build and install the desired variants
|
||||
# of the libraries.
|
||||
boostcpp.declare-targets $(all-libraries) ;
|
||||
@@ -0,0 +1,15 @@
|
||||
# Boost.Build top level Jamrules
|
||||
|
||||
# See tools/build/index.html for documentation.
|
||||
project boost ;
|
||||
|
||||
# Set some important global variables if they haven't already been set by the
|
||||
# user on the command-line or in the environment
|
||||
|
||||
# Establish this as the root of the boost installation. Most targets will want
|
||||
# $(BOOST_ROOT) in their #include path.
|
||||
path-global BOOST_ROOT : . ;
|
||||
|
||||
# The current version of Boost.
|
||||
BOOST_VERSION ?= 1.33.0 ;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Unless otherwise specified, all Boost software and documentation is subject
|
||||
to the Boost Software License Version 1.0. See the accompanying file LICENSE_1_0.txt.
|
||||
A copy of the license is also available at http://www.boost.org/LICENSE_1_0.txt.
|
||||
|
||||
For the most current version of Boost libraries and documentation, see:
|
||||
|
||||
http://www.boost.org
|
||||
|
||||
Boost documentation is in HTML format.
|
||||
|
||||
The top-level directory (which contains this README file) should contain
|
||||
a file named index.htm with links to all documentation, including
|
||||
documentation on building boost libraries for your particular compiler
|
||||
and operating system.
|
||||
@@ -1,46 +0,0 @@
|
||||
# Boost C++ Libraries
|
||||
|
||||
The Boost project provides free peer-reviewed portable C++ source libraries.
|
||||
|
||||
We emphasize libraries that work well with the C++ Standard Library. Boost
|
||||
libraries are intended to be widely useful, and usable across a broad spectrum
|
||||
of applications. The Boost license encourages both commercial and non-commercial use
|
||||
and does not require attribution for binary use.
|
||||
|
||||
The project website is www.boost.org, where you can obtain more information and
|
||||
[download](https://www.boost.org/users/download/) the current release.
|
||||
|
||||
## Cloning
|
||||
|
||||
Clone the superproject repository with all submodules and checkout the `master` as the default branch:
|
||||
|
||||
```console
|
||||
git clone --recurse-submodules https://github.com/boostorg/boost.git boost-root
|
||||
```
|
||||
|
||||
or checkout the `develop` branch with the latest development snapshot:
|
||||
|
||||
```console
|
||||
git clone --branch develop --recurse-submodules https://github.com/boostorg/boost.git boost-root
|
||||
```
|
||||
|
||||
Alternatively, clone just the superproject repository, then clone a desired submodule together with its dependencies:
|
||||
|
||||
```console
|
||||
git clone https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
git submodule update --init tools/boostdep
|
||||
python tools/boostdep/depinst/depinst.py filesystem
|
||||
```
|
||||
|
||||
Alternatively, clone just the superproject repository, then manually pick individual submodules:
|
||||
|
||||
```console
|
||||
git clone https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
git submodule --quiet update --init \
|
||||
tools/build \
|
||||
tools/boost_install \
|
||||
tools/boostdep \
|
||||
libs/headers
|
||||
```
|
||||
@@ -1,34 +0,0 @@
|
||||
version: 1.0.{build}-{branch}
|
||||
|
||||
branches:
|
||||
only:
|
||||
- develop
|
||||
- master
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||
SCRIPT: ci_boost_test_library
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
SCRIPT: ci_boost_test_library
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
SCRIPT: ci_boost_test_library
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
SCRIPT: ci_boost_status
|
||||
TARGET: quick
|
||||
|
||||
init:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%/..
|
||||
- appveyor DownloadFile "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_common.py"
|
||||
- appveyor DownloadFile "https://raw.githubusercontent.com/boostorg/release-tools/develop/%SCRIPT%.py"
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
install: python ../%SCRIPT%.py install
|
||||
before_build: python ../%SCRIPT%.py before_build
|
||||
build_script: python ../%SCRIPT%.py build_script
|
||||
after_build: python ../%SCRIPT%.py after_build
|
||||
before_test: python ../%SCRIPT%.py before_test
|
||||
test_script: python ../%SCRIPT%.py test_script
|
||||
after_test: python ../%SCRIPT%.py after_test
|
||||
on_success: python ../%SCRIPT%.py on_success
|
||||
on_failure: python ../%SCRIPT%.py on_failure
|
||||
on_finish: python ../%SCRIPT%.py on_finish
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
# Copyright (C) 2002-2003 David Abrahams.
|
||||
# Copyright (C) 2002-2003 Vladimir Prus.
|
||||
# Copyright (C) 2003,2007 Rene Rivera.
|
||||
# Use, modification and distribution are subject to 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)
|
||||
|
||||
# This is the initial file loaded by Boost Jam when run from any Boost library
|
||||
# folder. It allows us to choose which Boost Build installation to use for
|
||||
# building Boost libraries. Unless explicitly selected using a command-line
|
||||
# option, the version included with the Boost library distribution is used (as
|
||||
# opposed to any other Boost Build version installed on the user's system).
|
||||
#~ Copyright (C) 2002-2003, David Abrahams.
|
||||
#~ Copyright (C) 2002-2003, Vladimir Prus.
|
||||
#~ Copyright (C) 2003, Rene Rivera.
|
||||
#~ Use, modification and distribution are subject to 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)
|
||||
|
||||
BOOST_ROOT = $(.boost-build-file:D) ;
|
||||
BOOST_BUILD = [ MATCH --boost-build=(.*) : $(ARGV) ] ;
|
||||
BOOST_BUILD ?= tools/build/src ;
|
||||
boost-build $(BOOST_BUILD) ;
|
||||
if --v2 in $(ARGV)
|
||||
{
|
||||
JAMFILE = [Jj]amfile.v2 ;
|
||||
boost-build tools/build/v2 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
boost-build tools/build/v1 ;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
/*=============================================================================
|
||||
Copyright 2002 William E. Kempf
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompany-
|
||||
ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
=============================================================================*/
|
||||
|
||||
H1
|
||||
{
|
||||
FONT-SIZE: 200%;
|
||||
@@ -25,7 +19,6 @@ BODY
|
||||
{
|
||||
FONT-SIZE: 100%;
|
||||
BACKGROUND-COLOR: #ffffff;
|
||||
COLOR: #000000;
|
||||
}
|
||||
PRE
|
||||
{
|
||||
@@ -63,4 +56,4 @@ CODE.as_pre
|
||||
.function-semantics
|
||||
{
|
||||
CLEAR: left;
|
||||
}
|
||||
}
|
||||
|
||||
-674
@@ -1,674 +0,0 @@
|
||||
# Boost.Build support specific for the Boost C++ Libraries.
|
||||
# Copyright Vladimir Prus 2002-2010.
|
||||
# Copyright Dave Abrahams 2005-2006.
|
||||
# Copyright Rene Rivera 2005-2007.
|
||||
# Copyright Douglas Gregor 2005.
|
||||
#
|
||||
# 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 "class" : new ;
|
||||
import common ;
|
||||
import configure ;
|
||||
import build-system ;
|
||||
import generate ;
|
||||
import modules ;
|
||||
import option ;
|
||||
import os ;
|
||||
import package ;
|
||||
import path ;
|
||||
import project ;
|
||||
import regex ;
|
||||
import sequence ;
|
||||
import set ;
|
||||
import targets ;
|
||||
import feature ;
|
||||
import property ;
|
||||
import version : version-less ;
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# 0. General setup. Parse options, check them.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
BOOST_ROOT = [ modules.binding $(__name__) ] ;
|
||||
BOOST_ROOT = $(BOOST_ROOT:D) ;
|
||||
|
||||
rule set-version ( version )
|
||||
{
|
||||
BOOST_VERSION = $(version) ;
|
||||
|
||||
local version-tag =
|
||||
[ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ] ;
|
||||
if $(version-tag[3]) = 0
|
||||
{
|
||||
version-tag = $(version-tag[1-2]) ;
|
||||
}
|
||||
BOOST_VERSION_TAG = $(version-tag:J=_) ;
|
||||
}
|
||||
|
||||
# Option to choose how many variants to build. The default is "minimal".
|
||||
build-type = [ option.get build-type ] ;
|
||||
build-type ?= minimal ;
|
||||
if ! ( $(build-type) in complete minimal )
|
||||
{
|
||||
EXIT The value of the --build-type option should be either 'complete' or
|
||||
'minimal' ;
|
||||
}
|
||||
|
||||
# What kind of layout are we doing?
|
||||
layout = [ option.get layout : "" ] ;
|
||||
|
||||
layout = [ MATCH (versioned|tagged|system)(-(.+))? : $(layout) ] ;
|
||||
if $(layout[3])
|
||||
{
|
||||
layout-version = $(layout[3]) ;
|
||||
layout = $(layout[1]) ;
|
||||
if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 66 ]
|
||||
{
|
||||
layout-version = 1.40 ;
|
||||
}
|
||||
else if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 69 ]
|
||||
{
|
||||
layout-version = 1.66 ;
|
||||
}
|
||||
}
|
||||
layout-version ?= 1.69 ;
|
||||
|
||||
# On Windows, we used versioned layout by default in order to be compatible with
|
||||
# autolink. On other systems, we use system layout which is what every other
|
||||
# program uses. Note that the Windows check is static, and will not be affected
|
||||
# by specific build properties used.
|
||||
if ! $(layout)
|
||||
{
|
||||
if [ os.name ] = NT
|
||||
{
|
||||
layout = versioned ;
|
||||
}
|
||||
else
|
||||
{
|
||||
layout = system ;
|
||||
}
|
||||
}
|
||||
layout-$(layout) = true ;
|
||||
|
||||
if $(layout) = system && $(build-type) = complete
|
||||
{
|
||||
ECHO error\: Cannot use --layout=system with --build-type complete. ;
|
||||
ECHO error\: Please use either --layout=versioned or --layout=tagged ;
|
||||
ECHO error\: if you wish to build multiple variants. ;
|
||||
if [ os.name ] != NT
|
||||
{
|
||||
ECHO error\: Note that --layout=system is used by default on Unix
|
||||
starting with Boost 1.40. ;
|
||||
}
|
||||
EXIT ;
|
||||
}
|
||||
|
||||
# Possible stage only location.
|
||||
stage-locate = [ option.get stagedir ] ;
|
||||
|
||||
if $(stage-locate)
|
||||
{
|
||||
stage-locate = [ path.root [ path.make $(stage-locate) ] [ path.pwd ] ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
stage-locate = $(BOOST_ROOT)/stage ;
|
||||
}
|
||||
|
||||
BOOST_STAGE_LOCATE = $(stage-locate) ;
|
||||
|
||||
# Custom build ID.
|
||||
build-id = [ option.get buildid ] ;
|
||||
if $(build-id)
|
||||
{
|
||||
BUILD_ID = [ regex.replace $(build-id) "[*\\/:.\"\' ]" _ ] ;
|
||||
}
|
||||
|
||||
# Python build id (for Python libraries only).
|
||||
python-id = [ option.get "python-buildid" ] ;
|
||||
if $(python-id)
|
||||
{
|
||||
PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" _ ] ;
|
||||
}
|
||||
|
||||
|
||||
if $(layout) = versioned
|
||||
{
|
||||
switch $(layout-version)
|
||||
{
|
||||
case 1.40 :
|
||||
.format-name-args =
|
||||
<base> <toolset> <threading> <runtime> ;
|
||||
case 1.66 :
|
||||
.format-name-args =
|
||||
<base> <toolset> <threading> <runtime> <arch-and-model> ;
|
||||
case 1.69 :
|
||||
.format-name-args =
|
||||
<base> <toolset> <threading> <runtime> <arch-and-model> ;
|
||||
}
|
||||
}
|
||||
else if $(layout) = tagged
|
||||
{
|
||||
switch $(layout-version)
|
||||
{
|
||||
case 1.40 :
|
||||
.format-name-args =
|
||||
<base> <threading> <runtime> ;
|
||||
case 1.66 :
|
||||
.format-name-args =
|
||||
<base> <threading> <runtime> ;
|
||||
case 1.69 :
|
||||
.format-name-args =
|
||||
<base> <threading> <runtime> <arch-and-model> ;
|
||||
}
|
||||
}
|
||||
else if $(layout) = system
|
||||
{
|
||||
.format-name-args = <base> ;
|
||||
}
|
||||
else
|
||||
{
|
||||
.format-name-error = true ;
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# 1. 'tag' function adding decorations suitable to the properties if versioned
|
||||
# or tagged layout is requested. Called from Jamroot.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
rule tag ( name : type ? : property-set )
|
||||
{
|
||||
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
|
||||
{
|
||||
local args = $(.format-name-args) ;
|
||||
if $(layout) = versioned
|
||||
{
|
||||
args += -$(BOOST_VERSION_TAG) ;
|
||||
}
|
||||
local result = [ common.format-name
|
||||
$(args) -$(BUILD_ID)
|
||||
: $(name) : $(type) : $(property-set) ] ;
|
||||
if $(.format-name-error)
|
||||
{
|
||||
EXIT error\: invalid layout '$(layout:E=)' ;
|
||||
}
|
||||
|
||||
# Optionally add version suffix. On NT, library with version suffix will
|
||||
# not be recognized by linkers. On CYGWIN, we get strage duplicate
|
||||
# symbol errors when library is generated with version suffix. On OSX,
|
||||
# version suffix is not needed -- the linker expects the
|
||||
# libFoo.1.2.3.dylib format. AIX linkers do not accept version suffixes
|
||||
# either. Pgi compilers can not accept a library with version suffix.
|
||||
# For android, if we link to libFoo.so, which is a soft link to libFoo.so.1.2.3,
|
||||
# the android studio will only pack the former into the final apk.
|
||||
if $(type) = SHARED_LIB &&
|
||||
! [ $(property-set).get <target-os> ] in windows cygwin darwin aix android &&
|
||||
! [ $(property-set).get <toolset> ] in pgi
|
||||
{
|
||||
result = $(result).$(BOOST_VERSION) ;
|
||||
}
|
||||
|
||||
return $(result) ;
|
||||
}
|
||||
}
|
||||
|
||||
# Specialized tag function to use for libraries linking to Python.
|
||||
# Appends value of --python-buildid if provided.
|
||||
rule python-tag ( name : type ? : property-set )
|
||||
{
|
||||
local result = $(name) ;
|
||||
|
||||
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
|
||||
{
|
||||
# Add Python version suffix
|
||||
|
||||
local version = [ $(property-set).get <python> ] ;
|
||||
|
||||
local major-minor = [ MATCH "^([0-9]+)\.([0-9]+)" : $(version) ] ;
|
||||
local suffix = $(major-minor:J="") ;
|
||||
|
||||
if $(suffix)
|
||||
{
|
||||
result = $(result)$(suffix) ;
|
||||
}
|
||||
|
||||
# Add PYTHON_ID if supplied
|
||||
|
||||
if $(PYTHON_ID)
|
||||
{
|
||||
result = $(result)-$(PYTHON_ID) ;
|
||||
}
|
||||
}
|
||||
|
||||
# forward to the boost tagging rule
|
||||
return [ tag $(result) : $(type) : $(property-set) ] ;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# 2. Declare targets that build and install all libraries. Specifically:
|
||||
#
|
||||
# - 'stage-proper' that puts all libraries in stage/lib
|
||||
# - 'install-proper' that install libraries and headers to system location
|
||||
#
|
||||
################################################################################
|
||||
|
||||
rule declare_install_and_stage_proper_targets ( libraries * )
|
||||
{
|
||||
local p = [ project.current ] ;
|
||||
|
||||
alias install-proper : libs/$(libraries)/build//install ;
|
||||
$(p).mark-target-as-explicit install-proper ;
|
||||
|
||||
alias stage-proper : libs/$(libraries)/build//stage ;
|
||||
$(p).mark-target-as-explicit stage-proper ;
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# 3. Declare top-level targets 'stage' and 'install'. These examine the
|
||||
# --build-type option and, in case it is 'complete', build the 'install-proper'
|
||||
# and 'stage-proper' targets with a number of property sets.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
rule emit-shared-static-warning ( )
|
||||
{
|
||||
if ! $(.shared-static-warning-emitted)
|
||||
{
|
||||
ECHO "" ;
|
||||
ECHO "warning: The configuration link=shared, runtime-link=static is disabled" ;
|
||||
ECHO "warning: by default as being too dangerous to use, and will not be built." ;
|
||||
ECHO "warning: To enable it, use --allow-shared-static." ;
|
||||
ECHO "" ;
|
||||
|
||||
.shared-static-warning-emitted = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
class top-level-target : alias-target-class
|
||||
{
|
||||
import modules ;
|
||||
import boostcpp ;
|
||||
|
||||
rule __init__ ( name : project : sources * : requirements *
|
||||
: default-build * : usage-requirements * )
|
||||
{
|
||||
alias-target-class.__init__ $(name) : $(project) : $(sources) :
|
||||
$(requirements) : $(default-build) : $(usage-requirements) ;
|
||||
|
||||
self.build-type = [ modules.peek boostcpp : build-type ] ;
|
||||
# On Linux, we build the release variant by default, since few users
|
||||
# will ever want to debug C++ Boost libraries, and there is no ABI
|
||||
# incompatibility between debug and release variants. We build shared
|
||||
# and static libraries since that is what most packages seem to provide
|
||||
# (.so in libfoo and .a in libfoo-dev).
|
||||
|
||||
self.minimal-properties = [ property-set.create <variant>release
|
||||
<threading>multi <link>shared <link>static <runtime-link>shared ] ;
|
||||
|
||||
# On Windows, new IDE projects use:
|
||||
#
|
||||
# runtime-link=dynamic, threading=multi, variant=(debug|release)
|
||||
#
|
||||
# and in addition, C++ Boost's autolink defaults to static linking.
|
||||
|
||||
self.minimal-properties-win = [ property-set.create <variant>debug
|
||||
<variant>release <threading>multi <link>static <runtime-link>shared
|
||||
<address-model>32 <address-model>64 ] ;
|
||||
|
||||
self.complete-properties = [ property-set.create
|
||||
<variant>debug <variant>release
|
||||
<threading>multi
|
||||
<link>shared <link>static
|
||||
<runtime-link>shared <runtime-link>static ] ;
|
||||
|
||||
self.complete-properties-win = [ property-set.create
|
||||
<variant>debug <variant>release
|
||||
<threading>multi
|
||||
<link>shared <link>static
|
||||
<runtime-link>shared <runtime-link>static
|
||||
<address-model>32 <address-model>64 ] ;
|
||||
}
|
||||
|
||||
rule generate ( property-set )
|
||||
{
|
||||
modules.poke : top-level-targets : [ modules.peek : top-level-targets ]
|
||||
$(self.name) ;
|
||||
|
||||
local os = [ $(property-set).get <target-os> ] ;
|
||||
|
||||
# Because we completely override the parent's 'generate' we need to
|
||||
# check for default feature values ourselves.
|
||||
|
||||
if ! $(os)
|
||||
{
|
||||
os = [ feature.defaults <target-os> ] ;
|
||||
os = $(os:G=) ;
|
||||
}
|
||||
|
||||
local build-type-set ;
|
||||
|
||||
if $(self.build-type) = minimal
|
||||
{
|
||||
if $(os) = windows
|
||||
{
|
||||
build-type-set = $(self.minimal-properties-win) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
build-type-set = $(self.minimal-properties) ;
|
||||
}
|
||||
}
|
||||
else if $(self.build-type) = complete
|
||||
{
|
||||
if $(os) = windows
|
||||
{
|
||||
build-type-set = $(self.complete-properties-win) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
build-type-set = $(self.complete-properties) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
import errors ;
|
||||
errors.error "Unknown build type" ;
|
||||
}
|
||||
|
||||
if $(build-type-set)
|
||||
{
|
||||
local expanded = [ targets.apply-default-build $(property-set)
|
||||
: $(build-type-set) ] ;
|
||||
|
||||
# Filter inappropriate combinations.
|
||||
|
||||
local filtered ;
|
||||
local skipped ;
|
||||
|
||||
local argv = [ modules.peek : ARGV ] ;
|
||||
|
||||
for local p in $(expanded)
|
||||
{
|
||||
# See comment in handle-static-runtime regarding this logic.
|
||||
if [ $(p).get <link> ] = shared
|
||||
&& [ $(p).get <runtime-link> ] = static
|
||||
&& [ $(p).get <toolset> ] != cw
|
||||
&& ! --allow-shared-static in $(argv)
|
||||
{
|
||||
# Skip this.
|
||||
skipped += $(p) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
filtered += $(p) ;
|
||||
}
|
||||
}
|
||||
|
||||
if $(expanded) = $(skipped)
|
||||
{
|
||||
boostcpp.emit-shared-static-warning ;
|
||||
}
|
||||
|
||||
return [ build-multiple $(filtered) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
rule build-multiple ( property-sets * )
|
||||
{
|
||||
local usage-requirements = [ property-set.empty ] ;
|
||||
local result ;
|
||||
for local p in $(property-sets)
|
||||
{
|
||||
local r = [ alias-target-class.generate $(p) ] ;
|
||||
if $(r)
|
||||
{
|
||||
usage-requirements = [ $(usage-requirements).add $(r[1]) ] ;
|
||||
result += $(r[2-]) ;
|
||||
}
|
||||
}
|
||||
return $(usage-requirements) [ sequence.unique $(result) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
rule declare_top_level_targets ( libraries * )
|
||||
{
|
||||
declare_install_and_stage_proper_targets $(libraries) ;
|
||||
|
||||
targets.create-metatarget top-level-target : [ project.current ]
|
||||
: install
|
||||
: install-proper
|
||||
;
|
||||
targets.create-metatarget top-level-target : [ project.current ]
|
||||
: stage
|
||||
: stage-proper headers
|
||||
;
|
||||
|
||||
p = [ project.current ] ;
|
||||
$(p).mark-target-as-explicit install stage ;
|
||||
|
||||
# This target is built by default, and will forward to 'stage' after
|
||||
# producing some explanations.
|
||||
targets.create-metatarget top-level-target : [ project.current ]
|
||||
: forward
|
||||
: explain stage
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# 4. Add hook to report configuration before the build, and confirmation with
|
||||
# setup instructions after the build.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
message explain : "\nBuilding the Boost C++ Libraries.\n\n" ;
|
||||
local p = [ project.current ] ;
|
||||
$(p).mark-target-as-explicit explain ;
|
||||
|
||||
rule pre-build ( )
|
||||
{
|
||||
local tl = [ modules.peek : top-level-targets ] ;
|
||||
if stage in $(tl) || install in $(tl)
|
||||
{
|
||||
# FIXME: Remove 'if' when Boost regression tests start using trunk bjam.
|
||||
if PAD in [ RULENAMES ]
|
||||
{
|
||||
configure.print-component-configuration ;
|
||||
}
|
||||
}
|
||||
}
|
||||
IMPORT $(__name__) : pre-build : : $(__name__).pre-build ;
|
||||
build-system.set-pre-build-hook $(__name__).pre-build ;
|
||||
|
||||
rule post-build ( ok ? )
|
||||
{
|
||||
if forward in [ modules.peek : top-level-targets ]
|
||||
{
|
||||
if $(ok)
|
||||
{
|
||||
local include-path = [ path.native $(BOOST_ROOT) ] ;
|
||||
local stage-abs = [ path.native $(stage-locate)/lib ] ;
|
||||
|
||||
ECHO "
|
||||
|
||||
The Boost C++ Libraries were successfully built!
|
||||
|
||||
The following directory should be added to compiler include paths:
|
||||
|
||||
$(include-path)
|
||||
|
||||
The following directory should be added to linker library paths:
|
||||
|
||||
$(stage-abs)
|
||||
" ;
|
||||
}
|
||||
}
|
||||
}
|
||||
IMPORT $(__name__) : post-build : : $(__name__).post-build ;
|
||||
build-system.set-post-build-hook $(__name__).post-build ;
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# 5. Top-level setup.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Decides which libraries are to be installed by looking at --with-<library>
|
||||
# --without-<library> arguments. Returns the list of directories under "libs"
|
||||
# which must be built and installed.
|
||||
#
|
||||
rule libraries-to-install ( existing-libs * )
|
||||
{
|
||||
local argv = [ modules.peek : ARGV ] ;
|
||||
local with-parameter = [ MATCH ^--with-(.*) : $(argv) ] ;
|
||||
local without-parameter = [ MATCH ^--without-(.*) : $(argv) ] ;
|
||||
|
||||
if ! $(with-parameter) && ! $(without-parameter)
|
||||
{
|
||||
# Nothing is specified on command line. See if maybe project-config.jam
|
||||
# has some choices.
|
||||
local libs = [ modules.peek project-config : libraries ] ;
|
||||
with-parameter = [ MATCH ^--with-(.*) : $(libs) ] ;
|
||||
without-parameter = [ MATCH ^--without-(.*) : $(libs) ] ;
|
||||
}
|
||||
|
||||
# Do some checks.
|
||||
if $(with-parameter) && $(without-parameter)
|
||||
{
|
||||
EXIT error\: both --with-<library> and --without-<library> specified ;
|
||||
}
|
||||
|
||||
local wrong = [ set.difference $(with-parameter) : $(existing-libs) ] ;
|
||||
if $(wrong)
|
||||
{
|
||||
EXIT error\: wrong library name '$(wrong[1])' in the --with-<library>
|
||||
option. ;
|
||||
}
|
||||
local wrong = [ set.difference $(without-parameter) : $(existing-libs) ] ;
|
||||
if $(wrong)
|
||||
{
|
||||
EXIT error\: wrong library name '$(wrong[1])' in the --without-<library>
|
||||
option. ;
|
||||
}
|
||||
|
||||
if $(with-parameter)
|
||||
{
|
||||
return [ set.intersection $(existing-libs) : $(with-parameter) ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
return [ set.difference $(existing-libs) : $(without-parameter) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
rule declare-targets ( all-libraries * )
|
||||
{
|
||||
configure.register-components $(all-libraries) ;
|
||||
|
||||
# Select the libraries to install.
|
||||
libraries = [ libraries-to-install $(all-libraries) ] ;
|
||||
configure.components-building $(libraries) ;
|
||||
|
||||
if [ option.get "show-libraries" : : true ]
|
||||
{
|
||||
ECHO The following libraries require building\: ;
|
||||
for local l in $(libraries)
|
||||
{
|
||||
ECHO " - $(l)" ;
|
||||
}
|
||||
EXIT ;
|
||||
}
|
||||
|
||||
declare_top_level_targets $(libraries) ;
|
||||
}
|
||||
|
||||
# Returns the properties identifying the toolset. We'll use them
|
||||
# below to configure checks. These are essentially same as in
|
||||
# configure.builds, except we don't use address-model and
|
||||
# architecture - as we're trying to detect them here.
|
||||
#
|
||||
rule toolset-properties ( properties * )
|
||||
{
|
||||
local toolset = [ property.select <toolset> : $(properties) ] ;
|
||||
local toolset-version-property = "<toolset-$(toolset:G=):version>" ;
|
||||
return [ property.select <target-os> <toolset> $(toolset-version-property) : $(properties) ] ;
|
||||
}
|
||||
|
||||
feature.feature deduced-address-model : 32 64 : propagated optional composite hidden ;
|
||||
feature.compose <deduced-address-model>32 : <address-model>32 ;
|
||||
feature.compose <deduced-address-model>64 : <address-model>64 ;
|
||||
|
||||
rule deduce-address-model ( properties * )
|
||||
{
|
||||
local result ;
|
||||
local filtered = [ toolset-properties $(properties) ] ;
|
||||
local names = 32 64 ;
|
||||
local idx = [ configure.find-builds "default address-model" : $(filtered)
|
||||
: /boost/architecture//32 "32-bit"
|
||||
: /boost/architecture//64 "64-bit" ] ;
|
||||
result = $(names[$(idx)]) ;
|
||||
|
||||
if $(result)
|
||||
{
|
||||
# Normally, returning composite feature here is equivalent to forcing
|
||||
# constituent properties as well. But we only want to indicate toolset
|
||||
# deduced default, so also pick whatever address-model is explicitly
|
||||
# specified, if any.
|
||||
result = <deduced-address-model>$(result) [ property.select <address-model> : $(properties) ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule address-model ( )
|
||||
{
|
||||
return <conditional>@boostcpp.deduce-address-model ;
|
||||
}
|
||||
|
||||
local deducable-architectures = arm loongarch mips power riscv s390x sparc x86 combined ;
|
||||
feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ;
|
||||
for a in $(deducable-architectures)
|
||||
{
|
||||
feature.compose <deduced-architecture>$(a) : <architecture>$(a) ;
|
||||
}
|
||||
|
||||
rule deduce-architecture ( properties * )
|
||||
{
|
||||
local result ;
|
||||
local filtered = [ toolset-properties $(properties) ] ;
|
||||
local names = arm loongarch mips power riscv s390x sparc x86 combined ;
|
||||
local idx = [ configure.find-builds "default architecture" : $(filtered)
|
||||
: /boost/architecture//arm
|
||||
: /boost/architecture//loongarch
|
||||
: /boost/architecture//mips
|
||||
: /boost/architecture//power
|
||||
: /boost/architecture//riscv
|
||||
: /boost/architecture//s390x
|
||||
: /boost/architecture//sparc
|
||||
: /boost/architecture//x86
|
||||
: /boost/architecture//combined ] ;
|
||||
result = $(names[$(idx)]) ;
|
||||
|
||||
if $(result)
|
||||
{
|
||||
# See comment in deduce-address-model.
|
||||
result = <deduced-architecture>$(result) [ property.select <architecture> : $(properties) ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule architecture ( )
|
||||
{
|
||||
return <conditional>@boostcpp.deduce-architecture ;
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
REM Copyright 2019-2020 Rene Rivera
|
||||
REM Copyright (C) 2009 Vladimir Prus
|
||||
REM
|
||||
REM Distributed under the Boost Software License, Version 1.0.
|
||||
REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
ECHO Building Boost.Build engine
|
||||
if exist ".\tools\build\src\engine\b2.exe" del tools\build\src\engine\b2.exe
|
||||
pushd tools\build\src\engine
|
||||
|
||||
call .\build.bat %*
|
||||
@ECHO OFF
|
||||
|
||||
popd
|
||||
|
||||
if exist ".\tools\build\src\engine\b2.exe" (
|
||||
copy .\tools\build\src\engine\b2.exe . > nul
|
||||
goto :bjam_built)
|
||||
|
||||
goto :bjam_failure
|
||||
|
||||
:bjam_built
|
||||
|
||||
REM Ideally, we should obtain the toolset that build.bat has
|
||||
REM guessed. However, it uses setlocal at the start and does not
|
||||
REM export BOOST_JAM_TOOLSET, and I don't know how to do that
|
||||
REM properly. Default to msvc if not specified.
|
||||
|
||||
SET TOOLSET=msvc
|
||||
|
||||
IF "%1"=="gcc" SET TOOLSET=gcc
|
||||
IF "%1"=="clang" SET TOOLSET=clang
|
||||
IF "%1"=="borland" SET TOOLSET=embarcadero
|
||||
IF "%1"=="vc71" SET TOOLSET=msvc : 7.1
|
||||
IF "%1"=="vc8" SET TOOLSET=msvc : 8.0
|
||||
IF "%1"=="vc9" SET TOOLSET=msvc : 9.0
|
||||
IF "%1"=="vc10" SET TOOLSET=msvc : 10.0
|
||||
IF "%1"=="vc11" SET TOOLSET=msvc : 11.0
|
||||
IF "%1"=="vc12" SET TOOLSET=msvc : 12.0
|
||||
IF "%1"=="vc14" SET TOOLSET=msvc : 14.0
|
||||
IF "%1"=="vc141" SET TOOLSET=msvc : 14.1
|
||||
IF "%1"=="vc142" SET TOOLSET=msvc : 14.2
|
||||
IF "%1"=="vc143" SET TOOLSET=msvc : 14.3
|
||||
|
||||
ECHO.
|
||||
ECHO Generating Boost.Build configuration in project-config.jam for %TOOLSET%...
|
||||
ECHO # Boost.Build Configuration > project-config.jam
|
||||
ECHO # Automatically generated by bootstrap.bat >> project-config.jam
|
||||
ECHO. >> project-config.jam
|
||||
ECHO import option ; >> project-config.jam
|
||||
ECHO. >> project-config.jam
|
||||
ECHO using %TOOLSET% ; >> project-config.jam
|
||||
ECHO. >> project-config.jam
|
||||
ECHO option.set keep-going : false ; >> project-config.jam
|
||||
ECHO. >> project-config.jam
|
||||
|
||||
ECHO.
|
||||
ECHO Bootstrapping is done. To build, run:
|
||||
ECHO.
|
||||
ECHO .\b2
|
||||
ECHO.
|
||||
|
||||
IF EXIST libs\config\include (
|
||||
ECHO. To generate header files, run:
|
||||
ECHO.
|
||||
ECHO. .\b2 headers
|
||||
ECHO.
|
||||
)
|
||||
|
||||
ECHO To adjust configuration, edit 'project-config.jam'.
|
||||
ECHO Further information:
|
||||
ECHO.
|
||||
ECHO - Command line help:
|
||||
ECHO .\b2 --help
|
||||
ECHO.
|
||||
ECHO - Getting started guide:
|
||||
ECHO http://boost.org/more/getting_started/windows.html
|
||||
ECHO.
|
||||
ECHO - Boost.Build documentation:
|
||||
ECHO http://www.boost.org/build/
|
||||
ECHO.
|
||||
|
||||
goto :end
|
||||
|
||||
:bjam_failure
|
||||
|
||||
ECHO.
|
||||
ECHO Failed to build Boost.Build engine.
|
||||
ECHO.
|
||||
|
||||
REM Set an error code to allow `bootstrap && b2`
|
||||
cmd /c exit /b 1 > nul
|
||||
|
||||
:end
|
||||
-421
@@ -1,421 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2019-2021 René Ferdinand Rivera Morell
|
||||
# Copyright (C) 2005, 2006 Douglas Gregor.
|
||||
# Copyright (C) 2006 The Trustees of Indiana University
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# boostinspect:notab - Tabs are required for the Makefile.
|
||||
|
||||
BJAM=""
|
||||
TOOLSET=""
|
||||
BJAM_CONFIG=""
|
||||
BUILD=""
|
||||
PREFIX=/usr/local
|
||||
EPREFIX=
|
||||
LIBDIR=
|
||||
INCLUDEDIR=
|
||||
LIBS=""
|
||||
PYTHON=python
|
||||
PYTHON_VERSION=
|
||||
PYTHON_ROOT=
|
||||
ICU_ROOT=
|
||||
|
||||
# Handle case where builtin shell version of echo command doesn't
|
||||
# support -n. Use the installed echo executable if there is one
|
||||
# rather than builtin version to ensure -n is supported.
|
||||
ECHO=`which echo`
|
||||
if test "x$ECHO" = x; then
|
||||
ECHO=echo
|
||||
fi
|
||||
|
||||
# Internal flags
|
||||
flag_no_python=
|
||||
flag_icu=
|
||||
flag_show_libraries=
|
||||
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
|
||||
-help | --help | -h)
|
||||
want_help=yes ;;
|
||||
|
||||
-prefix=* | --prefix=*)
|
||||
PREFIX=`expr "x$option" : "x-*prefix=\(.*\)"`
|
||||
;;
|
||||
|
||||
-exec-prefix=* | --exec-prefix=*)
|
||||
EPREFIX=`expr "x$option" : "x-*exec-prefix=\(.*\)"`
|
||||
;;
|
||||
|
||||
-libdir=* | --libdir=*)
|
||||
LIBDIR=`expr "x$option" : "x-*libdir=\(.*\)"`
|
||||
;;
|
||||
|
||||
-includedir=* | --includedir=*)
|
||||
INCLUDEDIR=`expr "x$option" : "x-*includedir=\(.*\)"`
|
||||
;;
|
||||
|
||||
-show-libraries | --show-libraries )
|
||||
flag_show_libraries=yes
|
||||
;;
|
||||
|
||||
-with-bjam=* | --with-bjam=* )
|
||||
BJAM=`expr "x$option" : "x-*with-bjam=\(.*\)"`
|
||||
;;
|
||||
|
||||
-with-icu | --with-icu )
|
||||
flag_icu=yes
|
||||
;;
|
||||
|
||||
-with-icu=* | --with-icu=* )
|
||||
flag_icu=yes
|
||||
ICU_ROOT=`expr "x$option" : "x-*with-icu=\(.*\)"`
|
||||
;;
|
||||
|
||||
-without-icu | --without-icu )
|
||||
flag_icu=no
|
||||
;;
|
||||
|
||||
-with-libraries=* | --with-libraries=* )
|
||||
library_list=`expr "x$option" : "x-*with-libraries=\(.*\)"`
|
||||
if test "$library_list" != "all"; then
|
||||
old_IFS=$IFS
|
||||
IFS=,
|
||||
for library in $library_list
|
||||
do
|
||||
LIBS="$LIBS --with-$library"
|
||||
|
||||
if test $library = python; then
|
||||
requested_python=yes
|
||||
fi
|
||||
done
|
||||
IFS=$old_IFS
|
||||
|
||||
if test "x$requested_python" != xyes; then
|
||||
flag_no_python=yes
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
-without-libraries=* | --without-libraries=* )
|
||||
library_list=`expr "x$option" : "x-*without-libraries=\(.*\)"`
|
||||
old_IFS=$IFS
|
||||
IFS=,
|
||||
for library in $library_list
|
||||
do
|
||||
LIBS="$LIBS --without-$library"
|
||||
|
||||
if test $library = python; then
|
||||
flag_no_python=yes
|
||||
fi
|
||||
done
|
||||
IFS=$old_IFS
|
||||
;;
|
||||
|
||||
-with-python=* | --with-python=* )
|
||||
PYTHON=`expr "x$option" : "x-*with-python=\(.*\)"`
|
||||
;;
|
||||
|
||||
-with-python-root=* | --with-python-root=* )
|
||||
PYTHON_ROOT=`expr "x$option" : "x-*with-python-root=\(.*\)"`
|
||||
;;
|
||||
|
||||
-with-python-version=* | --with-python-version=* )
|
||||
PYTHON_VERSION=`expr "x$option" : "x-*with-python-version=\(.*\)"`
|
||||
;;
|
||||
|
||||
-with-toolset=* | --with-toolset=* )
|
||||
TOOLSET=`expr "x$option" : "x-*with-toolset=\(.*\)"`
|
||||
;;
|
||||
|
||||
-*)
|
||||
{ echo "error: unrecognized option: $option
|
||||
Try \`$0 --help' for more information." >&2
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
if test "x$want_help" = xyes; then
|
||||
cat <<EOF
|
||||
\`./bootstrap.sh\' builds the Boost build system B2 and prepares Boost for
|
||||
building. This includes setting defaults in the project-config.jam which you
|
||||
can adjust prior to invoking B2.
|
||||
|
||||
Usage: $0 [OPTION]...
|
||||
|
||||
Defaults for the options are specified in brackets.
|
||||
|
||||
Configuration:
|
||||
-h, --help display this help and exit
|
||||
--with-bjam=BJAM use existing Boost.Jam executable (bjam)
|
||||
[automatically built]
|
||||
--with-toolset=TOOLSET use specific TOOLSET to build B2 and as default
|
||||
for building Boost
|
||||
[automatically detected]
|
||||
--show-libraries show the set of libraries that require build
|
||||
and installation steps (i.e., those libraries
|
||||
that can be used with --with-libraries or
|
||||
--without-libraries), then exit
|
||||
--with-libraries=list build only a particular set of libraries,
|
||||
describing using either a comma-separated list of
|
||||
library names or "all"
|
||||
[all]
|
||||
--without-libraries=list build all libraries except the ones listed []
|
||||
--with-icu enable Unicode/ICU support in Regex
|
||||
[automatically detected]
|
||||
--without-icu disable Unicode/ICU support in Regex
|
||||
--with-icu=DIR specify the root of the ICU library installation
|
||||
and enable Unicode/ICU support in Regex
|
||||
[automatically detected]
|
||||
--with-python=PYTHON specify the Python executable [python]
|
||||
--with-python-root=DIR specify the root of the Python installation
|
||||
[automatically detected]
|
||||
--with-python-version=X.Y specify the Python version as X.Y
|
||||
[automatically detected]
|
||||
|
||||
Installation directories:
|
||||
--prefix=PREFIX install Boost into the given PREFIX
|
||||
[/usr/local]
|
||||
--exec-prefix=EPREFIX install Boost binaries into the given EPREFIX
|
||||
[PREFIX]
|
||||
|
||||
More precise control over installation directories:
|
||||
--libdir=DIR install libraries here [EPREFIX/lib]
|
||||
--includedir=DIR install headers here [PREFIX/include]
|
||||
|
||||
EOF
|
||||
fi
|
||||
test -n "$want_help" && exit 0
|
||||
|
||||
my_dir=$(dirname "$0")
|
||||
|
||||
# Determine the toolset, if not already decided
|
||||
if test "x$TOOLSET" = x; then
|
||||
guessed_toolset=`CXX= CXXFLAGS= $my_dir/tools/build/src/engine/build.sh --guess-toolset`
|
||||
case $guessed_toolset in
|
||||
acc | clang | gcc | como | mipspro | pathscale | pgi | qcc | vacpp )
|
||||
TOOLSET=$guessed_toolset
|
||||
;;
|
||||
|
||||
intel-* )
|
||||
TOOLSET=intel
|
||||
;;
|
||||
|
||||
mingw )
|
||||
TOOLSET=gcc
|
||||
;;
|
||||
|
||||
sun* )
|
||||
TOOLSET=sun
|
||||
;;
|
||||
|
||||
* )
|
||||
# Not supported by B2
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
rm -f config.log
|
||||
|
||||
# Build bjam
|
||||
if test "x$BJAM" = x; then
|
||||
$ECHO "Building B2 engine.."
|
||||
pwd=`pwd`
|
||||
CXX= CXXFLAGS= "$my_dir/tools/build/src/engine/build.sh" ${TOOLSET}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Failed to build B2 build engine"
|
||||
exit 1
|
||||
fi
|
||||
cd "$pwd"
|
||||
BJAM="$my_dir/tools/build/src/engine/b2"
|
||||
echo "tools/build/src/engine/b2"
|
||||
cp "$BJAM" .
|
||||
|
||||
fi
|
||||
|
||||
# TBD: Turn BJAM into an absolute path
|
||||
|
||||
# If there is a list of libraries
|
||||
if test "x$flag_show_libraries" = xyes; then
|
||||
cat <<EOF
|
||||
|
||||
The following Boost libraries have portions that require a separate build
|
||||
and installation step. Any library not listed here can be used by including
|
||||
the headers only.
|
||||
|
||||
The Boost libraries requiring separate building and installation are:
|
||||
EOF
|
||||
$BJAM -d0 --show-libraries | grep '^[[:space:]]*-'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Setup paths
|
||||
if test "x$EPREFIX" = x; then
|
||||
EPREFIX="$PREFIX"
|
||||
fi
|
||||
|
||||
if test "x$LIBDIR" = x; then
|
||||
LIBDIR="$EPREFIX/lib"
|
||||
fi
|
||||
|
||||
if test "x$INCLUDEDIR" = x; then
|
||||
INCLUDEDIR="$PREFIX/include"
|
||||
fi
|
||||
|
||||
# Find Python
|
||||
if test "x$flag_no_python" = x; then
|
||||
result=`$PYTHON -c "exit" > /dev/null 2>&1`
|
||||
if [ "$?" -ne "0" ]; then
|
||||
flag_no_python=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$flag_no_python" = x; then
|
||||
if test "x$PYTHON_VERSION" = x; then
|
||||
$ECHO -n "Detecting Python version... "
|
||||
PYTHON_VERSION=`$PYTHON -c "import sys; print (\"%d.%d\" % (sys.version_info[0], sys.version_info[1]))"`
|
||||
echo $PYTHON_VERSION
|
||||
fi
|
||||
|
||||
if test "x$PYTHON_ROOT" = x; then
|
||||
$ECHO -n "Detecting Python root... "
|
||||
PYTHON_ROOT=`$PYTHON -c "import sys; print(sys.prefix)"`
|
||||
echo $PYTHON_ROOT
|
||||
fi
|
||||
fi
|
||||
|
||||
# Configure ICU
|
||||
$ECHO -n "Unicode/ICU support for Boost.Regex?... "
|
||||
if test "x$flag_icu" != xno; then
|
||||
if test "x$ICU_ROOT" = x; then
|
||||
if command -v pkg-config > /dev/null && pkg-config icu-uc ; then
|
||||
ICU_ROOT=`pkg-config --variable=prefix icu-uc`
|
||||
fi
|
||||
fi
|
||||
if test "x$ICU_ROOT" = x; then
|
||||
COMMON_ICU_PATHS="/usr /usr/local /sw"
|
||||
for p in $COMMON_ICU_PATHS; do
|
||||
if test -r $p/include/unicode/utypes.h; then
|
||||
ICU_ROOT=$p
|
||||
fi
|
||||
done
|
||||
|
||||
if test "x$ICU_ROOT" = x; then
|
||||
echo "not found."
|
||||
else
|
||||
BJAM_CONFIG="$BJAM_CONFIG -sICU_PATH=$ICU_ROOT"
|
||||
echo "$ICU_ROOT"
|
||||
fi
|
||||
else
|
||||
BJAM_CONFIG="$BJAM_CONFIG -sICU_PATH=$ICU_ROOT"
|
||||
echo "$ICU_ROOT"
|
||||
fi
|
||||
else
|
||||
echo "disabled."
|
||||
fi
|
||||
|
||||
# Backup the user's existing project-config.jam
|
||||
JAM_CONFIG_OUT="project-config.jam"
|
||||
if test -r "project-config.jam"; then
|
||||
counter=1
|
||||
|
||||
while test -r "project-config.jam.$counter"; do
|
||||
counter=`expr $counter + 1`
|
||||
done
|
||||
|
||||
echo "Backing up existing B2 configuration in project-config.jam.$counter"
|
||||
mv "project-config.jam" "project-config.jam.$counter"
|
||||
fi
|
||||
|
||||
# Generate user-config.jam
|
||||
echo "Generating B2 configuration in project-config.jam for $TOOLSET..."
|
||||
cat > project-config.jam <<EOF
|
||||
# B2 Configuration
|
||||
# Automatically generated by bootstrap.sh
|
||||
|
||||
import option ;
|
||||
import feature ;
|
||||
|
||||
# Compiler configuration. This definition will be used unless
|
||||
# you already have defined some toolsets in your user-config.jam
|
||||
# file.
|
||||
if ! $TOOLSET in [ feature.values <toolset> ]
|
||||
{
|
||||
using $TOOLSET ;
|
||||
}
|
||||
|
||||
project : default-build <toolset>$TOOLSET ;
|
||||
EOF
|
||||
|
||||
# - Python configuration
|
||||
if test "x$flag_no_python" = x; then
|
||||
cat >> project-config.jam <<EOF
|
||||
|
||||
# Python configuration
|
||||
import python ;
|
||||
if ! [ python.configured ]
|
||||
{
|
||||
using python : $PYTHON_VERSION : "$PYTHON_ROOT" ;
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
if test "x$ICU_ROOT" != x; then
|
||||
cat >> project-config.jam << EOF
|
||||
|
||||
path-constant ICU_PATH : $ICU_ROOT ;
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat >> project-config.jam << EOF
|
||||
|
||||
# List of --with-<library> and --without-<library>
|
||||
# options. If left empty, all libraries will be built.
|
||||
# Options specified on the command line completely
|
||||
# override this variable.
|
||||
libraries = $LIBS ;
|
||||
|
||||
# These settings are equivalent to corresponding command-line
|
||||
# options.
|
||||
option.set prefix : $PREFIX ;
|
||||
option.set exec-prefix : $EPREFIX ;
|
||||
option.set libdir : $LIBDIR ;
|
||||
option.set includedir : $INCLUDEDIR ;
|
||||
|
||||
# Stop on first error
|
||||
option.set keep-going : false ;
|
||||
EOF
|
||||
|
||||
cat << EOF
|
||||
|
||||
Bootstrapping is done. To build, run:
|
||||
|
||||
./b2
|
||||
|
||||
To generate header files, run:
|
||||
|
||||
./b2 headers
|
||||
|
||||
The configuration generated uses ${TOOLSET} to build by default. If that is
|
||||
unintended either use the --with-toolset option or adjust configuration, by
|
||||
editing 'project-config.jam'.
|
||||
|
||||
Further information:
|
||||
|
||||
- Command line help:
|
||||
./b2 --help
|
||||
|
||||
- Getting started guide:
|
||||
http://www.boost.org/more/getting_started/unix-variants.html
|
||||
|
||||
- B2 documentation:
|
||||
http://www.boost.org/build/
|
||||
|
||||
EOF
|
||||
+19
-219
@@ -1,224 +1,24 @@
|
||||
# Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
# Copyright (c) 2016-2018 Rene Rivera
|
||||
#
|
||||
# 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 boost/doc
|
||||
: requirements
|
||||
<xsl:param>boost.libraries=../../libs/libraries.htm
|
||||
<format>html:<xsl:param>chunker.output.doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
<format>html:<xsl:param>chunker.output.doctype-system="http://www.w3.org/TR/html4/loose.dtd"
|
||||
;
|
||||
|
||||
project boost/doc ;
|
||||
import boostbook : boostbook ;
|
||||
import project ;
|
||||
import targets ;
|
||||
import print ;
|
||||
import type ;
|
||||
import generators ;
|
||||
import sequence ;
|
||||
import path ;
|
||||
import "class" : is-a ;
|
||||
import regex ;
|
||||
|
||||
path-constant BOOST_DOC : . ;
|
||||
# The <dependency> below allows Boost.Build to see Doxygen
|
||||
# main target, which is necessary to correctly build
|
||||
# documentation
|
||||
boostbook doc : src/boost.xml
|
||||
:
|
||||
<dependency>../libs/program_options/doc//autodoc.xml
|
||||
<dependency>../libs/algorithm/string/doc//autodoc.xml
|
||||
<dependency>../libs/logic/doc//reference.xml
|
||||
<dependency>../libs/functional/hash/doc//hash
|
||||
<dependency>../libs/type_traits/doc//type_traits
|
||||
<dependency>../libs/static_assert/doc//static_assert
|
||||
<dependency>../more/whos_using//using
|
||||
<implicit-dependency>../libs/functional/hash/doc//hash
|
||||
<implicit-dependency>../libs/type_traits/doc//type_traits
|
||||
<implicit-dependency>../libs/static_assert/doc//static_assert
|
||||
<implicit-dependency>../more/whos_using//using
|
||||
<xsl:param>boost.libraries=../../libs/libraries.htm
|
||||
|
||||
local lib-docs = [ path.glob [ path.glob $(BOOST_DOC)/../libs $(BOOST_DOC)/../tools : */doc ]
|
||||
: [ modules.peek project : JAMFILE ] ] ;
|
||||
|
||||
local rule find-target-of-class-or-type ( root-target : klass ? : type ? )
|
||||
{
|
||||
local result ;
|
||||
if ! $(result) && $(klass) && [ is-a $(root-target) : $(klass) ]
|
||||
{
|
||||
result ?= $(root-target) $(klass) ;
|
||||
}
|
||||
if ! $(result) && $(type) && $(type:U) = [ modules.peek $(root-target) : self.type ]
|
||||
{
|
||||
result ?= $(root-target) $(type:U) ;
|
||||
}
|
||||
local alternatives = [ modules.peek $(root-target) : self.alternatives ] ;
|
||||
if ! $(result)
|
||||
{
|
||||
for local alternative in $(alternatives)
|
||||
{
|
||||
if $(result) { break ; }
|
||||
result ?= [ find-target-of-class-or-type $(alternative) : $(klass) : $(type) ] ;
|
||||
}
|
||||
}
|
||||
if ! $(result)
|
||||
{
|
||||
for local alternative in $(alternatives)
|
||||
{
|
||||
if $(result) { break ; }
|
||||
local sources = [ modules.peek $(alternative) : self.sources ] ;
|
||||
for local source in [ $(alternative).sources ]
|
||||
{
|
||||
if $(result) { break ; }
|
||||
result ?= [ find-target-of-class-or-type $(source) : $(klass) : $(type) ] ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
local rule docbook-target-spec ( main-target )
|
||||
{
|
||||
local spec ;
|
||||
local doc-sub-target
|
||||
= [ find-target-of-class-or-type $(main-target) : boostbook-target-class : XML ] ;
|
||||
if $(doc-sub-target)
|
||||
{
|
||||
#ECHO *** $(main-target) ;
|
||||
#ECHO " ::" [ $(main-target).full-name ] ;
|
||||
#ECHO " ::" $(doc-sub-target) :: [ $(doc-sub-target[0]).full-name ] ;
|
||||
local full-name = [ $(doc-sub-target[0]).full-name ] ;
|
||||
local target-path = $(full-name:D) ;
|
||||
local target-name = $(full-name:B) ;
|
||||
local this-path = [ path.root [ project.attribute $(__name__) location ] [ path.pwd ] ] ;
|
||||
target-path = [ path.relative-to $(this-path) $(target-path) ] ;
|
||||
#ECHO " ::" $(target-path) :: $(target-name) ;
|
||||
spec = $(target-path)//$(target-name) ;
|
||||
}
|
||||
return $(spec) ;
|
||||
}
|
||||
|
||||
local exclude-libs = [ MATCH "^--exclude-libraries=(.*)" : [ modules.peek : ARGV ] ] ;
|
||||
exclude-libs = [ regex.split-list $(exclude-libs) : "," ] ;
|
||||
|
||||
#ECHO "=== --exclude-libraries:" $(exclude-libs) ;
|
||||
|
||||
local lib-doc-boostdoc-refs ;
|
||||
local lib-doc-boostrelease-refs ;
|
||||
|
||||
local this-path = [ path.root [ project.attribute $(__name__) location ] [ path.pwd ] ] ;
|
||||
for local lib-doc in $(lib-docs)
|
||||
{
|
||||
#ECHO === $(lib-doc) ... ;
|
||||
local doc-project = $(lib-doc:D) ;
|
||||
|
||||
local lib-dir = $(doc-project:D) ;
|
||||
local lib-name = $(lib-dir:BS) ;
|
||||
|
||||
#ECHO "=== lib-name:" $(lib-name) ... ;
|
||||
|
||||
if $(lib-name) in $(exclude-libs)
|
||||
{
|
||||
ECHO "-- Excluded library" '$(lib-name)' ;
|
||||
}
|
||||
else
|
||||
{
|
||||
local doc-module = [ project.find $(doc-project)
|
||||
: [ project.attribute $(__name__) location ] ] ;
|
||||
local doc-target = [ project.target $(doc-module) ] ;
|
||||
$(doc-target).build-main-targets ;
|
||||
local boostrelease-target = [ $(doc-target).main-target boostrelease ] ;
|
||||
if $(boostrelease-target)
|
||||
{
|
||||
local full-name = [ $(boostrelease-target).full-name ] ;
|
||||
local target-path = [ path.relative-to $(this-path) $(full-name:D) ] ;
|
||||
lib-doc-boostrelease-refs += $(target-path)//boostrelease ;
|
||||
#ECHO " ::" $(target-path)//boostrelease ;
|
||||
}
|
||||
local boostdoc-target = [ $(doc-target).main-target boostdoc ] ;
|
||||
if $(boostdoc-target)
|
||||
{
|
||||
local full-name = [ $(boostdoc-target).full-name ] ;
|
||||
local target-path = [ path.relative-to $(this-path) $(full-name:D) ] ;
|
||||
lib-doc-boostdoc-refs += $(target-path)//boostdoc ;
|
||||
#ECHO " ::" $(target-path)//boostdoc ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Build non-integrated library docs for release.
|
||||
if "--release-build" in [ modules.peek : ARGV ]
|
||||
{
|
||||
alias release-build : $(lib-doc-boostrelease-refs) ;
|
||||
}
|
||||
|
||||
local rule component-order ( x y )
|
||||
{
|
||||
local a = [ MATCH "(/libs/[^/]+)" "(/tools/[^/]+)" : $(x:G) $(x:G=) ] ;
|
||||
local b = [ MATCH "(/libs/[^/]+)" "(/tools/[^/]+)" : $(y:G) $(y:G=) ] ;
|
||||
if $(a[1]) < $(b[1])
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
else if $(a[1]) = $(b[1]) && $(x) < $(y)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
|
||||
rule xinclude-generator ( target : sources * : properties * )
|
||||
{
|
||||
print.output $(target) ;
|
||||
local includes ;
|
||||
sources = [ sequence.insertion-sort $(sources) : component-order ] ;
|
||||
locate = [ path.root [ on $(target) return $(LOCATE) ] [ path.pwd ] ] ;
|
||||
for local xml in $(sources)
|
||||
{
|
||||
local dir ;
|
||||
dir ?= [ on $(xml) return $(LOCATE) ] ;
|
||||
dir ?= [ on $(xml) return $(SEARCH) ] ;
|
||||
dir ?= "" ;
|
||||
dir = [ path.root $(dir[1]) [ path.pwd ] ] ;
|
||||
dir = [ path.relative-to $(locate) $(dir) ] ;
|
||||
includes += "<xi:include href=\"$(dir[1])/$(xml:G=)\"/>" ;
|
||||
}
|
||||
print.text
|
||||
"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
|
||||
"<xml xmlns:xi=\"http://www.w3.org/2003/XInclude\">"
|
||||
$(includes)
|
||||
"</xml>"
|
||||
: overwrite ;
|
||||
}
|
||||
type.register XINCLUDE_XML : xinclude : XML ;
|
||||
generators.register-composing $(__name__).xinclude-generator : XML : XINCLUDE_XML ;
|
||||
|
||||
rule xinclude ( name : sources * : requirements * : default-build * : usage-requirements * )
|
||||
{
|
||||
targets.create-typed-target XINCLUDE_XML
|
||||
: [ project.current ]
|
||||
: $(name)
|
||||
: $(sources)
|
||||
: $(requirements)
|
||||
: $(default-build)
|
||||
: $(usage-requirements)
|
||||
;
|
||||
}
|
||||
|
||||
xinclude libraries :
|
||||
$(lib-doc-boostdoc-refs)
|
||||
;
|
||||
explicit libraries ;
|
||||
|
||||
xinclude tools :
|
||||
../tools/quickbook/doc//quickbook
|
||||
../tools/boostbook/doc/boostbook.xml
|
||||
;
|
||||
explicit tools ;
|
||||
|
||||
boostbook doc
|
||||
:
|
||||
src/boost.xml
|
||||
:
|
||||
<xsl:param>generate.consistent.ids=1
|
||||
<use>$(lib-doc-boostdoc-refs)
|
||||
<dependency>libraries
|
||||
<implicit-dependency>libraries
|
||||
<dependency>tools
|
||||
<implicit-dependency>tools
|
||||
|
||||
<dependency>images
|
||||
<dependency>callouts
|
||||
<xsl:path>$(BOOST_DOC)
|
||||
;
|
||||
|
||||
install images : [ glob src/images/*.png ] : <location>html/images ;
|
||||
explicit images ;
|
||||
install callouts : [ glob src/images/callouts/*.png ] : <location>html/images/callouts ;
|
||||
explicit callouts ;
|
||||
|
||||
|
||||
+99
-14
@@ -1,16 +1,101 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
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) -->
|
||||
<title>Redirect to generated documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/doc/libs/master/doc/html/Assignable.html">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="http://www.boost.org/doc/libs/master/doc/html/Assignable.html">http://www.boost.org/doc/libs/master/doc/html/Assignable.html</a>
|
||||
</body>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept Assignable</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="next" href="InputIterator.html" title="Concept InputIterator">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="concepts/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="InputIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="Assignable"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept Assignable</span></h2>
|
||||
<p>Assignable</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975234"></a><h2>Description</h2>
|
||||
<p>Assignable types must have copy constructors,
|
||||
<code class="computeroutput">operator=</code> for assignment, and the <code class="computeroutput">swap()</code>
|
||||
function defined.</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975253"></a><h2>Refinement of</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><p><a href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a></p></li></ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975266"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">X</span></dt>
|
||||
<dd>A type playing the role of assignable-type in the <a href="Assignable.html" title="Concept Assignable">Assignable</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">x</code>, </span><span class="term"><code class="varname">y</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type X</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975296"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Assignment</p></td>
|
||||
<td><p>x = y</p></td>
|
||||
<td><p><span class="type">X &</span></p></td>
|
||||
<td><p>Require <code class="computeroutput">operator=</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Swap</p></td>
|
||||
<td><p>swap(x, y)</p></td>
|
||||
<td><p><span class="type">void</span></p></td>
|
||||
<td><p>Require <code class="computeroutput">swap()</code> function</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975359"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><span class="simplelist"><span class="type">int</span></span></li></ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975371"></a><h2>See also</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><p><a href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a></p></li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="concepts/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="InputIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Macro BOOST_ONCE_INIT</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="threads/reference.html#id718104" title="Header <boost/thread/once.hpp>">
|
||||
<link rel="prev" href="timed_mutex.html" title="Class timed_mutex">
|
||||
<link rel="next" href="call_once.html" title="Function call_once">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="timed_mutex.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="threads/reference.html#id718104"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="call_once.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="BOOST_ONCE_INIT"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Macro BOOST_ONCE_INIT</span></h2>
|
||||
<p>BOOST_ONCE_INIT — The call_once function and
|
||||
<code class="computeroutput">once_flag</code> type (statically initialized to
|
||||
<a href="BOOST_ONCE_INIT.html" title="Macro BOOST_ONCE_INIT">BOOST_ONCE_INIT</a>) can be used to run a
|
||||
routine exactly once. This can be used to initialize data in a
|
||||
<a href="threads.html#threads.glossary.thread-safe">thread-safe</a>
|
||||
manner.</p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">BOOST_ONCE_INIT</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1559796"></a><h2>Description</h2>The implementation-defined macro
|
||||
<a href="BOOST_ONCE_INIT.html" title="Macro BOOST_ONCE_INIT">BOOST_ONCE_INIT</a> is a constant value used to
|
||||
initialize <code class="computeroutput">once_flag</code> instances to indicate that the
|
||||
logically associated routine has not been run yet. See
|
||||
call_once for more details.</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2003 William E. Kempf</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="timed_mutex.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="threads/reference.html#id718104"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="call_once.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Macro BOOST_TRIBOOL_THIRD_STATE</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="tribool/reference.html#id996838" title="Header <boost/logic/tribool.hpp>">
|
||||
<link rel="prev" href="id1222476.html" title="Function operator!=">
|
||||
<link rel="next" href="indeterminate_name.html" title="Class template indeterminate_name">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="id1222476.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="tribool/reference.html#id996838"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="indeterminate_name.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="BOOST_TRIBOOL_THIRD_STATE"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Macro BOOST_TRIBOOL_THIRD_STATE</span></h2>
|
||||
<p>BOOST_TRIBOOL_THIRD_STATE — Declare a new name for the third state of a tribool. </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">BOOST_TRIBOOL_THIRD_STATE(Name)</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1571265"></a><h2>Description</h2>
|
||||
<p>Use this macro to declare a new name for the third state of a tribool. This state can have any number of new names (in addition to <code class="computeroutput">indeterminate</code> ), all of which will be equivalent. The new name will be placed in the namespace in which the macro is expanded.</p>
|
||||
<p>Example: BOOST_TRIBOOL_THIRD_STATE(true_or_false)</p>
|
||||
<p>tribool x(true_or_false); // potentially set x if (true_or_false(x)) { // don't know what x is } </p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Douglas Gregor</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="id1222476.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="tribool/reference.html#id996838"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="indeterminate_name.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Macro BOOST_VARIANT_ENUM_PARAMS</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="variant/reference.html#id1283515" title="Header <boost/variant/variant_fwd.hpp>">
|
||||
<link rel="prev" href="BOOST_VARIANT_LIMIT_TYPES.html" title="Macro BOOST_VARIANT_LIMIT_TYPES">
|
||||
<link rel="next" href="id691834.html" title="Macro BOOST_VARIANT_ENUM_SHIFTED_PARAMS">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="BOOST_VARIANT_LIMIT_TYPES.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id1283515"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="id691834.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="BOOST_VARIANT_ENUM_PARAMS"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Macro BOOST_VARIANT_ENUM_PARAMS</span></h2>
|
||||
<p>BOOST_VARIANT_ENUM_PARAMS — <p>Enumerate parameters for use with
|
||||
<code class="computeroutput"><a href="boost/variant.html" title="Class template variant">variant</a></code>.</p></p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">BOOST_VARIANT_ENUM_PARAMS(param)</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1662820"></a><h2>Description</h2>
|
||||
<p>Expands to a comma-separated sequence of length
|
||||
<code class="computeroutput"><a href="BOOST_VARIANT_LIMIT_TYPES.html" title="Macro BOOST_VARIANT_LIMIT_TYPES">BOOST_VARIANT_LIMIT_TYPES</a></code>, where
|
||||
each element in the sequence consists of the concatenation of
|
||||
<span class="emphasis"><em>param</em></span> with its zero-based index into the
|
||||
sequence. That is,
|
||||
<code class="computeroutput">param ## 0, param ## 1, ..., param ## BOOST_VARIANT_LIMIT_TYPES - 1</code>.</p>
|
||||
<p><span class="bold"><strong>Rationale</strong></span>: This macro greatly
|
||||
simplifies for the user the process of declaring
|
||||
<code class="computeroutput"><a href="boost/variant.html" title="Class template variant">variant</a></code> types
|
||||
in function templates or explicit partial specializations of class
|
||||
templates, as shown in the
|
||||
<a href="variant/tutorial.html#variant.tutorial.preprocessor" title="Preprocessor macros">tutorial</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002, 2003 Eric Friedman, Itay Maman</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="BOOST_VARIANT_LIMIT_TYPES.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id1283515"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="id691834.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,52 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Macro BOOST_VARIANT_LIMIT_TYPES</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="variant/reference.html#id1283515" title="Header <boost/variant/variant_fwd.hpp>">
|
||||
<link rel="prev" href="variant/reference.html" title="Reference">
|
||||
<link rel="next" href="BOOST_VARIANT_ENUM_PARAMS.html" title="Macro BOOST_VARIANT_ENUM_PARAMS">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="variant/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id1283515"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_VARIANT_ENUM_PARAMS.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="BOOST_VARIANT_LIMIT_TYPES"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Macro BOOST_VARIANT_LIMIT_TYPES</span></h2>
|
||||
<p>BOOST_VARIANT_LIMIT_TYPES — <p>Expands to the length of the
|
||||
template parameter list for
|
||||
<code class="computeroutput"><a href="boost/variant.html" title="Class template variant">variant</a></code>.</p></p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">BOOST_VARIANT_LIMIT_TYPES</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1662761"></a><h2>Description</h2>
|
||||
<p><span class="bold"><strong>Note</strong></span>: Conforming
|
||||
implementations of <code class="computeroutput">variant</code> must allow at least ten
|
||||
template arguments. That is, BOOST_VARIANT_LIMIT_TYPES must be greater
|
||||
or equal to <code class="computeroutput">10</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002, 2003 Eric Friedman, Itay Maman</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="variant/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id1283515"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_VARIANT_ENUM_PARAMS.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,165 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept BidirectionalIterator</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="ForwardIterator.html" title="Concept ForwardIterator">
|
||||
<link rel="next" href="RandomAccessIterator.html" title="Concept RandomAccessIterator">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="ForwardIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="RandomAccessIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="BidirectionalIterator"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept BidirectionalIterator</span></h2>
|
||||
<p>BidirectionalIterator</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976672"></a><h2>Description</h2>
|
||||
<p>A bidirectional iterator is an iterator that can read through a sequence
|
||||
of values. It can move in either direction through the sequence, and can
|
||||
be either mutable (data pointed to by it can be changed) or not mutable.</p>
|
||||
<p>An iterator represents a position in a sequence. Therefore, the
|
||||
iterator can point into the sequence (returning a value when dereferenced
|
||||
and being incrementable), or be off-the-end (and not dereferenceable or
|
||||
incrementable).</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976688"></a><h2>Refinement of</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><p><a href="ForwardIterator.html" title="Concept ForwardIterator">ForwardIterator</a></p></li></ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976700"></a><h2>Associated types</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<p><span class="bold"><strong>value_type</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::value_type</pre>
|
||||
<p>The value type of the iterator</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="bold"><strong>category</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::iterator_category</pre>
|
||||
<p>The category of the iterator</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976740"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Iter</span></dt>
|
||||
<dd>A type playing the role of iterator-type in the <a href="BidirectionalIterator.html" title="Concept BidirectionalIterator">BidirectionalIterator</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">i</code>, </span><span class="term"><code class="varname">j</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type Iter</dd>
|
||||
<dt><span class="term"><code class="varname">x</code></span></dt>
|
||||
<dd>Object of type value_type</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976778"></a><h2>Type expressions</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Category tag</span></dt>
|
||||
<dd><p><span class="type">category</span> must be
|
||||
derived from <span class="type">std::bidirectional_iterator_tag</span>.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976797"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Precondition</th>
|
||||
<th>Semantics</th>
|
||||
<th>Postcondition</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Predecrement</p></td>
|
||||
<td><p>--i</p></td>
|
||||
<td><p><span class="type">Iter &</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end) and some dereferenceable iterator <code class="computeroutput">j</code> exists
|
||||
such that <code class="computeroutput">i == ++j</code></p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Postdecrement</p></td>
|
||||
<td><p>i--</p></td>
|
||||
<td><p><span class="type">Iter</span></p></td>
|
||||
<td><p>Same as for predecrement</p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">{Iter j = i; --i; return j;}</code></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is dereferenceable or
|
||||
off-the-end</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976889"></a><h2>Complexity</h2>
|
||||
<p>
|
||||
All iterator operations must take amortized constant time.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976896"></a><h2>Invariants</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Predecrement must return object</span></dt>
|
||||
<dd><p><code class="computeroutput">&i = &(--i)</code></p></dd>
|
||||
<dt><span class="term">Unique path through sequence</span></dt>
|
||||
<dd><p><code class="computeroutput">i == j</code> implies <code class="computeroutput">--i == --j</code></p></dd>
|
||||
<dt><span class="term">Increment and decrement are inverses</span></dt>
|
||||
<dd><p><code class="computeroutput">++i; --i;</code> and <code class="computeroutput">--i; ++i;</code> must end up with the
|
||||
value of <code class="computeroutput">i</code> unmodified, if <code class="computeroutput">i</code> both of the
|
||||
operations in the pair are valid.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976958"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><span class="simplelist"><span class="type">T *</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::list<T>::iterator</span></span></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976979"></a><h2>See also</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><p><a href="RandomAccessIterator.html" title="Concept RandomAccessIterator">RandomAccessIterator</a></p></li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="ForwardIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="RandomAccessIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,16 +1,84 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
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) -->
|
||||
<title>Redirect to generated documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/doc/libs/master/doc/html/CopyConstructible.html">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="http://www.boost.org/doc/libs/master/doc/html/CopyConstructible.html">http://www.boost.org/doc/libs/master/doc/html/CopyConstructible.html</a>
|
||||
</body>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept CopyConstructible</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="DefaultConstructible.html" title="Concept DefaultConstructible">
|
||||
<link rel="next" href="EqualityComparable.html" title="Concept EqualityComparable">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="DefaultConstructible.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="EqualityComparable.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="CopyConstructible"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept CopyConstructible</span></h2>
|
||||
<p>CopyConstructible</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977733"></a><h2>Description</h2>
|
||||
<p>Copy constructible types must be able to be constructed from another
|
||||
member of the type.</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977740"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">X</span></dt>
|
||||
<dd>A type playing the role of copy-constructible-type in the <a href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">x</code>, </span><span class="term"><code class="varname">y</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type X</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977771"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td><p>Copy construction</p></td>
|
||||
<td><p>X(x)</p></td>
|
||||
<td><p><span class="type">X</span></p></td>
|
||||
<td><p>Require copy constructor.</p></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977808"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><span class="simplelist"><span class="type">int</span></span></li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="DefaultConstructible.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="EqualityComparable.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept DefaultConstructible</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="RandomAccessIterator.html" title="Concept RandomAccessIterator">
|
||||
<link rel="next" href="CopyConstructible.html" title="Concept CopyConstructible">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="RandomAccessIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="CopyConstructible.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="DefaultConstructible"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept DefaultConstructible</span></h2>
|
||||
<p>DefaultConstructible</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977635"></a><h2>Description</h2>
|
||||
<p>DefaultConstructible objects only need to have a default
|
||||
constructor.</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977642"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">X</span></dt>
|
||||
<dd>A type playing the role of default-constructible-type in the <a href="DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a> concept.</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977662"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td><p>Construction</p></td>
|
||||
<td><p>X()</p></td>
|
||||
<td><p><span class="type">X</span></p></td>
|
||||
<td><p>Construct an instance of the type with default parameters.</p></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977698"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><span class="simplelist"><span class="type">int</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::vector<double></span></span></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="RandomAccessIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="CopyConstructible.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,91 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept EqualityComparable</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="CopyConstructible.html" title="Concept CopyConstructible">
|
||||
<link rel="next" href="LessThanComparable.html" title="Concept LessThanComparable">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="CopyConstructible.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="LessThanComparable.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="EqualityComparable"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept EqualityComparable</span></h2>
|
||||
<p>EqualityComparable</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977835"></a><h2>Description</h2>
|
||||
<p>Equality Comparable types must have <code class="computeroutput">==</code> and
|
||||
<code class="computeroutput">!=</code> operators.</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977852"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">X</span></dt>
|
||||
<dd>A type playing the role of comparable-type in the <a href="EqualityComparable.html" title="Concept EqualityComparable">EqualityComparable</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">x</code>, </span><span class="term"><code class="varname">y</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type X</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977883"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Equality test</p></td>
|
||||
<td><p>x == y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Inequality test</p></td>
|
||||
<td><p>x != y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977929"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><span class="simplelist"><span class="type">int</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::vector<int></span></span></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="CopyConstructible.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="LessThanComparable.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,58 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct template FinderConcept</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="string_algo/reference.html#id907172" title="Header <boost/algorithm/string/concept.hpp>">
|
||||
<link rel="prev" href="is_iequal.html" title="Struct is_iequal">
|
||||
<link rel="next" href="FormatterConcept.html" title="Struct template FormatterConcept">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_iequal.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="string_algo/reference.html#id907172"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="FormatterConcept.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="FinderConcept"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct template FinderConcept</span></h2>
|
||||
<p>boost::algorithm::FinderConcept — Finder concept. </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> FinderT, <span class="bold"><strong>typename</strong></span> IteratorT>
|
||||
<span class="bold"><strong>struct</strong></span> FinderConcept {
|
||||
|
||||
<span class="emphasis"><em>// <a href="FinderConcept.html#id1000634-bb">public member functions</a></em></span>
|
||||
<span class="type"><span class="bold"><strong>void</strong></span></span> <a href="FinderConcept.html#id1069871-bb">constraints</a>() ;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1315117"></a><h2>Description</h2>
|
||||
<p>Defines the Finder concept. Finder is a functor which selects an arbitrary part of a string. Search is performed on the range specified by starting and ending iterators.</p>
|
||||
<p>Result of the find operation must be convertible to iterator_range. </p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1315129"></a><h3>
|
||||
<a name="id1000634-bb"></a><code class="computeroutput">FinderConcept</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id1069871-bb"></a>constraints() ;</pre></li></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Pavol Droba</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_iequal.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="string_algo/reference.html#id907172"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="FormatterConcept.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,58 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct template FormatterConcept</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="string_algo/reference.html#id907172" title="Header <boost/algorithm/string/concept.hpp>">
|
||||
<link rel="prev" href="FinderConcept.html" title="Struct template FinderConcept">
|
||||
<link rel="next" href="id1178955.html" title="Type token_compress_mode_type">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="FinderConcept.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="string_algo/reference.html#id907172"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="id1178955.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="FormatterConcept"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct template FormatterConcept</span></h2>
|
||||
<p>boost::algorithm::FormatterConcept — Formatter concept. </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> FormatterT, <span class="bold"><strong>typename</strong></span> FinderT, <span class="bold"><strong>typename</strong></span> IteratorT>
|
||||
<span class="bold"><strong>struct</strong></span> FormatterConcept {
|
||||
|
||||
<span class="emphasis"><em>// <a href="FormatterConcept.html#id801912-bb">public member functions</a></em></span>
|
||||
<span class="type"><span class="bold"><strong>void</strong></span></span> <a href="FormatterConcept.html#id768658-bb">constraints</a>() ;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1315246"></a><h2>Description</h2>
|
||||
<p>Defines the Formatter concept. Formatter is a functor, which takes a result from a finder operation and transforms it in a specific way.</p>
|
||||
<p>Result must be a container supported by container_traits, or a reference to it. </p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1315257"></a><h3>
|
||||
<a name="id801912-bb"></a><code class="computeroutput">FormatterConcept</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id768658-bb"></a>constraints() ;</pre></li></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Pavol Droba</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="FinderConcept.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="string_algo/reference.html#id907172"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="id1178955.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,182 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept ForwardIterator</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="OutputIterator.html" title="Concept OutputIterator">
|
||||
<link rel="next" href="BidirectionalIterator.html" title="Concept BidirectionalIterator">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="OutputIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="BidirectionalIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="ForwardIterator"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept ForwardIterator</span></h2>
|
||||
<p>ForwardIterator</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976320"></a><h2>Description</h2>
|
||||
<p>A forward iterator is an iterator that can read through a sequence of
|
||||
values. It is multi-pass (old values of the iterator can be
|
||||
re-used), and can be either mutable (data pointed to by it can be
|
||||
changed) or not mutable.</p>
|
||||
<p>An iterator represents a position in a sequence. Therefore, the
|
||||
iterator can point into the sequence (returning a value when dereferenced
|
||||
and being incrementable), or be off-the-end (and not dereferenceable or
|
||||
incrementable).</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976335"></a><h2>Refinement of</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p><a href="InputIterator.html" title="Concept InputIterator">InputIterator</a></p></li>
|
||||
<li><p><a href="OutputIterator.html" title="Concept OutputIterator">OutputIterator</a></p></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976355"></a><h2>Associated types</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<p><span class="bold"><strong>value_type</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::value_type</pre>
|
||||
<p>The value type of the iterator</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="bold"><strong>category</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::iterator_category</pre>
|
||||
<p>The category of the iterator</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976395"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Iter</span></dt>
|
||||
<dd>A type playing the role of iterator-type in the <a href="ForwardIterator.html" title="Concept ForwardIterator">ForwardIterator</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">i</code>, </span><span class="term"><code class="varname">j</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type Iter</dd>
|
||||
<dt><span class="term"><code class="varname">x</code></span></dt>
|
||||
<dd>Object of type value_type</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976433"></a><h2>Type expressions</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Category tag</span></dt>
|
||||
<dd><p><span class="type">category</span> must be
|
||||
derived from <span class="type">std::forward_iterator_tag</span>.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976452"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Precondition</th>
|
||||
<th>Semantics</th>
|
||||
<th>Postcondition</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Dereference</p></td>
|
||||
<td><p>*i</p></td>
|
||||
<td><p><span class="type">const-if-not-mutable value_type &</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Member access</p></td>
|
||||
<td><p>i->{member-name} (return type is pointer-to-object type)</p></td>
|
||||
<td><p><span class="type">const-if-not-mutable value_type *</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Preincrement</p></td>
|
||||
<td><p>++i</p></td>
|
||||
<td><p><span class="type">Iter &</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Postincrement</p></td>
|
||||
<td><p>i++</p></td>
|
||||
<td><p><span class="type">Iter</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">{Iter j = i; ++i; return j;}</code></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is dereferenceable or
|
||||
off-the-end</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976586"></a><h2>Complexity</h2>
|
||||
<p>
|
||||
All iterator operations must take amortized constant time.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976593"></a><h2>Invariants</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Predecrement must return object</span></dt>
|
||||
<dd><p><code class="computeroutput">&i = &(++i)</code></p></dd>
|
||||
<dt><span class="term">Unique path through sequence</span></dt>
|
||||
<dd><p><code class="computeroutput">i == j</code> implies <code class="computeroutput">++i == ++j</code></p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976624"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><span class="simplelist"><span class="type">T *</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::hash_set<T>::iterator</span></span></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976644"></a><h2>See also</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><p><a href="BidirectionalIterator.html" title="Concept BidirectionalIterator">BidirectionalIterator</a></p></li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="OutputIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="BidirectionalIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,190 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept InputIterator</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="Assignable.html" title="Concept Assignable">
|
||||
<link rel="next" href="OutputIterator.html" title="Concept OutputIterator">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="Assignable.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="OutputIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="InputIterator"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept InputIterator</span></h2>
|
||||
<p>InputIterator</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975397"></a><h2>Description</h2>
|
||||
<p>An input iterator is an iterator that can read through a sequence of
|
||||
values. It is single-pass (old values of the iterator cannot be
|
||||
re-used), and read-only.</p>
|
||||
<p>An input iterator represents a position in a sequence. Therefore, the
|
||||
iterator can point into the sequence (returning a value when dereferenced
|
||||
and being incrementable), or be off-the-end (and not dereferenceable or
|
||||
incrementable).</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975412"></a><h2>Refinement of</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p><a href="Assignable.html" title="Concept Assignable">Assignable</a></p></li>
|
||||
<li><p><a href="DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a></p></li>
|
||||
<li><p><a href="EqualityComparable.html" title="Concept EqualityComparable">EqualityComparable</a></p></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975441"></a><h2>Associated types</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<p><span class="bold"><strong>value_type</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::value_type</pre>
|
||||
<p>The value type of the iterator (not necessarily what
|
||||
<code class="computeroutput">*i</code> returns)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="bold"><strong>difference_type</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::difference_type</pre>
|
||||
<p>The difference type of the iterator</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="bold"><strong>category</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::iterator_category</pre>
|
||||
<p>The category of the iterator</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975504"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Iter</span></dt>
|
||||
<dd>A type playing the role of iterator-type in the <a href="InputIterator.html" title="Concept InputIterator">InputIterator</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">i</code>, </span><span class="term"><code class="varname">j</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type Iter</dd>
|
||||
<dt><span class="term"><code class="varname">x</code></span></dt>
|
||||
<dd>Object of type value_type</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975542"></a><h2>Type expressions</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Category tag</span></dt>
|
||||
<dd><p><span class="type">category</span> must be
|
||||
derived from <span class="type">std::input_iterator_tag</span>, a model of <a href="DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a>, and a model of <a href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a>.
|
||||
</p></dd>
|
||||
<dt><span class="term">Value type copy constructibility</span></dt>
|
||||
<dd><p><span class="type">value_type</span> must be
|
||||
a model of <a href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a>.
|
||||
</p></dd>
|
||||
<dt><span class="term">Difference type properties</span></dt>
|
||||
<dd><p><span class="type">difference_type</span> must be
|
||||
a model of <a href="SignedInteger.html" title="Concept SignedInteger">SignedInteger</a>.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975612"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Precondition</th>
|
||||
<th>Semantics</th>
|
||||
<th>Postcondition</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Dereference</p></td>
|
||||
<td><p>*i</p></td>
|
||||
<td><p>Convertible to <span class="type">value_type</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Preincrement</p></td>
|
||||
<td><p>++i</p></td>
|
||||
<td><p><span class="type">Iter &</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Postincrement</p></td>
|
||||
<td><p>i++</p></td>
|
||||
<td><p></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">(void)(++i)</code></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is dereferenceable or
|
||||
off-the-end</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Postincrement and dereference</p></td>
|
||||
<td><p>*i++</p></td>
|
||||
<td><p>Convertible to <span class="type">value_type</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">{value_type t = *i; ++i; return t;}</code></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is dereferenceable or
|
||||
off-the-end</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975758"></a><h2>Complexity</h2>
|
||||
<p>
|
||||
All iterator operations must take amortized constant time.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975765"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><span class="simplelist"><span class="type">std::istream_iterator</span></span></li></ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975777"></a><h2>See also</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p><a href="DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a></p></li>
|
||||
<li><p><a href="EqualityComparable.html" title="Concept EqualityComparable">EqualityComparable</a></p></li>
|
||||
<li><p><a href="ForwardIterator.html" title="Concept ForwardIterator">ForwardIterator</a></p></li>
|
||||
<li><p><a href="OutputIterator.html" title="Concept OutputIterator">OutputIterator</a></p></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="Assignable.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="OutputIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,105 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept LessThanComparable</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="EqualityComparable.html" title="Concept EqualityComparable">
|
||||
<link rel="next" href="SignedInteger.html" title="Concept SignedInteger">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="EqualityComparable.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="SignedInteger.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="LessThanComparable"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept LessThanComparable</span></h2>
|
||||
<p>LessThanComparable</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977964"></a><h2>Description</h2>
|
||||
<p>LessThanComparable types must have <code class="computeroutput"><</code>,
|
||||
<code class="computeroutput">></code>, <code class="computeroutput"><=</code>, and <code class="computeroutput">>=</code>
|
||||
operators.</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977993"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">X</span></dt>
|
||||
<dd>A type playing the role of comparable-type in the <a href="LessThanComparable.html" title="Concept LessThanComparable">LessThanComparable</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">x</code>, </span><span class="term"><code class="varname">y</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type X</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id978024"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Less than</p></td>
|
||||
<td><p>x < y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
<td><p>Determine if one value is less than another.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Less than or equal</p></td>
|
||||
<td><p>x <= y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
<td><p>Determine if one value is less than or equal to another.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Greater than</p></td>
|
||||
<td><p>x > y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
<td><p>Determine if one value is greater than another.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Greater than or equal to</p></td>
|
||||
<td><p>x >= y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
<td><p>Determine if one value is greater than or equal to another.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id978117"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><span class="simplelist"><span class="type">int</span></span></li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="EqualityComparable.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="SignedInteger.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,200 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept OutputIterator</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="InputIterator.html" title="Concept InputIterator">
|
||||
<link rel="next" href="ForwardIterator.html" title="Concept ForwardIterator">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="InputIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="ForwardIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="OutputIterator"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept OutputIterator</span></h2>
|
||||
<p>OutputIterator</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975829"></a><h2>Description</h2>
|
||||
<p>An output iterator is an iterator that can write a sequence of
|
||||
values. It is single-pass (old values of the iterator cannot be
|
||||
re-used), and write-only.</p>
|
||||
<p>An output iterator represents a position in a (possibly infinite)
|
||||
sequence. Therefore, the iterator can point into the sequence (returning
|
||||
a value when dereferenced and being incrementable), or be off-the-end
|
||||
(and not dereferenceable or incrementable).</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975844"></a><h2>Associated types</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<p><span class="bold"><strong>value_type</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::value_type</pre>
|
||||
<p>The stated value type of the iterator (should be
|
||||
<code class="computeroutput">void</code> for an output iterator that does not model some other
|
||||
iterator concept).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="bold"><strong>difference_type</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::difference_type</pre>
|
||||
<p>The difference type of the iterator</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="bold"><strong>category</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::iterator_category</pre>
|
||||
<p>The category of the iterator</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975908"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Iter</span></dt>
|
||||
<dd>A type playing the role of iterator-type in the <a href="OutputIterator.html" title="Concept OutputIterator">OutputIterator</a> concept.</dd>
|
||||
<dt><span class="term">ValueType</span></dt>
|
||||
<dd>A type playing the role of value-type in the <a href="OutputIterator.html" title="Concept OutputIterator">OutputIterator</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">i</code>, </span><span class="term"><code class="varname">j</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type Iter</dd>
|
||||
<dt><span class="term"><code class="varname">x</code></span></dt>
|
||||
<dd>Object of type ValueType</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id975960"></a><h2>Type expressions</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"></span></dt>
|
||||
<dd><p>The type <span class="type">Iter</span> must be a model of <a href="Assignable.html" title="Concept Assignable">Assignable</a>.</p></dd>
|
||||
<dt><span class="term"></span></dt>
|
||||
<dd><p>The type <span class="type">ValueType</span> must be a model of <a href="Assignable.html" title="Concept Assignable">Assignable</a>.</p></dd>
|
||||
<dt><span class="term"></span></dt>
|
||||
<dd><p>The type <span class="type">Iter</span> must be a model of <a href="DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a>.</p></dd>
|
||||
<dt><span class="term"></span></dt>
|
||||
<dd><p>The type <span class="type">Iter</span> must be a model of
|
||||
<a href="EqualityComparable.html" title="Concept EqualityComparable">EqualityComparable</a>.</p></dd>
|
||||
<dt><span class="term">Category tag</span></dt>
|
||||
<dd><p><span class="type">category</span> must be
|
||||
derived from <span class="type">std::output_iterator_tag</span>, a model of <a href="DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a>, and a model of <a href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a>.
|
||||
</p></dd>
|
||||
<dt><span class="term">Difference type properties</span></dt>
|
||||
<dd><p><span class="type">difference_type</span> must be
|
||||
a model of <a href="SignedInteger.html" title="Concept SignedInteger">SignedInteger</a>.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976078"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Precondition</th>
|
||||
<th>Semantics</th>
|
||||
<th>Postcondition</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Dereference</p></td>
|
||||
<td><p>*i</p></td>
|
||||
<td><p></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Dereference and assign</p></td>
|
||||
<td><p>*i = x</p></td>
|
||||
<td><p></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td> </td>
|
||||
<td><p><code class="computeroutput">*i</code> may not be written to again until it has
|
||||
been incremented.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Preincrement</p></td>
|
||||
<td><p>++i</p></td>
|
||||
<td><p><span class="type">Iter &</span></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Postincrement</p></td>
|
||||
<td><p>i++</p></td>
|
||||
<td><p></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">(void)(++i)</code></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is dereferenceable or
|
||||
off-the-end</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Postincrement, dereference, and assign</p></td>
|
||||
<td><p>*i++ = x</p></td>
|
||||
<td><p></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is incrementable (not
|
||||
off-the-end)</p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">{*i = t; ++i;}</code></p></td>
|
||||
<td><p><code class="computeroutput">i</code> is dereferenceable or
|
||||
off-the-end</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976245"></a><h2>Complexity</h2>
|
||||
<p>
|
||||
All iterator operations must take amortized constant time.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976252"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><span class="simplelist"><span class="type">std::ostream_iterator</span>, <span class="type">...</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::insert_iterator</span>, <span class="type">...</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::front_insert_iterator</span>, <span class="type">...</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::back_insert_iterator</span>, <span class="type">...</span></span></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id976301"></a><h2>See also</h2>
|
||||
<div class="itemizedlist"><ul type="disc"></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="InputIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="ForwardIterator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,230 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept RandomAccessIterator</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="BidirectionalIterator.html" title="Concept BidirectionalIterator">
|
||||
<link rel="next" href="DefaultConstructible.html" title="Concept DefaultConstructible">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="BidirectionalIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="DefaultConstructible.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="RandomAccessIterator"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept RandomAccessIterator</span></h2>
|
||||
<p>RandomAccessIterator</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977006"></a><h2>Description</h2>
|
||||
<p>A random access iterator is an iterator that can read through
|
||||
a sequence of values. It can move in either direction through the
|
||||
sequence (by any amount in constant time), and can be either mutable
|
||||
(data pointed to by it can be changed) or not mutable.</p>
|
||||
<p>An iterator represents a position in a sequence. Therefore,
|
||||
the iterator can point into the sequence (returning a value when
|
||||
dereferenced and being incrementable), or be off-the-end (and not
|
||||
dereferenceable or incrementable).</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977022"></a><h2>Refinement of</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p><a href="BidirectionalIterator.html" title="Concept BidirectionalIterator">BidirectionalIterator</a></p></li>
|
||||
<li><p><a href="LessThanComparable.html" title="Concept LessThanComparable">LessThanComparable</a></p></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977044"></a><h2>Associated types</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<p><span class="bold"><strong>value_type</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::value_type</pre>
|
||||
<p>The value type of the iterator</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="bold"><strong>category</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::iterator_category</pre>
|
||||
<p>The category of the iterator</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="bold"><strong>difference_type</strong></span></p>
|
||||
<pre class="literallayout">std::iterator_traits<Iter>::difference_type</pre>
|
||||
<p>The difference type of the iterator (measure of the number
|
||||
of steps between two iterators)</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977101"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Iter</span></dt>
|
||||
<dd>A type playing the role of iterator-type in the <a href="RandomAccessIterator.html" title="Concept RandomAccessIterator">RandomAccessIterator</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">i</code>, </span><span class="term"><code class="varname">j</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type Iter</dd>
|
||||
<dt><span class="term"><code class="varname">x</code></span></dt>
|
||||
<dd>Object of type value_type</dd>
|
||||
<dt><span class="term"><code class="varname">n</code></span></dt>
|
||||
<dd>Object of type difference_type</dd>
|
||||
<dt><span class="term"><code class="varname">int_off</code></span></dt>
|
||||
<dd>Object of type int</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977156"></a><h2>Type expressions</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Category tag</span></dt>
|
||||
<dd><p><span class="type">category</span> must be
|
||||
derived from <span class="type">std::random_access_iterator_tag</span>.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977175"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Motion</p></td>
|
||||
<td><p>i += n</p></td>
|
||||
<td><p><span class="type">Iter &</span></p></td>
|
||||
<td><p>Equivalent to applying <code class="computeroutput">i++</code><code class="computeroutput">n</code> times
|
||||
if <code class="computeroutput">n</code> is positive, applying <code class="computeroutput">i--</code><code class="computeroutput">-n</code> times if <code class="computeroutput">n</code> is negative, and to a null
|
||||
operation if <code class="computeroutput">n</code> is zero.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Motion (with integer offset)</p></td>
|
||||
<td><p>i += int_off</p></td>
|
||||
<td><p><span class="type">Iter &</span></p></td>
|
||||
<td><p>Equivalent to applying <code class="computeroutput">i++</code><code class="computeroutput">n</code> times
|
||||
if <code class="computeroutput">n</code> is positive, applying <code class="computeroutput">i--</code><code class="computeroutput">-n</code> times if <code class="computeroutput">n</code> is negative, and to a null
|
||||
operation if <code class="computeroutput">n</code> is zero.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Subtractive motion</p></td>
|
||||
<td><p>i -= n</p></td>
|
||||
<td><p><span class="type">Iter &</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">i+=(-n)</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Subtractive motion (with integer offset)</p></td>
|
||||
<td><p>i -= int_off</p></td>
|
||||
<td><p><span class="type">Iter &</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">i+=(-n)</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Addition</p></td>
|
||||
<td><p>i + n</p></td>
|
||||
<td><p><span class="type">Iter</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">{Iter j = i; j += n; return j;}</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Addition with integer</p></td>
|
||||
<td><p>i + int_off</p></td>
|
||||
<td><p><span class="type">Iter</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">{Iter j = i; j += n; return j;}</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Addition (count first)</p></td>
|
||||
<td><p>n + i</p></td>
|
||||
<td><p><span class="type">Iter</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">i + n</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Addition with integer (count first)</p></td>
|
||||
<td><p>int_off + i</p></td>
|
||||
<td><p><span class="type">Iter</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">i + n</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Subtraction</p></td>
|
||||
<td><p>i - n</p></td>
|
||||
<td><p><span class="type">Iter</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">i + (-n)</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Subtraction with integer</p></td>
|
||||
<td><p>i - int_off</p></td>
|
||||
<td><p><span class="type">Iter</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">i + (-n)</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Distance</p></td>
|
||||
<td><p>i - j</p></td>
|
||||
<td><p><span class="type">difference_type</span></p></td>
|
||||
<td><p>The number of times <code class="computeroutput">i</code> must be incremented (or
|
||||
decremented if the result is negative) to reach <code class="computeroutput">j</code>. Not
|
||||
defined if <code class="computeroutput">j</code> is not reachable from
|
||||
<code class="computeroutput">i</code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Element access</p></td>
|
||||
<td><p>i[n]</p></td>
|
||||
<td><p><span class="type">const-if-not-mutable value_type &</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">*(i + n)</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Element access with integer index</p></td>
|
||||
<td><p>i[int_off]</p></td>
|
||||
<td><p><span class="type">const-if-not-mutable value_type &</span></p></td>
|
||||
<td><p>Equivalent to <code class="computeroutput">*(i + n)</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977554"></a><h2>Complexity</h2>
|
||||
<p>
|
||||
All iterator operations must take amortized constant time.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977561"></a><h2>Models</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><span class="simplelist"><span class="type">T *</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::vector<T>::iterator</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::vector<T>::const_iterator</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::deque<T>::iterator</span></span></li>
|
||||
<li><span class="simplelist"><span class="type">std::deque<T>::const_iterator</span></span></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id977608"></a><h2>See also</h2>
|
||||
<div class="itemizedlist"><ul type="disc"><li><p><a href="LessThanComparable.html" title="Concept LessThanComparable">LessThanComparable</a></p></li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="BidirectionalIterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="DefaultConstructible.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,256 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concept SignedInteger</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="concepts/reference.html" title="Concept reference">
|
||||
<link rel="prev" href="LessThanComparable.html" title="Concept LessThanComparable">
|
||||
<link rel="next" href="date_time.html" title="Chapter 3. Boost.Date_Time">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="LessThanComparable.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="date_time.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="SignedInteger"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Concept SignedInteger</span></h2>
|
||||
<p>SignedInteger</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id978143"></a><h2>Refinement of</h2>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p><a href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a></p></li>
|
||||
<li><p><a href="Assignable.html" title="Concept Assignable">Assignable</a></p></li>
|
||||
<li><p><a href="DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a></p></li>
|
||||
<li><p><a href="EqualityComparable.html" title="Concept EqualityComparable">EqualityComparable</a></p></li>
|
||||
<li><p><a href="LessThanComparable.html" title="Concept LessThanComparable">LessThanComparable</a></p></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id978189"></a><h2>Notation</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">T</span></dt>
|
||||
<dd>A type playing the role of integral-type in the <a href="SignedInteger.html" title="Concept SignedInteger">SignedInteger</a> concept.</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">x</code>, </span><span class="term"><code class="varname">y</code>, </span><span class="term"><code class="varname">z</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type T</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="varname">a</code>, </span><span class="term"><code class="varname">b</code></span>
|
||||
</dt>
|
||||
<dd>Objects of type int</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id978234"></a><h2>Type expressions</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">Conversion to int</span></dt>
|
||||
<dd><p><span class="type">T</span> must be
|
||||
convertible to <span class="type">int</span>.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id978253"></a><h2>Valid expressions</h2>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Name</th>
|
||||
<th>Expression</th>
|
||||
<th>Type</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Conversion from int</p></td>
|
||||
<td><p>T(a)</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Preincrement</p></td>
|
||||
<td><p>++x</p></td>
|
||||
<td><p><span class="type">T &</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Predecrement</p></td>
|
||||
<td><p>--x</p></td>
|
||||
<td><p><span class="type">T &</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Postincrement</p></td>
|
||||
<td><p>x++</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Postdecrement</p></td>
|
||||
<td><p>x--</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Sum</p></td>
|
||||
<td><p>x + y</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Sum with int</p></td>
|
||||
<td><p>x + a</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Sum-assignment</p></td>
|
||||
<td><p>x += y</p></td>
|
||||
<td><p><span class="type">T &</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Sum-assignment with int</p></td>
|
||||
<td><p>x += a</p></td>
|
||||
<td><p><span class="type">T &</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Difference</p></td>
|
||||
<td><p>x - y</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Difference with int</p></td>
|
||||
<td><p>x - a</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Product</p></td>
|
||||
<td><p>x * y</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Product with int</p></td>
|
||||
<td><p>x * a</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Product-assignment with int</p></td>
|
||||
<td><p>x *= a</p></td>
|
||||
<td><p><span class="type">T &</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Product with int on left</p></td>
|
||||
<td><p>a * x</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Quotient</p></td>
|
||||
<td><p>x / y</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Quotient with int</p></td>
|
||||
<td><p>x / a</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Right-shift</p></td>
|
||||
<td><p>x >> y</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Right-shift with int</p></td>
|
||||
<td><p>x >> a</p></td>
|
||||
<td><p><span class="type">T</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Right-shift-assignment with int</p></td>
|
||||
<td><p>x >>= a</p></td>
|
||||
<td><p><span class="type">T &</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Less-than comparison</p></td>
|
||||
<td><p>x < y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Less-than comparison with int</p></td>
|
||||
<td><p>x < a</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Less-than comparison with size_t</p></td>
|
||||
<td><p>x < boost::sample_value < std::size_t >()</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Greater-than comparison</p></td>
|
||||
<td><p>x > y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Greater-than comparison with int</p></td>
|
||||
<td><p>x > a</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Less-than-or-equal comparison</p></td>
|
||||
<td><p>x <= y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Less-than-or-equal comparison with int</p></td>
|
||||
<td><p>x <= a</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Greater-than-or-equal comparison</p></td>
|
||||
<td><p>x >= y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Greater-than-or-equal comparison with int</p></td>
|
||||
<td><p>x >= a</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Greater-than-or-equal comparison with int on left</p></td>
|
||||
<td><p>a >= x</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Equality comparison</p></td>
|
||||
<td><p>x == y</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Equality comparison with int</p></td>
|
||||
<td><p>x == a</p></td>
|
||||
<td><p>Convertible to <span class="type">bool</span></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id996168"></a><h2>See also</h2>
|
||||
<div class="itemizedlist"><ul type="disc"></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="LessThanComparable.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="concepts/reference.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="date_time.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,107 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class abstract_variables_map</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="program_options/reference.html#id872805" title="Header <boost/program_options/variables_map.hpp>">
|
||||
<link rel="prev" href="bool_switch.html" title="Function bool_switch">
|
||||
<link rel="next" href="variable_value.html" title="Class variable_value">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="bool_switch.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id872805"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="variable_value.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="abstract_variables_map"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class abstract_variables_map</span></h2>
|
||||
<p>boost::program_options::abstract_variables_map — </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>class</strong></span> abstract_variables_map {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// <a href="abstract_variables_map.html#abstract_variables_mapconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="abstract_variables_map.html#id1115586-bb">abstract_variables_map</a>();
|
||||
<a href="abstract_variables_map.html#id1115588-bb">abstract_variables_map</a>(<span class="bold"><strong>const</strong></span> <a href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> *);
|
||||
<a href="abstract_variables_map.html#id1118289-bb">~abstract_variables_map</a>();
|
||||
|
||||
<span class="emphasis"><em>// <a href="abstract_variables_map.html#id1136283-bb">public member functions</a></em></span>
|
||||
<span class="type"><span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &</span> <a href="abstract_variables_map.html#id1136288-bb"><span class="bold"><strong>operator</strong></span>[]</a>(<span class="bold"><strong>const</strong></span> std::string &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>void</strong></span></span> <a href="abstract_variables_map.html#id1115549-bb">next</a>(<a href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> *) ;
|
||||
|
||||
<span class="emphasis"><em>// <a href="abstract_variables_map.html#id1118292-bb">private member functions</a></em></span>
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &</span> <a href="abstract_variables_map.html#id1118297-bb">get</a>(<span class="bold"><strong>const</strong></span> std::string &) <span class="bold"><strong>const</strong></span>;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1277263"></a><h2>Description</h2>
|
||||
<p>Implements string->string mapping with convenient value casting facilities. </p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1277273"></a><h3>
|
||||
<a name="abstract_variables_mapconstruct-copy-destruct"></a><code class="computeroutput">abstract_variables_map</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><a name="id1115586-bb"></a>abstract_variables_map();</pre></li>
|
||||
<li><pre class="literallayout"><a name="id1115588-bb"></a>abstract_variables_map(<span class="bold"><strong>const</strong></span> <a href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> * next);</pre></li>
|
||||
<li><pre class="literallayout"><a name="id1118289-bb"></a>~abstract_variables_map();</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1277346"></a><h3>
|
||||
<a name="id1136283-bb"></a><code class="computeroutput">abstract_variables_map</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &</span> <a name="id1136288-bb"></a><span class="bold"><strong>operator</strong></span>[](<span class="bold"><strong>const</strong></span> std::string & name) <span class="bold"><strong>const</strong></span>;</pre>
|
||||
<p>Obtains the value of variable 'name', from *this and possibly from the chain of variable maps.</p>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
<p>if there's no value in *this.</p>
|
||||
<div class="itemizedlist"><ul type="circle">
|
||||
<li><p>if there's next variable map, returns value from it</p></li>
|
||||
<li><p>otherwise, returns empty value</p></li>
|
||||
</ul></div>
|
||||
</li></ul></div>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
<p>if there's defaulted value</p>
|
||||
<div class="itemizedlist"><ul type="circle">
|
||||
<li><p>if there's next varaible map, which has a non-defauled value, return that</p></li>
|
||||
<li><p>otherwise, return value from *this</p></li>
|
||||
</ul></div>
|
||||
</li></ul></div>
|
||||
<div class="itemizedlist"><ul type="disc"><li><p>if there's a non-defauled value, returns it. </p></li></ul></div>
|
||||
</li>
|
||||
<li>
|
||||
<pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id1115549-bb"></a>next(<a href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> * next) ;</pre>
|
||||
<p>Sets next variable map, which will be used to find variables not found in *this. </p>
|
||||
</li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1277481"></a><h3>
|
||||
<a name="id1118292-bb"></a><code class="computeroutput">abstract_variables_map</code> private member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"><li>
|
||||
<pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &</span> <a name="id1118297-bb"></a>get(<span class="bold"><strong>const</strong></span> std::string & name) <span class="bold"><strong>const</strong></span>;</pre>
|
||||
<p>Returns value of variable 'name' stored in *this, or empty value otherwise. </p>
|
||||
</li></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Vladimir Prus</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="bool_switch.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id872805"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="variable_value.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,16 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
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) -->
|
||||
<title>Redirect to generated documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/doc/libs/master/doc/html/accumulators.html">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="http://www.boost.org/doc/libs/master/doc/html/accumulators.html">http://www.boost.org/doc/libs/master/doc/html/accumulators.html</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct template acst_dst_trait</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id941196" title="Header <boost/date_time/local_timezone_defs.hpp>">
|
||||
<link rel="prev" href="uk_dst_trait.html" title="Struct template uk_dst_trait">
|
||||
<link rel="next" href="microsec_clock.html" title="Class template microsec_clock">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="uk_dst_trait.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id941196"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="microsec_clock.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="acst_dst_trait"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct template acst_dst_trait</span></h2>
|
||||
<p>boost::date_time::acst_dst_trait — </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> date_type>
|
||||
<span class="bold"><strong>struct</strong></span> acst_dst_trait {
|
||||
<span class="emphasis"><em>// types</em></span>
|
||||
<span class="bold"><strong>typedef</strong></span> date_type::day_of_week_type day_of_week_type;
|
||||
<span class="bold"><strong>typedef</strong></span> date_type::month_type month_type;
|
||||
<span class="bold"><strong>typedef</strong></span> <a href="last_kday_of_month.html" title="Class template last_kday_of_month">date_time::last_kday_of_month</a>< date_type > start_rule_functor;
|
||||
<span class="bold"><strong>typedef</strong></span> <a href="last_kday_of_month.html" title="Class template last_kday_of_month">date_time::last_kday_of_month</a>< date_type > end_rule_functor;
|
||||
|
||||
<span class="emphasis"><em>// <a href="acst_dst_trait.html#id825387-bb">public static functions</a></em></span>
|
||||
<span class="type">day_of_week_type</span> <a href="acst_dst_trait.html#id825392-bb">start_day</a>() ;
|
||||
<span class="type">month_type</span> <a href="acst_dst_trait.html#id1107969-bb">start_month</a>() ;
|
||||
<span class="type">day_of_week_type</span> <a href="acst_dst_trait.html#id893157-bb">end_day</a>() ;
|
||||
<span class="type">month_type</span> <a href="acst_dst_trait.html#id936154-bb">end_month</a>() ;
|
||||
<span class="type"><span class="bold"><strong>int</strong></span></span> <a href="acst_dst_trait.html#id936167-bb">dst_start_offset_minutes</a>() ;
|
||||
<span class="type"><span class="bold"><strong>int</strong></span></span> <a href="acst_dst_trait.html#id832605-bb">dst_end_offset_minutes</a>() ;
|
||||
<span class="type"><span class="bold"><strong>int</strong></span></span> <a href="acst_dst_trait.html#id966084-bb">dst_shift_length_minutes</a>() ;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1110273"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1110276"></a><h3>
|
||||
<a name="id825387-bb"></a><code class="computeroutput">acst_dst_trait</code> public static functions</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><span class="type">day_of_week_type</span> <a name="id825392-bb"></a>start_day() ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">month_type</span> <a name="id1107969-bb"></a>start_month() ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">day_of_week_type</span> <a name="id893157-bb"></a>end_day() ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">month_type</span> <a name="id936154-bb"></a>end_month() ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>int</strong></span></span> <a name="id936167-bb"></a>dst_start_offset_minutes() ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>int</strong></span></span> <a name="id832605-bb"></a>dst_end_offset_minutes() ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>int</strong></span></span> <a name="id966084-bb"></a>dst_shift_length_minutes() ;</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="uk_dst_trait.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id941196"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="microsec_clock.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,64 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Function template all</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="string_algo/reference.html#id1144873" title="Header <boost/algorithm/string/predicate.hpp>">
|
||||
<link rel="prev" href="iequals.html" title="Function template iequals">
|
||||
<link rel="next" href="find_regex.html" title="Function template find_regex">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="iequals.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="string_algo/reference.html#id1144873"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="find_regex.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="all"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Function template all</span></h2>
|
||||
<p>boost::algorithm::all — 'All' predicate </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> RangeT, <span class="bold"><strong>typename</strong></span> PredicateT>
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> all(<span class="bold"><strong>const</strong></span> RangeT & Input, PredicateT Pred);</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1327677"></a><h2>Description</h2>
|
||||
<p>This predicate holds it all its elements satisfy a given condition, represented by the predicate.</p>
|
||||
<p></p>
|
||||
<div class="variablelist">
|
||||
<p class="title"><b>Parameters</b></p>
|
||||
<dl>
|
||||
<dt><span class="term">Input</span></dt>
|
||||
<dd><p>An input sequence </p></dd>
|
||||
<dt><span class="term">Pred</span></dt>
|
||||
<dd><p>A predicate </p></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
|
||||
|
||||
The result of the test<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Notes</span></b>:
|
||||
|
||||
This function provides the strong exception-safety guarantee </p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Pavol Droba</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="iequals.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="string_algo/reference.html#id1144873"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="find_regex.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,120 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class template all_date_names_put</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id1072331" title="Header <boost/date_time/date_names_put.hpp>">
|
||||
<link rel="prev" href="date_names_put.html" title="Class template date_names_put">
|
||||
<link rel="next" href="dst_calculator.html" title="Class template dst_calculator">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="date_names_put.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id1072331"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="dst_calculator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="all_date_names_put"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class template all_date_names_put</span></h2>
|
||||
<p>boost::date_time::all_date_names_put — A date name output facet that takes an array of char* to define strings. </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Config, <span class="bold"><strong>typename</strong></span> charT = <span class="bold"><strong>char</strong></span>,
|
||||
<span class="bold"><strong>typename</strong></span> <a href="OutputIterator.html" title="Concept OutputIterator">OutputIterator</a> = std::ostreambuf_iterator<charT> >
|
||||
<span class="bold"><strong>class</strong></span> all_date_names_put : <span class="bold"><strong>public</strong></span> boost::date_time::date_names_put< Config, charT, OutputIterator >
|
||||
{
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// types</em></span>
|
||||
<span class="bold"><strong>typedef</strong></span> OutputIterator iter_type;
|
||||
<span class="bold"><strong>typedef</strong></span> Config::month_enum month_enum;
|
||||
<span class="bold"><strong>typedef</strong></span> Config::weekday_enum weekday_enum;
|
||||
<span class="bold"><strong>typedef</strong></span> Config::special_value_enum special_value_enum;
|
||||
|
||||
<span class="emphasis"><em>// <a href="all_date_names_put.html#all_date_names_putconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="all_date_names_put.html#id936796-bb">all_date_names_put</a>(<span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span>, <span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span>,
|
||||
<span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span>, <span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span>,
|
||||
<span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span>, charT = '-',
|
||||
ymd_order_spec = ymd_order_iso,
|
||||
month_format_spec = month_as_short_string);
|
||||
|
||||
<span class="emphasis"><em>// <a href="all_date_names_put.html#id929560-bb">public member functions</a></em></span>
|
||||
<span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a href="all_date_names_put.html#id929565-bb">get_short_month_names</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a href="all_date_names_put.html#id1069945-bb">get_long_month_names</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a href="all_date_names_put.html#id801418-bb">get_special_value_names</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a href="all_date_names_put.html#id971730-bb">get_short_weekday_names</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a href="all_date_names_put.html#id822494-bb">get_long_weekday_names</a>() <span class="bold"><strong>const</strong></span>;
|
||||
|
||||
<span class="emphasis"><em>// <a href="all_date_names_put.html#id825192-bb">protected member functions</a></em></span>
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="all_date_names_put.html#id825197-bb">do_put_month_short</a>(iter_type &, month_enum) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="all_date_names_put.html#id933199-bb">do_put_month_long</a>(iter_type &, month_enum) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="all_date_names_put.html#id1075710-bb">do_put_special_value</a>(iter_type &, special_value_enum) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="all_date_names_put.html#id1104596-bb">do_put_weekday_short</a>(iter_type &, weekday_enum) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="all_date_names_put.html#id792600-bb">do_put_weekday_long</a>(iter_type &, weekday_enum) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="all_date_names_put.html#id838764-bb">do_month_sep_char</a>(iter_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="all_date_names_put.html#id1045428-bb">do_day_sep_char</a>(iter_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> ymd_order_spec</span> <a href="all_date_names_put.html#id970879-bb">do_date_order</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>virtual</strong></span> month_format_spec</span> <a href="all_date_names_put.html#id1077877-bb">do_month_format</a>() <span class="bold"><strong>const</strong></span>;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1079994"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1079997"></a><h3>
|
||||
<a name="all_date_names_putconstruct-copy-destruct"></a><code class="computeroutput">all_date_names_put</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id936796-bb"></a>all_date_names_put(<span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> month_short_names,
|
||||
<span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> month_long_names,
|
||||
<span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> special_value_names,
|
||||
<span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> weekday_short_names,
|
||||
<span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> weekday_long_names,
|
||||
charT separator_char = '-',
|
||||
ymd_order_spec order_spec = ymd_order_iso,
|
||||
month_format_spec month_format = month_as_short_string);</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1080096"></a><h3>
|
||||
<a name="id929560-bb"></a><code class="computeroutput">all_date_names_put</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a name="id929565-bb"></a>get_short_month_names() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a name="id1069945-bb"></a>get_long_month_names() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a name="id801418-bb"></a>get_special_value_names() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a name="id971730-bb"></a>get_short_weekday_names() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> charT *<span class="bold"><strong>const</strong></span> *</span> <a name="id822494-bb"></a>get_long_weekday_names() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1080280"></a><h3>
|
||||
<a name="id825192-bb"></a><code class="computeroutput">all_date_names_put</code> protected member functions</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id825197-bb"></a>do_put_month_short(iter_type & oitr, month_enum moy) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id933199-bb"></a>do_put_month_long(iter_type & oitr, month_enum moy) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span>
|
||||
<a name="id1075710-bb"></a>do_put_special_value(iter_type & oitr, special_value_enum sv) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id1104596-bb"></a>do_put_weekday_short(iter_type & oitr, weekday_enum wd) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id792600-bb"></a>do_put_weekday_long(iter_type & oitr, weekday_enum wd) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id838764-bb"></a>do_month_sep_char(iter_type & oitr) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id1045428-bb"></a>do_day_sep_char(iter_type & oitr) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> ymd_order_spec</span> <a name="id970879-bb"></a>do_date_order() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> month_format_spec</span> <a name="id1077877-bb"></a>do_month_format() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="date_names_put.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id1072331"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="dst_calculator.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class ambiguous_option</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="program_options/reference.html#id696710" title="Header <boost/program_options/errors.hpp>">
|
||||
<link rel="prev" href="eof_iterator.html" title="Class template eof_iterator">
|
||||
<link rel="next" href="error.html" title="Class error">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="eof_iterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id696710"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="error.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="ambiguous_option"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class ambiguous_option</span></h2>
|
||||
<p>boost::program_options::ambiguous_option — </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>class</strong></span> ambiguous_option : <span class="bold"><strong>public</strong></span> boost::program_options::error {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// <a href="ambiguous_option.html#ambiguous_optionconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="ambiguous_option.html#id656261-bb">ambiguous_option</a>(<span class="bold"><strong>const</strong></span> std::string &, <span class="bold"><strong>const</strong></span> std::vector< std::string > &);
|
||||
<a href="ambiguous_option.html#id864630-bb">~ambiguous_option</a>();
|
||||
|
||||
<span class="emphasis"><em>// <a href="ambiguous_option.html#id822608-bb">public member functions</a></em></span>
|
||||
|
||||
std::vector< std::string > alternatives;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1249951"></a><h2>Description</h2>
|
||||
<p>Class thrown when there's ambiguity amoung several possible options. </p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1249958"></a><h3>
|
||||
<a name="ambiguous_optionconstruct-copy-destruct"></a><code class="computeroutput">ambiguous_option</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><a name="id656261-bb"></a>ambiguous_option(<span class="bold"><strong>const</strong></span> std::string & name,
|
||||
<span class="bold"><strong>const</strong></span> std::vector< std::string > & alternatives);</pre></li>
|
||||
<li><pre class="literallayout"><a name="id864630-bb"></a>~ambiguous_option();</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1250018"></a><h3>
|
||||
<a name="id822608-bb"></a><code class="computeroutput">ambiguous_option</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Vladimir Prus</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="eof_iterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id696710"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="error.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct ambiguous_result</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id1106303" title="Header <boost/date_time/local_time/local_date_time.hpp>">
|
||||
<link rel="prev" href="nth_kday_rule_spec.html" title="Struct nth_kday_rule_spec">
|
||||
<link rel="next" href="time_label_invalid.html" title="Struct time_label_invalid">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="nth_kday_rule_spec.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id1106303"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="time_label_invalid.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="ambiguous_result"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct ambiguous_result</span></h2>
|
||||
<p>boost::local_time::ambiguous_result — simple exception for reporting when STD or DST cannot be determined </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> ambiguous_result {
|
||||
<span class="emphasis"><em>// <a href="ambiguous_result.html#ambiguous_resultconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="ambiguous_result.html#id821403-bb">ambiguous_result</a>(std::string = "");
|
||||
|
||||
<span class="emphasis"><em>// <a href="ambiguous_result.html#id821397-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1181119"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1181122"></a><h3>
|
||||
<a name="ambiguous_resultconstruct-copy-destruct"></a><code class="computeroutput">ambiguous_result</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id821403-bb"></a>ambiguous_result(std::string _msg = "");</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1181157"></a><h3>
|
||||
<a name="id821397-bb"></a><code class="computeroutput">ambiguous_result</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="nth_kday_rule_spec.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id1106303"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="time_label_invalid.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+104
-14
@@ -1,16 +1,106 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
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) -->
|
||||
<title>Redirect to generated documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/doc/libs/master/doc/html/any.html">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="http://www.boost.org/doc/libs/master/doc/html/any.html">http://www.boost.org/doc/libs/master/doc/html/any.html</a>
|
||||
</body>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Chapter 1. Boost.Any</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries">
|
||||
<link rel="prev" href="libraries/s02.html" title="Libraries Listed by Category">
|
||||
<link rel="next" href="any/s02.html" title="Examples">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="libraries/s02.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="any/s02.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="chapter" lang="en">
|
||||
<div class="titlepage"><div>
|
||||
<div><h2 class="title">
|
||||
<a name="any"></a>Chapter 1. Boost.Any</h2></div>
|
||||
<div><div class="author"><h3 class="author">
|
||||
<span class="firstname">Kevlin</span> <span class="surname">Henney</span>
|
||||
</h3></div></div>
|
||||
<div><p class="copyright">Copyright © 2001 Kevlin Henney</p></div>
|
||||
</div></div>
|
||||
<div class="toc">
|
||||
<p><b>Table of Contents</b></p>
|
||||
<dl>
|
||||
<dt><span class="section"><a href="any.html#id969830">Introduction</a></span></dt>
|
||||
<dt><span class="section"><a href="any/s02.html">Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="any/reference.html">Reference</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="any/reference.html#any.ValueType"><span class="emphasis"><em>ValueType</em></span> requirements</a></span></dt>
|
||||
<dt><span class="section"><a href="any/reference.html#header.boost.any.hpp">Header <boost/any.hpp></a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="any/s04.html">Acknowledgements</a></span></dt>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="id969830"></a>Introduction</h3></div></div></div>
|
||||
<p>There are times when a generic (in the sense of
|
||||
<span class="emphasis"><em>general</em></span> as opposed to
|
||||
<span class="emphasis"><em>template-based programming</em></span>) type is needed:
|
||||
variables that are truly variable, accommodating values of many
|
||||
other more specific types rather than C++'s normal strict and
|
||||
static types. We can distinguish three basic kinds of generic
|
||||
type:</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>Converting types that can hold one of a number of
|
||||
possible value types, e.g. <code class="computeroutput">int</code> and
|
||||
<code class="computeroutput">string</code>, and freely convert between them, for
|
||||
instance interpreting <code class="computeroutput">5</code> as <code class="computeroutput">"5"</code> or
|
||||
vice-versa. Such types are common in scripting and other
|
||||
interpreted
|
||||
languages.
|
||||
<code class="computeroutput">boost::lexical_cast</code>
|
||||
supports such conversion functionality.</p></li>
|
||||
<li><p>
|
||||
Discriminated types that contain values of different types but
|
||||
do not attempt conversion between them, i.e. <code class="computeroutput">5</code> is
|
||||
held strictly as an <code class="computeroutput">int</code> and is not implicitly
|
||||
convertible either to <code class="computeroutput">"5"</code> or to
|
||||
<code class="computeroutput">5.0</code>. Their indifference to interpretation but
|
||||
awareness of type effectively makes them safe, generic
|
||||
containers of single values, with no scope for surprises from
|
||||
ambiguous conversions.</p></li>
|
||||
<li><p>
|
||||
Indiscriminate types that can refer to anything but are
|
||||
oblivious to the actual underlying type, entrusting all forms
|
||||
of access and interpretation to the programmer. This niche is
|
||||
dominated by <code class="computeroutput">void *</code>, which offers plenty of scope
|
||||
for surprising, undefined behavior.</p></li>
|
||||
</ul></div>
|
||||
<p>The <code class="computeroutput"><a href="boost/any.html" title="Class any">boost::any</a></code> class
|
||||
(based on the class of the same name described in <a href="http://www.two-sdg.demon.co.uk/curbralan/papers/ValuedConversions.pdf" target="_top">"Valued
|
||||
Conversions"</a> by Kevlin Henney, <span class="emphasis"><em>C++
|
||||
Report</em></span> 12(7), July/August 2000) is a variant value type
|
||||
based on the second category. It supports copying of any value
|
||||
type and safe checked extraction of that value strictly against
|
||||
its type. A similar design, offering more appropriate operators,
|
||||
can be used for a generalized function adaptor,
|
||||
<code class="computeroutput">any_function</code>, a generalized iterator adaptor,
|
||||
<code class="computeroutput">any_iterator</code>, and other object types that need
|
||||
uniform runtime treatment but support only compile-time template
|
||||
parameter conformance.</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><small><p>Last revised: March 15, 2003 at 23:12:35 GMT</p></small></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="libraries/s02.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="any/s02.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../any.html" title="Chapter 1. Boost.Any">
|
||||
<link rel="prev" href="s02.html" title="Examples">
|
||||
<link rel="next" href="../bad_any_cast.html" title="Class bad_any_cast">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="s02.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../bad_any_cast.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="any.reference"></a>Reference</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="reference.html#any.ValueType"><span class="emphasis"><em>ValueType</em></span> requirements</a></span></dt>
|
||||
<dt><span class="section"><a href="reference.html#header.boost.any.hpp">Header <boost/any.hpp></a></span></dt>
|
||||
</dl></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="any.ValueType"></a><span class="emphasis"><em>ValueType</em></span> requirements</h4></div></div></div>
|
||||
<p>Values are strongly informational objects for which
|
||||
identity is not significant, i.e. the focus is principally on
|
||||
their state content and any behavior organized around
|
||||
that. Another distinguishing feature of values is their
|
||||
granularity: normally fine-grained objects representing simple
|
||||
concepts in the system such as quantities.</p>
|
||||
<p>As the emphasis of a value lies in its state not its
|
||||
identity, values can be copied and typically assigned one to
|
||||
another, requiring the explicit or implicit definition of a
|
||||
public copy constructor and public assignment operator. Values
|
||||
typically live within other scopes, i.e. within objects or
|
||||
blocks, rather than on the heap. Values are therefore normally
|
||||
passed around and manipulated directly as variables or through
|
||||
references, but not as pointers that emphasize identity and
|
||||
indirection.</p>
|
||||
<p>The specific requirements on value types to be used in an
|
||||
<code class="computeroutput"><a href="../boost/any.html" title="Class any">any</a></code>
|
||||
are:</p>
|
||||
<div class="itemizedlist"><ul type="disc" compact>
|
||||
<li>A <span class="emphasis"><em>ValueType</em></span> is
|
||||
<span class="emphasis"><em>CopyConstructible</em></span> [20.1.3].</li>
|
||||
<li>A <span class="emphasis"><em>ValueType</em></span> is
|
||||
optionally <span class="emphasis"><em>Assignable</em></span> [23.1]. The strong
|
||||
exception-safety guarantee is required for all forms of
|
||||
assignment.</li>
|
||||
<li>The destructor for a
|
||||
<span class="emphasis"><em>ValueType</em></span> upholds the no-throw
|
||||
exception-safety guarantee.</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="header.boost.any.hpp"></a>Header <<a href="../../../boost/any.hpp" target="_top">boost/any.hpp</a>></h4></div></div></div>
|
||||
<pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost {
|
||||
<span class="bold"><strong>class</strong></span> <a href="../bad_any_cast.html" title="Class bad_any_cast">bad_any_cast</a>;
|
||||
<span class="bold"><strong>class</strong></span> <a href="../boost/any.html" title="Class any">any</a>;
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> ValueType> <span class="type">ValueType</span> <a href="../any_cast.html" title="Function any_cast">any_cast</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/any.html" title="Class any">any</a> &);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> ValueType> <span class="type"><span class="bold"><strong>const</strong></span> ValueType *</span> <a href="../any_cast.html" title="Function any_cast">any_cast</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/any.html" title="Class any">any</a> *);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> ValueType> <span class="type">ValueType *</span> <a href="../any_cast.html" title="Function any_cast">any_cast</a>(<a href="../boost/any.html" title="Class any">any</a> *);
|
||||
}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001 Kevlin Henney</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="s02.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../bad_any_cast.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,144 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Examples</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../any.html" title="Chapter 1. Boost.Any">
|
||||
<link rel="prev" href="../any.html" title="Chapter 1. Boost.Any">
|
||||
<link rel="next" href="reference.html" title="Reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../any.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="id969978"></a>Examples</h3></div></div></div>
|
||||
<p>The following code demonstrates the syntax for using
|
||||
implicit conversions to and copying of any objects:</p>
|
||||
<pre class="programlisting">
|
||||
#include <list>
|
||||
#include <boost/any.hpp>
|
||||
|
||||
using <code class="computeroutput"><a href="../any_cast.html" title="Function any_cast">boost::any_cast</a></code>;
|
||||
typedef std::list<<code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code>> many;
|
||||
|
||||
void append_int(many & values, int value)
|
||||
{
|
||||
<code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> to_append = value;
|
||||
values.push_back(to_append);
|
||||
}
|
||||
|
||||
void append_string(many & values, const std::string & value)
|
||||
{
|
||||
values.push_back(value);
|
||||
}
|
||||
|
||||
void append_char_ptr(many & values, const char * value)
|
||||
{
|
||||
values.push_back(value);
|
||||
}
|
||||
|
||||
void append_any(many & values, const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> & value)
|
||||
{
|
||||
values.push_back(value);
|
||||
}
|
||||
|
||||
void append_nothing(many & values)
|
||||
{
|
||||
values.push_back(<code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code>());
|
||||
}
|
||||
</pre>
|
||||
<p>The following predicates follow on from the previous
|
||||
definitions and demonstrate the use of queries on any
|
||||
objects:</p>
|
||||
<pre class="programlisting">
|
||||
bool is_empty(const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> & operand)
|
||||
{
|
||||
return operand.<code class="computeroutput"><a href="../boost/any.html#id761592-bb">empty</a></code>();
|
||||
}
|
||||
|
||||
bool is_int(const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> & operand)
|
||||
{
|
||||
return operand.<code class="computeroutput"><a href="../boost/any.html#id761615-bb">type</a></code>() == typeid(int);
|
||||
}
|
||||
|
||||
bool is_char_ptr(const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> & operand)
|
||||
{
|
||||
try
|
||||
{
|
||||
<code class="computeroutput"><a href="../any_cast.html" title="Function any_cast">any_cast</a></code><const char *>(operand);
|
||||
return true;
|
||||
}
|
||||
catch(const <code class="computeroutput"><a href="../bad_any_cast.html" title="Class bad_any_cast">boost::bad_any_cast</a></code> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool is_string(const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> & operand)
|
||||
{
|
||||
return <code class="computeroutput"><a href="../any_cast.html" title="Function any_cast">any_cast</a></code><std::string>(&operand);
|
||||
}
|
||||
|
||||
void count_all(many & values, std::ostream & out)
|
||||
{
|
||||
out << "#empty == "
|
||||
<< std::count_if(values.begin(), values.end(), is_empty) << std::endl;
|
||||
out << "#int == "
|
||||
<< std::count_if(values.begin(), values.end(), is_int) << std::endl;
|
||||
out << "#const char * == "
|
||||
<< std::count_if(values.begin(), values.end(), is_char_ptr) << std::endl;
|
||||
out << "#string == "
|
||||
<< std::count_if(values.begin(), values.end(), is_string) << std::endl;
|
||||
}
|
||||
</pre>
|
||||
<p>The following type, patterned after the OMG's Property Service, defines name-value pairs for arbitrary value types:</p>
|
||||
<pre class="programlisting">
|
||||
struct property
|
||||
{
|
||||
property();
|
||||
property(const std::string &, const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> &);
|
||||
|
||||
std::string name;
|
||||
<code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> value;
|
||||
};
|
||||
|
||||
typedef std::list<property> properties;
|
||||
</pre>
|
||||
<p>The following base class demonstrates one approach to
|
||||
runtime polymorphism based callbacks that also require arbitrary
|
||||
argument types. The absence of virtual member templates requires
|
||||
that different solutions have different trade-offs in terms of
|
||||
efficiency, safety, and generality. Using a checked variant type
|
||||
offers one approach:</p>
|
||||
<pre class="programlisting">
|
||||
class consumer
|
||||
{
|
||||
public:
|
||||
virtual void notify(const <code class="computeroutput"><a href="../boost/any.html" title="Class any">any</a></code> &) = 0;
|
||||
...
|
||||
};
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001 Kevlin Henney</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../any.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Acknowledgements</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../any.html" title="Chapter 1. Boost.Any">
|
||||
<link rel="prev" href="../any_cast.html" title="Function any_cast">
|
||||
<link rel="next" href="../array.html" title="Chapter 2. Boost.Array">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../any_cast.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../array.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="id971646"></a>Acknowledgements</h3></div></div></div>
|
||||
<p>Doug Gregor ported the documentation to the BoostBook format.</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001 Kevlin Henney</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../any_cast.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../array.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,69 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Function any_cast</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="any/reference.html#header.boost.any.hpp" title="Header <boost/any.hpp>">
|
||||
<link rel="prev" href="boost/any.html" title="Class any">
|
||||
<link rel="next" href="any/s04.html" title="Acknowledgements">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="boost/any.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="any/reference.html#header.boost.any.hpp"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="any/s04.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="any_cast"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Function any_cast</span></h2>
|
||||
<p>boost::any_cast — <p>Custom keyword cast for extracting a value
|
||||
of a given type from an
|
||||
<code class="computeroutput"><a href="boost/any.html" title="Class any">any</a></code>.</p></p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> ValueType> <span class="type">ValueType</span> any_cast(<span class="bold"><strong>const</strong></span> <a href="boost/any.html" title="Class any">any</a> & operand);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> ValueType> <span class="type"><span class="bold"><strong>const</strong></span> ValueType *</span> any_cast(<span class="bold"><strong>const</strong></span> <a href="boost/any.html" title="Class any">any</a> * operand);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> ValueType> <span class="type">ValueType *</span> any_cast(<a href="boost/any.html" title="Class any">any</a> * operand);</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id971581"></a><h2>Description</h2>
|
||||
<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
|
||||
|
||||
If passed a pointer, it returns a
|
||||
similarly qualified pointer to the value content if
|
||||
successful, otherwise null is returned. If passed a value or
|
||||
reference, it returns a copy of the value content if
|
||||
successful.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
|
||||
|
||||
Overloads taking an
|
||||
<code class="computeroutput"><a href="boost/any.html" title="Class any">any</a></code> pointer do not
|
||||
throw; the overload taking an
|
||||
<code class="computeroutput"><a href="boost/any.html" title="Class any">any</a></code> value or reference
|
||||
throws <code class="computeroutput"><a href="bad_any_cast.html" title="Class bad_any_cast">bad_any_cast</a></code> if
|
||||
unsuccessful.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Rationale</span></b>:
|
||||
|
||||
The value/reference version returns a
|
||||
copy because the C++ keyword casts return
|
||||
copies.</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001 Kevlin Henney</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="boost/any.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="any/reference.html#header.boost.any.hpp"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="any/s04.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,111 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Appendix A. Rationale for some of the design decisions</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="lambda.html" title="Chapter 6. Boost.Lambda">
|
||||
<link rel="prev" href="lambda/s09.html" title="Contributors">
|
||||
<link rel="next" href="program_options.html" title="Chapter 7. Boost.Program_options">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="lambda/s09.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="lambda.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="program_options.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="appendix" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title">
|
||||
<a name="id1246210"></a>Appendix A. Rationale for some of the design decisions</h2></div></div></div>
|
||||
<div class="toc">
|
||||
<p><b>Table of Contents</b></p>
|
||||
<dl><dt><span class="section"><a href="apa.html#lambda.why_weak_arity">
|
||||
Lambda functor arity
|
||||
</a></span></dt></dl>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="lambda.why_weak_arity"></a>
|
||||
Lambda functor arity
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The highest placeholder index in a lambda expression determines the arity of the resulting function object.
|
||||
However, this is just the minimal arity, as the function object can take arbitrarily many arguments; those not needed are discarded.
|
||||
Consider the two bind expressions and their invocations below:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
bind(g, _3, _3, _3)(x, y, z);
|
||||
bind(g, _1, _1, _1)(x, y, z);
|
||||
</pre>
|
||||
<p>
|
||||
|
||||
This first line discards arguments <code class="literal">x</code> and
|
||||
<code class="literal">y</code>, and makes the call:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
g(z, z, z)
|
||||
</pre>
|
||||
<p>
|
||||
whereas the second line discards arguments <code class="literal">y</code> and
|
||||
<code class="literal">z</code>, and calls:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
g(x, x, x)
|
||||
</pre>
|
||||
<p>
|
||||
In earlier versions of the library, the latter line resulted in a compile
|
||||
time error.
|
||||
|
||||
This is basically a tradeoff between safety and flexibility, and the issue
|
||||
was extensively discussed during the Boost review period of the library.
|
||||
The main points for the <span class="emphasis"><em>strict arity</em></span> checking
|
||||
was that it might
|
||||
catch a programming error at an earlier time and that a lambda expression that
|
||||
explicitly discards its arguments is easy to write:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
(_3, bind(g, _1, _1, _1))(x, y, z);
|
||||
</pre>
|
||||
<p>
|
||||
This lambda expression takes three arguments.
|
||||
The left-hand argument of the comma operator does nothing, and as comma
|
||||
returns the result of evaluating the right-hand argument we end up with
|
||||
the call
|
||||
<code class="literal">g(x, x, x)</code>
|
||||
even with the strict arity.
|
||||
</p>
|
||||
<p>
|
||||
The main points against the strict arity checking were that the need to
|
||||
discard arguments is commonplace, and should therefore be straightforward,
|
||||
and that strict arity checking does not really buy that much more safety,
|
||||
particularly as it is not symmetric.
|
||||
For example, if the programmer wanted to write the expression
|
||||
<code class="literal">_1 + _2</code> but mistakenly wrote <code class="literal">_1 + 2</code>,
|
||||
with strict arity checking, the complier would spot the error.
|
||||
However, if the erroneous expression was <code class="literal">1 + _2</code> instead,
|
||||
the error would go unnoticed.
|
||||
Furthermore, weak arity checking simplifies the implementation a bit.
|
||||
Following the recommendation of the Boost review, strict arity checking
|
||||
was dropped.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 1999-2004 Jaakko Järvi, Gary Powell</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="lambda/s09.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="lambda.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="program_options.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,103 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Function apply_visitor</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="variant/reference.html#id872290" title="Header <boost/variant/apply_visitor.hpp>">
|
||||
<link rel="prev" href="apply_visitor_delayed_t.html" title="Class template apply_visitor_delayed_t">
|
||||
<link rel="next" href="bad_get.html" title="Class bad_get">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="apply_visitor_delayed_t.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id872290"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="bad_get.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="apply_visitor"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Function apply_visitor</span></h2>
|
||||
<p>boost::apply_visitor — <p>Allows compile-time checked type-safe application of the
|
||||
given visitor to the content of the given variant, ensuring that all
|
||||
types are handled by the visitor.</p></p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Visitor, <span class="bold"><strong>typename</strong></span> Variant>
|
||||
<span class="type"><span class="bold"><strong>typename</strong></span> Visitor::result_type</span>
|
||||
apply_visitor(Visitor & visitor, Variant & operand);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Visitor, <span class="bold"><strong>typename</strong></span> Variant>
|
||||
<span class="type"><span class="bold"><strong>typename</strong></span> Visitor::result_type</span>
|
||||
apply_visitor(<span class="bold"><strong>const</strong></span> Visitor & visitor, Variant & operand);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> BinaryVisitor, <span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2>
|
||||
<span class="type"><span class="bold"><strong>typename</strong></span> BinaryVisitor::result_type</span>
|
||||
apply_visitor(BinaryVisitor & visitor, Variant1 & operand1,
|
||||
Variant2 & operand2);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> BinaryVisitor, <span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2>
|
||||
<span class="type"><span class="bold"><strong>typename</strong></span> BinaryVisitor::result_type</span>
|
||||
apply_visitor(<span class="bold"><strong>const</strong></span> BinaryVisitor & visitor, Variant1 & operand1,
|
||||
Variant2 & operand2);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Visitor>
|
||||
<span class="type"><a href="apply_visitor_delayed_t.html" title="Class template apply_visitor_delayed_t">apply_visitor_delayed_t</a><Visitor></span> apply_visitor(Visitor & visitor);</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1668869"></a><h2>Description</h2>
|
||||
<p>The behavior of <code class="computeroutput">apply_visitor</code> is dependent on
|
||||
the number of arguments on which it operates (i.e., other than the
|
||||
visitor). The function behaves as follows:
|
||||
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>Overloads accepting one operand invoke the unary function
|
||||
call operator of the given visitor on the content of the given
|
||||
<code class="computeroutput"><a href="boost/variant.html" title="Class template variant">variant</a></code> operand.</li>
|
||||
<li>Overloads accepting two operands invoke the binary
|
||||
function call operator of the given visitor on the content of
|
||||
the given <code class="computeroutput"><a href="boost/variant.html" title="Class template variant">variant</a></code>
|
||||
operands.</li>
|
||||
<li>The overload accepting only a visitor returns a
|
||||
<code class="computeroutput"><a href="apply_visitor_delayed_t.html" title="Class template apply_visitor_delayed_t">generic function object</a></code>
|
||||
that accepts either one or two arguments and invokes
|
||||
<code class="computeroutput"><a href="apply_visitor.html" title="Function apply_visitor">apply_visitor</a></code> using
|
||||
these arguments and <code class="computeroutput">visitor</code>, thus behaving as
|
||||
specified above. (This behavior is particularly useful, for
|
||||
example, when one needs to operate on each element of a sequence
|
||||
of variant objects using a standard library
|
||||
algorithm.)</li>
|
||||
</ul></div></p>
|
||||
<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
|
||||
|
||||
The overloads acccepting operands return the result of
|
||||
applying the given visitor to the content of the given operands.
|
||||
The overload accepting only a visitor return a function object, thus
|
||||
delaying application of the visitor to any operands.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Requires</span></b>:
|
||||
|
||||
The given visitor must fulfill the
|
||||
<a href="variant/reference.html#variant.concepts.static-visitor" title="StaticVisitor"><span class="emphasis"><em>StaticVisitor</em></span></a>
|
||||
concept requirements with respect to each of the bounded types of the
|
||||
given <code class="computeroutput">variant</code>.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
|
||||
|
||||
The overloads accepting operands throw only if the given
|
||||
visitor throws when applied. The overload accepting only a visitor
|
||||
will not throw. (Note, however, that the returned
|
||||
<a href="apply_visitor_delayed_t.html" title="Class template apply_visitor_delayed_t">function object</a>
|
||||
may throw when invoked.)</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002, 2003 Eric Friedman, Itay Maman</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="apply_visitor_delayed_t.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id872290"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="bad_get.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,91 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class template apply_visitor_delayed_t</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="variant/reference.html#id872290" title="Header <boost/variant/apply_visitor.hpp>">
|
||||
<link rel="prev" href="unwrap_recursive_wrapper.html" title="Class template unwrap_recursive_wrapper">
|
||||
<link rel="next" href="apply_visitor.html" title="Function apply_visitor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unwrap_recursive_wrapper.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id872290"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="apply_visitor.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="apply_visitor_delayed_t"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class template apply_visitor_delayed_t</span></h2>
|
||||
<p>boost::apply_visitor_delayed_t — Adapts a visitor for use as a function object.</p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Visitor>
|
||||
<span class="bold"><strong>class</strong></span> apply_visitor_delayed_t {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// types</em></span>
|
||||
<span class="bold"><strong>typedef</strong></span> <span class="bold"><strong>typename</strong></span> Visitor::result_type result_type;
|
||||
|
||||
<span class="emphasis"><em>// <a href="apply_visitor_delayed_t.html#apply_visitor_delayed_tconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<span class="bold"><strong>explicit</strong></span> <a href="apply_visitor_delayed_t.html#id1208233-bb">apply_visitor_delayed_t</a>(Visitor &);
|
||||
|
||||
<span class="emphasis"><em>// <a href="apply_visitor_delayed_t.html#id1314580-bb">function object interface</a></em></span>
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Variant> <span class="type">result_type</span> <a href="apply_visitor_delayed_t.html#id1207026-bb"><span class="bold"><strong>operator</strong></span>()</a>(Variant &);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2>
|
||||
<span class="type">result_type</span> <a href="apply_visitor_delayed_t.html#id1251205-bb"><span class="bold"><strong>operator</strong></span>()</a>(Variant1 &, Variant2 &);
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1668496"></a><h2>Description</h2>
|
||||
<p>Adapts the function given at construction for use as a
|
||||
function object. This is useful, for example, when one needs to
|
||||
operate on each element of a sequence of variant objects using a
|
||||
standard library algorithm such as
|
||||
<code class="computeroutput">std::for_each</code>.</p>
|
||||
<p>See the "visitor-only" form of
|
||||
<code class="computeroutput"><a href="apply_visitor.html" title="Function apply_visitor">apply_visitor</a></code> for a simple
|
||||
way to create <code class="computeroutput">apply_visitor_delayed_t</code> objects.</p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1668530"></a><h3>
|
||||
<a name="apply_visitor_delayed_tconstruct-copy-destruct"></a><code class="computeroutput">apply_visitor_delayed_t</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li>
|
||||
<pre class="literallayout"><span class="bold"><strong>explicit</strong></span> <a name="id1208233-bb"></a>apply_visitor_delayed_t(Visitor & visitor);</pre>
|
||||
<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
|
||||
|
||||
Constructs the function object with the given
|
||||
visitor.</p>
|
||||
</li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1668581"></a><h3>
|
||||
<a name="id1314580-bb"></a><code class="computeroutput">apply_visitor_delayed_t</code> function object interface</h3>
|
||||
<div class="orderedlist"><ol type="1"><li>
|
||||
<p><a name="id1314583-bb"></a></p>
|
||||
<pre class="literallayout"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Variant> <span class="type">result_type</span> <a name="id1207026-bb"></a><span class="bold"><strong>operator</strong></span>()(Variant & operand);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2>
|
||||
<span class="type">result_type</span> <a name="id1251205-bb"></a><span class="bold"><strong>operator</strong></span>()(Variant1 & operand1, Variant2 & operand2);</pre>
|
||||
<p>Invokes
|
||||
<code class="computeroutput"><a href="apply_visitor.html" title="Function apply_visitor">apply_visitor</a></code> on the
|
||||
stored visitor using the given operands.</p>
|
||||
</li></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002, 2003 Eric Friedman, Itay Maman</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unwrap_recursive_wrapper.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id872290"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="apply_visitor.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+114
-14
@@ -1,16 +1,116 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
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) -->
|
||||
<title>Redirect to generated documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/doc/libs/master/doc/html/array.html">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="http://www.boost.org/doc/libs/master/doc/html/array.html">http://www.boost.org/doc/libs/master/doc/html/array.html</a>
|
||||
</body>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Chapter 2. Boost.Array</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries">
|
||||
<link rel="prev" href="any/s04.html" title="Acknowledgements">
|
||||
<link rel="next" href="array/reference.html" title="Reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="any/s04.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="array/reference.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="chapter" lang="en">
|
||||
<div class="titlepage"><div>
|
||||
<div><h2 class="title">
|
||||
<a name="array"></a>Chapter 2. Boost.Array</h2></div>
|
||||
<div><div class="author"><h3 class="author">
|
||||
<span class="firstname">Nicolai</span> <span class="surname">Josuttis</span>
|
||||
</h3></div></div>
|
||||
<div><p class="copyright">Copyright © 2001-2004 Nicolai M. Josuttis</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id971681"></a><p>Permission to copy, use, modify, sell and distribute this
|
||||
software is granted provided this copyright notice appears in
|
||||
all copies. This software is provided "as is" without express or
|
||||
implied warranty, and with no claim as to its suitability for
|
||||
any purpose.</p>
|
||||
</div></div>
|
||||
</div></div>
|
||||
<div class="toc">
|
||||
<p><b>Table of Contents</b></p>
|
||||
<dl>
|
||||
<dt><span class="section"><a href="array.html#array.intro">Introduction</a></span></dt>
|
||||
<dt><span class="section"><a href="array/reference.html">Reference</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="array/reference.html#header.boost.array.hpp">Header <boost/array.hpp></a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="array/rationale.html">Design Rationale</a></span></dt>
|
||||
<dt><span class="section"><a href="array/more/info.html">For more information...</a></span></dt>
|
||||
<dt><span class="section"><a href="array/ack.html">Acknowledgements</a></span></dt>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="array.intro"></a>Introduction</h3></div></div></div>
|
||||
<p>The C++ Standard Template Library STL as part of the C++
|
||||
Standard Library provides a framework for processing algorithms on
|
||||
different kind of containers. However, ordinary arrays don't
|
||||
provide the interface of STL containers (although, they provide
|
||||
the iterator interface of STL containers).</p>
|
||||
<p>As replacement for ordinary arrays, the STL provides class
|
||||
<code class="computeroutput">std::vector</code>. However,
|
||||
<code class="computeroutput">std::vector<></code> provides
|
||||
the semantics of dynamic arrays. Thus, it manages data to be able
|
||||
to change the number of elements. This results in some overhead in
|
||||
case only arrays with static size are needed.</p>
|
||||
<p>In his book, <span class="emphasis"><em>Generic Programming and the
|
||||
STL</em></span>, Matthew H. Austern introduces a useful wrapper
|
||||
class for ordinary arrays with static size, called
|
||||
<code class="computeroutput">block</code>. It is safer and has no worse performance than
|
||||
ordinary arrays. In <span class="emphasis"><em>The C++ Programming
|
||||
Language</em></span>, 3rd edition, Bjarne Stroustrup introduces a
|
||||
similar class, called <code class="computeroutput">c_array</code>, which I (<a href="http://www.josuttis.com" target="_top">Nicolai Josuttis</a>) present
|
||||
slightly modified in my book <span class="emphasis"><em>The C++ Standard Library -
|
||||
A Tutorial and Reference</em></span>, called
|
||||
<code class="computeroutput">carray</code>. This is the essence of these approaches
|
||||
spiced with many feedback from <a href="http://www.boost.org" target="_top">boost</a>.</p>
|
||||
<p>After considering different names, we decided to name this
|
||||
class simply <code class="computeroutput"><a href="boost/array.html" title="Class template array">array</a></code>.</p>
|
||||
<p>Note that this class is suggested to be part of the next
|
||||
Technical Report, which will extend the C++ Standard (see
|
||||
<a href="" target="_top">http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1548.htm</a>).</p>
|
||||
<p>Class <code class="computeroutput"><a href="boost/array.html" title="Class template array">array</a></code> fulfills most
|
||||
but not all of the requirements of "reversible containers" (see
|
||||
Section 23.1, [lib.container.requirements] of the C++
|
||||
Standard). The reasons array is not an reversible STL container is
|
||||
because:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc" compact>
|
||||
<li>No constructors are provided.</li>
|
||||
<li>Elements may have an undetermined initial value (see <a href="array/rationale.html" title="Design Rationale">the section called “Design Rationale”</a>).</li>
|
||||
<li>
|
||||
<code class="computeroutput"><a href="boost/array.html#id763420">swap</a></code>() has no constant complexity.</li>
|
||||
<li>
|
||||
<code class="computeroutput"><a href="boost/array.html#id686133-bb">size</a></code>() is always constant, based on the second template argument of the type.</li>
|
||||
<li>The container provides no allocator support.</li>
|
||||
</ul></div>
|
||||
<p>It doesn't fulfill the requirements of a "sequence" (see Section 23.1.1, [lib.sequence.reqmts] of the C++ Standard), except that:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc" compact>
|
||||
<li>
|
||||
<code class="computeroutput"><a href="boost/array.html#id763241-bb">front</a></code>() and <code class="computeroutput"><a href="boost/array.html#id763273-bb">back</a></code>() are provided.</li>
|
||||
<li>
|
||||
<code class="computeroutput"><a href="boost/array.html#id685146-bb">operator[]</a></code> and <code class="computeroutput"><a href="boost/array.html#id726524-bb">at</a></code>() are provided.</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><small><p>Last revised: January 30, 2004 at 03:51:06 GMT</p></small></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="any/s04.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="array/reference.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Acknowledgements</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../array.html" title="Chapter 2. Boost.Array">
|
||||
<link rel="prev" href="more/info.html" title="For more information...">
|
||||
<link rel="next" href="../concepts/reference.html" title="Concept reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="more/info.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../array.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../concepts/reference.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="array.ack"></a>Acknowledgements</h3></div></div></div>
|
||||
<p>Doug Gregor ported the documentation to the BoostBook format.</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2004 Nicolai M. Josuttis</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="more/info.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../array.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../concepts/reference.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,48 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>For more information...</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../../array.html" title="Chapter 2. Boost.Array">
|
||||
<link rel="prev" href="../rationale.html" title="Design Rationale">
|
||||
<link rel="next" href="../ack.html" title="Acknowledgements">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../rationale.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../array.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../ack.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="array.more.info"></a>For more information...</h3></div></div></div>
|
||||
<p>To find more details about using ordinary arrays in C++ and
|
||||
the framework of the STL, see e.g.
|
||||
|
||||
</p>
|
||||
<div class="literallayout"><p>The C++ Standard Library - A Tutorial and Reference<br>
|
||||
by Nicolai M. Josuttis<br>
|
||||
Addison Wesley Longman, 1999<br>
|
||||
ISBN 0-201-37926-0</p></div>
|
||||
<p><a href="http://www.josuttis.com/" target="_top">Home Page of Nicolai
|
||||
Josuttis</a></p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2004 Nicolai M. Josuttis</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../rationale.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../array.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../ack.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,74 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Design Rationale</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../array.html" title="Chapter 2. Boost.Array">
|
||||
<link rel="prev" href="../boost/array.html" title="Class template array">
|
||||
<link rel="next" href="more/info.html" title="For more information...">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../boost/array.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../array.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="more/info.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="array.rationale"></a>Design Rationale</h3></div></div></div>
|
||||
<p>There was an important design tradeoff regarding the
|
||||
constructors: We could implement array as an "aggregate" (see
|
||||
Section 8.5.1, [dcl.init.aggr], of the C++ Standard). This would
|
||||
mean:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
<p>An array can be initialized with a
|
||||
brace-enclosing, comma-separated list of initializers for the
|
||||
elements of the container, written in increasing subscript
|
||||
order:</p>
|
||||
<pre class="programlisting"><code class="computeroutput"><a href="../boost/array.html" title="Class template array">boost::array</a></code><int,4> a = { { 1, 2, 3 } };</pre>
|
||||
<p>Note that if there are fewer elements in the
|
||||
initializer list, then each remaining element gets
|
||||
default-initialized (thus, it has a defined value).</p>
|
||||
</li></ul></div>
|
||||
<p>However, this approach has its drawbacks: <span class="bold"><strong> passing no initializer list means that the elements
|
||||
have an indetermined initial value</strong></span>, because the rule says
|
||||
that aggregates may have:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>No user-declared constructors.</li>
|
||||
<li>No private or protected non-static data members.</li>
|
||||
<li>No base classes.</li>
|
||||
<li>No virtual functions.</li>
|
||||
</ul></div>
|
||||
<p>Nevertheless, The current implementation uses this approach.</p>
|
||||
<p>Note that for standard conforming compilers it is possible to
|
||||
use fewer braces (according to 8.5.1 (11) of the Standard). That is,
|
||||
you can initialize an array as follows:</p>
|
||||
<pre class="programlisting"><code class="computeroutput"><a href="../boost/array.html" title="Class template array">boost::array</a></code><int,4> a = { 1, 2, 3 };
|
||||
</pre>
|
||||
<p>I'd appreciate any constructive feedback. <span class="bold"><strong>Please note: I don't have time to read all boost
|
||||
mails. Thus, to make sure that feedback arrives to me, please send
|
||||
me a copy of each mail regarding this class.</strong></span></p>
|
||||
<p>The code is provided "as is" without expressed or implied
|
||||
warranty.</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2004 Nicolai M. Josuttis</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../boost/array.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../array.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="more/info.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../array.html" title="Chapter 2. Boost.Array">
|
||||
<link rel="prev" href="../array.html" title="Chapter 2. Boost.Array">
|
||||
<link rel="next" href="../boost/array.html" title="Class template array">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../array.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../array.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../boost/array.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="array.reference"></a>Reference</h3></div></div></div>
|
||||
<div class="toc"><dl><dt><span class="section"><a href="reference.html#header.boost.array.hpp">Header <boost/array.hpp></a></span></dt></dl></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="header.boost.array.hpp"></a>Header <<a href="../../../boost/array.hpp" target="_top">boost/array.hpp</a>></h4></div></div></div>
|
||||
<pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost {
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, std::size_t N> <span class="bold"><strong>class</strong></span> <a href="../boost/array.html" title="Class template array">array</a>;
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, std::size_t N> <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="../boost/array.html#id763420">swap</a>(<a href="../boost/array.html" title="Class template array">array</a><T, N>&, <a href="../boost/array.html" title="Class template array">array</a><T, N>&);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, std::size_t N>
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id763478"><span class="bold"><strong>operator</strong></span>==</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, std::size_t N>
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id763537"><span class="bold"><strong>operator</strong></span>!=</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, std::size_t N>
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id763586"><span class="bold"><strong>operator</strong></span><</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, std::size_t N>
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id763648"><span class="bold"><strong>operator</strong></span>></a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, std::size_t N>
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id763696"><span class="bold"><strong>operator</strong></span><=</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&);
|
||||
<span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, std::size_t N>
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id763744"><span class="bold"><strong>operator</strong></span>>=</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a><T, N>&);
|
||||
}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2004 Nicolai M. Josuttis</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../array.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../array.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../boost/array.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,16 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
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) -->
|
||||
<title>Redirect to generated documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/doc/libs/master/doc/html/atomic.html">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="http://www.boost.org/doc/libs/master/doc/html/atomic.html">http://www.boost.org/doc/libs/master/doc/html/atomic.html</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct bad_adjustment</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id928390" title="Header <boost/date_time/local_time/posix_time_zone.hpp>">
|
||||
<link rel="prev" href="bad_offset.html" title="Struct bad_offset">
|
||||
<link rel="next" href="posix_time_zone.html" title="Class posix_time_zone">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="bad_offset.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id928390"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="posix_time_zone.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_adjustment"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct bad_adjustment</span></h2>
|
||||
<p>boost::local_time::bad_adjustment — simple exception for UTC daylight savings adjustment </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> bad_adjustment {
|
||||
<span class="emphasis"><em>// <a href="bad_adjustment.html#bad_adjustmentconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_adjustment.html#id1031899-bb">bad_adjustment</a>(std::string = "");
|
||||
|
||||
<span class="emphasis"><em>// <a href="bad_adjustment.html#id1031894-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1184122"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1184126"></a><h3>
|
||||
<a name="bad_adjustmentconstruct-copy-destruct"></a><code class="computeroutput">bad_adjustment</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id1031899-bb"></a>bad_adjustment(std::string _msg = "");</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1184159"></a><h3>
|
||||
<a name="id1031894-bb"></a><code class="computeroutput">bad_adjustment</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="bad_offset.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id928390"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="posix_time_zone.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,53 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class bad_any_cast</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="any/reference.html#header.boost.any.hpp" title="Header <boost/any.hpp>">
|
||||
<link rel="prev" href="any/reference.html" title="Reference">
|
||||
<link rel="next" href="boost/any.html" title="Class any">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="any/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="any/reference.html#header.boost.any.hpp"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="boost/any.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_any_cast"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class bad_any_cast</span></h2>
|
||||
<p>boost::bad_any_cast — The exception thrown in the event of a failed
|
||||
<code class="computeroutput"><a href="any_cast.html" title="Function any_cast">any_cast</a></code> of an
|
||||
<code class="computeroutput"><a href="boost/any.html" title="Class any">any</a></code> value.</p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>class</strong></span> bad_any_cast : <span class="bold"><strong>public</strong></span> std::bad_cast {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="bold"><strong>virtual</strong></span> <span class="type"><span class="bold"><strong>const</strong></span> <span class="bold"><strong>char</strong></span> *</span> <a href="bad_any_cast.html#id728128-bb">what</a>() <span class="bold"><strong>const</strong></span>;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id970542"></a><h2>Description</h2>
|
||||
<pre class="literallayout"><span class="bold"><strong>virtual</strong></span> <span class="type"><span class="bold"><strong>const</strong></span> <span class="bold"><strong>char</strong></span> *</span> <a name="id728128-bb"></a>what() <span class="bold"><strong>const</strong></span>;</pre>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001 Kevlin Henney</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="any/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="any/reference.html#header.boost.any.hpp"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="boost/any.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,66 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct bad_day_of_month</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id906477" title="Header <boost/date_time/gregorian/greg_day.hpp>">
|
||||
<link rel="prev" href="boost/gregorian/date.html" title="Class date">
|
||||
<link rel="next" href="greg_day.html" title="Class greg_day">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="boost/gregorian/date.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id906477"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_day.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_day_of_month"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct bad_day_of_month</span></h2>
|
||||
<p>boost::gregorian::bad_day_of_month — Exception type for gregorian day of month (1..31). </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> bad_day_of_month {
|
||||
<span class="emphasis"><em>// <a href="bad_day_of_month.html#bad_day_of_monthconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_day_of_month.html#id826911-bb">bad_day_of_month</a>();
|
||||
<a href="bad_day_of_month.html#id826913-bb">bad_day_of_month</a>(<span class="bold"><strong>const</strong></span> std::string &);
|
||||
|
||||
<span class="emphasis"><em>// <a href="bad_day_of_month.html#id1106058-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1150646"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1150650"></a><h3>
|
||||
<a name="bad_day_of_monthconstruct-copy-destruct"></a><code class="computeroutput">bad_day_of_month</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><a name="id826911-bb"></a>bad_day_of_month();</pre></li>
|
||||
<li><pre class="literallayout"><a name="id826913-bb"></a>bad_day_of_month(<span class="bold"><strong>const</strong></span> std::string & s);</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1150704"></a><h3>
|
||||
<a name="id1106058-bb"></a><code class="computeroutput">bad_day_of_month</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="boost/gregorian/date.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id906477"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_day.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct bad_day_of_year</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id862957" title="Header <boost/date_time/gregorian/greg_day_of_year.hpp>">
|
||||
<link rel="prev" href="greg_day.html" title="Class greg_day">
|
||||
<link rel="next" href="greg_durations_config.html" title="Struct greg_durations_config">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="greg_day.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id862957"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_durations_config.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_day_of_year"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct bad_day_of_year</span></h2>
|
||||
<p>boost::gregorian::bad_day_of_year — Exception type for day of year (1..366). </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> bad_day_of_year {
|
||||
<span class="emphasis"><em>// <a href="bad_day_of_year.html#bad_day_of_yearconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_day_of_year.html#id1108640-bb">bad_day_of_year</a>();
|
||||
|
||||
<span class="emphasis"><em>// <a href="bad_day_of_year.html#id1108635-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1151132"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1151135"></a><h3>
|
||||
<a name="bad_day_of_yearconstruct-copy-destruct"></a><code class="computeroutput">bad_day_of_year</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id1108640-bb"></a>bad_day_of_year();</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1151168"></a><h3>
|
||||
<a name="id1108635-bb"></a><code class="computeroutput">bad_day_of_year</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="greg_day.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id862957"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_durations_config.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct bad_field_count</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id1034888" title="Header <boost/date_time/tz_db_base.hpp>">
|
||||
<link rel="prev" href="data_not_accessible.html" title="Struct data_not_accessible">
|
||||
<link rel="next" href="tz_db_base.html" title="Class template tz_db_base">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="data_not_accessible.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id1034888"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="tz_db_base.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_field_count"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct bad_field_count</span></h2>
|
||||
<p>boost::date_time::bad_field_count — </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> bad_field_count {
|
||||
<span class="emphasis"><em>// <a href="bad_field_count.html#bad_field_countconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_field_count.html#id932728-bb">bad_field_count</a>(<span class="bold"><strong>const</strong></span> std::string &);
|
||||
|
||||
<span class="emphasis"><em>// <a href="bad_field_count.html#id932723-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1147112"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1147115"></a><h3>
|
||||
<a name="bad_field_countconstruct-copy-destruct"></a><code class="computeroutput">bad_field_count</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id932728-bb"></a>bad_field_count(<span class="bold"><strong>const</strong></span> std::string & s);</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1147154"></a><h3>
|
||||
<a name="id932723-bb"></a><code class="computeroutput">bad_field_count</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="data_not_accessible.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id1034888"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="tz_db_base.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class bad_function_call</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="function/reference.html#header.boost.function.hpp" title="Header <boost/function.hpp>">
|
||||
<link rel="prev" href="function/reference.html" title="Reference">
|
||||
<link rel="next" href="function_base.html" title="Class function_base">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="function/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="function/reference.html#header.boost.function.hpp"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="function_base.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_function_call"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class bad_function_call</span></h2>
|
||||
<p>boost::bad_function_call — An exception type thrown when an instance of a <code class="computeroutput">function</code> object is empty when invoked.</p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>class</strong></span> bad_function_call : <span class="bold"><strong>public</strong></span> std::runtime_error {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// <a href="bad_function_call.html#bad_function_callconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_function_call.html#id928551-bb">bad_function_call</a>();
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1206744"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1206748"></a><h3>
|
||||
<a name="bad_function_callconstruct-copy-destruct"></a><code class="computeroutput">bad_function_call</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li>
|
||||
<pre class="literallayout"><a name="id928551-bb"></a>bad_function_call();</pre>
|
||||
<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
|
||||
|
||||
Constructs a <code class="computeroutput"><a href="bad_function_call.html" title="Class bad_function_call">bad_function_call</a></code> exception object.</p>
|
||||
</li></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2004 Douglas Gregor</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="function/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="function/reference.html#header.boost.function.hpp"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="function_base.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,53 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class bad_get</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="variant/reference.html#id894482" title="Header <boost/variant/get.hpp>">
|
||||
<link rel="prev" href="apply_visitor.html" title="Function apply_visitor">
|
||||
<link rel="next" href="get.html" title="Function get">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="apply_visitor.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id894482"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="get.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_get"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class bad_get</span></h2>
|
||||
<p>boost::bad_get — <p>The exception thrown in the event of a failed application of
|
||||
<code class="computeroutput"><a href="get.html" title="Function get">boost::get</a></code> on the given
|
||||
operand value.</p></p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>class</strong></span> bad_get : <span class="bold"><strong>public</strong></span> std::exception {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="bold"><strong>virtual</strong></span> <span class="type"><span class="bold"><strong>const</strong></span> <span class="bold"><strong>char</strong></span> *</span> <a href="bad_get.html#id801330-bb">what</a>() <span class="bold"><strong>const</strong></span>;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1669332"></a><h2>Description</h2>
|
||||
<pre class="literallayout"><span class="bold"><strong>virtual</strong></span> <span class="type"><span class="bold"><strong>const</strong></span> <span class="bold"><strong>char</strong></span> *</span> <a name="id801330-bb"></a>what() <span class="bold"><strong>const</strong></span>;</pre>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002, 2003 Eric Friedman, Itay Maman</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="apply_visitor.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id894482"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="get.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct bad_month</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id871347" title="Header <boost/date_time/gregorian/greg_month.hpp>">
|
||||
<link rel="prev" href="id792474.html" title="Function template operator<<">
|
||||
<link rel="next" href="greg_month.html" title="Class greg_month">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="id792474.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id871347"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_month.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_month"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct bad_month</span></h2>
|
||||
<p>boost::gregorian::bad_month — Exception thrown if a greg_month is constructed with a value out of range. </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> bad_month {
|
||||
<span class="emphasis"><em>// <a href="bad_month.html#bad_monthconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_month.html#id692487-bb">bad_month</a>();
|
||||
|
||||
<span class="emphasis"><em>// <a href="bad_month.html#id692482-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1152847"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1152850"></a><h3>
|
||||
<a name="bad_monthconstruct-copy-destruct"></a><code class="computeroutput">bad_month</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id692487-bb"></a>bad_month();</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1152883"></a><h3>
|
||||
<a name="id692482-bb"></a><code class="computeroutput">bad_month</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="id792474.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id871347"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_month.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct bad_offset</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id928390" title="Header <boost/date_time/local_time/posix_time_zone.hpp>">
|
||||
<link rel="prev" href="local_date_time_base.html" title="Class template local_date_time_base">
|
||||
<link rel="next" href="bad_adjustment.html" title="Struct bad_adjustment">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="local_date_time_base.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id928390"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="bad_adjustment.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_offset"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct bad_offset</span></h2>
|
||||
<p>boost::local_time::bad_offset — simple exception for UTC and Daylight savings start/end offsets </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> bad_offset {
|
||||
<span class="emphasis"><em>// <a href="bad_offset.html#bad_offsetconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_offset.html#id1001792-bb">bad_offset</a>(std::string = "");
|
||||
|
||||
<span class="emphasis"><em>// <a href="bad_offset.html#id1002747-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1184007"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1184010"></a><h3>
|
||||
<a name="bad_offsetconstruct-copy-destruct"></a><code class="computeroutput">bad_offset</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id1001792-bb"></a>bad_offset(std::string _msg = "");</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1184044"></a><h3>
|
||||
<a name="id1002747-bb"></a><code class="computeroutput">bad_offset</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="local_date_time_base.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id928390"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="bad_adjustment.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,52 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class bad_visit</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="variant/reference.html#id1561653" title="Header <boost/variant/bad_visit.hpp>">
|
||||
<link rel="prev" href="get.html" title="Function get">
|
||||
<link rel="next" href="static_visitor.html" title="Class template static_visitor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="get.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id1561653"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="static_visitor.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_visit"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class bad_visit</span></h2>
|
||||
<p>boost::bad_visit — <p>The exception thrown in the event of a visitor
|
||||
unable to handle the visited value.</p></p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>class</strong></span> bad_visit : <span class="bold"><strong>public</strong></span> std::exception {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="bold"><strong>virtual</strong></span> <span class="type"><span class="bold"><strong>const</strong></span> <span class="bold"><strong>char</strong></span> *</span> <a href="bad_visit.html#id1254309-bb">what</a>() <span class="bold"><strong>const</strong></span>;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1669929"></a><h2>Description</h2>
|
||||
<pre class="literallayout"><span class="bold"><strong>virtual</strong></span> <span class="type"><span class="bold"><strong>const</strong></span> <span class="bold"><strong>char</strong></span> *</span> <a name="id1254309-bb"></a>what() <span class="bold"><strong>const</strong></span>;</pre>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002, 2003 Eric Friedman, Itay Maman</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="get.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="variant/reference.html#id1561653"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="static_visitor.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct bad_weekday</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id973291" title="Header <boost/date_time/gregorian/greg_weekday.hpp>">
|
||||
<link rel="prev" href="greg_month.html" title="Class greg_month">
|
||||
<link rel="next" href="greg_weekday.html" title="Class greg_weekday">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="greg_month.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id973291"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_weekday.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_weekday"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct bad_weekday</span></h2>
|
||||
<p>boost::gregorian::bad_weekday — Exception that flags that a weekday number is incorrect. </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> bad_weekday {
|
||||
<span class="emphasis"><em>// <a href="bad_weekday.html#bad_weekdayconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_weekday.html#id977285-bb">bad_weekday</a>();
|
||||
|
||||
<span class="emphasis"><em>// <a href="bad_weekday.html#id977279-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1171466"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1171470"></a><h3>
|
||||
<a name="bad_weekdayconstruct-copy-destruct"></a><code class="computeroutput">bad_weekday</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id977285-bb"></a>bad_weekday();</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1171503"></a><h3>
|
||||
<a name="id977279-bb"></a><code class="computeroutput">bad_weekday</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="greg_month.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id973291"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_weekday.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Struct bad_year</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id866121" title="Header <boost/date_time/gregorian/greg_year.hpp>">
|
||||
<link rel="prev" href="greg_weekday.html" title="Class greg_weekday">
|
||||
<link rel="next" href="greg_year.html" title="Class greg_year">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="greg_weekday.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id866121"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_year.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="bad_year"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Struct bad_year</span></h2>
|
||||
<p>boost::gregorian::bad_year — Exception type for gregorian year. </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>struct</strong></span> bad_year {
|
||||
<span class="emphasis"><em>// <a href="bad_year.html#bad_yearconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="bad_year.html#id933145-bb">bad_year</a>();
|
||||
|
||||
<span class="emphasis"><em>// <a href="bad_year.html#id933140-bb">public member functions</a></em></span>
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1172170"></a><h2>Description</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1172174"></a><h3>
|
||||
<a name="bad_yearconstruct-copy-destruct"></a><code class="computeroutput">bad_year</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id933145-bb"></a>bad_year();</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1172206"></a><h3>
|
||||
<a name="id933140-bb"></a><code class="computeroutput">bad_year</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="greg_weekday.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id866121"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="greg_year.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,117 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class barrier</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="threads/reference.html#id759234" title="Header <boost/thread/barrier.hpp>">
|
||||
<link rel="prev" href="threads/reference.html" title="Reference">
|
||||
<link rel="next" href="condition.html" title="Class condition">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="threads/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="threads/reference.html#id759234"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="condition.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="barrier"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class barrier</span></h2>
|
||||
<p>boost::barrier — <p>An object of class <a href="barrier.html" title="Class barrier">barrier</a> is a synchronization
|
||||
primitive used to cause a set of threads to wait until they each perform a
|
||||
certain function or each reach a particular point in their execution.</p></p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
|
||||
<span class="bold"><strong>class</strong></span> barrier : <span class="bold"><strong>private</strong></span> boost::noncopyable <span class="emphasis"><em>// Exposition only</em></span>
|
||||
{
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// <a href="barrier.html#barrierconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="barrier.html#id1008465-bb">barrier</a>(size_t);
|
||||
<a href="barrier.html#id683382-bb">~barrier</a>();
|
||||
|
||||
<span class="emphasis"><em>// <a href="barrier.html#id942530-bb">waiting</a></em></span>
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="barrier.html#id1178178-bb">wait</a>();
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1556579"></a><h2>Description</h2>
|
||||
<p>When a barrier is created, it is initialized with a thread count N.
|
||||
The first N-1 calls to <code class="computeroutput">wait()</code> will all cause their threads to be blocked.
|
||||
The Nth call to <code class="computeroutput">wait()</code> will allow all of the waiting threads, including
|
||||
the Nth thread, to be placed in a ready state. The Nth call will also "reset"
|
||||
the barrier such that, if an additional N+1th call is made to <code class="computeroutput">wait()</code>,
|
||||
it will be as though this were the first call to <code class="computeroutput">wait()</code>; in other
|
||||
words, the N+1th to 2N-1th calls to <code class="computeroutput">wait()</code> will cause their
|
||||
threads to be blocked, and the 2Nth call to <code class="computeroutput">wait()</code> will allow all of
|
||||
the waiting threads, including the 2Nth thread, to be placed in a ready state
|
||||
and reset the barrier. This functionality allows the same set of N threads to re-use
|
||||
a barrier object to synchronize their execution at multiple points during their
|
||||
execution.</p>
|
||||
<p>See <a href="threads.html#threads.glossary" title="Glossary">Glossary</a> for definitions of thread
|
||||
states <a href="threads.html#threads.glossary.thread-state">blocked</a>
|
||||
and <a href="threads.html#threads.glossary.thread-state">ready</a>.
|
||||
Note that "waiting" is a synonym for blocked.</p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1556658"></a><h3>
|
||||
<a name="barrierconstruct-copy-destruct"></a><code class="computeroutput">barrier</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<pre class="literallayout"><a name="id1008465-bb"></a>barrier(size_t count);</pre>
|
||||
<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
|
||||
|
||||
Constructs a <a href="barrier.html" title="Class barrier">barrier</a> object that
|
||||
will cause <code class="computeroutput">count</code> threads to block on a call to <code class="computeroutput">wait()</code>.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<pre class="literallayout"><a name="id683382-bb"></a>~barrier();</pre>
|
||||
<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
|
||||
|
||||
Destroys <code class="computeroutput">*this</code>. If threads are still executing
|
||||
their <code class="computeroutput">wait()</code> operations, the behavior for these threads is undefined.
|
||||
</p>
|
||||
</li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1556757"></a><h3>
|
||||
<a name="id942530-bb"></a><code class="computeroutput">barrier</code> waiting</h3>
|
||||
<div class="orderedlist"><ol type="1"><li>
|
||||
<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id1178178-bb"></a>wait();</pre>
|
||||
<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
|
||||
|
||||
Wait until N threads call <code class="computeroutput">wait()</code>, where
|
||||
N equals the <code class="computeroutput">count</code> provided to the constructor for the
|
||||
barrier object.<p><span class="bold"><strong>Note</strong></span> that if the barrier is
|
||||
destroyed before <code class="computeroutput">wait()</code> can return, the behavior is
|
||||
undefined.</p><br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
|
||||
|
||||
Exactly one of the N threads will receive a return value
|
||||
of <code class="computeroutput">true</code>, the others will receive a value of <code class="computeroutput">false</code>.
|
||||
Precisely which thread receives the return value of <code class="computeroutput">true</code> will
|
||||
be implementation-defined. Applications can use this value to designate one
|
||||
thread as a leader that will take a certain action, and the other threads
|
||||
emerging from the barrier can wait for that action to take place.</p>
|
||||
</li></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2003 William E. Kempf</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="threads/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="threads/reference.html#id759234"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="condition.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,129 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class template base_time</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="date_time/doxy.html#id831553" title="Header <boost/date_time/time.hpp>">
|
||||
<link rel="prev" href="gather_weekday_strings.html" title="Function template gather_weekday_strings">
|
||||
<link rel="next" href="second_clock.html" title="Class template second_clock">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="gather_weekday_strings.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id831553"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="second_clock.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="base_time"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class template base_time</span></h2>
|
||||
<p>boost::date_time::base_time — Representation of a precise moment in time, including the date. </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, <span class="bold"><strong>typename</strong></span> time_system>
|
||||
<span class="bold"><strong>class</strong></span> base_time {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// types</em></span>
|
||||
<span class="bold"><strong>typedef</strong></span> T time_type;
|
||||
<span class="bold"><strong>typedef</strong></span> time_system::time_rep_type time_rep_type;
|
||||
<span class="bold"><strong>typedef</strong></span> time_system::date_type date_type;
|
||||
<span class="bold"><strong>typedef</strong></span> time_system::date_duration_type date_duration_type;
|
||||
<span class="bold"><strong>typedef</strong></span> time_system::time_duration_type time_duration_type;
|
||||
|
||||
<span class="emphasis"><em>// <a href="base_time.html#base_timeconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="base_time.html#id796514-bb">base_time</a>(<span class="bold"><strong>const</strong></span> date_type &, <span class="bold"><strong>const</strong></span> time_duration_type &,
|
||||
dst_flags = not_dst);
|
||||
<a href="base_time.html#id689610-bb">base_time</a>(special_values);
|
||||
<a href="base_time.html#id689624-bb">base_time</a>(<span class="bold"><strong>const</strong></span> time_rep_type &);
|
||||
|
||||
<span class="emphasis"><em>// <a href="base_time.html#id724655-bb">public member functions</a></em></span>
|
||||
<span class="type">date_type</span> <a href="base_time.html#id724660-bb">date</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">time_duration_type</span> <a href="base_time.html#id724673-bb">time_of_day</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">std::string</span> <a href="base_time.html#id724686-bb">zone_name</a>(<span class="bold"><strong>bool</strong></span> = false) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">std::string</span> <a href="base_time.html#id828497-bb">zone_abbrev</a>(<span class="bold"><strong>bool</strong></span> = false) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">std::string</span> <a href="base_time.html#id828535-bb">zone_as_posix_string</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="base_time.html#id828553-bb">is_not_a_date_time</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="base_time.html#id726580-bb">is_infinity</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="base_time.html#id718630-bb">is_pos_infinity</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="base_time.html#id718647-bb">is_neg_infinity</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="base_time.html#id795507-bb">is_special</a>() <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="base_time.html#id719180-bb"><span class="bold"><strong>operator</strong></span>==</a>(<span class="bold"><strong>const</strong></span> time_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="base_time.html#id718223-bb"><span class="bold"><strong>operator</strong></span><</a>(<span class="bold"><strong>const</strong></span> time_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">time_duration_type</span> <a href="base_time.html#id803846-bb"><span class="bold"><strong>operator</strong></span>-</a>(<span class="bold"><strong>const</strong></span> time_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">time_type</span> <a href="base_time.html#id803874-bb"><span class="bold"><strong>operator</strong></span>+</a>(<span class="bold"><strong>const</strong></span> date_duration_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">time_type</span> <a href="base_time.html#id803902-bb"><span class="bold"><strong>operator</strong></span>+=</a>(<span class="bold"><strong>const</strong></span> date_duration_type &) ;
|
||||
<span class="type">time_type</span> <a href="base_time.html#id721757-bb"><span class="bold"><strong>operator</strong></span>-</a>(<span class="bold"><strong>const</strong></span> date_duration_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">time_type</span> <a href="base_time.html#id796021-bb"><span class="bold"><strong>operator</strong></span>-=</a>(<span class="bold"><strong>const</strong></span> date_duration_type &) ;
|
||||
<span class="type">time_type</span> <a href="base_time.html#id834553-bb"><span class="bold"><strong>operator</strong></span>+</a>(<span class="bold"><strong>const</strong></span> time_duration_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">time_type</span> <a href="base_time.html#id834581-bb"><span class="bold"><strong>operator</strong></span>+=</a>(<span class="bold"><strong>const</strong></span> time_duration_type &) ;
|
||||
<span class="type">time_type</span> <a href="base_time.html#id834605-bb"><span class="bold"><strong>operator</strong></span>-</a>(<span class="bold"><strong>const</strong></span> time_duration_type &) <span class="bold"><strong>const</strong></span>;
|
||||
<span class="type">time_type</span> <a href="base_time.html#id796489-bb"><span class="bold"><strong>operator</strong></span>-=</a>(<span class="bold"><strong>const</strong></span> time_duration_type &) ;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1117231"></a><h2>Description</h2>
|
||||
<p>This class is a skeleton for the interface of a temporal type with a resolution that is higher than a day. It is intended that this class be the base class and that the actual time class be derived using the BN pattern. In this way, the derived class can make decisions such as 'should there be a default constructor' and what should it set its value to, should there be optional constructors say allowing only an time_durations that generate a time from a clock,etc. So, in fact multiple time types can be created for a time_system with different construction policies, and all of them can perform basic operations by only writing a copy constructor. Finally, compiler errors are also shorter.</p>
|
||||
<p>The real behavior of the time class is provided by the time_system template parameter. This class must provide all the logic for addition, subtraction, as well as define all the interface types. </p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1117242"></a><h3>
|
||||
<a name="base_timeconstruct-copy-destruct"></a><code class="computeroutput">base_time</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><a name="id796514-bb"></a>base_time(<span class="bold"><strong>const</strong></span> date_type & day, <span class="bold"><strong>const</strong></span> time_duration_type & td,
|
||||
dst_flags dst = not_dst);</pre></li>
|
||||
<li><pre class="literallayout"><a name="id689610-bb"></a>base_time(special_values sv);</pre></li>
|
||||
<li><pre class="literallayout"><a name="id689624-bb"></a>base_time(<span class="bold"><strong>const</strong></span> time_rep_type & rhs);</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1117309"></a><h3>
|
||||
<a name="id724655-bb"></a><code class="computeroutput">base_time</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><span class="type">date_type</span> <a name="id724660-bb"></a>date() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_duration_type</span> <a name="id724673-bb"></a>time_of_day() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li>
|
||||
<pre class="literallayout"><span class="type">std::string</span> <a name="id724686-bb"></a>zone_name(<span class="bold"><strong>bool</strong></span> as_offset = false) <span class="bold"><strong>const</strong></span>;</pre>
|
||||
<p>Optional bool parameter will return time zone as an offset (ie "+07:00"). Empty string is returned for classes that do not use a time_zone </p>
|
||||
</li>
|
||||
<li>
|
||||
<pre class="literallayout"><span class="type">std::string</span> <a name="id828497-bb"></a>zone_abbrev(<span class="bold"><strong>bool</strong></span> as_offset = false) <span class="bold"><strong>const</strong></span>;</pre>
|
||||
<p>Optional bool parameter will return time zone as an offset (ie "+07:00"). Empty string is returned for classes that do not use a time_zone </p>
|
||||
</li>
|
||||
<li><pre class="literallayout"><span class="type">std::string</span> <a name="id828535-bb"></a>zone_as_posix_string() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id828553-bb"></a>is_not_a_date_time() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id726580-bb"></a>is_infinity() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id718630-bb"></a>is_pos_infinity() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id718647-bb"></a>is_neg_infinity() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id795507-bb"></a>is_special() <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id719180-bb"></a><span class="bold"><strong>operator</strong></span>==(<span class="bold"><strong>const</strong></span> time_type & rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id718223-bb"></a><span class="bold"><strong>operator</strong></span><(<span class="bold"><strong>const</strong></span> time_type & rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_duration_type</span> <a name="id803846-bb"></a><span class="bold"><strong>operator</strong></span>-(<span class="bold"><strong>const</strong></span> time_type & rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id803874-bb"></a><span class="bold"><strong>operator</strong></span>+(<span class="bold"><strong>const</strong></span> date_duration_type & dd) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id803902-bb"></a><span class="bold"><strong>operator</strong></span>+=(<span class="bold"><strong>const</strong></span> date_duration_type & dd) ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id721757-bb"></a><span class="bold"><strong>operator</strong></span>-(<span class="bold"><strong>const</strong></span> date_duration_type & dd) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id796021-bb"></a><span class="bold"><strong>operator</strong></span>-=(<span class="bold"><strong>const</strong></span> date_duration_type & dd) ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id834553-bb"></a><span class="bold"><strong>operator</strong></span>+(<span class="bold"><strong>const</strong></span> time_duration_type & td) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id834581-bb"></a><span class="bold"><strong>operator</strong></span>+=(<span class="bold"><strong>const</strong></span> time_duration_type & td) ;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id834605-bb"></a><span class="bold"><strong>operator</strong></span>-(<span class="bold"><strong>const</strong></span> time_duration_type & rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
|
||||
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id796489-bb"></a><span class="bold"><strong>operator</strong></span>-=(<span class="bold"><strong>const</strong></span> time_duration_type & td) ;</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="gather_weekday_strings.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id831553"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="second_clock.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,101 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class template basic_command_line_parser</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="program_options/reference.html#id730253" title="Header <boost/program_options/parsers.hpp>">
|
||||
<link rel="prev" href="id1104430.html" title="Class options_description_easy_init">
|
||||
<link rel="next" href="basic_parsed_options.html" title="Class template basic_parsed_options">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="id1104430.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id730253"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="basic_parsed_options.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="basic_command_line_parser"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class template basic_command_line_parser</span></h2>
|
||||
<p>boost::program_options::basic_command_line_parser — </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> charT>
|
||||
<span class="bold"><strong>class</strong></span> basic_command_line_parser {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// <a href="basic_command_line_parser.html#basic_command_line_parserconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="basic_command_line_parser.html#id1138166-bb">basic_command_line_parser</a>(<span class="bold"><strong>const</strong></span> std::vector< std::basic_string< charT > > &);
|
||||
<a href="basic_command_line_parser.html#id1009768-bb">basic_command_line_parser</a>(<span class="bold"><strong>int</strong></span>, charT *);
|
||||
|
||||
<span class="emphasis"><em>// <a href="basic_command_line_parser.html#id762142-bb">public member functions</a></em></span>
|
||||
<span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &</span> <a href="basic_command_line_parser.html#id762147-bb">options</a>(<span class="bold"><strong>const</strong></span> <a href="options_description.html" title="Class options_description">options_description</a> &) ;
|
||||
<span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &</span>
|
||||
<a href="basic_command_line_parser.html#id663575-bb">positional</a>(<span class="bold"><strong>const</strong></span> <a href="id683292.html" title="Class positional_options_description">positional_options_description</a> &) ;
|
||||
<span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &</span> <a href="basic_command_line_parser.html#id1031754-bb">style</a>(<span class="bold"><strong>int</strong></span>) ;
|
||||
<span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &</span> <a href="basic_command_line_parser.html#id1008745-bb">extra_parser</a>(ext_parser) ;
|
||||
<span class="type"><a href="basic_parsed_options.html" title="Class template basic_parsed_options">basic_parsed_options</a>< charT ></span> <a href="basic_command_line_parser.html#id1140268-bb">run</a>() ;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1255000"></a><h2>Description</h2>
|
||||
<p>Command line parser.</p>
|
||||
<p>The class allows one to specify all the information needed for parsing and to parser the parse the command line. It is primarily needed to emulate named function parameters -- a regular function with 5 parameters will be hard to use and creating overloads with a smaller nuber of parameters will be confusing.</p>
|
||||
<p>For the most common case, the function parse_command_line is a better alternative. </p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1255017"></a><h3>
|
||||
<a name="basic_command_line_parserconstruct-copy-destruct"></a><code class="computeroutput">basic_command_line_parser</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<pre class="literallayout"><a name="id1138166-bb"></a>basic_command_line_parser(<span class="bold"><strong>const</strong></span> std::vector< std::basic_string< charT > > & args);</pre>
|
||||
<p>Creates a command line parser for the specified arguments list. The 'args' parameter should not include program name. </p>
|
||||
</li>
|
||||
<li>
|
||||
<pre class="literallayout"><a name="id1009768-bb"></a>basic_command_line_parser(<span class="bold"><strong>int</strong></span> argc, charT * argv);</pre>
|
||||
<p>Creates a command line parser for the specified arguments list. The parameter should be the same as passes to 'main'. </p>
|
||||
</li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1255088"></a><h3>
|
||||
<a name="id762142-bb"></a><code class="computeroutput">basic_command_line_parser</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<pre class="literallayout"><span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &</span> <a name="id762147-bb"></a>options(<span class="bold"><strong>const</strong></span> <a href="options_description.html" title="Class options_description">options_description</a> & desc) ;</pre>
|
||||
<p>Sets options descriptions to use. </p>
|
||||
</li>
|
||||
<li>
|
||||
<pre class="literallayout"><span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &</span>
|
||||
<a name="id663575-bb"></a>positional(<span class="bold"><strong>const</strong></span> <a href="id683292.html" title="Class positional_options_description">positional_options_description</a> & desc) ;</pre>
|
||||
<p>Sets positional options description to use. </p>
|
||||
</li>
|
||||
<li>
|
||||
<pre class="literallayout"><span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &</span> <a name="id1031754-bb"></a>style(<span class="bold"><strong>int</strong></span> ) ;</pre>
|
||||
<p>Sets the command line style. </p>
|
||||
</li>
|
||||
<li>
|
||||
<pre class="literallayout"><span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &</span> <a name="id1008745-bb"></a>extra_parser(ext_parser ) ;</pre>
|
||||
<p>Sets the extra parsers. </p>
|
||||
</li>
|
||||
<li><pre class="literallayout"><span class="type"><a href="basic_parsed_options.html" title="Class template basic_parsed_options">basic_parsed_options</a>< charT ></span> <a name="id1140268-bb"></a>run() ;</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Vladimir Prus</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="id1104430.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id730253"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="basic_parsed_options.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,74 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class template basic_option</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="program_options/reference.html#id864937" title="Header <boost/program_options/option.hpp>">
|
||||
<link rel="prev" href="validation_error.html" title="Class validation_error">
|
||||
<link rel="next" href="duplicate_option_error.html" title="Class duplicate_option_error">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="validation_error.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id864937"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="duplicate_option_error.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="basic_option"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class template basic_option</span></h2>
|
||||
<p>boost::program_options::basic_option — </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> charT>
|
||||
<span class="bold"><strong>class</strong></span> basic_option {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// <a href="basic_option.html#basic_optionconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="basic_option.html#id1114467-bb">basic_option</a>();
|
||||
<a href="basic_option.html#id1042744-bb">basic_option</a>(<span class="bold"><strong>const</strong></span> std::string &, <span class="bold"><strong>const</strong></span> std::vector< std::string > &);
|
||||
|
||||
<span class="emphasis"><em>// <a href="basic_option.html#id1004663-bb">public member functions</a></em></span>
|
||||
|
||||
std::string string_key;
|
||||
int position_key;
|
||||
std::vector< std::basic_string< charT > > value;
|
||||
bool unregistered;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1252076"></a><h2>Description</h2>
|
||||
<p>Option found in input source. Contains a key and a value. The key, in turn, can be a string (name of an option), or an integer (position in input source) -- in case no name is specified. The latter is only possible for command line. The template parameter specifies the type of char used for storing the option's value. </p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1252087"></a><h3>
|
||||
<a name="basic_optionconstruct-copy-destruct"></a><code class="computeroutput">basic_option</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><pre class="literallayout"><a name="id1114467-bb"></a>basic_option();</pre></li>
|
||||
<li><pre class="literallayout"><a name="id1042744-bb"></a>basic_option(<span class="bold"><strong>const</strong></span> std::string & string_key,
|
||||
<span class="bold"><strong>const</strong></span> std::vector< std::string > & value);</pre></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1252147"></a><h3>
|
||||
<a name="id1004663-bb"></a><code class="computeroutput">basic_option</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Vladimir Prus</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="validation_error.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id864937"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="duplicate_option_error.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Class template basic_parsed_options</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="program_options/reference.html#id730253" title="Header <boost/program_options/parsers.hpp>">
|
||||
<link rel="prev" href="basic_command_line_parser.html" title="Class template basic_command_line_parser">
|
||||
<link rel="next" href="id1002952-bb.html" title="Class basic_parsed_options<wchar_t>">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="basic_command_line_parser.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id730253"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="id1002952-bb.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="refentry" lang="en">
|
||||
<a name="basic_parsed_options"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2><span class="refentrytitle">Class template basic_parsed_options</span></h2>
|
||||
<p>boost::program_options::basic_parsed_options — </p>
|
||||
</div>
|
||||
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
|
||||
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> charT>
|
||||
<span class="bold"><strong>class</strong></span> basic_parsed_options {
|
||||
<span class="bold"><strong>public</strong></span>:
|
||||
<span class="emphasis"><em>// <a href="basic_parsed_options.html#basic_parsed_optionsconstruct-copy-destruct">construct/copy/destruct</a></em></span>
|
||||
<a href="basic_parsed_options.html#id1081818-bb">basic_parsed_options</a>(<span class="bold"><strong>const</strong></span> <a href="options_description.html" title="Class options_description">options_description</a> *);
|
||||
|
||||
<span class="emphasis"><em>// <a href="basic_parsed_options.html#id1081812-bb">public member functions</a></em></span>
|
||||
|
||||
std::vector< <a href="basic_option.html" title="Class template basic_option">basic_option</a>< charT > > options;
|
||||
const <a href="options_description.html" title="Class options_description">options_description</a> * description;
|
||||
};</pre></div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id1255371"></a><h2>Description</h2>
|
||||
<p>Results of parsing an input source. The primary use of this class is passing information from parsers component to value storage component. This class does not makes much sense itself. </p>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1255380"></a><h3>
|
||||
<a name="basic_parsed_optionsconstruct-copy-destruct"></a><code class="computeroutput">basic_parsed_options</code> construct/copy/destruct</h3>
|
||||
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><a name="id1081818-bb"></a>basic_parsed_options(<span class="bold"><strong>const</strong></span> <a href="options_description.html" title="Class options_description">options_description</a> * description);</pre></li></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1255428"></a><h3>
|
||||
<a name="id1081812-bb"></a><code class="computeroutput">basic_parsed_options</code> public member functions</h3>
|
||||
<div class="orderedlist"><ol type="1"></ol></div>
|
||||
</div>
|
||||
<div class="refsect2" lang="en">
|
||||
<a name="id1255446"></a><h3>Specializations</h3>
|
||||
<div class="itemizedlist"><ul type="disc"><li><p><a href="id1002952-bb.html" title="Class basic_parsed_options<wchar_t>">Class basic_parsed_options<wchar_t></a></p></li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright © 2002-2004 Vladimir Prus</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="basic_command_line_parser.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id730253"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="id1002952-bb.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+122
-14
@@ -1,16 +1,124 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
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) -->
|
||||
<title>Redirect to generated documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=../../tools/build/doc/html/index.html">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="../../tools/build/doc/html/index.html">../../tools/build/doc/html/index.html</a>
|
||||
</body>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Part III. Boost.Build v2 User Manual</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="index.html" title="The Boost C++ Libraries">
|
||||
<link rel="prev" href="boostbook/dtd/rationale.html" title="
|
||||
BoostBook element rationale">
|
||||
<link rel="next" href="bbv2/howto.html" title="Chapter 21. How to use this document">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
|
||||
<td align="center"><a href="../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="boostbook/dtd/rationale.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="bbv2/howto.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="part" lang="en">
|
||||
<div class="titlepage"><div><div><h1 class="title">
|
||||
<a name="bbv2"></a>Boost.Build v2 User Manual</h1></div></div></div>
|
||||
<div class="toc">
|
||||
<p><b>Table of Contents</b></p>
|
||||
<dl>
|
||||
<dt><span class="chapter"><a href="bbv2/howto.html">21. How to use this document</a></span></dt>
|
||||
<dt><span class="chapter"><a href="bbv2/installation.html">22. Installation</a></span></dt>
|
||||
<dt><span class="chapter"><a href="bbv2/tutorial.html">23. Tutorial</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="bbv2/tutorial.html#bbv2.tutorial.hello">Hello, world</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/tutorial/properties.html">Properties</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/tutorial/hierarchy.html">Project Hierarchies</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/tutorial/libs.html">Dependent Targets</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/tutorial/linkage.html">Static and shared libaries</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/tutorial/conditions.html">Conditions and alternatives</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/tutorial/prebuilt.html">Prebuilt targets</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="chapter"><a href="bbv2/advanced.html">24. User documentation</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="bbv2/advanced.html#bbv2.advanced.configuration">Configuration</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/advanced/jamfiles.html">Writing Jamfiles</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/advanced/build_process.html">The Build Process</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/advanced/builtins/targets.html">Builtin target types</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/advanced/builtins/features.html">Builtin features</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/advanced/differences_to_v1.html">Differences to Boost.Build V1</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="chapter"><a href="bbv2/extender.html">25. Extender Manual</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="bbv2/extender.html#bbv2.extender.intro">Introduction</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/extending/targets.html">Target types</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/extending/tools.html">Tools and generators</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/extending/features.html">Features</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/extending/rules.html">Main target rules</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/extending/toolset_modules.html">Toolset modules</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="chapter"><a href="bbv2/reference.html">26. Detailed reference</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="bbv2/reference.html#bbv2.reference.general">General information</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/reference/jamfiles.html">Writing Jamfiles</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/reference/buildprocess.html">Build process</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/reference/definitions.html">Definitions</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/reference/generators.html">Generators</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="chapter"><a href="bbv2/faq.html">27. Frequently Asked Questions</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="bbv2/faq.html#id1708877">
|
||||
I'm getting "Duplicate name of actual target" error. What
|
||||
does it mean?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/faq/envar.html">
|
||||
Accessing environment variables
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/faq/s03.html">
|
||||
How to control properties order?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/faq/s04.html">
|
||||
How to control the library order on Unix?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/faq/external.html">Can I get output of external program as a variable in a Jamfile?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/faq/s06.html">How to get the project-root location?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/faq/s07.html">How to change compilation flags for one file?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/faq/dll-path.html">Why are the <code class="computeroutput">dll-path</code> and
|
||||
<code class="computeroutput">hardcode-dll-paths</code> properties useful?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/recipies/site-config.html">Targets in site-config.jam</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="appendix"><a href="bbv2/arch.html">B. Boost.Build v2 architecture</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="bbv2/arch.html#bbv2.arch.overview">Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/arch/build.html">The build layer</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/arch/tools.html">The tools layer</a></span></dt>
|
||||
<dt><span class="section"><a href="bbv2/arch/targets.html">Targets</a></span></dt>
|
||||
</dl></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><small><p>Last revised: December 29, 2004 at 22:17:38 GMT</p></small></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="boostbook/dtd/rationale.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="bbv2/howto.html"><img src="images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Chapter 24. User documentation</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../bbv2.html" title="Part III. Boost.Build v2 User Manual">
|
||||
<link rel="prev" href="tutorial/prebuilt.html" title="Prebuilt targets">
|
||||
<link rel="next" href="advanced/jamfiles.html" title="Writing Jamfiles">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="tutorial/prebuilt.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="advanced/jamfiles.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="chapter" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title">
|
||||
<a name="bbv2.advanced"></a>Chapter 24. User documentation</h2></div></div></div>
|
||||
<div class="toc">
|
||||
<p><b>Table of Contents</b></p>
|
||||
<dl>
|
||||
<dt><span class="section"><a href="advanced.html#bbv2.advanced.configuration">Configuration</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/jamfiles.html">Writing Jamfiles</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="advanced/jamfiles.html#bbv2.advanced.overview">Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/jamfiles.html#bbv2.advanced.targets">Main targets</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/jamfiles.html#bbv2.advanced.projects">Projects</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/jamfiles.html#bbv2.advanced.other-rules">Jamfile Utility Rules</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="advanced/build_process.html">The Build Process</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="advanced/build_process.html#id1704308">Build request</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/build_process.html#id1704350">Building a main target</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/build_process.html#id1704448">Building a project</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="advanced/builtins/targets.html">Builtin target types</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="advanced/builtins/targets.html#id1704505">Programs</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/builtins/targets.html#id1704568">Libraries</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/builtins/targets.html#bbv2.builtins.alias">Alias</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/builtins/targets.html#bbv2.builtins.stage">Installing</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/builtins/targets.html#bbv2.builtins.testing">Testing</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="advanced/builtins/features.html">Builtin features</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/differences_to_v1.html">Differences to Boost.Build V1</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="advanced/differences_to_v1.html#bbv2.advanced.differences_to_v1.configuration">Configuration</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/differences_to_v1.html#bbv2.advanced.differences_to_v1.jamfiles">Writing Jamfiles</a></span></dt>
|
||||
<dt><span class="section"><a href="advanced/differences_to_v1.html#bbv2.advanced.differences_to_v1.build_process">Build process</a></span></dt>
|
||||
</dl></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>This section will provide the information necessary to create your own
|
||||
projects using Boost.Build. The information provided here is relatively
|
||||
high-level, and <a href="reference.html" title="Chapter 26. Detailed reference">Chapter 26, <i>Detailed reference</i></a> as
|
||||
well as the on-line help system must be used to obtain
|
||||
low-level documentation (see <a href="reference.html#bbv2.reference.init.options.help">???</a>).</p>
|
||||
<p>Boost.Build actually consists of two parts - Boost.Jam, a
|
||||
build engine with its own interpreted language, and Boost.Build itself,
|
||||
implemented in Boost.Jam's language. The chain of events when
|
||||
you type <span><strong class="command">bjam</strong></span> on the command line is:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><p>Boost.Jam tries to find Boost.Build and loads the top-level
|
||||
module. The exact process is described in <a href="reference.html#bbv2.reference.init" title="Initialization">the section called “Initialization”</a></p></li>
|
||||
<li><p>The top-level module loads user-defined configuration
|
||||
files, <code class="filename">user-config.jam</code> and <code class="filename">site-config.jam</code>, which define
|
||||
available toolsets.</p></li>
|
||||
<li><p>The Jamfile in the current directory is read. That in turn
|
||||
might cause reading of further Jamfiles. As a result, a tree of
|
||||
projects is created, with targets inside projects.</p></li>
|
||||
<li><p>Finally, using the build request specified on the command line,
|
||||
Boost.Build decides which targets should be built, and how. That
|
||||
information is passed back to Boost.Jam, which takes care of
|
||||
actually running commands.</p></li>
|
||||
</ol></div>
|
||||
<p>So, to be able to successfully use Boost.Build, you need to know only
|
||||
three things:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p><a href="advanced.html#bbv2.advanced.configuration" title="Configuration">
|
||||
How to configure Boost.Build</a></p></li>
|
||||
<li><p><a href="advanced/jamfiles.html" title="Writing Jamfiles">
|
||||
How to write Jamfiles</a></p></li>
|
||||
<li><p><a href="advanced/build_process.html" title="The Build Process">
|
||||
How the build process works</a></p></li>
|
||||
<li><p>Some Basics about the Boost.Jam language. See the
|
||||
<a href="http://www.boost.org/tools/build/jam_src/index.html#jam_fundamentals" target="_top">Boost.Jam</a>
|
||||
and <a href="http://www.boost.org/tools/build/jam_src/Jam.html" target="_top">Classic
|
||||
Jam</a> documentation.
|
||||
</p></li>
|
||||
</ul></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.advanced.configuration"></a>Configuration</h2></div></div></div>
|
||||
<p>The Boost.Build configuration is specified in the file
|
||||
<code class="filename">user-config.jam</code>. You can edit the one that comes with Boost.Build, or
|
||||
|
||||
create a copy in your home directory and edit that. (See the <a href="reference.html#bbv2.reference.init.config" title="Table 26.1. Search paths for configuration files">reference</a> for the exact search
|
||||
paths.) The primary function of that file is to declare which compilers
|
||||
and other tools are available. The simplest syntax to configure a tool is:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using <em class="replaceable"><code>tool-name</code></em> ;
|
||||
</pre>
|
||||
<p>
|
||||
The <code class="computeroutput">using</code> rule is given a name of tool, and will make that tool
|
||||
available to Boost.Build. For example, <code class="computeroutput">using gcc ;</code> will make the gcc compiler
|
||||
available.
|
||||
</p>
|
||||
<p>
|
||||
Since nothing but a tool name is specified, Boost.Build will
|
||||
pick some default settings. For example, it will use the
|
||||
<span><strong class="command">gcc</strong></span> executable found in the
|
||||
<code class="envar">PATH</code>, or look in some known installation
|
||||
locations. In most cases, this strategy works automatically. In
|
||||
case you have several versions of a compiler, it's installed in
|
||||
some unusual location, or you need to tweak its configuration,
|
||||
you'll need to pass additional parameters to the
|
||||
<code class="computeroutput">using</code> rule. The parameters to
|
||||
<code class="computeroutput">using</code> can be different for each
|
||||
tool. You can obtain specific documentation for any tool's
|
||||
configuration parameters by invoking
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
bjam --help <em class="replaceable"><code>tool-name</code></em>.init
|
||||
</pre>
|
||||
<p>
|
||||
That said, for all the compiler toolsets Boost.Build supports
|
||||
out-of-the-box, the list of parameters to
|
||||
<code class="computeroutput">using</code> is the same: <em class="parameter"><code>toolset-name</code></em>, <em class="parameter"><code>version</code></em>, <em class="parameter"><code>invocation-command</code></em>, and <em class="parameter"><code>options</code></em>.
|
||||
</p>
|
||||
<p>The <em class="parameter"><code>version</code></em>
|
||||
parameter identifies the toolset version, in case you have
|
||||
several installed. It can have any form you like, but
|
||||
it's recommended that you use a numeric identifier like
|
||||
<code class="literal">7.1</code>.
|
||||
</p>
|
||||
<p>
|
||||
The <em class="parameter"><code>invocation-command</code></em>
|
||||
parameter is the command that must be executed to run the
|
||||
compiler. This parameter can usually be omitted if the compiler
|
||||
executable
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>has its “usual
|
||||
name” and is in the <code class="envar">PATH</code>,
|
||||
or</p></li>
|
||||
<li><p>was installed in a standard
|
||||
“installation directory”,
|
||||
or</p></li>
|
||||
<li><p>can be found through a global mechanism like the
|
||||
Windows registry.</p></li>
|
||||
</ul></div>
|
||||
<p>
|
||||
|
||||
For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using msvc : 7.1 ;
|
||||
using gcc ;
|
||||
</pre>
|
||||
<p>
|
||||
If the compiler can be found in the <code class="envar">PATH</code> but only by a
|
||||
nonstandard name, you can just supply that name:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using gcc : : g++-3.2 ;
|
||||
</pre>
|
||||
<p>
|
||||
Otherwise, it might be necessary to supply the complete path to the
|
||||
compiler executable:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using msvc : : Z:/Programs/Microsoft Visual Studio/vc98/bin/cl ;
|
||||
</pre>
|
||||
<p>
|
||||
Some Boost.Build toolsets will use that path to take additional
|
||||
actions required before invoking the compiler, such as calling
|
||||
vendor-supplied scripts to set up its required environment variables.
|
||||
</p>
|
||||
<p>To configure several versions of a toolset, simply invoke
|
||||
the <code class="computeroutput">using</code> rule multiple times:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using gcc : 3.3 ;
|
||||
using gcc : 3.4 : g++-3.4 ;
|
||||
using gcc : 3.2 : g++-3.2 ;
|
||||
</pre>
|
||||
<p>
|
||||
Note that in the first call to
|
||||
<code class="computeroutput">using</code>, the compiler found in the
|
||||
<code class="envar">PATH</code> will be used, and there's no need to
|
||||
explicitly specify the command.
|
||||
</p>
|
||||
<p>As shown above, both the <em class="parameter"><code>version</code></em> and <em class="parameter"><code>invocation-command</code></em> parameters are
|
||||
optional, but there's an important restriction: if you configure
|
||||
the same toolset more than once, you must pass the <em class="parameter"><code>version</code></em>
|
||||
parameter every time. For example, the following is not allowed:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using gcc ;
|
||||
using gcc : 3.4 : g++-3.4 ;
|
||||
</pre>
|
||||
<p>
|
||||
because the first <code class="computeroutput">using</code> call does
|
||||
not specify a <em class="parameter"><code>version</code></em>.
|
||||
</p>
|
||||
<p>The <em class="parameter"><code>options</code></em>
|
||||
parameter is used to fine-tune the configuration. All of
|
||||
Boost.Build's standard compiler toolsets accept properties of the
|
||||
four builtin features <code class="varname">cflags</code>,
|
||||
<code class="varname">cxxflags</code>, <code class="varname">compileflags</code> and
|
||||
<code class="varname">linkflags</code> as <em class="parameter"><code>options</code></em> specifying flags that will be
|
||||
always passed to the corresponding tools. Values of the
|
||||
<code class="varname">cflags</code> feature are passed directly to the C
|
||||
compiler, values of the <code class="varname">cxxflags</code> feature are
|
||||
passed directly to the C++ compiler, and values of the
|
||||
<code class="varname">compileflags</code> feature are passed to both. For
|
||||
example, to configure a <span><strong class="command">gcc</strong></span> toolset so that it
|
||||
always generates 64-bit code you could write:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using gcc : 3.4 : : <compileflags>-m64 <linkflags>-m64 ;
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="tutorial/prebuilt.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="advanced/jamfiles.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,194 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>The Build Process</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../advanced.html" title="Chapter 24. User documentation">
|
||||
<link rel="prev" href="jamfiles.html" title="Writing Jamfiles">
|
||||
<link rel="next" href="builtins/targets.html" title="Builtin target types">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="jamfiles.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="builtins/targets.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.advanced.build_process"></a>The Build Process</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="build_process.html#id1704308">Build request</a></span></dt>
|
||||
<dt><span class="section"><a href="build_process.html#id1704350">Building a main target</a></span></dt>
|
||||
<dt><span class="section"><a href="build_process.html#id1704448">Building a project</a></span></dt>
|
||||
</dl></div>
|
||||
<p>When you've described your targets, you want Boost.Build to run the
|
||||
right tools and create the needed targets.
|
||||
|
||||
This section will describe
|
||||
two things: how you specify what to build, and how the main targets are
|
||||
actually constructed.
|
||||
</p>
|
||||
<p>The most important thing to note is that in Boost.Build, unlike
|
||||
other build tools, the targets you declare do not correspond to specific
|
||||
files. What you declare in a Jamfile is more like a “metatarget.”
|
||||
|
||||
Depending on the properties you specify on the command line,
|
||||
each metatarget will produce a set of real targets corresponding
|
||||
to the requested properties. It is quite possible that the same
|
||||
metatarget is built several times with different properties,
|
||||
|
||||
producing different files.
|
||||
</p>
|
||||
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Tip</h3>
|
||||
<p>
|
||||
This means that for Boost.Build, you cannot directly obtain a build
|
||||
variant from a Jamfile. There could be several variants requested by the
|
||||
user, and each target can be built with different properties.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="id1704308"></a>Build request</h3></div></div></div>
|
||||
<p>
|
||||
The command line specifies which targets to build and with which
|
||||
properties. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
bjam app1 lib1//lib1 toolset=gcc variant=debug optimization=full
|
||||
</pre>
|
||||
<p>
|
||||
would build two targets, "app1" and "lib1//lib1" with the specified
|
||||
properties. You can refer to any targets, using
|
||||
<a href="../reference/definitions.html#bbv2.reference.ids" title="Target identifiers and references">target id</a> and specify arbitrary
|
||||
properties. Some of the properties are very common, and for them the name
|
||||
of the property can be omitted. For example, the above can be written as:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
bjam app1 lib1//lib1 gcc debug optimization=full
|
||||
</pre>
|
||||
<p>
|
||||
The complete syntax, which has some additional shortcuts, is
|
||||
described in <a href="../reference.html#bbv2.reference.commandline" title="Command line">the section called “Command line”</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="id1704350"></a>Building a main target</h3></div></div></div>
|
||||
<p>When you request, directly or indirectly, a build of a main target
|
||||
with specific requirements, the following steps are made. Some brief
|
||||
explanation is provided, and more details are given in <a href="../reference/buildprocess.html" title="Build process">the section called “Build process”</a>.
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><p>Applying default build. If the default-build
|
||||
property of a target specifies a value of a feature that is not
|
||||
present in the build request, that value is added.</p></li>
|
||||
<li><p>Selecting the main target alternative to use. For
|
||||
each alternative we look how many properties are present both in
|
||||
alternative's requirements, and in build request. The
|
||||
alternative with large number of matching properties is selected.
|
||||
</p></li>
|
||||
<li><p>Determining "common" properties.
|
||||
|
||||
The build request
|
||||
is <a href="../reference/definitions.html#bbv2.reference.variants.proprefine" title="Property refinement">refined</a>
|
||||
with target's requirements.
|
||||
|
||||
The conditional properties in
|
||||
requirements are handled as well. Finally, default values of
|
||||
features are added.
|
||||
</p></li>
|
||||
<li><p>Building targets referred by the sources list and
|
||||
dependency properties. The list of sources and the properties
|
||||
can refer to other target using <a href="../reference/definitions.html#bbv2.reference.ids" title="Target identifiers and references">target references</a>. For each
|
||||
reference, we take all <a href="../reference/definitions.html#bbv2.reference.features.attributes.propagated">propagated</a>
|
||||
properties, refine them by explicit properties specified in the
|
||||
target reference, and pass the resulting properties as build
|
||||
request to the other target.
|
||||
</p></li>
|
||||
<li><p>Adding the usage requirements produced when building
|
||||
dependencies to the "common" properties. When dependencies are
|
||||
built in the previous step, they return
|
||||
|
||||
both the set of created
|
||||
"real" targets, and usage requirements. The usage requirements
|
||||
are added to the common properties and the resulting property
|
||||
set will be used for building the current target.
|
||||
</p></li>
|
||||
<li><p>Building the target using generators. To convert the
|
||||
sources to the desired type, Boost.Build uses "generators" ---
|
||||
objects that correspond to tools like compilers and
|
||||
linkers. Each generator declares what type of targets it
|
||||
|
||||
can
|
||||
produce and what type of sources it requires. Using this
|
||||
information, Boost.Build determines which generators must be run
|
||||
to produce a specific target from specific sources. When
|
||||
generators are run, they return the "real" targets.
|
||||
</p></li>
|
||||
<li><p>Computing the usage requirements to be returned. The
|
||||
conditional properties in usage requirements are expanded
|
||||
|
||||
and the
|
||||
result is returned.</p></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="id1704448"></a>Building a project</h3></div></div></div>
|
||||
<p>Often, a user builds a complete project, not just one main
|
||||
target. In fact, invoking <span><strong class="command">bjam</strong></span> without
|
||||
arguments
|
||||
|
||||
builds the project defined in the current
|
||||
directory.</p>
|
||||
<p>When a project is built, the build request is passed without
|
||||
modification to all main targets in that project.
|
||||
|
||||
It's is possible to
|
||||
prevent implicit building of a target in a project with the
|
||||
<code class="computeroutput">explicit</code> rule:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
explicit hello_test ;
|
||||
</pre>
|
||||
<p>
|
||||
would cause the <code class="computeroutput">hello_test</code> target to be built only if
|
||||
explicitly requested by the user or by some other target.
|
||||
</p>
|
||||
<p>The Jamfile for a project can include a number of
|
||||
<code class="computeroutput">build-project</code> rule calls
|
||||
|
||||
that specify additional projects
|
||||
to be built.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="jamfiles.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="builtins/targets.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,172 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Builtin features</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../../advanced.html" title="Chapter 24. User documentation">
|
||||
<link rel="prev" href="targets.html" title="Builtin target types">
|
||||
<link rel="next" href="../differences_to_v1.html" title="Differences to Boost.Build V1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="targets.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../advanced.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../differences_to_v1.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.advanced.builtins.features"></a>Builtin features</h2></div></div></div>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="literal">variant</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
A feature that combines several low-level features, making
|
||||
it easy to request common build configurations.
|
||||
</p>
|
||||
<p><span class="bold"><strong>Allowed values:</strong></span><code class="literal">debug</code>, <code class="literal">release</code>,
|
||||
<code class="literal">profile</code></p>
|
||||
<p>The value <code class="literal">debug</code> expands to</p>
|
||||
<pre class="programlisting">
|
||||
<optimization>off <debug-symbols>on <inlining>off <runtime-debugging>on
|
||||
</pre>
|
||||
<p>The value <code class="literal">release</code> expands to</p>
|
||||
<pre class="programlisting">
|
||||
<optimization>speed <debug-symbols>off <inlining>full <runtime-debugging>off
|
||||
</pre>
|
||||
<p>The value <code class="literal">profile</code> expands to the same as
|
||||
<code class="literal">release</code>, plus:</p>
|
||||
<pre class="programlisting">
|
||||
<profiling>on <debug-symbols>on
|
||||
</pre>
|
||||
<p><span class="bold"><strong>Rationale:</strong></span> Runtime
|
||||
debugging is on in debug builds to suit the expectations of
|
||||
people used to various IDEs.
|
||||
|
||||
It's assumed other folks don't
|
||||
have any specific expectation in this point.
|
||||
</p>
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="bbv2.advanced.builtins.features.link"></a><span class="term"><code class="literal">link</code></span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
A feature that controls how libraries are built.
|
||||
</p>
|
||||
<p><span class="bold"><strong>Allowed values:</strong></span><code class="literal">shared</code>,
|
||||
<code class="literal">static</code></p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="literal">source</code></span></dt>
|
||||
<dd>
|
||||
The <code class="computeroutput"><source>X</code> feature has the same effect on building a target
|
||||
as putting X in the list of sources. The feature
|
||||
is sometimes more convenient:
|
||||
|
||||
you can put <code class="computeroutput"><source>X</code> in the
|
||||
requirements for a project and <code class="filename">X</code> will
|
||||
be included as a source in all of the project's main
|
||||
targets.
|
||||
</dd>
|
||||
<dt><span class="term"><code class="literal">library</code></span></dt>
|
||||
<dd>
|
||||
This feature is equivalent to the <source> feature, and exists
|
||||
for backward compatibility reasons.
|
||||
</dd>
|
||||
<dt><span class="term"><a name="bbv2.builtin.features.dependency"></a><code class="literal">dependency</code></span></dt>
|
||||
<dd>
|
||||
Introduces a dependency on the target named by the
|
||||
value of this feature (so it will be brought
|
||||
up-to-date whenever the target being declared is), and
|
||||
adds its usage requirements to the build properties
|
||||
|
||||
of the target being declared. The dependency is not used
|
||||
in any other way. The primary use case is when you want
|
||||
the usage requirements (such as <code class="computeroutput">#include</code> paths) of some
|
||||
library to be applied, but don't want to link to it.
|
||||
</dd>
|
||||
<dt><span class="term"><a name="bbv2.builtin.features.use"></a><code class="literal">use</code></span></dt>
|
||||
<dd>
|
||||
Introduces a dependency on the target named by the
|
||||
value of this feature (so it will be brought
|
||||
up-to-date whenever the target being declared is), and
|
||||
adds its usage requirements to the build properties
|
||||
|
||||
of the target being declared. The dependency is not used
|
||||
in any other way. The primary use case is when you want
|
||||
the usage requirements (such as <code class="computeroutput">#include</code> paths) of some
|
||||
library to be applied, but don't want to link to it.
|
||||
</dd>
|
||||
<dt><span class="term"><code class="literal">dll-path</code></span></dt>
|
||||
<dd>
|
||||
Specify an additional directory where the system should
|
||||
look for shared libraries when the executable or shared
|
||||
library is run. This feature only affects Unix
|
||||
compilers. Plase see <a href="../../faq/dll-path.html" title="Why are the dll-path and
|
||||
hardcode-dll-paths properties useful?
|
||||
">the section called “Why are the <code class="computeroutput">dll-path</code> and
|
||||
<code class="computeroutput">hardcode-dll-paths</code> properties useful?
|
||||
”</a>
|
||||
in <a href="../../faq.html" title="Chapter 27. Frequently Asked Questions">Chapter 27, <i>Frequently Asked Questions</i></a> for details.
|
||||
</dd>
|
||||
<dt><span class="term"><code class="literal">hardcode-dll-paths</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Controls automatic generation of dll-path properties.
|
||||
</p>
|
||||
<p><span class="bold"><strong>Allowed values:</strong></span><code class="literal">true</code>, <code class="literal">false</code>. This property
|
||||
is specific to Unix systems. If an executable is built with
|
||||
<code class="computeroutput"><hardcode-dll-paths>true</code>, the generated binary
|
||||
will contain the list of all the paths to the used shared
|
||||
libraries. As the result, the executable can be run without
|
||||
changing system paths to shared libraries or installing the
|
||||
libraries to system paths. This
|
||||
|
||||
is very convenient during
|
||||
development. Plase see the <a href="../../faq/dll-path.html" title="Why are the dll-path and
|
||||
hardcode-dll-paths properties useful?
|
||||
">FAQ entry</a> for details.
|
||||
Note that on Mac OSX, the paths are unconditionally hardcoded by
|
||||
the linker, and it's not possible to disable that behaviour.
|
||||
</p>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term"><code class="literal">cflags</code>, </span><span class="term"><code class="literal">cxxflags</code>, </span><span class="term"><code class="literal">linkflags</code></span>
|
||||
</dt>
|
||||
<dd>
|
||||
The value of those features is passed without modification to the
|
||||
corresponding tools. For <code class="computeroutput">cflags</code> that's both C and C++
|
||||
compilers, for <code class="computeroutput">cxxflags</code> that's C++ compiler and for
|
||||
<code class="computeroutput">linkflags</code> that's linker. The features are handy when
|
||||
you're trying to do something special that cannot be achieved by
|
||||
higher-level feature in Boost.Build.
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="targets.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../advanced.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../differences_to_v1.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,390 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Builtin target types</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../../advanced.html" title="Chapter 24. User documentation">
|
||||
<link rel="prev" href="../build_process.html" title="The Build Process">
|
||||
<link rel="next" href="features.html" title="Builtin features">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../build_process.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../advanced.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="features.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.advanced.builtins.targets"></a>Builtin target types</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="targets.html#id1704505">Programs</a></span></dt>
|
||||
<dt><span class="section"><a href="targets.html#id1704568">Libraries</a></span></dt>
|
||||
<dt><span class="section"><a href="targets.html#bbv2.builtins.alias">Alias</a></span></dt>
|
||||
<dt><span class="section"><a href="targets.html#bbv2.builtins.stage">Installing</a></span></dt>
|
||||
<dt><span class="section"><a href="targets.html#bbv2.builtins.testing">Testing</a></span></dt>
|
||||
</dl></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="id1704505"></a>Programs</h3></div></div></div>
|
||||
<p>Programs are created using the <code class="computeroutput">exe</code> rule, which
|
||||
follows the <a href="../jamfiles.html#bbv2.main-target-rule-syntax">common
|
||||
syntax</a>. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe hello : hello.cpp some_library.lib /some_project//library
|
||||
: <threading>multi
|
||||
;
|
||||
</pre>
|
||||
<p>
|
||||
This will create an executable file from the sources -- in this case,
|
||||
one C++ file, one library file present in the same directory, and
|
||||
another library that is created by Boost.Build. Generally, sources
|
||||
can include C and C++ files, object files and libraries. Boost.Build
|
||||
will automatically try to convert targets of other types.
|
||||
</p>
|
||||
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Tip</h3>
|
||||
<p>
|
||||
On Windows, if an application uses dynamic libraries, and both
|
||||
the application and the libraries are built by Boost.Build, its not
|
||||
possible to immediately run the application, because the
|
||||
<code class="literal">PATH</code> environment variable should include the path
|
||||
to the libraries. It means you have to either add the paths
|
||||
manually, or place the application and the libraries to the same
|
||||
directory, for example using the <a href="targets.html#bbv2.builtins.stage" title="Installing">
|
||||
stage</a> rule.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="id1704568"></a>Libraries</h3></div></div></div>
|
||||
<p>Libraries are created using the <code class="computeroutput">lib</code> rule, which
|
||||
follows the <a href="../jamfiles.html#bbv2.main-target-rule-syntax">common
|
||||
syntax</a>. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib helpers : helpers.cpp : <include>boost : : <include>. ;
|
||||
</pre>
|
||||
<p>In the most common case, the <code class="computeroutput">lib</code> creates a library
|
||||
from the specified sources. Depending on the value of
|
||||
<link> feature the library will be either static or
|
||||
shared. There are two other cases. First is when the library is
|
||||
installed somewhere in compiler's search paths, and should be
|
||||
searched by the compiler (typically, using the <code class="option">-l</code>
|
||||
option). The second case is where the library is available as a
|
||||
prebuilt file and the full path is known.
|
||||
</p>
|
||||
<p>
|
||||
The syntax for these case is given below:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib z : : <name>z <search>/home/ghost ;
|
||||
lib compress : : <file>/opt/libs/compress.a ;
|
||||
</pre>
|
||||
<p>
|
||||
The <code class="computeroutput">name</code> property specifies the name that should be
|
||||
passed to the <code class="option">-l</code> option, and the <code class="computeroutput">file</code>
|
||||
property specifies the file location. The <code class="varname">search</code> feature
|
||||
specifies paths in which to search for the library. That feature can
|
||||
be specified several times, or it can be omitted, in which case only
|
||||
default compiler paths will be searched.
|
||||
</p>
|
||||
<p>The difference between using the <code class="varname">file</code> feature as
|
||||
opposed to the <code class="varname">name</code> feature together with the
|
||||
<code class="varname">search</code> feature is that <code class="varname">file</code> is more
|
||||
precise. A specific file will be used. On the other hand, the
|
||||
<code class="varname">search</code> feature only adds a library path, and the
|
||||
<code class="varname">name</code> feature gives the basic name of the library. The
|
||||
search rules are specific to the linker. For example, given these
|
||||
definition:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib a : : <variant>release <file>/pool/release/a.so ;
|
||||
lib a : : <variant>debug <file>/pool/debug/a.so ;
|
||||
lib b : : <variant>release <file>/pool/release/b.so ;
|
||||
lib b : : <variant>debug <file>/pool/debug/b.so ;
|
||||
</pre>
|
||||
<p>
|
||||
It's possible to use release version of <code class="computeroutput">a</code> and debug
|
||||
version of <code class="computeroutput">b</code>. Had we used the <code class="varname">name</code> and
|
||||
<code class="varname">search</code> features, the linker would always pick either
|
||||
release or debug versions.
|
||||
</p>
|
||||
<p>
|
||||
For convenience, the following syntax is allowed:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib z ;
|
||||
lib gui db aux ;
|
||||
</pre>
|
||||
<p>
|
||||
and is does exactly the same as:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib z : : <name>z ;
|
||||
lib gui : : <name>gui ;
|
||||
lib db : : <name>db ;
|
||||
lib aux : : <name>aux ;
|
||||
</pre>
|
||||
<p>When a library uses another library you should put that another
|
||||
library in the list of sources. This will do the right thing in all
|
||||
cases. For portability, you should specify library dependencies even
|
||||
for searched and prebuilt libraries, othewise, static linking on
|
||||
Unix won't work. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib z ;
|
||||
lib png : z : <name>png ;
|
||||
</pre>
|
||||
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Note</h3>
|
||||
<p>When a library (say, <code class="computeroutput">a</code>), that has another
|
||||
library, (say, <code class="computeroutput">b</code>)
|
||||
|
||||
is linked dynamically, the <code class="computeroutput">b</code>
|
||||
library will be incorporated
|
||||
|
||||
in <code class="computeroutput">a</code>. (If <code class="computeroutput">b</code>
|
||||
is dynamic library as well, then <code class="computeroutput">a</code> will only refer to
|
||||
it, and not include any extra code.)
|
||||
|
||||
When the <code class="computeroutput">a</code>
|
||||
library is linked statically, Boost.Build will assure that all
|
||||
executables that link to <code class="computeroutput">a</code> will also link to
|
||||
<code class="computeroutput">b</code>.
|
||||
</p>
|
||||
</div>
|
||||
<p>One feature of Boost.Build that is very important for libraries
|
||||
is usage requirements.
|
||||
|
||||
For example, if you write:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib helpers : helpers.cpp : : : <include>. ;
|
||||
</pre>
|
||||
<p>
|
||||
then the compiler include path for all targets that use
|
||||
<code class="computeroutput">helpers</code> will contain the directory
|
||||
|
||||
where the target is defined.path to "helpers.cpp". The user
|
||||
only needs to add <code class="computeroutput">helpers</code> to the list of sources,
|
||||
and needn't consider the requirements its use imposes on a
|
||||
dependent target. This feature greatly simplifies Jamfiles.
|
||||
</p>
|
||||
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Note</h3>
|
||||
<p>If you don't want shared libraries to include all libraries
|
||||
that are specified in sources (especially statically linked ones),
|
||||
you'd need to use the following:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib b : a.cpp ;
|
||||
lib a : a.cpp : <use>b : : <library>b ;
|
||||
</pre>
|
||||
<p>
|
||||
This specifies that <code class="computeroutput">a</code> uses <code class="computeroutput">b</code>, and causes
|
||||
all executables that link to <code class="computeroutput">a</code> also link to
|
||||
<code class="computeroutput">b</code>. In this case, even for shared linking, the
|
||||
<code class="computeroutput">a</code> library won't even refer to <code class="computeroutput">b</code>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.builtins.alias"></a>Alias</h3></div></div></div>
|
||||
<p>The <code class="computeroutput">alias</code> rule follows the <a href="../jamfiles.html#bbv2.main-target-rule-syntax">common syntax</a>. For
|
||||
example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
alias core : im reader writer ;
|
||||
</pre>
|
||||
<p>
|
||||
will build the sources
|
||||
|
||||
and return
|
||||
|
||||
the generated source targets
|
||||
without modification.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="computeroutput">alias</code> rule is a convenience tool. If you often build
|
||||
the same group of targets at the same time, you can define an alias
|
||||
to save typing.
|
||||
</p>
|
||||
<p>
|
||||
Another use of the <code class="computeroutput">alias</code> rule is to change build
|
||||
properties. For example, if you always want static linking for a
|
||||
specific C++ Boost library, you can write the following:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
alias threads : /boost/thread//boost_thread : <link>static ;
|
||||
</pre>
|
||||
<p>
|
||||
and use only the <code class="computeroutput">threads</code> alias in your Jamfiles.
|
||||
</p>
|
||||
<p>
|
||||
You can also specify usage requirements for the
|
||||
<code class="computeroutput">alias</code> target. If you write the following:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
alias header_only_library : : : : <include>/usr/include/header_only_library ;
|
||||
</pre>
|
||||
<p>
|
||||
then using <code class="computeroutput">header_only_library</code> in sources will only add an
|
||||
include path. Also note that when there are some sources, their usage
|
||||
requirements are propagated, too. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib lib : lib.cpp : : : <include>. ;
|
||||
alias lib_alias ;
|
||||
exe main : main.cpp lib_alias ;
|
||||
</pre>
|
||||
<p>
|
||||
will compile <code class="filename">main.cpp</code> with the additional include.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.builtins.stage"></a>Installing</h3></div></div></div>
|
||||
<p>For installing a built target you should use the
|
||||
<code class="computeroutput">install</code> rule, which follows the <a href="../jamfiles.html#bbv2.main-target-rule-syntax">common syntax</a>. For
|
||||
example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
install dist : hello helpers ;
|
||||
</pre>
|
||||
<p>
|
||||
will cause the targets <code class="computeroutput">hello</code> and <code class="computeroutput">helpers</code> to
|
||||
be moved to the <code class="filename">dist</code> directory, relative to
|
||||
Jamfile's directory. The directory can
|
||||
be changed with the <code class="computeroutput">location</code> property:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
install dist : hello helpers : <location>/usr/bin ;
|
||||
</pre>
|
||||
<p>
|
||||
While you can achieve the same effect by changing the target name to
|
||||
<code class="filename">/usr/bin</code>, using the <code class="computeroutput">location</code>
|
||||
property is better, because it allows you to use a memnonic target
|
||||
name.
|
||||
</p>
|
||||
<p>The <code class="computeroutput">location</code> property is especially handy when the location
|
||||
is not fixed, but depends on build variant or environment variables:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
install dist : hello helpers : <variant>release:<location>dist/release
|
||||
<variant>debug:<location>dist/debug ;
|
||||
install dist2 : hello helpers : <location>$(DIST) ;
|
||||
</pre>
|
||||
<p>
|
||||
See also <a href="../../reference/definitions.html#bbv2.reference.variants.propcond" title="Conditional properties">conditional
|
||||
properties</a> and <a href="../../faq/envar.html" title="
|
||||
Accessing environment variables
|
||||
">environment variables</a></p>
|
||||
<p>
|
||||
Specifying the names of all libraries to install can be boring. The
|
||||
<code class="computeroutput">install</code> allows you to specify only the top-level executable
|
||||
targets to install, and automatically install all dependencies:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
install dist : hello
|
||||
: <install-dependencies>on <install-type>EXE
|
||||
<install-type>LIB
|
||||
;
|
||||
</pre>
|
||||
<p>
|
||||
will find all targets that <code class="computeroutput">hello</code> depends on, and install
|
||||
all of the which are either executables or libraries. More
|
||||
specifically, for each target, other targets that were specified as
|
||||
sources or as dependency properties, will be recursively found. One
|
||||
exception is that targets referred with the <a href="features.html#bbv2.builtin.features.use"><code class="computeroutput">use</code></a> feature
|
||||
are not considered, because that feature is typically used to refer to
|
||||
header-only libraries.
|
||||
If the set of target types is specified, only targets of that type
|
||||
will be installed, otherwise, all found target will be installed.
|
||||
</p>
|
||||
<p>The <a href="targets.html#bbv2.builtins.alias" title="Alias"><code class="computeroutput">alias</code></a>
|
||||
rule can be used when targets must be installed into several
|
||||
directories:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
install install : install-bin install-lib ;
|
||||
install install-bin : applications : /usr/bin ;
|
||||
install install-lib : helper : /usr/lib ;
|
||||
</pre>
|
||||
<p>Because the <code class="computeroutput">install</code> rule just copies targets, most
|
||||
free features <sup>[<a name="id1705185" href="#ftn.id1705185">6</a>]</sup>
|
||||
have no effect when used in requirements of the <code class="computeroutput">install</code>.
|
||||
The only two which matter are
|
||||
<a href="features.html#bbv2.builtin.features.dependency"><code class="varname">dependency</code></a> and, on Unix,
|
||||
<code class="varname">dll-path</code>.
|
||||
</p>
|
||||
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Note</h3>
|
||||
<p>
|
||||
(Unix specific). On Unix, executables built with Boost.Build typically
|
||||
contain the list of paths to all used dynamic libraries. For
|
||||
installing, this is not desired, so Boost.Build relinks the executable
|
||||
with an empty list of paths. You can also specify additional paths for
|
||||
installed executables with the <code class="varname">dll-path</code> feature.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.builtins.testing"></a>Testing</h3></div></div></div>
|
||||
<p>Boost.Build has convenient support for running unit tests. The
|
||||
simplest way is the <code class="computeroutput">unit-test</code> rule, which follows the
|
||||
<a href="../jamfiles.html#bbv2.main-target-rule-syntax">common syntax</a>. For
|
||||
example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
unit-test helpers_test : helpers_test.cpp helpers ;
|
||||
</pre>
|
||||
<p>The <code class="computeroutput">unit-test</code> rule behaves like the
|
||||
<code class="computeroutput">exe</code> rule, but after the executable is created it is
|
||||
run. If the executable returns an error code, the build system will also
|
||||
return an error and will try running the executable on the next
|
||||
invocation until it runs successfully. This behaviour ensures that you
|
||||
can't miss a unit test failure.
|
||||
</p>
|
||||
<p>There are rules for more elaborate testing: <code class="computeroutput">compile</code>,
|
||||
<code class="computeroutput">compile-fail</code>, <code class="computeroutput">run</code> and
|
||||
<code class="computeroutput">run-fail</code>. They are more suitable for automated testing, and
|
||||
are not covered here.
|
||||
</p>
|
||||
</div>
|
||||
<div class="footnotes">
|
||||
<br><hr width="100" align="left">
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1705185" href="#id1705185">6</a>] </sup>see the definition of "free" in <a href="../../reference/definitions.html#bbv2.reference.features.attributes" title="Feature Attributes">the section called “Feature Attributes”</a>.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../build_process.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../advanced.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="features.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,138 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Differences to Boost.Build V1</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../advanced.html" title="Chapter 24. User documentation">
|
||||
<link rel="prev" href="builtins/features.html" title="Builtin features">
|
||||
<link rel="next" href="../extender.html" title="Chapter 25. Extender Manual">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="builtins/features.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../extender.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.advanced.differences_to_v1"></a>Differences to Boost.Build V1</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="differences_to_v1.html#bbv2.advanced.differences_to_v1.configuration">Configuration</a></span></dt>
|
||||
<dt><span class="section"><a href="differences_to_v1.html#bbv2.advanced.differences_to_v1.jamfiles">Writing Jamfiles</a></span></dt>
|
||||
<dt><span class="section"><a href="differences_to_v1.html#bbv2.advanced.differences_to_v1.build_process">Build process</a></span></dt>
|
||||
</dl></div>
|
||||
<p>While Boost.Build V2 is based on the same ideas as Boost.Build V1,
|
||||
some of the syntax was changed, and some new important features were
|
||||
added. This chapter describes most of the changes.</p>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.advanced.differences_to_v1.configuration"></a>Configuration</h3></div></div></div>
|
||||
<p>In V1, there were two methods to configure a toolset. One was to
|
||||
set some environment variable, or use the <code class="option">-s</code> command line option to set
|
||||
a variable inside BJam.
|
||||
|
||||
Another method was to create a new toolset module that would set
|
||||
the variables and then invoke the base toolset. Neither method
|
||||
is necessary now: the <code class="computeroutput">using</code> rule provides a consistent way to
|
||||
initialize a toolset,
|
||||
|
||||
including several versions. See <a href="../advanced.html#bbv2.advanced.configuration" title="Configuration">the section called “Configuration”</a> for details.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.advanced.differences_to_v1.jamfiles"></a>Writing Jamfiles</h3></div></div></div>
|
||||
<p>Probably one of the most important differences in V2 Jamfiles is
|
||||
the use of project requirements. In V1, if several targets had the same
|
||||
requirements (for example, a common <code class="computeroutput">#include</code> path), it was necessary to
|
||||
manually write the requirements or use a helper rule or template target. In V2, the
|
||||
common properties can be specified with the <code class="computeroutput">requirements</code> project
|
||||
attribute, as documented in <a href="jamfiles.html#bbv2.advanced.projects" title="Projects">the section called “Projects”</a>.
|
||||
</p>
|
||||
<p><a href="../tutorial/libs.html" title="Dependent Targets">Usage requirements</a>
|
||||
also help to simplify Jamfiles.
|
||||
|
||||
If a library requires
|
||||
all clients to use specific <code class="computeroutput">#include</code> paths or macros when compiling
|
||||
code that depends on the library, that information can be cleanly
|
||||
represented.</p>
|
||||
<p>The difference between <code class="computeroutput">lib</code> and <code class="computeroutput">dll</code> targets in V1 is completely
|
||||
eliminated in V2. There's only one library target type, <code class="computeroutput">lib</code>, which can create
|
||||
either static or shared libraries depending on the value of the
|
||||
<a href="builtins/features.html#bbv2.advanced.builtins.features.link"><code class="varname"><link></code>
|
||||
feature</a>. If your target should be only built in one way, you
|
||||
can add <code class="computeroutput"><link>shared</code> or <code class="computeroutput"><link>static</code> to its requirements.
|
||||
</p>
|
||||
<p>The syntax for referring to other targets was changed a bit. While
|
||||
in V1 one would use:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe a : a.cpp <lib>../foo/bar ;
|
||||
</pre>
|
||||
<p>
|
||||
the V2 syntax is:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe a : a.cpp ../foo//bar ;
|
||||
</pre>
|
||||
<p>
|
||||
Note that you don't need to specify the type of other target, but the
|
||||
last element should be separated from the others by a double slash to indicate that
|
||||
you're referring to target <code class="filename">bar</code> in project <code class="filename">../foo</code>, and not to
|
||||
project <code class="filename">../foo/bar</code>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.advanced.differences_to_v1.build_process"></a>Build process</h3></div></div></div>
|
||||
<p>The command line syntax in V2 is completely different. For example
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
bjam -sTOOLS=msvc -sBUILD=release some_target
|
||||
</pre>
|
||||
<p>
|
||||
now becomes:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
bjam toolset=msvc variant=release some_target
|
||||
</pre>
|
||||
<p>
|
||||
or, using implicit features, just:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
bjam msvc release some_target
|
||||
</pre>
|
||||
<p>
|
||||
See <a href="../reference.html#bbv2.reference.commandline" title="Command line">the reference</a> for a
|
||||
complete description of the syntax.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="builtins/features.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../extender.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,465 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Writing Jamfiles</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../advanced.html" title="Chapter 24. User documentation">
|
||||
<link rel="prev" href="../advanced.html" title="Chapter 24. User documentation">
|
||||
<link rel="next" href="build_process.html" title="The Build Process">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../advanced.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="build_process.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.advanced.jamfiles"></a>Writing Jamfiles</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="jamfiles.html#bbv2.advanced.overview">Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="jamfiles.html#bbv2.advanced.targets">Main targets</a></span></dt>
|
||||
<dt><span class="section"><a href="jamfiles.html#bbv2.advanced.projects">Projects</a></span></dt>
|
||||
<dt><span class="section"><a href="jamfiles.html#bbv2.advanced.other-rules">Jamfile Utility Rules</a></span></dt>
|
||||
</dl></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.advanced.overview"></a>Overview</h3></div></div></div>
|
||||
<p>Jamfiles are the thing that is most important to the user,
|
||||
|
||||
bacause they declare the targets that should be built.
|
||||
|
||||
Jamfiles are also used for organizing targets—
|
||||
|
||||
each Jamfile is a separate project
|
||||
|
||||
that can be built independently from the other projects.
|
||||
</p>
|
||||
<p>Jamfiles mostly contain calls to Boost.Build functions that do
|
||||
all the work, specifically:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p><a href="jamfiles.html#bbv2.advanced.targets" title="Main targets">declare main
|
||||
targets</a></p></li>
|
||||
<li><p><a href="jamfiles.html#bbv2.advanced.projects" title="Projects">define
|
||||
project properties</a></p></li>
|
||||
<li><p><a href="jamfiles.html#bbv2.advanced.other-rules" title="Jamfile Utility Rules">do various other
|
||||
things</a></p></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.advanced.targets"></a>Main targets</h3></div></div></div>
|
||||
<p><a name="bbv2.advanced.targets.main"></a>
|
||||
A <em class="firstterm">Main target</em> is a user-defined named
|
||||
entity that can be built, for example an executable file.
|
||||
|
||||
Declaring a main target is usually done using one of the main
|
||||
target rules described in <a href="builtins/targets.html" title="Builtin target types">the section called “Builtin target types”</a>. The user can also declare
|
||||
custom main target rules as shown in <a href="../extending/rules.html" title="Main target rules">the section called “Main target rules”</a>.
|
||||
</p>
|
||||
<p>Most main target rules in Boost.Build can be invoked with
|
||||
a common syntax:</p>
|
||||
<a name="bbv2.main-target-rule-syntax"></a><pre class="programlisting"><em class="replaceable"><code>rule-name</code></em> <em class="replaceable"><code>main-target-name</code></em>
|
||||
: <em class="replaceable"><code>sources...</code></em>
|
||||
: <em class="replaceable"><code>requirements...</code></em>
|
||||
: <em class="replaceable"><code>default-build...</code></em>
|
||||
: <em class="replaceable"><code>usage-requirements...</code></em>
|
||||
;
|
||||
</pre>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<em class="parameter"><code>main-target-name</code></em> is the name used
|
||||
to request the target on command line and to use it from
|
||||
other main targets. A main target name may contain
|
||||
alphanumeric characters, dashes
|
||||
(‘<code class="computeroutput">-</code>’), and underscores
|
||||
(‘<code class="computeroutput">_</code>’).
|
||||
</li>
|
||||
<li>
|
||||
<em class="parameter"><code>sources</code></em> is the list of source files and other main
|
||||
targets that must be combined.
|
||||
</li>
|
||||
<li>
|
||||
<em class="parameter"><code>requirements</code></em> is the list of properties that must always
|
||||
be present when this main target is built.
|
||||
</li>
|
||||
<li>
|
||||
<em class="parameter"><code>default-build</code></em> is the list of properties that will be used
|
||||
unless some other value of the same feature is already
|
||||
specified, e.g. on the command line or by propogation from a dependent target.
|
||||
</li>
|
||||
<li>
|
||||
<em class="parameter"><code>usage-requirements</code></em> is the list of properties that will be
|
||||
propagated to all main targets that use this one, i.e. to all its
|
||||
dependents.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
Some main target rules have a shorter list of parameters;
|
||||
consult their documentation for details.
|
||||
</p>
|
||||
<p>Note that the actual requirements, default-build and
|
||||
usage-requirements attributes for a target are obtained by
|
||||
combining the explicitly specified ones with those specified for
|
||||
the project where a target is declared.
|
||||
</p>
|
||||
<p>The list of sources specifies what should be processed to
|
||||
get the resulting targets. Most of the time, it's just a list of
|
||||
files. Sometimes, you'll want to automatically construct the
|
||||
list of source files rather than having to spell it out
|
||||
manually, in which case you can use the
|
||||
<code class="computeroutput">glob</code> rule. Here are two examples:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe a : a.cpp ; # a.cpp is the only source file
|
||||
exe b : [ glob *.cpp ] ; # all .cpp files in this directory are sources
|
||||
</pre>
|
||||
<p>
|
||||
Unless you specify a files with absolute path, the name is
|
||||
considered relative to the source directory -- which is typically
|
||||
the directory where the Jamfile is located, but can be changed as
|
||||
described in <a href="jamfiles.html#bbv2.advanced.projects.attributes.projectrule" title="">the section called “Projects”</a>.
|
||||
</p>
|
||||
<p>
|
||||
The list of sources can also refer to other main targets.
|
||||
Targets in the same project can be referred to by name, while
|
||||
targets in other projects need to be qualified with a directory or a symbolic
|
||||
project name. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib helper : helper.cpp ;
|
||||
exe a : a.cpp helper ;
|
||||
exe b : b.cpp ..//utils ;
|
||||
exe c : c.cpp /boost/program_options//program_options ;
|
||||
</pre>
|
||||
<p>
|
||||
The first exe uses the library defined in the same
|
||||
project. The second one uses some target (most likely library)
|
||||
defined by Jamfile one level higher. Finally, the third target
|
||||
uses some <a href="http://boost.org" target="_top">C++ Boost</a>
|
||||
library, referring to it by its absolute symbolic name. More
|
||||
information about it can be found in <a href="../tutorial/libs.html" title="Dependent Targets">the section called “Dependent Targets”</a> and <a href="../reference/definitions.html#bbv2.reference.ids" title="Target identifiers and references">the section called “Target identifiers and references”</a>.
|
||||
</p>
|
||||
<p>Requirements are the properties that should always be present when
|
||||
building a target. Typically, they are includes and defines:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe hello : hello.cpp : <include>/opt/boost <define>MY_DEBUG ;
|
||||
</pre>
|
||||
<p>
|
||||
In special circumstances,
|
||||
|
||||
other properties can be used, for example if
|
||||
a library can only be built statically, or a file can't be compiled
|
||||
with optimization due to a compiler bug, one can use
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib util : util.cpp : <link>static ;
|
||||
obj main : main.cpp : <optimization>off ;
|
||||
</pre>
|
||||
<p>Sometimes requirements are necessary only for a specific
|
||||
compiler or build variant. <a href="../reference/definitions.html#bbv2.reference.variants.propcond" title="Conditional properties">Conditional
|
||||
properties</a> can be used in that case:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib util : util.cpp : <toolset>msvc:<link>static ;
|
||||
</pre>
|
||||
<p>
|
||||
Whenever <code class="computeroutput"><toolset>msvc</code> property is
|
||||
in build properties, the <code class="computeroutput"><link>static</code> property will
|
||||
be included as well. Conditional requirements can be “chained”:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib util : util.cpp : <toolset>msvc:<link>static
|
||||
<link>static:<define>STATIC_LINK ;
|
||||
</pre>
|
||||
<p>
|
||||
will set of static link
|
||||
|
||||
and the <code class="computeroutput">STATIC_LINK</code> define on the
|
||||
<code class="computeroutput">msvc</code> toolset.
|
||||
</p>
|
||||
<p>The <code class="varname">default-build</code> parameter
|
||||
|
||||
is a set of properties to be used if the build request does
|
||||
not otherwise specify a value for features in the set. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe hello : hello.cpp : : <threading>multi ;
|
||||
</pre>
|
||||
<p>
|
||||
would build a multi-threaded target in unless the user
|
||||
explicitly requests a single-threaded version. The difference between
|
||||
requirements and default-build is that requirements cannot be
|
||||
overriden in any way.</p>
|
||||
<p>A target of the same name can be declared several times, in which
|
||||
case each declaration is called an
|
||||
<em class="firstterm">alternative</em>. When the target is built, one of
|
||||
the alternatives will be selected and used. Alternatives need not be
|
||||
defined by the same main target rule. For example,
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib helpers : helpers.hpp ; # a header-only library
|
||||
alias helpers : helpers.lib : <toolset>msvc ; # except on msvc
|
||||
</pre>
|
||||
<p>The actual commands used to build any given main target can differ greatly from
|
||||
platform to platform. For example, you might have different lists
|
||||
of sources for different compilers, or different options for those
|
||||
compilers. Two approaches to this are explained in the
|
||||
<a href="../tutorial/conditions.html" title="Conditions and alternatives">tutorial</a>.
|
||||
</p>
|
||||
<p>Sometimes a main target is really needed only by some other main
|
||||
target. For example, a rule that declares a test-suite uses a main
|
||||
target
|
||||
|
||||
that represent test, but those main targets are rarely needed
|
||||
by themselves.
|
||||
</p>
|
||||
<p>It is possible to declare a target inline, i.e. the "sources"
|
||||
parameter may include calls to other main rules. For example:</p>
|
||||
<pre class="programlisting">
|
||||
exe hello : hello.cpp
|
||||
[ obj helpers : helpers.cpp : <optimization>off ] ;
|
||||
</pre>
|
||||
<p>
|
||||
Will cause "helpers.cpp" to be always compiled without
|
||||
optimization.
|
||||
|
||||
When referring to an inline main target, its declared name
|
||||
must be prefixed by its parent target's name and two dots. In
|
||||
the example above, to build only helpers, one should run
|
||||
<code class="computeroutput">bjam hello..helpers</code>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.advanced.projects"></a>Projects</h3></div></div></div>
|
||||
<p>As mentioned before, targets are grouped into projects,
|
||||
and each Jamfile is a separate project. Projects are useful
|
||||
because they allow us to group related targets together, define
|
||||
properties common to all those targets, and assign a symbolic
|
||||
name to the project that can be used in referring to its
|
||||
targets.
|
||||
</p>
|
||||
<p>Projects are named using the
|
||||
<code class="computeroutput">project</code> rule, which has the
|
||||
following syntax:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
project <em class="replaceable"><code>id</code></em> : <em class="replaceable"><code>attributes</code></em> ;
|
||||
</pre>
|
||||
<p>
|
||||
Here, <em class="replaceable"><code>attributes</code></em> is a sequence of
|
||||
rule arguments, each of which begins with an attribute-name
|
||||
and is followed by any number of build properties.
|
||||
The list
|
||||
of attribute names along with its handling is also shown in
|
||||
the table below. For example, it is possible to write:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
project tennis
|
||||
: requirements <threading>multi
|
||||
: default-build release
|
||||
;
|
||||
</pre>
|
||||
<p>The possible attributes are listed below.</p>
|
||||
<p><span class="emphasis"><em>Project id</em></span> is a short way to denote a project, as
|
||||
opposed to the Jamfile's pathname. It is a hierarchical path,
|
||||
unrelated to filesystem, such as "boost/thread". <a href="../reference/definitions.html#bbv2.reference.ids" title="Target identifiers and references">Target references</a> make use of project ids to
|
||||
specify a target.</p>
|
||||
<p><span class="emphasis"><em>Source location</em></span> specifies the directory where sources
|
||||
for the project are located.</p>
|
||||
<p><span class="emphasis"><em>Project requirements</em></span> are requirements that apply to
|
||||
all the targets in the projects as well as all subprojects.</p>
|
||||
<p><span class="emphasis"><em>Default build</em></span> is the build request that should be
|
||||
used when no build request is specified explicitly.</p>
|
||||
<p><a name="bbv2.advanced.projects.attributes.projectrule"></a>
|
||||
The default values for those attributes are
|
||||
given in the table below.
|
||||
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1703973"></a><p class="title"><b>Table 24.1. </b></p>
|
||||
<table class="table" summary="">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Attribute</th>
|
||||
<th>Name for the 'project' rule</th>
|
||||
<th>Default value</th>
|
||||
<th>Handling by the 'project' rule</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Project id</td>
|
||||
<td>none</td>
|
||||
<td>none</td>
|
||||
<td>Assigned from the first parameter of the 'project' rule.
|
||||
It is assumed to denote absolute project id.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Source location</td>
|
||||
<td><code class="literal">source-location</code></td>
|
||||
<td>The location of jamfile for the project</td>
|
||||
<td>Sets to the passed value</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Requirements</td>
|
||||
<td><code class="literal">requirements</code></td>
|
||||
<td>The parent's requirements</td>
|
||||
<td>The parent's requirements are refined with the passed
|
||||
requirement and the result is used as the project
|
||||
requirements.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Default build</td>
|
||||
<td><code class="literal">default-build</code></td>
|
||||
<td>none</td>
|
||||
<td>Sets to the passed value</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Build directory</td>
|
||||
<td><code class="literal">build-dir</code></td>
|
||||
<td>Empty if the parent has no build directory set.
|
||||
Otherwise, the parent's build directory with with the
|
||||
relative path from parent to the current project
|
||||
appended to it.
|
||||
</td>
|
||||
<td>Sets to the passed value, interpreted as relative to the
|
||||
project's location.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Besides defining projects and main targets, Jamfiles
|
||||
commonly invoke utility rules such as
|
||||
<code class="computeroutput">constant</code> and
|
||||
<code class="computeroutput">path-constant</code>, which inject a
|
||||
specified Boost.Jam variable setting into this project's Jamfile
|
||||
module and those of all its subprojects. See <a href="jamfiles.html#bbv2.advanced.other-rules" title="Jamfile Utility Rules">the section called “Jamfile Utility Rules”</a> for a complete description
|
||||
of these utility rules. Jamfiles are regular Boost.Jam source
|
||||
files and Boost.Build modules, so naturally they can contain any kind of Boost.Jam code,
|
||||
including rule definitions.
|
||||
</p>
|
||||
<p>Each subproject inherits attributes, constants and rules
|
||||
from its parent project, which is defined by the nearest
|
||||
Jamfile in an ancestor directory above
|
||||
the subproject. The top-level project is declared in a file
|
||||
called <code class="filename">Jamroot</code> rather than
|
||||
<code class="filename">Jamfile</code>. When loading a project,
|
||||
Boost.Build looks for either <code class="filename">Jamroot</code> or
|
||||
<code class="computeroutput">Jamfile</code>. They are handled indentically, except
|
||||
that if the file is called <code class="filename">Jamroot</code>, the
|
||||
search for a parent project is not performed.
|
||||
</p>
|
||||
<p>Even when building in a subproject directory, parent
|
||||
project files are always loaded before those of their
|
||||
subprojects, so that every definition made in a parent project
|
||||
is always available to its children. The loading order of any
|
||||
other projects is unspecified. Even if one project refers to
|
||||
another via <a href="../../"><code class="computeroutput">use-project</code></a>,
|
||||
or a target reference, no specific order should be assumed.
|
||||
</p>
|
||||
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Note</h3>
|
||||
<p>Giving the root project the special name
|
||||
“<code class="filename">Jamroot</code>” ensures that
|
||||
Boost.Build won't misinterpret a directory above it as the
|
||||
project root just because the directory contains a Jamfile.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.advanced.other-rules"></a>Jamfile Utility Rules</h3></div></div></div>
|
||||
<p>The following table describes utility rules that can be
|
||||
used in Jamfiles. Detailed information for any of these rules can
|
||||
be obtained by running:
|
||||
</p>
|
||||
<pre class="screen">
|
||||
bjam --help project.<em class="replaceable"><code>rulename</code></em></pre>
|
||||
<div class="table">
|
||||
<a name="id1704194"></a><p class="title"><b>Table 24.2. </b></p>
|
||||
<table class="table" summary="">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Rule</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="jamfiles.html#bbv2.advanced.projects.attributes.projectrule">project</a></td>
|
||||
<td>Define this project's symbolic ID or attributes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="../../">use-project</a></td>
|
||||
<td>Make another project known so that it can be referred to by symbolic ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="../../">build-project</a></td>
|
||||
<td>Cause another project to be built when this one is built.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="../../">explicit</a></td>
|
||||
<td>State that a target should be built only by explicit
|
||||
request.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>glob</td>
|
||||
<td>Translate a list of shell-style wildcards into a
|
||||
corresponding list of files.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>constant</td>
|
||||
<td>Injects a variable setting into this project's
|
||||
Jamfile module and those of all its subprojects.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>path-constant</td>
|
||||
<td>Injects a variable set to a path value into
|
||||
this project's Jamfile module and those of all its subprojects.
|
||||
If the value is a relative path it will be adjusted for
|
||||
each subproject so that it refers to the same
|
||||
directory.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../advanced.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="build_process.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,77 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Appendix B. Boost.Build v2 architecture</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../bbv2.html" title="Part III. Boost.Build v2 User Manual">
|
||||
<link rel="prev" href="recipies/site-config.html" title="Targets in site-config.jam">
|
||||
<link rel="next" href="arch/build.html" title="The build layer">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="recipies/site-config.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="arch/build.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="appendix" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title">
|
||||
<a name="bbv2.arch"></a>Appendix B. Boost.Build v2 architecture</h2></div></div></div>
|
||||
<div class="toc">
|
||||
<p><b>Table of Contents</b></p>
|
||||
<dl>
|
||||
<dt><span class="section"><a href="arch.html#bbv2.arch.overview">Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="arch/build.html">The build layer</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="arch/build.html#bbv2.arch.metatargets">Metatargets</a></span></dt>
|
||||
<dt><span class="section"><a href="arch/build.html#bbv2.arch.virtual">Virtual targets</a></span></dt>
|
||||
<dt><span class="section"><a href="arch/build.html#bbv2.arch.properties"></a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="arch/tools.html">The tools layer</a></span></dt>
|
||||
<dt><span class="section"><a href="arch/targets.html">Targets</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="arch/targets.html#bbv2.arch.depends">Dependency scanning</a></span></dt></dl></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="sidebar"><p>This document is work-in progress. Don't expect much from it
|
||||
yet.</p></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.arch.overview"></a>Overview</h2></div></div></div>
|
||||
<p>The Boost.Build code is structured in four different components:
|
||||
"kernel", "util", "build" and "tools". The first two are relatively
|
||||
uninteresting, so we'll focus on the remaining pair. The "build" component
|
||||
provides classes necessary to declare targets, determine which properties
|
||||
should be used for their building, and for creating the dependency
|
||||
graph. The "tools" component provides user-visible functionality. It
|
||||
mostly allows to declare specific kind of main targets, and declare
|
||||
avaiable tools, which are then used when creating the dependency graph.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="recipies/site-config.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="arch/build.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,196 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>The build layer</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../arch.html" title="Appendix B. Boost.Build v2 architecture">
|
||||
<link rel="prev" href="../arch.html" title="Appendix B. Boost.Build v2 architecture">
|
||||
<link rel="next" href="tools.html" title="The tools layer">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../arch.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../arch.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tools.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.arch.build"></a>The build layer</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="build.html#bbv2.arch.metatargets">Metatargets</a></span></dt>
|
||||
<dt><span class="section"><a href="build.html#bbv2.arch.virtual">Virtual targets</a></span></dt>
|
||||
<dt><span class="section"><a href="build.html#bbv2.arch.properties"></a></span></dt>
|
||||
</dl></div>
|
||||
<p>The build layer has just four main parts -- metatargets (abstract targets),
|
||||
virtual targets, generators and properties.
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>Metatargets (see the "targets.jam" module) represent
|
||||
all the user-defined entities which can be built. The "meta" prefix
|
||||
signify that they don't really corrspond to files -- depending of
|
||||
build request, they can produce different set of
|
||||
files. Metatargets are created when Jamfiles are loaded. Each
|
||||
metagarget has a <code class="computeroutput">generate</code> method which is given a
|
||||
property set and produces virtual targets for the passed properties.
|
||||
</p></li>
|
||||
<li><p>Virtual targets (see the "virtual-targets.jam"
|
||||
module) correspond to the atomic things which can be updated --
|
||||
most typically files.
|
||||
</p></li>
|
||||
<li><p>Properties are just (name, value) pairs, specified
|
||||
by the user and describing how the targets should be
|
||||
built. Properties are stored using the <code class="computeroutput">property-set</code> class.
|
||||
</p></li>
|
||||
<li><p>Generators are the objects which encapsulate tools
|
||||
-- they can take a list of source virtual targets and produce new
|
||||
virtual targets from them.
|
||||
</p></li>
|
||||
</ul></div>
|
||||
<p>The build process includes those steps:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><p>Top-level code calls the <code class="computeroutput">generate</code>
|
||||
method of a metatarget with some properties. </p></li>
|
||||
<li><p>The metatarget combines the requested properties
|
||||
with requirements and passes the result, together with the list
|
||||
of sources, to the <code class="computeroutput">generators.construct</code>
|
||||
function</p></li>
|
||||
<li><p>A generator appropriate for the build properties is
|
||||
selected and its <code class="computeroutput">run</code> method is
|
||||
called. The method returns a list of virtual targets
|
||||
</p></li>
|
||||
<li><p>The targets are returned to the top level code. They
|
||||
are converted into bjam targets (via
|
||||
<code class="computeroutput">virtual-target.actualize</code>) and passed to bjam for building.
|
||||
</p></li>
|
||||
</ol></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.arch.metatargets"></a>Metatargets</h3></div></div></div>
|
||||
<p>There are several classes derived from "abstract-target". The
|
||||
"main-target" class represents top-level main target, the "project-target"
|
||||
acts like container for all main targets, and "basic-target" class is a
|
||||
base class for all further target types.
|
||||
</p>
|
||||
<p>Since each main target can have several alternatives, all top-level
|
||||
target objects are just containers, referring to "real" main target
|
||||
classes. The type is that container is "main-target". For example, given:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
alias a ;
|
||||
lib a : a.cpp : <toolset>gcc ;
|
||||
</pre>
|
||||
<p>
|
||||
we would have one-top level instance of "main-target-class", which will
|
||||
contain one instance of "alias-target-class" and one instance of
|
||||
"lib-target-class". The "generate" method of "main-target" decides
|
||||
which of the alternative should be used, and call "generate" on the
|
||||
corresponding instance.
|
||||
</p>
|
||||
<p>Each alternative is a instance of a class derived from
|
||||
"basic-target". The "basic-target.generate" does several things that are
|
||||
always should be done:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>Determines what properties should be used for building the
|
||||
target. This includes looking at requested properties, requirements,
|
||||
and usage requirements of all sources.</p></li>
|
||||
<li><p>Builds all sources</p></li>
|
||||
<li><p>Computes the usage requirements which should be passes back.</p></li>
|
||||
</ul></div>
|
||||
<p>
|
||||
For the real work of constructing virtual target, a new method
|
||||
"construct" is called.
|
||||
</p>
|
||||
<p>The "construct" method can be implemented in any way by classes
|
||||
derived from "basic-target", but one specific derived class plays the
|
||||
central role -- "typed-target". That class holds the desired type of file
|
||||
to be produces, and calls the generators modules to do the job.
|
||||
</p>
|
||||
<p>This means that a specific metatarget subclass may avoid using
|
||||
generators at all. However, this is deprecated and we're trying to
|
||||
eliminate all such subsclasses at the moment.
|
||||
</p>
|
||||
<p>Note that the <code class="filename">build/targets.jam</code> file contains
|
||||
an UML diagram which might help.</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.arch.virtual"></a>Virtual targets</h3></div></div></div>
|
||||
<p>Virtual targets correspond to the atomic things which can be
|
||||
updated. Each virtual target can be assigned an updating action --
|
||||
instance of the <code class="computeroutput">action</code> class. The action class, in
|
||||
turn, contains a list of source targets, properties, and a name of
|
||||
bjam action block which should be executed.
|
||||
</p>
|
||||
<p>We try hard to never create equal instances of the
|
||||
<code class="computeroutput">virtual-target</code> class. Each code which creates virtual
|
||||
targets passes them though the <code class="computeroutput">virtual-target.register</code>
|
||||
function, which detects if a target with the same name, sources, and
|
||||
properties was created. In that case, existing target is returned.
|
||||
</p>
|
||||
<p>When all virtual targets are produced, they are
|
||||
"actualized". This means that the real file names are computed, and
|
||||
the commands that should be run are generated. This is done by the
|
||||
<code class="computeroutput">virtual-target.actualize</code> method and the
|
||||
<code class="computeroutput">action.actualize</code> methods. The first is conceptually
|
||||
simple, while the second need additional explanation. The commands
|
||||
in bjam are generated in two-stage process. First, a rule with the
|
||||
appropriate name (for example
|
||||
"gcc.compile") is called and is given the names of targets. The rule
|
||||
sets some variables, like "OPTIONS". After that, the command string
|
||||
is taken, and variable are substitutes, so use of OPTIONS inside the
|
||||
command string become the real compile options.
|
||||
</p>
|
||||
<p>Boost.Build added a third stage to simplify things. It's now
|
||||
possible to automatically convert properties to appropriate assignments to
|
||||
variables. For example, <debug-symbols>on would add "-g" to the
|
||||
OPTIONS variable, without requiring to manually add this logic to
|
||||
gcc.compile. This functionality is part of the "toolset" module.
|
||||
</p>
|
||||
<p>Note that the <code class="filename">build/virtual-targets.jam</code> file
|
||||
contains an UML diagram which might help.</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"></div>
|
||||
<p>Above, we noted that metatargets are built with a set of
|
||||
properties. That set is represented with the
|
||||
<code class="computeroutput">property-set</code> class. An important point is that handling
|
||||
of property sets can get very expensive. For that reason, we make
|
||||
sure that for each set of (name, value) pairs only one
|
||||
<code class="computeroutput">property-set</code> instance is created. The
|
||||
<code class="computeroutput">property-set</code> uses extensive caching for all operation,
|
||||
so most work is avoided. The <code class="computeroutput">property-set.create</code> is the
|
||||
factory function which should be used to create instances of the
|
||||
<code class="computeroutput">property-set</code> class.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../arch.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../arch.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tools.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,396 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Targets</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../arch.html" title="Appendix B. Boost.Build v2 architecture">
|
||||
<link rel="prev" href="tools.html" title="The tools layer">
|
||||
<link rel="next" href="../../who_s_using_boost_.html" title="Who's Using Boost?">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="tools.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../arch.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../who_s_using_boost_.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.arch.targets"></a>Targets</h2></div></div></div>
|
||||
<div class="toc"><dl><dt><span class="section"><a href="targets.html#bbv2.arch.depends">Dependency scanning</a></span></dt></dl></div>
|
||||
<p>NOTE: THIS SECTION IS NOT EXPECTED TO BE READ!
|
||||
There are two user-visible kinds of targets in Boost.Build.
|
||||
First are "abstract" — they correspond to things declared
|
||||
by user, for example, projects and executable files. The primary
|
||||
thing about abstract target is that it's possible to request them
|
||||
to be build with a particular values of some properties. Each
|
||||
combination of properties may possible yield different set of
|
||||
real file, so abstract target do not have a direct correspondence
|
||||
with files.</p>
|
||||
<p>File targets, on the contary, are associated with concrete
|
||||
files. Dependency graphs for abstract targets with specific
|
||||
properties are constructed from file targets. User has no was to
|
||||
create file targets, however it can specify rules that detect
|
||||
file type for sources, and also rules for transforming between
|
||||
file targets of different types. That information is used in
|
||||
constructing dependency graph, as desribed in the "next section".
|
||||
[ link? ] <span class="bold"><strong>Note:</strong></span>File targets are not
|
||||
the same as targets in Jam sense; the latter are created from
|
||||
file targets at the latest possible moment. <span class="bold"><strong>Note:</strong></span>"File
|
||||
target" is a proposed name for what we call virtual targets. It
|
||||
it more understandable by users, but has one problem: virtual
|
||||
targets can potentially be "phony", and not correspond to any
|
||||
file.</p>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.arch.depends"></a>Dependency scanning</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="targets.html#id1709744">Support for different scanning algorithms</a></span></dt>
|
||||
<dt><span class="section"><a href="targets.html#id1709753">Ability to scan the same file several times</a></span></dt>
|
||||
<dt><span class="section"><a href="targets.html#id1709788">Proper detection of dependencies on generated files.</a></span></dt>
|
||||
<dt><span class="section"><a href="targets.html#id1709921">Proper detection of dependencies from generated files</a></span></dt>
|
||||
</dl></div>
|
||||
<p>Dependency scanning is the process of finding implicit
|
||||
dependencies, like "#include" statements in C++. The requirements
|
||||
for right dependency scanning mechanism are:</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Support for different scanning algorithms. C++ and XML have
|
||||
quite different syntax for includes and rules for looking up
|
||||
included files.
|
||||
</li>
|
||||
<li>
|
||||
Ability to scan the same file several times. For example,
|
||||
single C++ file can be compiled with different include
|
||||
paths.
|
||||
</li>
|
||||
<li>
|
||||
Proper detection of dependencies on generated files.
|
||||
</li>
|
||||
<li>
|
||||
Proper detection of dependencies from generated file.
|
||||
</li>
|
||||
</ul></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="id1709744"></a>Support for different scanning algorithms</h4></div></div></div>
|
||||
<p>Different scanning algorithm are encapsulated by objects
|
||||
called "scanners". Please see the documentation for "scanner"
|
||||
module for more details.</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="id1709753"></a>Ability to scan the same file several times</h4></div></div></div>
|
||||
<p>As said above, it's possible to compile a C++ file twice, with
|
||||
different include paths. Therefore, include dependencies for
|
||||
those compilations can be different. The problem is that bjam
|
||||
does not allow several scans of the same target.</p>
|
||||
<p>The solution in Boost.Build is straigtforward. When a virtual
|
||||
target is converted to bjam target (via
|
||||
<code class="literal">virtual-target.actualize</code> method), we specify the scanner
|
||||
object to be used. The actualize method will create different
|
||||
bjam targets for different scanners.</p>
|
||||
<p>All targets with specific scanner are made dependent on target
|
||||
without scanner, which target is always created. This is done in
|
||||
case the target is updated. The updating action will be
|
||||
associated with target without scanner, but if sources for that
|
||||
action are touched, all targets — with scanner and without
|
||||
should be considered outdated.</p>
|
||||
<p>For example, assume that "a.cpp" is compiled by two compilers
|
||||
with different include path. It's also copied into some install
|
||||
location. In turn, it's produced from "a.verbatim". The
|
||||
dependency graph will look like:</p>
|
||||
<pre class="programlisting">
|
||||
a.o (<toolset>gcc) <--(compile)-- a.cpp (scanner1) ----+
|
||||
a.o (<toolset>msvc) <--(compile)-- a.cpp (scanner2) ----|
|
||||
a.cpp (installed copy) <--(copy) ----------------------- a.cpp (no scanner)
|
||||
^
|
||||
|
|
||||
a.verbose --------------------------------+
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="id1709788"></a>Proper detection of dependencies on generated files.</h4></div></div></div>
|
||||
<p>This requirement breaks down to the following ones.</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
If when compiling "a.cpp" there's include of "a.h", the
|
||||
"dir" directory is in include path, and a target called "a.h"
|
||||
will be generated to "dir", then bjam should discover the
|
||||
include, and create "a.h" before compiling "a.cpp".
|
||||
</li>
|
||||
<li>
|
||||
Since almost always Boost.Build generates targets to a
|
||||
"bin" directory, it should be supported as well. I.e. in the
|
||||
scanario above, Jamfile in "dir" might create a main target,
|
||||
which generates "a.h". The file will be generated to "dir/bin"
|
||||
directory, but we still have to recornize the dependency.
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>The first requirement means that when determining what "a.h"
|
||||
means, when found in "a.cpp", we have to iterate over all
|
||||
directories in include paths, checking for each one:</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
If there's file "a.h" in that directory, or
|
||||
</li>
|
||||
<li>
|
||||
If there's a target called "a.h", which will be generated
|
||||
to that directory.
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>Classic Jam has built-in facilities for point (1) above, but
|
||||
that's not enough. It's hard to implement the right semantic
|
||||
without builtin support. For example, we could try to check if
|
||||
there's targer called "a.h" somewhere in dependency graph, and
|
||||
add a dependency to it. The problem is that without search in
|
||||
include path, the semantic may be incorrect. For example, one can
|
||||
have an action which generated some "dummy" header, for system
|
||||
which don't have the native one. Naturally, we don't want to
|
||||
depend on that generated header on platforms where native one is
|
||||
included.</p>
|
||||
<p>There are two design choices for builtin support. Suppose we
|
||||
have files a.cpp and b.cpp, and each one includes header.h,
|
||||
generated by some action. Dependency graph created by classic jam
|
||||
would look like:</p>
|
||||
<pre class="programlisting">
|
||||
a.cpp -----> <scanner1>header.h [search path: d1, d2, d3]
|
||||
|
||||
|
||||
<d2>header.h --------> header.y
|
||||
[generated in d2]
|
||||
|
||||
b.cpp -----> <scanner2>header.h [ search path: d1, d2, d4]
|
||||
</pre>
|
||||
<p>
|
||||
In this case, Jam thinks all header.h target are not
|
||||
realated. The right dependency graph might be:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
a.cpp ----
|
||||
\
|
||||
\
|
||||
>----> <d2>header.h --------> header.y
|
||||
/ [generated in d2]
|
||||
/
|
||||
b.cpp ----
|
||||
</pre>
|
||||
<p>
|
||||
|
||||
or
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
a.cpp -----> <scanner1>header.h [search path: d1, d2, d3]
|
||||
|
|
||||
(includes)
|
||||
V
|
||||
<d2>header.h --------> header.y
|
||||
[generated in d2]
|
||||
^
|
||||
(includes)
|
||||
|
|
||||
b.cpp -----> <scanner2>header.h [ search path: d1, d2, d4]
|
||||
</pre>
|
||||
<p>
|
||||
The first alternative was used for some time. The problem
|
||||
however is: what include paths should be used when scanning
|
||||
header.h? The second alternative was suggested by Matt Armstrong.
|
||||
It has similiar effect: add targets which depend on
|
||||
<scanner1>header.h will also depend on <d2>header.h.
|
||||
But now we have two different target with two different scanners,
|
||||
and those targets can be scanned independently. The problem of
|
||||
first alternative is avoided, so the second alternative is
|
||||
implemented now.
|
||||
</p>
|
||||
<p>The second sub-requirements is that targets generated to "bin"
|
||||
directory are handled as well. Boost.Build implements
|
||||
semi-automatic approach. When compiling C++ files the process
|
||||
is:</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
The main target to which compiled file belongs is found.
|
||||
</li>
|
||||
<li>
|
||||
All other main targets that the found one depends on are
|
||||
found. Those include main target which are used as sources, or
|
||||
present as values of "dependency" features.
|
||||
</li>
|
||||
<li>
|
||||
All directories where files belonging to those main target
|
||||
will be generated are added to the include path.
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>After this is done, dependencies are found by the approach
|
||||
explained previously.</p>
|
||||
<p>Note that if a target uses generated headers from other main
|
||||
target, that main target should be explicitly specified as
|
||||
dependency property. It would be better to lift this requirement,
|
||||
but it seems not very problematic in practice.</p>
|
||||
<p>For target types other than C++, adding of include paths must
|
||||
be implemented anew.</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="id1709921"></a>Proper detection of dependencies from generated files</h4></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="targets.html#id1710022">File targets</a></span></dt>
|
||||
<dt><span class="section"><a href="targets.html#id1710055">Target paths</a></span></dt>
|
||||
</dl></div>
|
||||
<p>Suppose file "a.cpp" includes "a.h" and both are generated by
|
||||
some action. Note that classic jam has two stages. In first stage
|
||||
dependency graph graph is build and actions which should be run
|
||||
are determined. In second stage the actions are executed.
|
||||
Initially, neither file exists, so the include is not found. As
|
||||
the result, jam might attempt to compile a.cpp before creating
|
||||
a.h, and compilation will fail.</p>
|
||||
<p>The solution in Boost.Jam is to perform additional dependency
|
||||
scans after targets are updated. This break separation between
|
||||
build stages in jam — which some people consider a good
|
||||
thing — but I'm not aware of any better solution.</p>
|
||||
<p>In order to understand the rest of this section, you better
|
||||
read some details about jam dependency scanning, available
|
||||
<a href="http://public.perforce.com:8080/@md=d&cd=//public/jam/src/&ra=s&c=kVu@//2614?ac=10" target="_top">
|
||||
at this link</a>.</p>
|
||||
<p>Whenever a target is updated, Boost.Jam rescans it for
|
||||
includes. Consider this graph, created before any actions are
|
||||
run.</p>
|
||||
<pre class="programlisting">
|
||||
A -------> C ----> C.pro
|
||||
/
|
||||
B --/ C-includes ---> D
|
||||
</pre>
|
||||
<p>
|
||||
Both A and B have dependency on C and C-includes (the latter
|
||||
dependency is not shown). Say during building we've tried to create
|
||||
A, then tried to create C and successfully created C.
|
||||
</p>
|
||||
<p>In that case, the set of includes in C might well have
|
||||
changed. We do not bother to detect precisely which includes were
|
||||
added or removed. Instead we create another internal node
|
||||
C-includes-2. Then we determine what actions should be run to
|
||||
update the target. In fact this mean that we perform logic of
|
||||
first stage while already executing stage.</p>
|
||||
<p>After actions for C-includes-2 are determined, we add
|
||||
C-includes-2 to the list of A's dependents, and stage 2 proceeds
|
||||
as usual. Unfortunately, we can't do the same with target B,
|
||||
since when it's not visited, C target does not know B depends on
|
||||
it. So, we add a flag to C which tells and it was rescanned. When
|
||||
visiting B target, the flag is notices and C-includes-2 will be
|
||||
added to the list of B's dependencies.</p>
|
||||
<p>Note also that internal nodes are sometimes updated too.
|
||||
Consider this dependency graph:</p>
|
||||
<pre class="programlisting">
|
||||
a.o ---> a.cpp
|
||||
a.cpp-includes --> a.h (scanned)
|
||||
a.h-includes ------> a.h (generated)
|
||||
|
|
||||
|
|
||||
a.pro <-------------------------------------------+
|
||||
</pre>
|
||||
<p>Here, out handling of generated headers come into play. Say
|
||||
that a.h exists but is out of date with respect to "a.pro", then
|
||||
"a.h (generated)" and "a.h-includes" will be marking for
|
||||
updating, but "a.h (scanned)" won't be marked. We have to rescan
|
||||
"a.h" file after it's created, but since "a.h (generated)" has no
|
||||
scanner associated with it, it's only possible to rescan "a.h"
|
||||
after "a.h-includes" target was updated.</p>
|
||||
<p>Tbe above consideration lead to decision that we'll rescan a
|
||||
target whenever it's updated, no matter if this target is
|
||||
internal or not.</p>
|
||||
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Warning</h3>
|
||||
<p>
|
||||
The remainder of this document is not indended to be read at
|
||||
all. This will be rearranged in future.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="id1710022"></a>File targets</h5></div></div></div>
|
||||
<p>
|
||||
As described above, file targets corresponds
|
||||
to files that Boost.Build manages. User's may be concerned about
|
||||
file targets in three ways: when declaring file target types,
|
||||
when declaring transformations between types, and when
|
||||
determining where file target will be placed. File targets can
|
||||
also be connected with actions, that determine how the target is
|
||||
created. Both file targets and actions are implemented in the
|
||||
<code class="literal">virtual-target</code> module.
|
||||
</p>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="id1710041"></a>Types</h6></div></div></div>
|
||||
<p>A file target can be given a file, which determines
|
||||
what transformations can be applied to the file. The
|
||||
<code class="literal">type.register</code> rule declares new types. File type can
|
||||
also be assigned a scanner, which is used to find implicit
|
||||
dependencies. See "dependency scanning" [ link? ] below.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="id1710055"></a>Target paths</h5></div></div></div>
|
||||
<p>To distinguish targets build with different properties, they
|
||||
are put in different directories. Rules for determining target
|
||||
paths are given below:</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
All targets are placed under directory corresponding to the
|
||||
project where they are defined.
|
||||
</li>
|
||||
<li>
|
||||
Each non free, non incidental property cause an additional
|
||||
element to be added to the target path. That element has the
|
||||
form <code class="literal"><feature-name>-<feature-value></code> for
|
||||
ordinary features and <code class="literal"><feature-value></code> for
|
||||
implicit ones. [Note about composite features].
|
||||
</li>
|
||||
<li>
|
||||
If the set of free, non incidental properties is different
|
||||
from the set of free, non incidental properties for the project
|
||||
in which the main target that uses the target is defined, a
|
||||
part of the form <code class="literal">main_target-<name></code> is added to
|
||||
the target path. <span class="bold"><strong>Note:</strong></span>It would be nice to completely
|
||||
track free features also, but this appears to be complex and
|
||||
not extremely needed.
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>For example, we might have these paths:</p>
|
||||
<pre class="programlisting">
|
||||
debug/optimization-off
|
||||
debug/main-target-a
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="tools.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../arch.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../who_s_using_boost_.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,48 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>The tools layer</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../arch.html" title="Appendix B. Boost.Build v2 architecture">
|
||||
<link rel="prev" href="build.html" title="The build layer">
|
||||
<link rel="next" href="targets.html" title="Targets">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="build.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../arch.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="targets.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.arch.tools"></a>The tools layer</h2></div></div></div>
|
||||
<p>Write me!</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="build.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../arch.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="targets.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,139 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Chapter 25. Extender Manual</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../bbv2.html" title="Part III. Boost.Build v2 User Manual">
|
||||
<link rel="prev" href="advanced/differences_to_v1.html" title="Differences to Boost.Build V1">
|
||||
<link rel="next" href="extending/targets.html" title="Target types">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="advanced/differences_to_v1.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="extending/targets.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="chapter" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title">
|
||||
<a name="bbv2.extender"></a>Chapter 25. Extender Manual</h2></div></div></div>
|
||||
<div class="toc">
|
||||
<p><b>Table of Contents</b></p>
|
||||
<dl>
|
||||
<dt><span class="section"><a href="extender.html#bbv2.extender.intro">Introduction</a></span></dt>
|
||||
<dt><span class="section"><a href="extending/targets.html">Target types</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="extending/targets.html#bbv2.extending.scanners">Scanners</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="extending/tools.html">Tools and generators</a></span></dt>
|
||||
<dt><span class="section"><a href="extending/features.html">Features</a></span></dt>
|
||||
<dt><span class="section"><a href="extending/rules.html">Main target rules</a></span></dt>
|
||||
<dt><span class="section"><a href="extending/toolset_modules.html">Toolset modules</a></span></dt>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.extender.intro"></a>Introduction</h2></div></div></div>
|
||||
<p>This document explains how to extend Boost.Build to accomodate
|
||||
your local requirements. Let's start with a simple but
|
||||
realistic example.</p>
|
||||
<p>Say you're writing an application that generates C++ code. If
|
||||
you ever did this, you know that it's not nice. Embedding large
|
||||
portions of C++ code in string literals is very awkward. A much
|
||||
better solution is:</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
Write the template of the code to be generated, leaving
|
||||
placeholders at the points that will change
|
||||
</li>
|
||||
<li>
|
||||
Access the template in your application and replace
|
||||
placeholders with appropriate text.
|
||||
</li>
|
||||
<li>Write the result.</li>
|
||||
</ol></div>
|
||||
<p>It's quite easy to achieve. You write special verbatim files
|
||||
that are just C++, except that the very first line of the file
|
||||
contains the name of a variable that should be generated. A simple tool
|
||||
is created that takes a verbatim file and creates a cpp file with
|
||||
a single <code class="computeroutput">char*</code> variable whose name is taken from the first line
|
||||
of the verbatim file and whose value is the file's properly quoted content.</p>
|
||||
<p>Let's see what Boost.Build can do.</p>
|
||||
<p>First off, Boost.Build has no idea about "verbatim files". So,
|
||||
you must register a new target type. The following code does
|
||||
it:</p>
|
||||
<pre class="programlisting">
|
||||
import type ;
|
||||
type.register VERBATIM : vrb ;
|
||||
</pre>
|
||||
<p>The first parameter to
|
||||
<code class="computeroutput">type.register</code> gives the name of the
|
||||
declared type. By convention, it's uppercase. The second parameter
|
||||
is the suffix for files of this type. So, if Boost.Build sees
|
||||
<code class="filename">code.vrb</code> in a list of sources, it knows that it's of type
|
||||
<code class="computeroutput">VERBATIM</code>.</p>
|
||||
<p>Next, you tell Boost.Build that the verbatim files can be
|
||||
transformed into C++ files in one build step. A
|
||||
<em class="firstterm">generator</em> is a template for a build step that
|
||||
transforms targets of one type (or set of types) into another. Our
|
||||
generator will be called <code class="computeroutput">verbatim.inline-file</code>; it
|
||||
transforms <code class="computeroutput">VERBATIM</code> files into <code class="computeroutput">CPP</code> files:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
import generators ;
|
||||
generators.register-standard verbatim.inline-file : VERBATIM : CPP ;
|
||||
</pre>
|
||||
<p>Lastly, you have to inform Boost.Build about the shell
|
||||
commands used to make that transformation. That's done with an
|
||||
<code class="computeroutput">actions</code> declaration.
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
actions inline-file
|
||||
{
|
||||
"./inline-file.py" $(<) $(>)
|
||||
}
|
||||
</pre>
|
||||
<p>Now, we're ready to tie it all together. Put all the code
|
||||
above in file <code class="filename">verbatim.jam</code>, add <code class="computeroutput">import verbatim ;</code>
|
||||
to <code class="filename">project-root.jam</code>, and it's possible to write
|
||||
the following in Jamfile:</p>
|
||||
<pre class="programlisting">
|
||||
exe codegen : codegen.cpp class_template.verbatim usage.verbatim ;
|
||||
</pre>
|
||||
<p>
|
||||
The verbatim files will be automatically converted into C++
|
||||
and linked it.
|
||||
</p>
|
||||
<p>In the subsequent sections, we will extend this example, and review
|
||||
all the mechanisms in detail. The complete code is available in <a href="../../../tools/build/v2/example/customization" target="_top">example/customization</a>
|
||||
directory.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="advanced/differences_to_v1.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="extending/targets.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,262 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Features</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../extender.html" title="Chapter 25. Extender Manual">
|
||||
<link rel="prev" href="tools.html" title="Tools and generators">
|
||||
<link rel="next" href="rules.html" title="Main target rules">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="tools.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="rules.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.extending.features"></a>Features</h2></div></div></div>
|
||||
<p>
|
||||
Often, we need to control the options passed the invoked tools. This
|
||||
is done with features. Consider an example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
# Declare a new free feature
|
||||
import feature : feature ;
|
||||
feature verbatim-options : : free ;
|
||||
|
||||
# Cause the value of the 'verbatim-options' feature to be
|
||||
# available as 'OPTIONS' variable inside verbatim.inline-file
|
||||
import toolset : flags ;
|
||||
flags verbatim.inline-file OPTIONS <verbatim-options> ;
|
||||
|
||||
# Use the "OPTIONS" variable
|
||||
actions inline-file
|
||||
{
|
||||
"./inline-file.py" $(OPTIONS) $(<) $(>)
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
We first define a new feature. Then, the <code class="computeroutput">flags</code> invocation
|
||||
says that whenever verbatin.inline-file action is run, the value of
|
||||
the <code class="computeroutput">verbatim-options</code> feature will be added to the
|
||||
<code class="computeroutput">OPTIONS</code> variable, an can be used inside the action body.
|
||||
You'd need to consult online help (--help) to find all the features of
|
||||
the <code class="computeroutput">toolset.flags</code> rule.
|
||||
</p>
|
||||
<p>
|
||||
Although you can define any set of features and interpret their values
|
||||
in any way, Boost.Build suggests the following coding standard for
|
||||
designing features.
|
||||
</p>
|
||||
<p>Most features should have a fixed set of values that is portable
|
||||
(tool neutral) across the class of tools they are designed to work
|
||||
with. The user does not have to adjust the values for a exact tool. For
|
||||
example, <code class="computeroutput"><optimization>speed</code> has the same meaning for
|
||||
all C++ compilers and the user does not have to worry about the exact
|
||||
options passed to the compiler's command line.
|
||||
</p>
|
||||
<p>
|
||||
Besides such portable features there are special 'raw' features that
|
||||
allow the user to pass any value to the command line parameters for a
|
||||
particular tool, if so desired. For example, the
|
||||
<code class="computeroutput"><cxxflags></code> feature allows you to pass any command line
|
||||
options to a C++ compiler. The <code class="computeroutput"><include></code> feature
|
||||
allows you to pass any string preceded by <code class="computeroutput">-I</code> and the interpretation
|
||||
is tool-specific. (See <a href="../faq/external.html" title="Can I get output of external program as a variable in a Jamfile?
|
||||
">the section called “Can I get output of external program as a variable in a Jamfile?
|
||||
”</a> for an example of very smart usage of that
|
||||
feature). Of course one should always strive to use portable
|
||||
features, but these are still be provided as a backdoor just to make
|
||||
sure Boost.Build does not take away any control from the user.
|
||||
</p>
|
||||
<p>
|
||||
Using portable features is a good idea because:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>When a portable feature is given a fixed set of
|
||||
values, you can build your project with two different
|
||||
settings of the feature and Boost.Build will automatically
|
||||
use two different directories for generated files.
|
||||
Boost.Build does not try to separate targets built with
|
||||
different raw options.
|
||||
</p></li>
|
||||
<li><p>Unlike with “raw” features, you don't need to use
|
||||
specific command-line flags in your Jamfile, and it will be
|
||||
more likely to work with other tools.
|
||||
</p></li>
|
||||
</ul></div>
|
||||
<h3>
|
||||
<a name="id1706749"></a>Steps for adding a feauture</h3>
|
||||
<p>Adding a feature requires three steps:
|
||||
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<p>Declaring a feature. For that, the "feature.feature"
|
||||
rule is used. You have to decide on the set of <a href="../reference/definitions.html#bbv2.reference.features.attributes" title="Feature Attributes">feature
|
||||
attributes</a>:
|
||||
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>if a feature has several values and
|
||||
significally affects the build, make it “propagated,” so that the
|
||||
whole project is built with the same value by
|
||||
default</p></li>
|
||||
<li><p>if a feature does not have a fixed
|
||||
list of values, it must be “free.” For example, the
|
||||
<code class="computeroutput">include</code> feature is a free
|
||||
feature.</p></li>
|
||||
<li><p>if a feature is used to refer to a
|
||||
path relative to the Jamfile, it must be a “path”
|
||||
feature. <code class="computeroutput">include</code> is also a path
|
||||
feature.</p></li>
|
||||
<li><p>if feature is used to refer to some target, it
|
||||
must be a “dependency” feature. </p></li>
|
||||
</ul></div>
|
||||
</li>
|
||||
<li><p>Representing the feature value in a
|
||||
target-specific variable. Build actions are command
|
||||
templates modified by Boost.Jam variable expansions. The
|
||||
<code class="computeroutput">toolset.flags</code> rule sets a target-specific
|
||||
variable to the value of a feature.</p></li>
|
||||
<li><p>Using the variable. The variable set in step 2 can
|
||||
be used in a build action to form command parameters or
|
||||
files.</p></li>
|
||||
</ol></div>
|
||||
<h3>
|
||||
<a name="id1706828"></a>Another example</h3>
|
||||
<p>Here's another example.
|
||||
Let's see how we can make a feature that refers to a target. For example,
|
||||
when linking dynamic libraries on windows, one sometimes needs to specify
|
||||
"DEF file", telling what functions should be exported. It would be nice to
|
||||
use this file like this:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib a : a.cpp : <def-file>a.def ;
|
||||
</pre>
|
||||
<p>
|
||||
Actually, this feature is already supported, but anyway...
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<p>Since the feature refers to a target, it must be "dependency".
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
feature def-file : : free dependency ;
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>One of the toolsets that cares about
|
||||
|
||||
DEF files is msvc. The following line should be added to it.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
flags msvc.link DEF_FILE <def-file> ;
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>Since the DEF_FILE variable is not used by the
|
||||
msvc.link action,
|
||||
|
||||
we need to modify it to be:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
actions link bind DEF_FILE
|
||||
{
|
||||
$(.LD) .... /DEF:$(DEF_FILE) ....
|
||||
}
|
||||
</pre>
|
||||
<p> Note the <code class="computeroutput">bind DEF_FILE</code> part. It tells
|
||||
bjam to translate the internal target name in
|
||||
<code class="varname">DEF_FILE</code> to a corresponding filename in
|
||||
the <code class="computeroutput">link</code> action. Without it the expansion of
|
||||
<code class="computeroutput">$(DEF_FILE)</code> would be a strange symbol that is
|
||||
not likely to make sense for the linker.
|
||||
</p>
|
||||
<p>
|
||||
We've almost done, but should stop for a small workaround. Add the following
|
||||
code to msvc.jam
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
rule link
|
||||
{
|
||||
DEPENDS $(<) : [ on $(<) return $(DEF_FILE) ] ;
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
|
||||
This is needed to accomodate some bug in bjam, which hopefully
|
||||
will be fixed one day.
|
||||
</p>
|
||||
</li>
|
||||
</ol></div>
|
||||
<h3>
|
||||
<a name="id1706925"></a>Variants and composite features.</h3>
|
||||
<p>Sometimes you want to create a shorcut for some set of
|
||||
features. For example, <code class="computeroutput">release</code> is a value of
|
||||
<code class="computeroutput"><variant></code> and is a shortcut for a set of features.
|
||||
</p>
|
||||
<p>It is possible to define your own build variants. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
variant crazy : <optimization>speed <inlining>off
|
||||
<debug-symbols>on <profiling>on ;
|
||||
</pre>
|
||||
<p>
|
||||
will define a new variant with the specified set of properties. You
|
||||
can also extend an existing variant:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
variant super_release : release : <define>USE_ASM ;
|
||||
</pre>
|
||||
<p>
|
||||
In this case, <code class="computeroutput">super_release</code> will expand to all properties
|
||||
specified by <code class="computeroutput">release</code>, and the additional one you've specified.
|
||||
</p>
|
||||
<p>You are not restricted to using the <code class="computeroutput">variant</code> feature
|
||||
only.
|
||||
|
||||
Here's example that defines a brand new feature:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
feature parallelism : mpi fake none : composite link-incompatible ;
|
||||
feature.compose <parallelism>mpi : <library>/mpi//mpi/<parallelism>none ;
|
||||
feature.compose <parallelism>fake : <library>/mpi//fake/<parallelism>none ;
|
||||
</pre>
|
||||
<p>
|
||||
This will allow you to specify value of feature
|
||||
<code class="computeroutput">parallelism</code>, which will expand to link to the necessary
|
||||
library.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="tools.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="rules.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,109 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Main target rules</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../extender.html" title="Chapter 25. Extender Manual">
|
||||
<link rel="prev" href="features.html" title="Features">
|
||||
<link rel="next" href="toolset_modules.html" title="Toolset modules">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="features.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="toolset_modules.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.extending.rules"></a>Main target rules</h2></div></div></div>
|
||||
<p>
|
||||
A main target rule (e.g “<code class="computeroutput">exe</code>”
|
||||
Or “<code class="computeroutput">lib</code>”) creates a top-level target. It's quite likely that you'll want to declare your own and
|
||||
there are two ways to do that.
|
||||
</p>
|
||||
<p><a name="bbv2.extending.rules.main-type"></a>The first way applies when
|
||||
|
||||
your target rule should just produce a target of specific type. In that case, a
|
||||
rule is already defined for you! When you define a new type, Boost.Build
|
||||
automatically defines a corresponding rule. The name of the rule is
|
||||
obtained from the name of the type, by downcasing all letters and
|
||||
replacing underscores with dashes.
|
||||
|
||||
For example, if you create a module
|
||||
<code class="filename">obfuscate.jam</code> containing:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
import type ;
|
||||
type.register OBFUSCATED_CPP : ocpp ;
|
||||
|
||||
import generators ;
|
||||
generators.register-standard obfuscate.file : CPP : OBFUSCATED_CPP ;
|
||||
</pre>
|
||||
<p>
|
||||
and import that module, you'll be able to use the rule "obfuscated-cpp"
|
||||
in Jamfiles, which will convert source to the OBFUSCATED_CPP type.
|
||||
</p>
|
||||
<p>The second way is to write a wrapper rule that calls
|
||||
any of the existing rules. For example, suppose you have only one library per
|
||||
directory and want all cpp files in the directory to be compiled into that library. You
|
||||
can achieve this effect with:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib codegen : [ glob *.cpp ] ;
|
||||
</pre>
|
||||
<p>
|
||||
but if you want to make it even simpler, you could add the following
|
||||
definition to the <code class="filename">project-root.jam</code> file:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
rule glib ( name : extra-sources * : requirements * )
|
||||
{
|
||||
lib $(name) : [ glob *.cpp ] $(extra-sources) : $(requirements) ;
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
which would allow you to reduce the Jamfile to
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
glib codegen ;
|
||||
</pre>
|
||||
<p>
|
||||
Note that because you can associate a custom generator with a target
|
||||
type, the logic of building can be rather compiler.
|
||||
|
||||
For example, the
|
||||
<code class="computeroutput">boostbook</code> module declares a target type
|
||||
<code class="computeroutput">BOOSTBOOK_MAIN</code> and a custom generator for that
|
||||
type. You can use that as example if your main target rule is
|
||||
non-trivial.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="features.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="toolset_modules.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,148 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Target types</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../extender.html" title="Chapter 25. Extender Manual">
|
||||
<link rel="prev" href="../extender.html" title="Chapter 25. Extender Manual">
|
||||
<link rel="next" href="tools.html" title="Tools and generators">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../extender.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tools.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.extending.targets"></a>Target types</h2></div></div></div>
|
||||
<div class="toc"><dl><dt><span class="section"><a href="targets.html#bbv2.extending.scanners">Scanners</a></span></dt></dl></div>
|
||||
<p>The first thing we did in the <a href="../extender.html#bbv2.extender.intro" title="Introduction">intruduction</a> was declaring a
|
||||
new target type:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
import type ;
|
||||
type.register VERBATIM : verbatim ;
|
||||
</pre>
|
||||
<p>
|
||||
The type is the most important property of a target. Boost.Build can
|
||||
automatically generate necessary build actions only because you
|
||||
specify the desired type (using the different main target rules), and
|
||||
because Boost.Build can guess the type of sources from their
|
||||
extensions.
|
||||
</p>
|
||||
<p>The first two parameters for the <code class="computeroutput">type.register</code> rule
|
||||
are the name of new type and the list of extensions associated with
|
||||
it. A file with an extension from the list will have the given target
|
||||
type. In the case where a target of the declared type is generated
|
||||
from other sources, the first specified extension will be used.
|
||||
</p>
|
||||
<p>Sometimes you want to change the suffix used for generated targets
|
||||
depending on build properties, such as toolset. For example, some compiler
|
||||
uses extension <code class="literal">elf</code> for executable files. You can use the
|
||||
<code class="computeroutput">type.set-generated-target-suffix</code> rule:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
type.set-generated-target-suffix EXE : <toolset>elf : elf ;
|
||||
</pre>
|
||||
<p>A new target type can be inherited from an existing one.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
type.register PLUGIN : : SHARED_LIB ;
|
||||
</pre>
|
||||
<p>
|
||||
The above code defines a new type derived from
|
||||
<code class="computeroutput">SHARED_LIB</code>. Initially, the new type inherits all the
|
||||
properties of the base type - in particular generators and suffix.
|
||||
Typically, you'll change the new type in some way. For example, using
|
||||
<code class="computeroutput">type.set-generated-target-suffix</code> you can set the suffix for
|
||||
the new type. Or you can write special generator for the new type. For
|
||||
example, it can generate additional metainformation for plugin.
|
||||
In either way, the <code class="computeroutput">PLUGIN</code> type can be used whenever
|
||||
<code class="computeroutput">SHARED_LIB</code> can. For example, you can directly link plugins
|
||||
to an application.
|
||||
</p>
|
||||
<p>A type can be defined as "main", in which case Boost.Build will
|
||||
automatically declare a main target rule for building targets of that
|
||||
type. More details can be found <a href="rules.html#bbv2.extending.rules.main-type">later</a>.
|
||||
</p>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="bbv2.extending.scanners"></a>Scanners</h3></div></div></div>
|
||||
<p>
|
||||
Sometimes, a file can refer to other files via some include
|
||||
mechanism. To make Boost.Build track dependencies to the included
|
||||
files, you need to provide a scanner. The primary limitation is that
|
||||
only one scanner can be assigned to a target type.
|
||||
</p>
|
||||
<p>First, we need to declare a new class for the scanner:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
class verbatim-scanner : common-scanner
|
||||
{
|
||||
rule pattern ( )
|
||||
{
|
||||
return "//###include[ ]*\"([^\"]*)\"" ;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
All the complex logic is in the <code class="computeroutput">common-scanner</code>
|
||||
class, and you only need to override the method that returns
|
||||
the regular expression to be used for scanning. The
|
||||
paranthethis in the regular expression indicate which part
|
||||
of the string is the name of the included file. Only the
|
||||
first parenthesized group in the regular expression will be
|
||||
recognized; if you can't express everything you want that
|
||||
way, you can return multiple regular expressions, each of
|
||||
which contains a parenthesized group to be matched.
|
||||
</p>
|
||||
<p>After that, we need to register our scanner class:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
scanner.register verbatim-scanner : include ;
|
||||
</pre>
|
||||
<p>
|
||||
The value of the second parameter, in this case
|
||||
<code class="computeroutput">include</code>, specifies the properties that contain the list
|
||||
of paths that should be searched for the included files.
|
||||
</p>
|
||||
<p>Finally, we assign the new scaner to the <code class="computeroutput">VERBATIM</code>
|
||||
target type:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
type.set-scanner VERBATIM : verbatim-scanner ;
|
||||
</pre>
|
||||
<p>
|
||||
That's enough for scanning include dependencies.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../extender.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tools.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,247 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Tools and generators</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../extender.html" title="Chapter 25. Extender Manual">
|
||||
<link rel="prev" href="targets.html" title="Target types">
|
||||
<link rel="next" href="features.html" title="Features">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="targets.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="features.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.extending.tools"></a>Tools and generators</h2></div></div></div>
|
||||
<p>
|
||||
This section will describe how Boost.Build can be extended to support
|
||||
new tools.
|
||||
</p>
|
||||
<p>For each additional tool, a Boost.Build object called generator
|
||||
must be created. That object has specific types of targets that it
|
||||
accepts an produces. Using that information, Boost.Build is able
|
||||
to automatically invoke the generator. For example, if you declare a
|
||||
generator that takes a target of the type <code class="literal">D</code> and
|
||||
produces a target of the type <code class="literal">OBJ</code>, when placing a
|
||||
file with extention <code class="literal">.d</code> in a list of sources will
|
||||
cause Boost.Build to invoke your generator, and then to link the
|
||||
resulting object file into an application. (Of course, this requires
|
||||
that you specify that the <code class="literal">.d</code> extension corresponds
|
||||
to the <code class="literal">D</code> type.)
|
||||
</p>
|
||||
<p>Each generator should be an instance of a class derived from the
|
||||
<code class="computeroutput">generator</code> class. In the simplest case, you don't need to
|
||||
create a derived class, but simply create an instance of the
|
||||
<code class="computeroutput">generator</code> class. Let's review the example we've seen in the
|
||||
<a href="../extender.html#bbv2.extender.intro" title="Introduction">introduction</a>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
import generators ;
|
||||
generators.register-standard verbatim.inline-file : VERBATIM : CPP ;
|
||||
actions inline-file
|
||||
{
|
||||
"./inline-file.py" $(<) $(>)
|
||||
}
|
||||
</pre>
|
||||
<p>We declare a standard generator, specifying its id, the source type
|
||||
and the target type. When invoked, the generator will create a target
|
||||
of type <code class="literal">CPP</code> with a source target of
|
||||
type <code class="literal">VERBATIM</code> as the only source. But what command
|
||||
will be used to actually generate the file? In bjam, actions are
|
||||
specified using named "actions" blocks and the name of the action
|
||||
block should be specified when creating targets. By convention,
|
||||
generators use the same name of the action block as their own id. So,
|
||||
in above example, the "inline-file" actions block will be use to
|
||||
convert the source into the target.
|
||||
</p>
|
||||
<p>
|
||||
There are two primary kinds of generators: standard and composing,
|
||||
which are registered with the
|
||||
<code class="computeroutput">generators.register-standard</code> and the
|
||||
<code class="computeroutput">generators.register-composing</code> rules, respectively. For
|
||||
example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
generators.register-standard verbatim.inline-file : VERBATIM : CPP ;
|
||||
generators.register-composing mex.mex : CPP LIB : MEX ;
|
||||
</pre>
|
||||
<p>
|
||||
Standard generators take a <span class="emphasis"><em>single</em></span> source of type
|
||||
<code class="computeroutput">VERBATIM</code> and produces a result. The second generator
|
||||
takes any number of sources, which can have either the
|
||||
<code class="computeroutput">CPP</code> or the <code class="computeroutput">LIB</code> type. Composing generators
|
||||
are typically used for generating top-level target type. For example,
|
||||
the first generator invoked when building an <code class="computeroutput">exe</code> target
|
||||
is a composing generator corresponding to the proper linker.
|
||||
</p>
|
||||
<p>You should also know about two specific function for registering
|
||||
generators: <code class="computeroutput">generators.register-c-compiler</code> and
|
||||
<code class="computeroutput">generators.register-linker</code>. The first sets up header
|
||||
dependecy scanning for C files, and the seconds handles various
|
||||
complexities like searched libraries. For that reason, you should always
|
||||
use those functions when adding support for compilers and linkers.
|
||||
</p>
|
||||
<p>(Need a note about UNIX)</p>
|
||||
<h3>
|
||||
<a name="id1706493"></a>Custom generator classes</h3>
|
||||
<p>The standard generators allows you to specify source and target
|
||||
types, action, and a set of flags. If you need anything more complex,
|
||||
|
||||
you need to create a new generator class with your own logic. Then,
|
||||
you have to create an instance of that class and register it. Here's
|
||||
an example how you can create your own generator class:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
class custom-generator : generator
|
||||
{
|
||||
rule __init__ ( * : * )
|
||||
{
|
||||
generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
generators.register
|
||||
[ new custom-generator verbatim.inline-file : VERBATIM : CPP ] ;
|
||||
</pre>
|
||||
<p>
|
||||
This generator will work exactly like the
|
||||
<code class="computeroutput">verbatim.inline-file</code> generator we've defined above, but
|
||||
it's possible to customize the behaviour by overriding methods of the
|
||||
<code class="computeroutput">generator</code> class.
|
||||
</p>
|
||||
<p>There are two methods of interest. The <code class="computeroutput">run</code> method is
|
||||
responsible for the overall process - it takes a number of source targets,
|
||||
converts them the the right types, and creates the result. The
|
||||
<code class="computeroutput">generated-targets</code> method is called when all sources are
|
||||
converted to the right types to actually create the result.
|
||||
</p>
|
||||
<p>The <code class="computeroutput">generated-target</code>
|
||||
method can be overridden
|
||||
when you want to add additional properties to the generated
|
||||
targets or use additional sources. For a real-life example,
|
||||
suppose you have a program analysis tool that should be given a
|
||||
name of executable and the list of all sources. Naturally, you
|
||||
don't want to list all source files manually. Here's how the
|
||||
<code class="computeroutput">generated-target</code> method can find the list of
|
||||
sources automatically:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
class itrace-generator : generator {
|
||||
....
|
||||
rule generated-targets ( sources + : property-set : project name ? )
|
||||
{
|
||||
local leaves ;
|
||||
local temp = [ virtual-target.traverse $(sources[1]) : : include-sources ] ;
|
||||
for local t in $(temp)
|
||||
{
|
||||
if ! [ $(t).action ]
|
||||
{
|
||||
leaves += $(t) ;
|
||||
}
|
||||
}
|
||||
return [ generator.generated-targets $(sources) $(leafs)
|
||||
: $(property-set) : $(project) $(name) ] ;
|
||||
}
|
||||
}
|
||||
generators.register [ new itrace-generator nm.itrace : EXE : ITRACE ] ;
|
||||
</pre>
|
||||
<p>
|
||||
The <code class="computeroutput">generated-targets</code> method will be called with a single
|
||||
source target of type <code class="literal">EXE</code>. The call to
|
||||
<code class="computeroutput">virtual-target.traverse</code> will return all targets the
|
||||
executable depends on, and we further find files that are not
|
||||
produced from anything.
|
||||
The found targets are added to the sources.
|
||||
</p>
|
||||
<p>The <code class="computeroutput">run</code> method can be overriden to completely
|
||||
customize the way generator works. In particular, the conversion of
|
||||
sources to the desired types can be completely customized. Here's
|
||||
another real example. Tests for the Boost Python library usually
|
||||
consist of two parts: a Python program and a C++ file. The C++ file is
|
||||
compiled to Python extension that is loaded by the Python
|
||||
program. But in the likely case that both files have the same name,
|
||||
the created Python extension must be renamed. Otherwise, Python
|
||||
program will import itself, not the extension. Here's how it can be
|
||||
done:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
rule run ( project name ? : property-set : sources * : multiple ? )
|
||||
{
|
||||
local python ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ $(s).type ] = PY
|
||||
{
|
||||
python = $(s) ;
|
||||
}
|
||||
}
|
||||
|
||||
local libs ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ type.is-derived [ $(s).type ] LIB ]
|
||||
{
|
||||
libs += $(s) ;
|
||||
}
|
||||
}
|
||||
|
||||
local new-sources ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ type.is-derived [ $(s).type ] CPP ]
|
||||
{
|
||||
local name = [ $(s).name ] ; # get the target's basename
|
||||
if $(name) = [ $(python).name ]
|
||||
{
|
||||
name = $(name)_ext ; # rename the target
|
||||
}
|
||||
new-sources += [ generators.construct $(project) $(name) :
|
||||
PYTHON_EXTENSION : $(property-set) : $(s) $(libs) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
result = [ construct-result $(python) $(new-sources) : $(project) $(name)
|
||||
: $(property-set) ] ;
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
|
||||
First, we separate all source into python files, libraries and C++
|
||||
sources. For each C++ source we create a separate Python extension by
|
||||
calling <code class="computeroutput">generators.construct</code> and passing the C++ source
|
||||
and the libraries. At this point, we also change the extension's name,
|
||||
if necessary.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="targets.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="features.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,124 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Toolset modules</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../extender.html" title="Chapter 25. Extender Manual">
|
||||
<link rel="prev" href="rules.html" title="Main target rules">
|
||||
<link rel="next" href="../reference.html" title="Chapter 26. Detailed reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="rules.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.extending.toolset_modules"></a>Toolset modules</h2></div></div></div>
|
||||
<p>If your extensions will be used only on one project, they can be
|
||||
placed in a separate <code class="filename">.jam</code> file that will be
|
||||
imported by your <code class="filename">project-root.jam</code>. If the
|
||||
extensions will be used on many projects, users will thank you for
|
||||
a finishing touch.
|
||||
</p>
|
||||
<p>The <code class="computeroutput">using</code> rule provides a standard mechanism
|
||||
for loading and configuring extensions. To make it work, your module
|
||||
|
||||
should provide an <code class="computeroutput">init</code> rule. The rule will be called
|
||||
with the same parameters that were passed to the
|
||||
<code class="computeroutput">using</code> rule. The set of allowed parameters is
|
||||
determined by you. For example, you can allow the user to specify
|
||||
paths, tool versions, and other options.
|
||||
</p>
|
||||
<p>Here are some guidelines that help to make Boost.Build more
|
||||
consistent:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>The <code class="computeroutput">init</code> rule should never fail. Even if
|
||||
the user provided an incorrect path, you should emit a warning and go
|
||||
on. Configuration may be shared between different machines, and
|
||||
wrong values on one machine can be OK on another.
|
||||
</p></li>
|
||||
<li>
|
||||
<p>Prefer specifying the command to be executed
|
||||
to specifying the tool's installation path. First of all, this
|
||||
gives more control: it's possible to specify
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
/usr/bin/g++-snapshot
|
||||
time g++
|
||||
</pre>
|
||||
<p>
|
||||
as the command. Second, while some tools have a logical
|
||||
"installation root", it's better if user doesn't have to remember whether
|
||||
a specific tool requires a full command or a path.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Check for multiple initialization. A user can try to
|
||||
initialize the module several times. You need to check for this
|
||||
and decide what to do. Typically, unless you support several
|
||||
versions of a tool, duplicate initialization is a user error.
|
||||
|
||||
If the
|
||||
tool's version can be specified during initialization, make sure the
|
||||
version is either always specified, or never specified (in which
|
||||
case the tool is initialied only once). For example, if you allow:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using yfc ;
|
||||
using yfc : 3.3 ;
|
||||
using yfc : 3.4 ;
|
||||
</pre>
|
||||
<p>
|
||||
Then it's not clear if the first initialization corresponds to
|
||||
version 3.3 of the tool, version 3.4 of the tool, or some other
|
||||
version. This can lead to building twice with the same version.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If possible, <code class="computeroutput">init</code> must be callable
|
||||
with no parameters. In which case, it should try to autodetect all
|
||||
the necessary information, for example, by looking for a tool in
|
||||
<code class="envar">PATH</code> or in common installation locations. Often this
|
||||
is possible and allows the user to simply write:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
using yfc ;
|
||||
</pre>
|
||||
</li>
|
||||
<li><p>Consider using facilities in the
|
||||
<code class="computeroutput">tools/common</code> module. You can take a look at how
|
||||
<code class="computeroutput">tools/gcc.jam</code> uses that module in the <code class="computeroutput">init</code> rule.
|
||||
</p></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="rules.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../extender.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,149 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Chapter 27. Frequently Asked Questions</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../bbv2.html" title="Part III. Boost.Build v2 User Manual">
|
||||
<link rel="prev" href="reference/generators.html" title="Generators">
|
||||
<link rel="next" href="faq/envar.html" title="
|
||||
Accessing environment variables
|
||||
">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="reference/generators.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="faq/envar.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="chapter" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title">
|
||||
<a name="bbv2.faq"></a>Chapter 27. Frequently Asked Questions</h2></div></div></div>
|
||||
<div class="toc">
|
||||
<p><b>Table of Contents</b></p>
|
||||
<dl>
|
||||
<dt><span class="section"><a href="faq.html#id1708877">
|
||||
I'm getting "Duplicate name of actual target" error. What
|
||||
does it mean?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="faq/envar.html">
|
||||
Accessing environment variables
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="faq/s03.html">
|
||||
How to control properties order?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="faq/s04.html">
|
||||
How to control the library order on Unix?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="faq/external.html">Can I get output of external program as a variable in a Jamfile?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="faq/s06.html">How to get the project-root location?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="faq/s07.html">How to change compilation flags for one file?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="faq/dll-path.html">Why are the <code class="computeroutput">dll-path</code> and
|
||||
<code class="computeroutput">hardcode-dll-paths</code> properties useful?
|
||||
</a></span></dt>
|
||||
<dt><span class="section"><a href="recipies/site-config.html">Targets in site-config.jam</a></span></dt>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1708877"></a>
|
||||
I'm getting "Duplicate name of actual target" error. What
|
||||
does it mean?
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
The most likely case is that you're trying to
|
||||
compile the same file twice, with almost the same,
|
||||
but differing properties. For example:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe a : a.cpp : <include>/usr/local/include ;
|
||||
exe b : a.cpp ;
|
||||
</pre>
|
||||
<p>
|
||||
The above snippet requires two different compilations
|
||||
of 'a.cpp', which differ only in 'include' property.
|
||||
Since the 'include' property is free, Boost.Build
|
||||
can't generate two objects files into different directories.
|
||||
On the other hand, it's dangerous to compile the file only
|
||||
once -- maybe you really want to compile with different
|
||||
includes.
|
||||
</p>
|
||||
<p>
|
||||
To solve this issue, you need to decide if file should
|
||||
be compiled once or twice.</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<p>Two compile file only once, make sure that properties
|
||||
are the same:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe a : a.cpp : <include>/usr/local/include ;
|
||||
exe b : a.cpp : <include>/usr/local/include ;
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
If changing the properties is not desirable, for example
|
||||
if 'a' and 'b' target have other sources which need
|
||||
specific properties, separate 'a.cpp' into it's own target:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
obj a_obj : a.cpp : <include>/usr/local/include ;
|
||||
exe a : a_obj ;
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
To compile file twice, you can make the object file local
|
||||
to the main target:
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe a : [ obj a_obj : a.cpp ] : <include>/usr/local/include ;
|
||||
exe b : [ obj a_obj : a.cpp ] ;
|
||||
</pre>
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>
|
||||
A good question is why Boost.Build can't use some of the above
|
||||
approaches automatically. The problem is that such magic would
|
||||
require additional implementation complexities and would only
|
||||
help in half of the cases, while in other half we'd be silently
|
||||
doing the wrong thing. It's simpler and safe to ask user to
|
||||
clarify his intention in such cases.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="reference/generators.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="faq/envar.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,110 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Why are the dll-path and
|
||||
hardcode-dll-paths properties useful?
|
||||
</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../faq.html" title="Chapter 27. Frequently Asked Questions">
|
||||
<link rel="prev" href="s07.html" title="How to change compilation flags for one file?
|
||||
">
|
||||
<link rel="next" href="../recipies/site-config.html" title="Targets in site-config.jam">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="s07.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../recipies/site-config.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.faq.dll-path"></a>Why are the <code class="computeroutput">dll-path</code> and
|
||||
<code class="computeroutput">hardcode-dll-paths</code> properties useful?
|
||||
</h2></div></div></div>
|
||||
<p>(This entry is specific to Unix system.)Before answering the
|
||||
questions, let's recall a few points about shared libraries. Shared
|
||||
libraries can be used by several applications, or other libraries,
|
||||
without phisycally including the library in the application. This can
|
||||
greatly decrease the total size of applications. It's also possible to
|
||||
upgrade a shared library when the application is already
|
||||
installed. Finally, shared linking can be faster.
|
||||
</p>
|
||||
<p>However, the shared library must be found when the application is
|
||||
started. The dynamic linker will search in a system-defined list of
|
||||
paths, load the library and resolve the symbols. Which means that you
|
||||
should either change the system-defined list, given by the
|
||||
<code class="envar">LD_LIBRARY_PATH</code> environment variable, or install the
|
||||
libraries to a system location. This can be inconvenient when
|
||||
developing, since the libraries are not yet ready to be installed, and
|
||||
cluttering system paths is undesirable. Luckily, on Unix there's another
|
||||
way.
|
||||
</p>
|
||||
<p>An executable can include a list of additional library paths, which
|
||||
will be searched before system paths. This is excellent for development,
|
||||
because the build system knows the paths to all libraries and can include
|
||||
them in executables. That's done when the <code class="computeroutput">hardcode-dll-paths</code>
|
||||
feature has the <code class="literal">true</code> value, which is the
|
||||
default. When the executables should be installed, the story is
|
||||
different.
|
||||
</p>
|
||||
<p>
|
||||
Obviously, installed executable should not hardcode paths to your
|
||||
development tree. (The <code class="computeroutput">stage</code> rule explicitly disables the
|
||||
<code class="computeroutput">hardcode-dll-paths</code> feature for that reason.) However, you
|
||||
can use the <code class="computeroutput">dll-path</code> feature to add explicit paths
|
||||
manually. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
stage installed : application : <dll-path>/usr/lib/snake
|
||||
<location>/usr/bin ;
|
||||
</pre>
|
||||
<p>
|
||||
will allow the application to find libraries placed to
|
||||
<code class="filename">/usr/lib/snake</code>.
|
||||
</p>
|
||||
<p>If you install libraries to a nonstandard location and add an
|
||||
explicit path, you get more control over libraries which will be used. A
|
||||
library of the same name in a system location will not be inadvertently
|
||||
used. If you install libraries to a system location and do not add any
|
||||
paths, the system administrator will have more control. Each library can
|
||||
be individually upgraded, and all applications will use the new library.
|
||||
</p>
|
||||
<p>Which approach is best depends on your situation. If the libraries
|
||||
are relatively standalone and can be used by third party applications,
|
||||
they should be installed in the system location. If you have lots of
|
||||
libraries which can be used only by your application, it makes sense to
|
||||
install it to a nonstandard directory and add an explicit path, like the
|
||||
example above shows. Please also note that guidelines for different
|
||||
systems differ in this respect. The Debian guidelines prohibit any
|
||||
additional search paths, and Solaris guidelines suggest that they should
|
||||
always be used.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="s07.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../recipies/site-config.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,72 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Accessing environment variables
|
||||
</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../faq.html" title="Chapter 27. Frequently Asked Questions">
|
||||
<link rel="prev" href="../faq.html" title="Chapter 27. Frequently Asked Questions">
|
||||
<link rel="next" href="s03.html" title="
|
||||
How to control properties order?
|
||||
">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../faq.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s03.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.faq.envar"></a>
|
||||
Accessing environment variables
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
Many users would like to use environment variables in Jamfiles, for
|
||||
example, to control location of external libraries. In many cases you
|
||||
better declare those external libraries in the site-config.jam file, as
|
||||
documented in the <a href="../recipies/site-config.html" title="Targets in site-config.jam">recipes
|
||||
section</a>. However, if the users already have the environment variables set
|
||||
up, it's not convenient to ask them to set up site-config.jam files as
|
||||
well, and using environment variables might be reasonable.
|
||||
</p>
|
||||
<p>In Boost.Build V2, each Jamfile is a separate namespace, and the
|
||||
variables defined in environment is imported into the global
|
||||
namespace. Therefore, to access environment variable from Jamfile, you'd
|
||||
need the following code:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
import modules ;
|
||||
local SOME_LIBRARY_PATH = [ modules.peek : SOME_LIBRARY_PATH ] ;
|
||||
exe a : a.cpp : <include>$(SOME_LIBRARY_PATH) ;
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../faq.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s03.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,77 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Can I get output of external program as a variable in a Jamfile?
|
||||
</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../faq.html" title="Chapter 27. Frequently Asked Questions">
|
||||
<link rel="prev" href="s04.html" title="
|
||||
How to control the library order on Unix?
|
||||
">
|
||||
<link rel="next" href="s06.html" title="How to get the project-root location?
|
||||
">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="s04.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s06.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="bbv2.faq.external"></a>Can I get output of external program as a variable in a Jamfile?
|
||||
</h2></div></div></div>
|
||||
<p>From time to time users ask how to run an external program and save
|
||||
the result in Jamfile variable, something like:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
local gtk_includes = [ RUN_COMMAND gtk-config ] ;
|
||||
</pre>
|
||||
<p>
|
||||
Unfortunately, this is not possible at the moment. However, if the
|
||||
result of command invocation is to be used in a command to some tool,
|
||||
and you're working on Unix, the following workaround is possible.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
alias gtk+-2.0 : : : :
|
||||
<cflags>"`pkg-config --cflags gtk+-2.0`"
|
||||
<inkflags>"`pkg-config --libs gtk+-2.0`"
|
||||
;
|
||||
</pre>
|
||||
<p>
|
||||
If you use the "gtk+-2.0" target in sources, then the properties
|
||||
specified above will be added to the build properties and eventually
|
||||
will appear in the command line. Unix command line shell processes
|
||||
the backticks quoting by running the tool and using its output --
|
||||
which is what's desired in that case. Thanks to Daniel James for
|
||||
sharing this approach.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="s04.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s06.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,80 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
How to control properties order?
|
||||
</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../faq.html" title="Chapter 27. Frequently Asked Questions">
|
||||
<link rel="prev" href="envar.html" title="
|
||||
Accessing environment variables
|
||||
">
|
||||
<link rel="next" href="s04.html" title="
|
||||
How to control the library order on Unix?
|
||||
">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="envar.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s04.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1709000"></a>
|
||||
How to control properties order?
|
||||
</h2></div></div></div>
|
||||
<p>For internal reasons, Boost.Build sorts all the properties
|
||||
alphabetically. This means that if you write:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe a : a.cpp : <include>b <include>a ;
|
||||
</pre>
|
||||
<p>
|
||||
then the command line with first mention the "a" include directory, and
|
||||
then "b", even though they are specified in the opposite order. In most
|
||||
cases, the user doesn't care. But sometimes the order of includes, or
|
||||
other properties, is important. For example, if one uses both the C++
|
||||
Boost library and the "boost-sandbox" (libraries in development), then
|
||||
include path for boost-sandbox must come first, because some headers may
|
||||
override ones in C++ Boost. For such cases, a special syntax is
|
||||
provided:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
exe a : a.cpp : <include>a&&b ;
|
||||
</pre>
|
||||
<p>The <code class="computeroutput">&&</code> symbols separate values of an
|
||||
property, and specify that the order of the values should be preserved. You
|
||||
are advised to use this feature only when the order of properties really
|
||||
matters, and not as a convenient shortcut. Using it everywhere might
|
||||
negatively affect performance.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="envar.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s04.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,82 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
How to control the library order on Unix?
|
||||
</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../faq.html" title="Chapter 27. Frequently Asked Questions">
|
||||
<link rel="prev" href="s03.html" title="
|
||||
How to control properties order?
|
||||
">
|
||||
<link rel="next" href="external.html" title="Can I get output of external program as a variable in a Jamfile?
|
||||
">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="s03.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="external.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1709033"></a>
|
||||
How to control the library order on Unix?
|
||||
</h2></div></div></div>
|
||||
<p>On the Unix-like operating systems, the order in which static
|
||||
libraries are specified when invoking the linker is important, because by
|
||||
default, the linker uses one pass though the libraries list. Passing the
|
||||
libraries in the incorrect order will lead to a link error. Further, this
|
||||
behaviour is often used to make one library override symbols from
|
||||
another. So, sometimes it's necessary to force specific order of
|
||||
libraries.
|
||||
</p>
|
||||
<p>Boost.Build tries to automatically compute the right order. The
|
||||
primary rule is that if library a "uses" library b, then library a will
|
||||
appear on the command line before library b. Library a is considered to
|
||||
use b is b is present either in the sources of a or in its
|
||||
requirements. To explicitly specify the use relationship one can use the
|
||||
<use> feature. For example, both of the following lines will cause
|
||||
a to appear before b on the command line:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib a : a.cpp b ;
|
||||
lib a : a.cpp : <use>b ;
|
||||
</pre>
|
||||
<p>
|
||||
The same approach works for searched libraries, too:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
lib z ;
|
||||
lib png : : <use>z ;
|
||||
exe viewer : viewer png z ;
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="s03.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="external.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>How to get the project-root location?
|
||||
</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<style type="text/css">
|
||||
body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
/* The following properties make the watermark "fixed" on the page. */
|
||||
/* I think that's just a bit too distracting for the reader... */
|
||||
/* background-attachment: fixed; */
|
||||
/* background-position: center center; */
|
||||
}</style>
|
||||
<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
|
||||
<link rel="up" href="../faq.html" title="Chapter 27. Frequently Asked Questions">
|
||||
<link rel="prev" href="external.html" title="Can I get output of external program as a variable in a Jamfile?
|
||||
">
|
||||
<link rel="next" href="s07.html" title="How to change compilation flags for one file?
|
||||
">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="external.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s07.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1709107"></a>How to get the project-root location?
|
||||
</h2></div></div></div>
|
||||
<p>You might want to use the location of the project-root in your
|
||||
Jamfiles. To do it, you'd need to declare path constant in your
|
||||
project-root.jam:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
path-constant TOP : . ;
|
||||
</pre>
|
||||
<p>
|
||||
After that, the <code class="computeroutput">TOP</code> variable can be used in every Jamfile.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small></small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="external.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s07.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user