Compare commits

...
Author SHA1 Message Date
Andrey Semashev 160a76ce61 Boost.Log merged to trunk.
[SVN r83860]
2013-04-13 12:30:25 +00:00
Rene Rivera c04f679388 Cleanup release tags.
[SVN r44328]
2008-04-12 05:23:21 +00:00
Rene Rivera 11fea88a9b Cleanup release tags.
[SVN r44258]
2008-04-12 03:45:15 +00:00
nobody f630b96a82 This commit was manufactured by cvs2svn to create tag
'Version_1_33_1_beta'.

[SVN r31604]
2005-11-08 23:18:41 +00:00
Douglas Gregor 73fb5325fc Bronek deserves an acknowledgement for sure
[SVN r31603]
2005-11-08 23:18:40 +00:00
Michael Stevens e3ced501bb FIX completed ignore_unused_variable thanks to Georg Baum
[SVN r31601]
2005-11-08 18:26:34 +00:00
Douglas Gregor f54c8ebb91 Add any docs, 1.33.1 beta release date
[SVN r31600]
2005-11-08 15:39:26 +00:00
Douglas Gregor 872806f4cc Mark VC8 failures as known
[SVN r31599]
2005-11-08 15:27:38 +00:00
John Maddock c730f973f0 Update to reflect recent changes.
[SVN r31597]
2005-11-08 11:36:52 +00:00
Rene Rivera 034b5f38f3 Fix incorrect version on install include directory. It was missing the patch version number when present.
[SVN r31596]
2005-11-08 04:39:45 +00:00
Douglas Gregor 4b2d1b749d Update documentation for 1.33.1
[SVN r31595]
2005-11-08 02:24:05 +00:00
Jonathan Turkanis 568337313a rephrased last addition
[SVN r31594]
2005-11-07 20:59:00 +00:00
Jonathan Turkanis 1583407413 added mention of standard streams as devices
[SVN r31593]
2005-11-07 20:54:38 +00:00
Jonathan Turkanis 9f0bffd0a9 added mention of standard streams
[SVN r31592]
2005-11-07 20:53:45 +00:00
Jonathan Turkanis d7031b59f4 Added copy-constructible requirement
[SVN r31591]
2005-11-07 20:27:48 +00:00
Jonathan Turkanis 3cdc206cc0 fixed garbled prose
[SVN r31590]
2005-11-07 20:27:19 +00:00
Michael Stevens 07f411d83d FIX remove bogus returns from element_erase
[SVN r31581]
2005-11-06 18:17:17 +00:00
Michael Stevens f650fe7f42 ADD ignore_unused_variable thanks to Angus Lemming
[SVN r31580]
2005-11-06 16:40:17 +00:00
Douglas Gregor 745e8e1cb8 Fix dump typo
[SVN r31574]
2005-11-05 17:50:51 +00:00
Douglas Gregor f95771a9f0 Note the introduction of the configure script
[SVN r31573]
2005-11-05 17:48:51 +00:00
Douglas Gregor 9615bdf3ac Add documentation for VC8
[SVN r31572]
2005-11-05 17:45:43 +00:00
Douglas Gregor 648805499e Make VC8 a required platform
[SVN r31570]
2005-11-05 17:27:31 +00:00
Douglas Gregor a726395343 Setup for Boost 1.33.1 beta release
[SVN r31569]
2005-11-05 17:18:51 +00:00
Douglas Gregor 83bc5c1b81 Some fixes and suggestions from Troy Straszheim
[SVN r31568]
2005-11-05 16:30:41 +00:00
Douglas Gregor 423012d210 Suggest unified diff format
[SVN r31567]
2005-11-05 16:13:37 +00:00
Dave Abrahams f2e1fe1f86 merged from trunk
[SVN r31558]
2005-11-04 21:39:06 +00:00
Douglas Gregor a14e81c37e Fixed seiialization
[SVN r31555]
2005-11-04 15:21:36 +00:00
John Maddock 2ef9351447 Fix regexes used and scanning used to search CVS/Entries.Log files as well as CVS/Entries files (the latter don't always get immediately updated).
[SVN r31546]
2005-11-03 12:11:51 +00:00
John Maddock 6c9712f8bd Fix configure script: some tabs had been erroneously stripped, and the regexes were incorrectly quoted for M4.
[SVN r31545]
2005-11-03 11:23:34 +00:00
John Maddock b0c72cd3ea Fix regex so that --unix-lines option actual works!
[SVN r31544]
2005-11-03 11:23:10 +00:00
Alexander Nasonov 9fb9c5dc35 http://lists.boost.org/Archives/boost/2005/09/93982.php
http://lists.boost.org/Archives/boost/2005/09/93984.php


[SVN r31543]
2005-11-03 06:08:29 +00:00
Douglas Gregor 4f1476a4ed Fix broken link
[SVN r31540]
2005-11-03 03:50:13 +00:00
Michael Stevens 8ce7d5eb53 FIX coordinate_vector pop_back type, should be filled_
Thanks to Markus Schöpflin


[SVN r31537]
2005-11-02 20:42:40 +00:00
Douglas Gregor b1a8fda81d Fixes for VC++ 8.0
[SVN r31536]
2005-11-02 19:48:40 +00:00
John Maddock 555dabd6b9 Fix performance when using bidirectional iterators: don't use std::distance!
[SVN r31531]
2005-11-01 17:36:42 +00:00
Dave Abrahams c8b52b5451 merged from trunk
[SVN r31529]
2005-11-01 15:09:28 +00:00
Jeff Garland b4a63d4016 Fix one last unqualified tm struct --> make std::tm
[SVN r31521]
2005-11-01 04:27:29 +00:00
Thorsten Jørgen Ottosen 7c83dd15d7 *** empty log message ***
[SVN r31520]
2005-10-31 23:11:00 +00:00
Thorsten Jørgen Ottosen 967e530ab8 *** empty log message ***
[SVN r31519]
2005-10-31 22:12:39 +00:00
Dave Abrahams 10461b74e6 merged from trunk
[SVN r31516]
2005-10-31 19:25:36 +00:00
John Maddock e4ae66c138 Re-enable broken compiler workarounds (they cause regressions if not present).
[SVN r31512]
2005-10-31 13:29:56 +00:00
John Maddock c3677522d1 Additional tests for trailing '-' in range expressions.
[SVN r31511]
2005-10-31 11:09:54 +00:00
John Maddock dddf598dc3 Fix for trailing '-' in range expressions.
[SVN r31510]
2005-10-31 11:09:13 +00:00
Stefan Slapeta 8ad3c373ed Updated boost.date_time for Intel 8.1
[SVN r31504]
2005-10-30 18:15:52 +00:00
Stefan Slapeta 7aeef719d5 Updated boost.serialization for Intel 8.1
[SVN r31503]
2005-10-30 17:53:30 +00:00
Dave Abrahams 3cf92f6ecc manually fix since my tobranch script didn't work.
[SVN r31502]
2005-10-29 17:46:07 +00:00
Jeff Garland e587033fec merge changes for QNX port to branch -- basically a half dozen changes to ensure that 'tm' and 'time_t' are qualified with std::
[SVN r31500]
2005-10-28 13:32:38 +00:00
Rene Rivera 4334568828 Fix save-load dependency problems when building with more than one toolset.
[SVN r31498]
2005-10-27 15:31:25 +00:00
Douglas Gregor daa7acbc26 Reverse topological order
[SVN r31497]
2005-10-27 14:31:49 +00:00
Dave Abrahams 0b068149d5 merged from trunk
[SVN r31495]
2005-10-27 12:22:23 +00:00
Robert Ramey ac72d4d343 small modification to accomodate QNX
[SVN r31489]
2005-10-27 07:25:44 +00:00
Victor A. Wagner Jr. a171142b31 Changed - the table of legal characters for an XML tag
- the problem was found by Benjamin Higgins, bhiggins@gmail.com and
          was an obvious typo.


[SVN r31488]
2005-10-27 06:40:01 +00:00
Stefan Slapeta d249f7b494 removed markup in io for intel 9
[SVN r31487]
2005-10-27 05:37:38 +00:00
Beman Dawes c85f1bc5dd Fix QNX bug (Jim Douglas)
[SVN r31486]
2005-10-26 22:26:33 +00:00
Douglas Gregor a2d65f26b0 minimim_degree_ordering Python bindings
[SVN r31484]
2005-10-26 21:45:04 +00:00
Douglas Gregor 37391f9245 autoconf-like configure script support
[SVN r31483]
2005-10-26 21:41:14 +00:00
Dave Abrahams 62e4f5b368 merged from trunk
[SVN r31480]
2005-10-26 12:07:52 +00:00
Jonathan Turkanis 04303fe922 fixed error string in cleanup_and_throw()
[SVN r31476]
2005-10-26 05:27:32 +00:00
Rene Rivera 46270a6be8 Also search for the Python DLL in the install location to catch when Python is not installed globally (non-admin install). [merge from head]
[SVN r31475]
2005-10-26 03:30:41 +00:00
Rene Rivera 65b51ecbb3 Adjust docs for "--with-python-root=*" to indicate new default locations.
Add "--with-python-version=*" option.


[SVN r31472]
2005-10-25 22:20:03 +00:00
Dave Abrahams b67f339058 merged from trunk
[SVN r31471]
2005-10-25 21:38:14 +00:00
Douglas Gregor 350476c3cd Do not crash when n == 0
[SVN r31468]
2005-10-25 19:56:20 +00:00
Dave Abrahams 4e70e240f5 merged from trunk
[SVN r31467]
2005-10-25 19:10:23 +00:00
Robert Ramey dda0ccbb86 remove force:include from como linker arguments
[SVN r31465]
2005-10-25 18:21:52 +00:00
Douglas Gregor 98e15c7e6e Add BOOST_DEDUCED_TYPENAME for Metrowerks CodeWarrior
[SVN r31461]
2005-10-25 13:49:23 +00:00
Dave Abrahams 0e3d2f203e merged from trunk
[SVN r31452]
2005-10-24 17:41:48 +00:00
Douglas Gregor 222f21466d Tru64 CXX 7.1 is now a release platform
[SVN r31446]
2005-10-24 15:59:35 +00:00
Douglas Gregor c8d1c650f5 Fixes for shared_ptr serialization on Borland compilers, from John Maddock
[SVN r31445]
2005-10-24 15:31:26 +00:00
Douglas Gregor 3fc0a43a3e Fix dependency problems with tests, from Troy D. Straszheim
[SVN r31444]
2005-10-24 15:14:47 +00:00
Douglas Gregor d971f4e483 Remove Python tags for Jeremy
[SVN r31443]
2005-10-24 15:07:04 +00:00
Jeff Garland cfc4bf15e0 Add tests for fix to negative duration problem that caused incorrect calculation results
[SVN r31441]
2005-10-24 01:33:50 +00:00
Jeff Garland 9e15c94b72 Fix problem where negative durations would create incorrect calculation results.
[SVN r31440]
2005-10-24 01:32:08 +00:00
Rene Rivera 28c4a3b0e4 Reflect new default PYTHON_ROOT value for Windows.
[SVN r31439]
2005-10-23 23:01:47 +00:00
Robert Ramey fbb9e1e463 addition to accomodate browsers with javascript turned off
[SVN r31438]
2005-10-23 21:35:09 +00:00
Robert Ramey e6e2b871f5 replace _ with -
[SVN r31434]
2005-10-23 16:51:41 +00:00
Robert Ramey f2659ccad4 document compiler warning messages
[SVN r31433]
2005-10-23 16:35:01 +00:00
Robert Ramey b6d4d72745 suppress irrelevant warnings
[SVN r31432]
2005-10-23 16:33:43 +00:00
Michael Stevens 0589d038c1 FIX coordinate_matrix pop_back type, should be filled_
Thanks to Markus Schöpflin


[SVN r31406]
2005-10-20 09:13:17 +00:00
Dave Abrahams 09dbb63170 merged from trunk
[SVN r31401]
2005-10-19 22:34:04 +00:00
Dave Abrahams bbf9872f8c merged from trunk
[SVN r31399]
2005-10-19 22:03:37 +00:00
Dave Abrahams d95b506e75 merged from trunk
[SVN r31397]
2005-10-19 18:28:28 +00:00
Dave Abrahams ce1407ab53 Add the ability to easily use new-style polymorphism wrappers with
smart pointer held_type.


[SVN r31395]
2005-10-19 18:22:53 +00:00
Dave Abrahams abd8131263 merged from trunk
[SVN r31394]
2005-10-19 18:19:23 +00:00
nobody 06e46b961b This commit was manufactured by cvs2svn to create branch 'RC_1_33_0'.
[SVN r31393]
2005-10-19 18:17:14 +00:00
Dave Abrahams e51d37d1dc merged from trunk
[SVN r31386]
2005-10-19 13:18:01 +00:00
Joel de Guzman 37a127681e some updates
[SVN r31382]
2005-10-18 23:28:05 +00:00
Joaquín M. López Muñoz 7a4b43fbbb added GCC 4.0.2
[SVN r31360]
2005-10-17 12:55:31 +00:00
Rene Rivera 3aa07187b7 Merge from HEAD:
* Fix QNX/qcc detection so it doesn't error on other OSs that happen to have a qcc command.


[SVN r31359]
2005-10-17 02:43:44 +00:00
John Maddock e7d94b91aa Updated tests to reflect recent fixes.
Fixed a problem where some invalid expressions would either be accepted, or worse crash.
Changed error code for unsupported lookbehind assertions.


[SVN r31350]
2005-10-16 18:12:59 +00:00
Douglas Gregor b80a4aab11 Fix broken uses of NULL
[SVN r31349]
2005-10-16 17:04:58 +00:00
Douglas Gregor e8763051b2 Remove the broken read_write_mutex
[SVN r31344]
2005-10-16 14:37:34 +00:00
Douglas Gregor d5a1b07664 Note the fixes to Signals
[SVN r31343]
2005-10-16 14:14:58 +00:00
Douglas Gregor 0dfe9456df Attempted to fix SourceForge bug #1262038 boost:signals SIGSEV
[SVN r31342]
2005-10-16 14:06:07 +00:00
Robert Ramey 513940789f correct error which shows up in test_no_rtti
[SVN r31340]
2005-10-15 20:14:31 +00:00
Robert Ramey c1dbcd7820 workaround ICE on old plaforms
[SVN r31337]
2005-10-15 14:20:11 +00:00
Dave Abrahams 3cc9f4fd84 Updated Python news
[SVN r31331]
2005-10-14 21:14:48 +00:00
Dave Abrahams dfe565db93 merged from trunk
[SVN r31330]
2005-10-14 19:30:27 +00:00
Dave Abrahams 68c01d4f50 merged from trunk
[SVN r31326]
2005-10-14 16:44:24 +00:00
Rene Rivera d9c8eea62c Avoid duplicate specialization of hash<void*> when using STLport5. All graph, and python which uses graph, tests pass on MinGW+STLPort5 now.
[SVN r31324]
2005-10-14 15:57:10 +00:00
Dave Abrahams 14e06ca592 merged from trunk
[SVN r31323]
2005-10-14 15:54:40 +00:00
Dave Abrahams e4155b62fd merged from trunk
[SVN r31320]
2005-10-14 15:05:40 +00:00
Hartmut Kaiser 6c8918a38c Fixed swprintf issue on Mingw.
[SVN r31318]
2005-10-14 14:46:38 +00:00
Markus Schöpflin 72fa99ebaa Mark-up for variant test failures in the serialization library on Tru64/CXX,
and for signal test failures on Tru64/CXX and Comeau.


[SVN r31315]
2005-10-14 11:45:13 +00:00
Rene Rivera 55926afed8 Add markup for graph/graphviz_test/cw-9_4.
[SVN r31314]
2005-10-13 23:16:29 +00:00
Robert Ramey 9aa4aa5bdb include commented out includes to fix bjam dependencies
[SVN r31304]
2005-10-12 16:47:52 +00:00
John Maddock 4a2d19543a Fix bug that allows some partial matches to go undetected.
[SVN r31302]
2005-10-12 14:33:21 +00:00
Markus Schöpflin fc7fd47738 Added mark-up for python on Tru64/CXX.
[SVN r31300]
2005-10-12 10:35:25 +00:00
Dave Abrahams 10bde7285a merged from trunk
[SVN r31296]
2005-10-11 23:49:24 +00:00
Dave Abrahams 7d0a6a252c merged from trunk
[SVN r31294]
2005-10-11 22:03:32 +00:00
Dave Abrahams 7c6bb3dc06 Fixes for the RC branch
[SVN r31292]
2005-10-11 21:52:38 +00:00
Dave Abrahams 162ea31a75 merged from trunk
[SVN r31291]
2005-10-11 21:24:00 +00:00
Robert Ramey 4df2225cc0 add mention that derived pointers must be polymorphic
[SVN r31287]
2005-10-11 15:12:58 +00:00
Robert Ramey 8fb2ca6829 back out reset_object_address template
[SVN r31286]
2005-10-11 15:10:23 +00:00
Dave Abrahams f403286c6d merged from trunk
[SVN r31285]
2005-10-11 14:41:42 +00:00
John Maddock 808a2a70ac Ensure code is -W4 clean on VC++.
Remove unneeded parameters from one function.
Change casts so they actually work correctly on Win64 platforms.


[SVN r31284]
2005-10-11 14:27:56 +00:00
Dave Abrahams 22c177d533 merged from trunk
[SVN r31282]
2005-10-11 13:33:06 +00:00
Dave Abrahams a7d4dc7e3d merged from trunk
[SVN r31280]
2005-10-11 13:19:43 +00:00
Markus Schöpflin e4524fe983 There is no python dl library on Tru64.
[SVN r31278]
2005-10-11 13:09:08 +00:00
Markus Schöpflin 7d2a298a70 Improved markup for date_time lib on Tru64/CXX.
[SVN r31276]
2005-10-11 08:53:47 +00:00
Caleb Epstein 164c692b02 Removed markup for the *_lib thread tests on gcc + sunos; these tests now pass
[SVN r31267]
2005-10-10 20:41:06 +00:00
John Maddock dc461d5dca Make build requirements a requirement, not a request.
[SVN r31264]
2005-10-10 16:34:37 +00:00
John Maddock 6108e699e1 Quote pathnames for ICU and STLport.
[SVN r31262]
2005-10-10 16:29:30 +00:00
Robert Ramey 7abc55048b correct very first illustration
[SVN r31260]
2005-10-10 03:26:49 +00:00
Robert Ramey de60e05771 remove unnecessary serialization_map declaration
[SVN r31259]
2005-10-10 03:23:49 +00:00
Robert Ramey 1b5ea651b5 reformat
[SVN r31258]
2005-10-10 03:22:44 +00:00
Robert Ramey 3412ca26eb remove const from reset_object_address declaration
[SVN r31257]
2005-10-10 03:20:28 +00:00
Jonathan Turkanis 8f2a504639 reverted recent changes
[SVN r31255]
2005-10-10 00:18:38 +00:00
Rene Rivera 031b9dab11 Support more versions of Intel Linux compiler. Thanks to Martin Wille.
[SVN r31253]
2005-10-09 21:26:30 +00:00
Rene Rivera 96ff220650 filesystem/operations_test_dll and filesystem/path_test_dll fails on all mingw-3.4 versions.
[SVN r31251]
2005-10-09 20:24:42 +00:00
Jonathan Turkanis 987e3f8dc8 second try at gcc 4.0.2
[SVN r31249]
2005-10-09 17:38:37 +00:00
Jonathan Turkanis 54fc6dd9bf first try at fixing is_incrementable for gcc 4.0.2
[SVN r31243]
2005-10-09 03:11:46 +00:00
Jonathan Turkanis 66cfc7bcdb removed use of is_dereferenceable
[SVN r31242]
2005-10-08 22:25:21 +00:00
Hartmut Kaiser d160053b75 Updated Wave expected failures list.
[SVN r31241]
2005-10-08 17:08:35 +00:00
Hartmut Kaiser 69b48587e3 Fixed warnings reported by gcc 4.x.
[SVN r31239]
2005-10-08 13:27:39 +00:00
Hartmut Kaiser efea683e37 Updated Wave expected failures list.
[SVN r31238]
2005-10-08 13:15:25 +00:00
Hartmut Kaiser f0e295d8c5 Fixed a missing const specifier.
[SVN r31237]
2005-10-08 12:54:28 +00:00
Hartmut Kaiser 8d14c80042 Added missing headers.
[SVN r31232]
2005-10-08 03:29:36 +00:00
Hartmut Kaiser 902795c290 Fixed an iterator issue reported by the gcc debug stl.
[SVN r31229]
2005-10-07 22:52:14 +00:00
Jonathan Turkanis 0c38532bb1 fix for read-only files
[SVN r31224]
2005-10-07 17:12:33 +00:00
Jonathan Turkanis c11738079a restored 'bzlib.h' comment
[SVN r31223]
2005-10-07 17:11:53 +00:00
Jonathan Turkanis 04ea396f30 reformatting
[SVN r31222]
2005-10-07 17:09:07 +00:00
Jonathan Turkanis 3a546331e3 omitted error check on reset/end
[SVN r31221]
2005-10-07 16:31:04 +00:00
John Maddock 91a5730df5 Added two new open source libraries.
[SVN r31220]
2005-10-07 15:56:16 +00:00
Jonathan Turkanis 0333c78d9a fixed previous fix
[SVN r31215]
2005-10-06 23:52:42 +00:00
Jonathan Turkanis fd32ca730b yet another attempted gcc-4.0.2 fix
[SVN r31209]
2005-10-06 17:28:34 +00:00
Rene Rivera 59d9e8ab23 Fix compile failures on CodeWarrior, where free and malloc are correctly not in the global namespace.
[SVN r31201]
2005-10-05 18:57:33 +00:00
Rene Rivera fbb37655f1 Remove CodeWarrior expected failure for graphviz test. As it should work.
[SVN r31200]
2005-10-05 18:40:11 +00:00
Jonathan Turkanis 3acf7417da attempted gcc 4.0.2 fix
[SVN r31188]
2005-10-03 23:52:34 +00:00
Hartmut Kaiser b0ef7042ce Fixed error handling for passive #if/#elif branches.
[SVN r31185]
2005-10-03 15:21:26 +00:00
Joel de Guzman 2c10cb964e fixed relative file include
[SVN r31176]
2005-10-03 00:02:25 +00:00
Robert Ramey ad999d450b update for 1.33.1
[SVN r31171]
2005-10-02 06:25:42 +00:00
Robert Ramey 836b2e295b fix xml test
[SVN r31170]
2005-10-02 06:04:17 +00:00
Robert Ramey d7b0da552e reset_object_address is now a template
[SVN r31169]
2005-10-02 06:02:06 +00:00
Robert Ramey 5cd6a78368 make sure no destructors call any virtual functions
[SVN r31168]
2005-10-02 06:01:14 +00:00
Robert Ramey e65ba4c3bc make sure destruct doesnt call any virtual functions
[SVN r31167]
2005-10-02 05:59:38 +00:00
Robert Ramey 6806f0472f reset object address now a template
[SVN r31166]
2005-10-02 05:58:37 +00:00
Robert Ramey 3e98da0afa fix tab
[SVN r31165]
2005-10-02 05:57:24 +00:00
Robert Ramey 0799a44790 minor code refactor
[SVN r31164]
2005-10-02 05:52:42 +00:00
Robert Ramey 14cfbcb543 change reset_object_address to use template
[SVN r31163]
2005-10-02 05:51:40 +00:00
Robert Ramey cbc42b54cd fix errorneous call into virtual function from destructor
[SVN r31162]
2005-10-02 05:50:13 +00:00
Daniel James 6064a74815 Fix the link to the book example in the hash source documentation.
[SVN r31153]
2005-09-30 07:40:08 +00:00
Daniel James a69e51b0a0 Fix the link to the books example in the generated hash documentation.
[SVN r31152]
2005-09-30 07:37:23 +00:00
Hartmut Kaiser 626441241b Added a missing inline keyword.
[SVN r31150]
2005-09-30 01:33:08 +00:00
Rene Rivera 685adc3c77 Basic toolset for QNX Neutrino 6.3.0 version of GCC.
[SVN r31148]
2005-09-29 15:51:41 +00:00
Michael Stevens d747bac9db FIX typos in subslice
[SVN r31142]
2005-09-28 14:39:57 +00:00
Douglas Gregor fef2ad9446 New home page. Yay
[SVN r31118]
2005-09-26 03:04:24 +00:00
Jonathan Turkanis 322569c5d2 uncommented reset() to fix memory leak
[SVN r31103]
2005-09-24 19:21:59 +00:00
Douglas Gregor 9d8e5cc60d GCC 3.2.x do not disambiguate properly
[SVN r31099]
2005-09-23 18:05:27 +00:00
Hartmut Kaiser 642a479713 Updated Spirit changelog.
[SVN r31096]
2005-09-23 16:24:50 +00:00
John Maddock 720975adc0 Remove <runtime-link>static requirement: it's not universally supported.
[SVN r31095]
2005-09-23 15:09:33 +00:00
Hartmut Kaiser 087ce47fa4 Fixed a regex issue.
[SVN r31094]
2005-09-23 14:37:07 +00:00
Douglas Gregor 282eeb915b Markup stl_concept_covering failures
[SVN r31092]
2005-09-23 12:11:04 +00:00
Douglas Gregor 063dd3748d Added alternative Qt hack from Frank Hess
[SVN r31091]
2005-09-23 11:45:10 +00:00
Michael Stevens 65d9400bdd FIX poor performance due to expression eval in BOOST_UBLAS_CHECK
This will create some unused variable warnings


[SVN r31089]
2005-09-23 09:32:08 +00:00
Robert Ramey 4517a85558 improved archive concept
[SVN r31086]
2005-09-23 06:13:57 +00:00
Hartmut Kaiser 62020320a8 removed the static linking directive.
[SVN r31084]
2005-09-23 01:43:01 +00:00
Hartmut Kaiser 68772ae315 Removed duplicate includes.
[SVN r31083]
2005-09-22 23:52:31 +00:00
Douglas Gregor 70d87fd4f2 GCC 2.95.3 will not handle enable_if
[SVN r31080]
2005-09-22 16:08:06 +00:00
Douglas Gregor 2a80922c8a Try to make enable_if tests appear
[SVN r31065]
2005-09-20 23:33:28 +00:00
Robert Ramey 6226cae078 correct tests to help passing
[SVN r31057]
2005-09-20 16:17:32 +00:00
John Maddock 262c21beb4 Enabled negated character classes inside character sets.
[SVN r31053]
2005-09-20 12:01:25 +00:00
Robert Ramey 912f3fa48d BOOST_NO_EXCEPTION fixup
[SVN r31041]
2005-09-19 17:18:34 +00:00
Markus Schöpflin 2f32d34f25 Workaround for Tru64/CXX std::numeric_limits::denorm_min() bug.
[SVN r31037]
2005-09-19 09:06:28 +00:00
Robert Ramey 1aa6e2ad19 add info about map
[SVN r31031]
2005-09-19 03:16:56 +00:00
Robert Ramey 5b182f583d change to accomodate map serialization
[SVN r31030]
2005-09-19 03:14:59 +00:00
Robert Ramey 7a4c96e66f correct for BOOST_NO_EXCEPTION
[SVN r31026]
2005-09-19 01:52:02 +00:00
Douglas Gregor 2c1559e4a6 Remove typeof and foreach. They aren't part of Boost 1.33.0
[SVN r31023]
2005-09-18 15:21:16 +00:00
Robert Ramey 5ceead71f5 amend and reformat archive concepts
[SVN r31013]
2005-09-16 20:06:57 +00:00
John Maddock 0450805974 Applied Beman Dawes patches to tidy up examples.
[SVN r31009]
2005-09-16 12:39:42 +00:00
John Maddock 991b6d7633 Have to exclude STLport from some explicit instantiations.
[SVN r31008]
2005-09-16 12:29:15 +00:00
Joaquín M. López Muñoz 1dbdca3a03 updated according to latest regression tests results
[SVN r31007]
2005-09-16 06:41:59 +00:00
Douglas Gregor 3e9a56b762 Fix bug in enumerating grid-force pairs
[SVN r31006]
2005-09-16 04:39:52 +00:00
Rene Rivera 5a246d89c9 Comment about MinGW and STLport support.
[SVN r31005]
2005-09-16 04:15:55 +00:00
Rene Rivera abd11bcd18 Factor out the docs for stlport support, to make it consistent across toolsets.
[SVN r31004]
2005-09-16 03:18:06 +00:00
Robert Ramey f053f02036 misc document refinements and corrections
[SVN r31003]
2005-09-15 20:12:37 +00:00
Rene Rivera d5633e8168 Change MinGW checks to use the runtime defined version number. Remove ms_int64 def as upon further testing it proves not to be there.
[SVN r31002]
2005-09-15 16:38:32 +00:00
Rene Rivera c5381ceb86 MinGW runtime 3.8 now supports wide char functions, but only the C99 set. MinGW specific patch to use std::wcrtomb instead of std::wctomb.
[SVN r31001]
2005-09-15 16:36:10 +00:00
Rene Rivera 60d70f3e55 More tweaks for STLport-5 support:
* Handle "g" vs. "d" tags on STLport library names based on the compiler.
* Force multi-threaded builds as STLport-5 only supports that.


[SVN r31000]
2005-09-15 16:34:08 +00:00
Rene Rivera 717089b437 Fix the condition for STLport-5 so that it works when there is no stlport-version property.
[SVN r30999]
2005-09-15 16:19:10 +00:00
Douglas Gregor dbf4fb7bf8 Work around Tiger's wonky long double type
[SVN r30993]
2005-09-15 02:28:43 +00:00
Douglas Gregor 19d8c8c267 Continue the strange workaround into GCC 4.0
[SVN r30992]
2005-09-15 02:26:13 +00:00
Thorsten Jørgen Ottosen 689e86800f *** empty log message ***
[SVN r30988]
2005-09-14 17:05:05 +00:00
Rene Rivera 395aab3d44 Some additional functionality is available with MinGW+GCC-3.4.2.
[SVN r30983]
2005-09-14 13:42:25 +00:00
John Maddock dc2ba20171 Fixed remaining zero-width assertion issues.
Added separate file instantiation of ICU support templates.
Ensured code is STLport debug mode clean.


[SVN r30980]
2005-09-14 12:20:41 +00:00
Rene Rivera fe6ab6b719 MinGW-3.4.2 + STLport-5 can support wide char operations.
[SVN r30960]
2005-09-13 19:12:47 +00:00
Rene Rivera ddca5f676c Ignore stlport-iostream as iostreams are always on in STLport-5.
[SVN r30959]
2005-09-13 19:01:04 +00:00
Rene Rivera c22d51ce77 Make it so that the MInGW DLLs are found automatically and don't have to be in the path.
[SVN r30949]
2005-09-13 14:08:44 +00:00
Michael Stevens 8b0ac7cf3e FIX avoid template param T shallowing that in shallow_array_adaptor
[SVN r30948]
2005-09-13 14:05:39 +00:00
Robert Ramey d13f20afad add test for nested invocations
[SVN r30939]
2005-09-13 04:33:30 +00:00
Robert Ramey 9bf91e9d62 suppress error messages
[SVN r30938]
2005-09-13 04:32:16 +00:00
Robert Ramey f42b82da13 enhance comments
[SVN r30937]
2005-09-13 04:28:26 +00:00
Robert Ramey d2d6ff7170 update data member name
[SVN r30936]
2005-09-13 04:26:51 +00:00
Robert Ramey e30fbcfadb add guard for unknown deletion
[SVN r30935]
2005-09-13 04:25:49 +00:00
Robert Ramey 637ab0ae82 add erase call
[SVN r30934]
2005-09-13 04:23:04 +00:00
Robert Ramey 8b96427812 formating improvement
[SVN r30933]
2005-09-13 04:22:02 +00:00
Robert Ramey eaa51328e9 add erase member function
[SVN r30932]
2005-09-13 04:20:27 +00:00
Robert Ramey 6c04aa4a8f make destructor non-virtual
[SVN r30931]
2005-09-13 04:18:13 +00:00
Robert Ramey 65cf7049f0 cosmetic formating improvement
[SVN r30930]
2005-09-13 04:17:30 +00:00
Robert Ramey ca1699a183 remove virtual from destructor
[SVN r30928]
2005-09-13 03:54:10 +00:00
Thorsten Jørgen Ottosen a65e866291 *** empty log message ***
[SVN r30927]
2005-09-12 20:08:14 +00:00
Rene Rivera f467a6fe17 Add support for STLport 5.0.
[SVN r30925]
2005-09-12 19:31:37 +00:00
Hartmut Kaiser 7ad39c1e32 Fixed line numbering inside the generated tokens.
[SVN r30922]
2005-09-12 17:23:08 +00:00
Douglas Gregor cd289011e3 Note the fix to the relaxed heap
[SVN r30918]
2005-09-12 15:19:29 +00:00
Douglas Gregor 51ba403346 Always use log2
[SVN r30916]
2005-09-12 14:58:37 +00:00
Hartmut Kaiser 6beed9a31f Enabled --preserved and --long_long modes by default for the cpp_tokens sample.
[SVN r30912]
2005-09-11 20:40:07 +00:00
Hartmut Kaiser 7f9b730e8d Bumped wave version to 1.2.1.
[SVN r30911]
2005-09-11 18:46:03 +00:00
Hartmut Kaiser 5008279dba Fixed missing namespace specifiers in token definition macros.
[SVN r30910]
2005-09-11 18:43:05 +00:00
Rene Rivera f33b93cc1f Worksounrds to make iostreams build on QNX Momentics 6.3:
* Workaround for broken WEOF, EOF macros.
* Some Dinkumware workarounds not required for QNX.


[SVN r30900]
2005-09-10 18:49:36 +00:00
John Maddock 3c033aa2bd Fix comment.
[SVN r30895]
2005-09-10 10:16:40 +00:00
Douglas Gregor 3a7ae4df28 Use an integer log2 instead of the double version
[SVN r30892]
2005-09-09 22:15:05 +00:00
Jonathan Turkanis 660fd0a55c reworked previous fix, using BOOST_NESTED_TEMPLATE
[SVN r30891]
2005-09-09 18:08:40 +00:00
Thorsten Jørgen Ottosen 31a13d589b simplified metafunctions interface
[SVN r30889]
2005-09-09 16:11:29 +00:00
Jonathan Turkanis 3b18ab00b8 fixed description of closable bidirectional components
[SVN r30884]
2005-09-09 00:11:03 +00:00
Jonathan Turkanis d470354d1b fixed description of closable bidirectional components
[SVN r30883]
2005-09-09 00:09:30 +00:00
Rene Rivera 1698b6c5e3 "unix" was not getting defined for all variants of QNX, specifically Neutrino, which prevented JAMUNAME from getting set up correctly.
[SVN r30882]
2005-09-08 23:39:12 +00:00
Rene Rivera 3d2b89a9d6 Oops, it should qcc not QCC for the QNX/Momentics C compiler.
[SVN r30881]
2005-09-08 22:04:43 +00:00
Jonathan Turkanis e64523af63 Tru64 workaround
[SVN r30880]
2005-09-08 20:11:37 +00:00
Thorsten Jørgen Ottosen 28d40342a1 markup for range-lib
[SVN r30877]
2005-09-08 15:37:30 +00:00
Markus Schöpflin 5c8a780f7e Marked numeric/interval library as not supported on Tru64/CXX and Tru64/GCC.
[SVN r30875]
2005-09-08 13:34:02 +00:00
Markus Schöpflin db2b71383c Skip some tests which only work for STD library implementations conforming to the resolution of DR#179.
[SVN r30874]
2005-09-08 13:24:21 +00:00
Rene Rivera 425189ea29 Detect and use QNX QCC (GCC variant) compiler.
[SVN r30867]
2005-09-07 22:05:12 +00:00
Rene Rivera e41e61a6e1 QNX Momentics doesn't have/need -pthread.
[SVN r30866]
2005-09-07 22:01:00 +00:00
Rene Rivera 1d2b2b54b7 QNX 6.3 Momentics w/Dinkumware defines the integer types with slightly different names. So provide the standard names.
[SVN r30865]
2005-09-07 21:52:13 +00:00
Dave Abrahams 39dfa05572 merged from trunk
[SVN r30864]
2005-09-07 21:50:07 +00:00
John Maddock f75ca95b92 Try and fix errors unique to gcc-3.3 on darwin.
[SVN r30856]
2005-09-07 17:00:57 +00:00
Thorsten Jørgen Ottosen d26189920c added remove_const to parameters to avoid common instantiations errors
[SVN r30855]
2005-09-07 16:13:23 +00:00
Thorsten Jørgen Ottosen 99b6a43578 added discussion on extension mechanism
[SVN r30854]
2005-09-07 16:12:03 +00:00
Markus Schöpflin c25195ab7a Merged workaround for Tru64/CXX from trunk to RC branch.
[SVN r30853]
2005-09-07 16:06:27 +00:00
Markus Schöpflin fc08c991cb Merged regex/concept_check markup from trunk to RC branch.
[SVN r30851]
2005-09-07 15:47:10 +00:00
Douglas Gregor 8da6e53f73 Add bibliography link for PLOD algorithm
[SVN r30846]
2005-09-07 13:58:17 +00:00
Markus Schöpflin 48338961b0 Merged typo fix from trunk to RC branch.
[SVN r30845]
2005-09-07 11:10:56 +00:00
Markus Schöpflin 7130e394d5 Merged changes done by Jeff Garland from trunk to RC branch.
[SVN r30843]
2005-09-07 09:15:03 +00:00
Markus Schöpflin 5164ec4683 Merged markup for smart_ptr library on Tru64 from trunk to RC.
[SVN r30842]
2005-09-07 09:04:09 +00:00
Markus Schöpflin abf3c17bc3 Merged markup for filesystem library on Tru64 from trunk to RC.
[SVN r30840]
2005-09-07 08:50:57 +00:00
Markus Schöpflin ce8fbf88d9 Merged fix for dependent name lookup problem to RC branch.
[SVN r30838]
2005-09-07 08:16:45 +00:00
Markus Schöpflin de66b91b37 Marked Wave on Tru64/CXX as unusable.
[SVN r30837]
2005-09-07 08:10:32 +00:00
Thomas Witt 4059ed92af Updated bio.
[SVN r30836]
2005-09-06 22:09:23 +00:00
Douglas Gregor e7622832da Fix handling of bundled properties
[SVN r30835]
2005-09-06 20:34:31 +00:00
Rene Rivera 9939cea884 Document addition of patch numbers to version tags.
[SVN r30834]
2005-09-06 20:07:36 +00:00
Douglas Gregor 8a05e5c70b Add support for reading/writing adjacency list format
[SVN r30833]
2005-09-06 19:55:40 +00:00
Rene Rivera 130d6cdb16 Add patch number to version tag as we don't guarantee binary compatibility even for patch releases.
[SVN r30832]
2005-09-06 17:57:50 +00:00
John Maddock fd14eba097 Decided we need the full version string after all.
[SVN r30831]
2005-09-06 17:31:44 +00:00
Hartmut Kaiser 01f8661d01 Updated ChangeLog.
[SVN r30830]
2005-09-06 16:23:05 +00:00
Hartmut Kaiser da1f9554fc Fixed a bug where the 'parameters' and 'definition' parameters to the
defined_macro callback of the preprocessing hooks were always empty (thanks
to Stephan Seefeld for reporting).


[SVN r30829]
2005-09-06 16:20:54 +00:00
Douglas Gregor d0843d6b16 Fix vertex_queue initialization
[SVN r30828]
2005-09-06 15:55:43 +00:00
Thorsten Jørgen Ottosen 5765e18fb7 *** empty log message ***
[SVN r30827]
2005-09-06 15:26:50 +00:00
Joaquín M. López Muñoz 8466cbf89f added an entry on changes to multi_index
[SVN r30826]
2005-09-06 13:45:32 +00:00
John Maddock 16940cd325 Need to set BOOST_LIB_VERSION correctly.
[SVN r30825]
2005-09-06 12:36:24 +00:00
Thorsten Jørgen Ottosen 23f61634bb added test for extension mechanism
[SVN r30815]
2005-09-05 19:44:09 +00:00
Robert Ramey 1b08c23693 correction for reset_object_address
[SVN r30814]
2005-09-05 14:48:41 +00:00
Joaquín M. López Muñoz f2d6165060 merged changes in trunk since 1.33.0
[SVN r30813]
2005-09-05 11:34:18 +00:00
Robert Ramey 0c45fa7982 small adjustment in derived pointer example
[SVN r30804]
2005-09-04 20:05:49 +00:00
Robert Ramey f1349ed0da add test for map::value_type
[SVN r30803]
2005-09-04 20:02:48 +00:00
Robert Ramey 2a8c269168 factor out common module
[SVN r30802]
2005-09-04 20:00:15 +00:00
Robert Ramey dcd93f2318 correct subtle error in map serialization
[SVN r30801]
2005-09-04 19:58:48 +00:00
John Maddock ff6abbb275 Merged patches for Intel on linux from main branch.
[SVN r30800]
2005-09-04 16:20:44 +00:00
Robert Ramey 3063a13d48 update template traits information
[SVN r30797]
2005-09-03 18:34:15 +00:00
Robert Ramey 28fa3db0db correct header sequence explanation
[SVN r30796]
2005-09-03 18:33:17 +00:00
John Maddock 56143b8cc6 Ported ICU integration code to VC6/7.
Added some needed std lib #includes.
Reworked gcc separate file template instantiation code.


[SVN r30791]
2005-09-03 11:13:28 +00:00
John Maddock 3348a8bc68 Detect non-default threading support.
[SVN r30790]
2005-09-03 11:04:21 +00:00
Robert Ramey 048700d625 correction to reset_object_address
[SVN r30788]
2005-09-03 04:45:27 +00:00
Robert Ramey f35f1010eb new header file
[SVN r30766]
2005-09-01 07:16:07 +00:00
Robert Ramey d18b393245 augment test
[SVN r30765]
2005-09-01 07:13:34 +00:00
Robert Ramey 24289d6560 remove header sequence requirment
[SVN r30764]
2005-09-01 07:12:32 +00:00
Robert Ramey 564630c35e correct reset_object_address
[SVN r30763]
2005-09-01 07:06:09 +00:00
Robert Ramey daa3a37bfb remove header sequence requirment
[SVN r30762]
2005-09-01 07:02:34 +00:00
Robert Ramey 1b2df1dc38 remove header sequence requirement
[SVN r30761]
2005-09-01 06:56:46 +00:00
Robert Ramey fcdd26f12f remove header sequence requirement and bug fixes
[SVN r30760]
2005-09-01 06:55:24 +00:00
Douglas Gregor 5dbf14ab62 Temporarily remove Tru64 CXX
[SVN r30735]
2005-08-30 10:34:44 +00:00
Douglas Gregor 9ab7c7111b Fix _MSC_VER version numbers
[SVN r30734]
2005-08-30 10:24:06 +00:00
Jonathan Turkanis a7ce2e7916 changed deprecation warning
[SVN r30733]
2005-08-29 22:50:37 +00:00
Jonathan Turkanis a056294711 narrowed Intel failures
[SVN r30732]
2005-08-29 22:46:10 +00:00
Douglas Gregor 2f88fc7aae Label as 1.33.1
[SVN r30731]
2005-08-29 21:46:43 +00:00
Douglas Gregor cf60c64e4f Add required toolsets for 1.33.1
[SVN r30730]
2005-08-29 21:40:00 +00:00
Jonathan Turkanis 17b48b9ad0 named anonymous enums
[SVN r30729]
2005-08-29 20:28:26 +00:00
John Maddock 23b427970e Reconfigure lexical_cast to work with wide character strings and VC++ even when not using /Zc:wchar_t.
[SVN r30725]
2005-08-29 12:45:35 +00:00
John Maddock 4ddb9030cb Reconfigure lexical_cast to work wide character strings and VC++ when not using /Zc:wchar_t.
[SVN r30724]
2005-08-29 12:44:09 +00:00
Daniel James edcf3fb19a Added note about changes to the hash library.
[SVN r30702]
2005-08-27 10:35:45 +00:00
John Maddock 2e7ec8eea1 Added config and header include changes needed to support MSVC + STLport 5.0.
[SVN r30701]
2005-08-27 10:25:15 +00:00
Jonathan Turkanis b2ffa11b42 s/declaration/invocation/
[SVN r30700]
2005-08-26 20:32:50 +00:00
Jonathan Turkanis dd66d143ec clarified statement re semicolons
[SVN r30699]
2005-08-26 20:31:50 +00:00
Jonathan Turkanis 5554a8b92b fixed specification of non-deprecated component() function
[SVN r30698]
2005-08-26 20:27:47 +00:00
Jonathan Turkanis 54d2e75f05 removed expected failure for mapped_file_test on Intel 9.0 (iostreams)
[SVN r30697]
2005-08-26 20:18:03 +00:00
Jonathan Turkanis cd30809071 s/us/you/
[SVN r30694]
2005-08-26 19:34:25 +00:00
Jonathan Turkanis 7ae2cf1f89 changed name of template param
[SVN r30693]
2005-08-26 19:27:13 +00:00
Jonathan Turkanis 4762eddb34 made code example match source code
[SVN r30692]
2005-08-26 19:25:30 +00:00
Douglas Gregor e2b461f5d8 kFreeBSD support from Domenico Andreoli
[SVN r30687]
2005-08-26 15:00:14 +00:00
Jonathan Turkanis 246fdc0bd7 eliminated comparisons of signed and unsigned values
[SVN r30682]
2005-08-26 03:11:13 +00:00
Jonathan Turkanis a1f7732580 made boost logo link to local homepage
[SVN r30681]
2005-08-26 02:55:30 +00:00
Jonathan Turkanis 34d2e0fadc documented changes to Iostreams lib
[SVN r30680]
2005-08-26 02:51:24 +00:00
Jonathan Turkanis 244c00cb14 initial commitment
[SVN r30679]
2005-08-26 02:37:38 +00:00
Jonathan Turkanis a394798faf misc
[SVN r30678]
2005-08-26 02:27:27 +00:00
Jonathan Turkanis d79f455770 initial commitment
[SVN r30677]
2005-08-26 02:24:08 +00:00
Jonathan Turkanis 976c47546f misc
[SVN r30675]
2005-08-26 02:05:33 +00:00
John Maddock 5ba72258f9 Gcc warning suppression.
[SVN r30673]
2005-08-25 17:26:08 +00:00
John Maddock da4260d6e4 gcc+stlport fix.
[SVN r30668]
2005-08-25 12:57:20 +00:00
Peter Dimov 0c4d9e2f23 shared_ptr section updated
[SVN r30667]
2005-08-25 12:42:51 +00:00
John Maddock 4aa142b1f3 Patch to detect std::allocator<>::rebind in STLport 5.0.
[SVN r30665]
2005-08-25 10:11:22 +00:00
Michael Stevens f43aa5d454 FIX missing () in container assignment
FIX comment out unused parameters
FIX copy constructor for sparse element proxies


[SVN r30663]
2005-08-25 09:13:05 +00:00
Jonathan Turkanis 2ba61df5a4 misc
[SVN r30661]
2005-08-25 05:33:23 +00:00
Jonathan Turkanis 1eb3e3d1f3 misc
[SVN r30659]
2005-08-25 02:25:37 +00:00
Jonathan Turkanis b08a2e2991 misc
[SVN r30658]
2005-08-25 01:36:55 +00:00
Jonathan Turkanis 4b934a225d documented new component access interface
[SVN r30657]
2005-08-25 01:35:57 +00:00
Peter Dimov 1804a13712 Switched to 'int' since 'long' is 64 bits on PPC64
[SVN r30651]
2005-08-24 17:15:49 +00:00
John Maddock 04a84320d9 Fix type_with_alignment and aligned_storage docs mix up.
[SVN r30650]
2005-08-24 16:49:32 +00:00
John Maddock 0e02ca7845 Enable support for Dragonfly BSD
[SVN r30647]
2005-08-24 15:45:17 +00:00
John Maddock f62f93f348 Add comments for a tentative 1.33.x release.
[SVN r30644]
2005-08-24 11:42:25 +00:00
John Maddock 6645b8ddd7 Disabled support for external templates with Intel 8.0 and earlier (it leads to unresolved externals).
[SVN r30643]
2005-08-24 09:59:14 +00:00
Robert Ramey aef7d4f7b3 fix typos
[SVN r30642]
2005-08-23 23:44:52 +00:00
Rene Rivera 6f66f9ec20 Fix build errors when building under cygwin shell because of missing DLL targets. [merge from HEAD]
[SVN r30639]
2005-08-23 02:19:44 +00:00
John Maddock 697525faba Made regex_error backwards compatible with Boost-1.32.
[SVN r30623]
2005-08-22 10:56:15 +00:00
Daniel James c37c62d3eb Fix the hash example error in the generated documenation as well.
[SVN r30614]
2005-08-21 14:17:28 +00:00
Daniel James 5e89b7f4fe Fixed stupid error in hash point example.
[SVN r30609]
2005-08-20 20:39:21 +00:00
John Maddock 0bdc22cac9 Updated History.
Added additional tests for regexes that are supposed to be empty.
Added additional test cases for non-greedy repeats.


[SVN r30605]
2005-08-19 16:12:45 +00:00
John Maddock 2c39ebf17e Fixed VC7.1-STLport config setup so it works with /Zc:wchar_t
Re-ordered code in static_mutex.hpp to satisfy SGI IRIX.
Added some additional #includes to satisfy SGI Irix.
Fixed strange bug where some non-greedy repeats could repeat more times than permitted.
Fixed return value from basic_regex<>::empty().
Fixed return value from basic_regex<>::expression() and basic_regex<>::size() when the expression is invalid.


[SVN r30604]
2005-08-19 16:10:11 +00:00
John Maddock c88d6a898b Fix the makefiles:
Remove references to files that no longer exist.
Fix VC7.1 and VC8 setup code.


[SVN r30594]
2005-08-16 17:32:30 +00:00
John Maddock 8b8b39c001 Don't undef BOOST_LIB_TOOLSET.
[SVN r30593]
2005-08-16 17:30:58 +00:00
Jonathan Turkanis 749c5d91d3 changed image
[SVN r30589]
2005-08-16 01:09:42 +00:00
Jonathan Turkanis e31348d12f changed image
[SVN r30588]
2005-08-16 01:02:07 +00:00
Peter Dimov 7895ea23f8 Removed explicit register use (thanks to Howard Hinnant)
[SVN r30585]
2005-08-15 19:44:15 +00:00
Jonathan Turkanis c056cc8269 fixed typos
[SVN r30584]
2005-08-15 17:36:19 +00:00
Jonathan Turkanis 22eed1b2ae escaped < and >
[SVN r30571]
2005-08-13 19:27:52 +00:00
Jonathan Turkanis 793183e97d fixed warning message
[SVN r30569]
2005-08-13 14:52:24 +00:00
Dave Abrahams b5f2db7e6d merged from trunk
[SVN r30567]
2005-08-13 01:19:53 +00:00
Jonathan Turkanis a765d4bbac fixed typos
[SVN r30565]
2005-08-12 22:53:46 +00:00
Dave Abrahams a4b1e53d2a merged from trunk
[SVN r30560]
2005-08-12 19:50:06 +00:00
Douglas Gregor f62e4e3e4c Final release date
[SVN r30531]
2005-08-12 03:25:33 +00:00
Douglas Gregor 808f006fc1 New logo
[SVN r30530]
2005-08-12 03:09:31 +00:00
Rene Rivera 11c4dae0d6 Fixes to account for the new logo.
[SVN r30529]
2005-08-11 21:49:54 +00:00
Douglas Gregor 1e650b99ca New logo
[SVN r30528]
2005-08-11 21:14:14 +00:00
Douglas Gregor 105f995860 Markup weird linker failures
[SVN r30524]
2005-08-11 13:56:18 +00:00
Rene Rivera 5fee5a0262 Fix bad 'extends'. Thanks to p.klotz@icoserve.com.
[SVN r30523]
2005-08-10 22:30:51 +00:00
Jonathan Turkanis e49ed73d25 noted that mapped_file_test occassionally fails on intel-win32
[SVN r30520]
2005-08-10 06:24:33 +00:00
Robert Ramey ac65346e6d tweak to help code instantiation
[SVN r30519]
2005-08-10 05:35:31 +00:00
Robert Ramey a396b67d6d permit non-default constructors
[SVN r30518]
2005-08-10 05:34:42 +00:00
Robert Ramey 826792c88e fix indent
[SVN r30517]
2005-08-10 05:31:46 +00:00
Robert Ramey 4e5c1c3074 move is_abstract to serialization namespace
[SVN r30516]
2005-08-10 05:30:55 +00:00
Robert Ramey 6912a28ed7 add missing entry points
[SVN r30515]
2005-08-10 05:28:57 +00:00
Robert Ramey 5a2e484d39 change type to typex to accomodate BCB
[SVN r30514]
2005-08-09 15:43:31 +00:00
Douglas Gregor bfbc3c52e4 LyX
[SVN r30513]
2005-08-09 12:53:44 +00:00
Thorsten Jørgen Ottosen 94ce24a596 *** empty log message ***
[SVN r30508]
2005-08-08 20:58:56 +00:00
Robert Ramey 4876020a21 added serialization to feature updates
[SVN r30502]
2005-08-07 21:29:37 +00:00
Douglas Gregor 9986978784 New release date, and we're gonna stick to it, darnit
[SVN r30500]
2005-08-07 16:34:44 +00:00
Jonathan Turkanis 6908e4a0d5 changed description of stream
[SVN r30496]
2005-08-05 20:39:03 +00:00
Jonathan Turkanis 19293949d7 changed description of filtering_stream
[SVN r30495]
2005-08-05 20:38:24 +00:00
Jonathan Turkanis dadbb421f4 fixed description of stream base class
[SVN r30494]
2005-08-05 20:23:39 +00:00
Jonathan Turkanis 0f5dc0ef08 added more hyperlinks
[SVN r30493]
2005-08-05 20:22:52 +00:00
Jonathan Turkanis 36f7174779 fixed previous markup (iostreams)
[SVN r30492]
2005-08-05 18:17:07 +00:00
Jonathan Turkanis 6010e45801 marked maped_file_test as failing intermittently on intel-win32-9_0 (iostreams)
[SVN r30491]
2005-08-05 18:10:08 +00:00
Thorsten Jørgen Ottosen 4e88a39c1a *** empty log message ***
[SVN r30490]
2005-08-05 15:16:37 +00:00
Dave Abrahams bf8cce28db merged from trunk
[SVN r30489]
2005-08-05 15:02:14 +00:00
Rene Rivera 6e4cd4fc03 Expect cw-8_3 range and static_assert test to all be successful.
[SVN r30487]
2005-08-05 14:43:20 +00:00
Rene Rivera 0b4ca326a4 Fix fallout of changes to collection_load_imp.hpp of moving the stl sub-namespace scope.
[SVN r30486]
2005-08-05 14:27:58 +00:00
Douglas Gregor bd435e8eb7 Regenerated
[SVN r30485]
2005-08-05 14:14:06 +00:00
Douglas Gregor b76da23fad Be slightly more forgiving about timing
[SVN r30483]
2005-08-05 13:17:42 +00:00
Douglas Gregor 565dc93892 Fix for FreeBSD, from Simon Barner
[SVN r30482]
2005-08-05 13:14:15 +00:00
John Maddock b7ef44ad86 Finished off normalising the library names.
[SVN r30481]
2005-08-05 12:40:23 +00:00
John Maddock 42cf781e5c Tidy up references to Boost libraries.
Minor improvement to Jamfile.


[SVN r30480]
2005-08-05 12:25:24 +00:00
John Maddock 884da8c598 Improved local documentation build.
[SVN r30479]
2005-08-05 11:44:32 +00:00
Robert Ramey 5cf874392f remove superfluous header
[SVN r30474]
2005-08-04 21:09:04 +00:00
Ralf W. Grosse-Kunstleve 47172a355f bug fix merged from trunk
[SVN r30472]
2005-08-04 20:19:24 +00:00
Daniel James 8df7213cbe Fix the hash includes in the generated documentation.
[SVN r30470]
2005-08-04 20:07:08 +00:00
Jonathan Turkanis 46ec9c371e chamged INTJ link
[SVN r30469]
2005-08-04 18:30:51 +00:00
Jonathan Turkanis 836f6868a0 s/a/an/
[SVN r30468]
2005-08-04 17:47:44 +00:00
Jonathan Turkanis 8ebf4d9afe fixed garbled explanation
[SVN r30467]
2005-08-04 17:46:56 +00:00
Robert Ramey 4b8daf6897 include is_pointer.hpp
[SVN r30466]
2005-08-04 17:42:30 +00:00
Jonathan Turkanis d6f0b8b269 fixed homepage link
[SVN r30463]
2005-08-04 16:53:47 +00:00
John Maddock 8247c74138 Fix broken link.
[SVN r30460]
2005-08-04 16:24:01 +00:00
John Maddock 59218c61bd Added Wave to the list of libraries requiring separate source.
[SVN r30459]
2005-08-04 16:20:52 +00:00
Thorsten Jørgen Ottosen 9818db57d7 removed dog bugs and added a few new explanations
[SVN r30457]
2005-08-04 16:03:49 +00:00
Douglas Gregor 55c02678d2 Add missing include
[SVN r30456]
2005-08-04 15:41:36 +00:00
Douglas Gregor d6f7047fc0 Fix workaround for MSVC-emulating compilers
[SVN r30455]
2005-08-04 15:22:48 +00:00
Douglas Gregor b89348d58b Fix a critical disconnection bug
[SVN r30454]
2005-08-04 15:14:10 +00:00
Dave Abrahams 6ad24ce419 merged from trunk
[SVN r30451]
2005-08-04 05:09:00 +00:00
Jonathan Turkanis d869fe16be added entry for iostreams under 'Automatic Linking on Windows'
[SVN r30448]
2005-08-04 02:07:53 +00:00
Douglas Gregor 63194623dd Fix broken link
[SVN r30447]
2005-08-04 01:58:31 +00:00
Rene Rivera 2389faa028 Fix a bogus link.
[SVN r30446]
2005-08-04 01:50:18 +00:00
Hartmut Kaiser 63fbec4820 Fixed broken links.
[SVN r30445]
2005-08-04 01:47:16 +00:00
Rene Rivera 33a453c835 Fix a bogus link.
[SVN r30444]
2005-08-04 01:43:33 +00:00
Jonathan Turkanis 41b2492185 (temporarily) fixed broken link to documentation list
[SVN r30443]
2005-08-04 01:34:37 +00:00
Rene Rivera 4d9004315e Fix a bogus link. Remove all HTML validation warnings.
[SVN r30442]
2005-08-04 01:32:36 +00:00
Jonathan Turkanis 266115dcfd changed link to sgi.com
[SVN r30441]
2005-08-04 01:23:40 +00:00
Jonathan Turkanis 4f97c60e0b hid broken link
[SVN r30440]
2005-08-04 01:13:41 +00:00
Jonathan Turkanis 54a3fc849c fixed broken links
[SVN r30438]
2005-08-04 00:15:21 +00:00
Jonathan Turkanis 04bacb88cb fixed broken links
[SVN r30437]
2005-08-04 00:09:45 +00:00
Jonathan Turkanis 0984071008 fixed broken links
[SVN r30436]
2005-08-04 00:03:47 +00:00
Jonathan Turkanis f38234091d fixed broken links
[SVN r30435]
2005-08-03 23:51:45 +00:00
Jonathan Turkanis cdbc81c379 corrected Iostreams config info
[SVN r30434]
2005-08-03 22:55:37 +00:00
Jonathan Turkanis f4f47024bb added Iostreams config info
[SVN r30433]
2005-08-03 22:54:17 +00:00
Jonathan Turkanis 2a63a9141d corrected spelling of NO_COMPRESSION
[SVN r30432]
2005-08-03 22:49:33 +00:00
Jonathan Turkanis 617e6ae896 fixed broken links
[SVN r30431]
2005-08-03 21:42:39 +00:00
Douglas Gregor 1a3a3cc061 Update autolinking info for Serialization lib
[SVN r30430]
2005-08-03 21:25:44 +00:00
Douglas Gregor c0e3e2a29f Trivial tweak for compilers emulating Microsoft's bugs
[SVN r30429]
2005-08-03 21:10:23 +00:00
Jonathan Turkanis 921930f78f fixed broken links
[SVN r30423]
2005-08-03 20:11:21 +00:00
Jonathan Turkanis f9ed9415a7 fixed broken links
[SVN r30421]
2005-08-03 19:43:36 +00:00
Jonathan Turkanis cb525d2991 misc
[SVN r30420]
2005-08-03 19:00:45 +00:00
Jonathan Turkanis 05658120b0 typo
[SVN r30419]
2005-08-03 18:55:35 +00:00
Jonathan Turkanis be1a4d3584 typo
[SVN r30418]
2005-08-03 18:54:33 +00:00
Jonathan Turkanis 363c37c2c1 misc
[SVN r30417]
2005-08-03 18:53:02 +00:00
Jonathan Turkanis bebde46586 changed img dimensions
[SVN r30415]
2005-08-03 17:57:59 +00:00
Dave Abrahams 5da20cd03b merged from trunk
[SVN r30414]
2005-08-03 17:31:05 +00:00
Douglas Gregor b5645c2ae7 Fixed broken links
[SVN r30412]
2005-08-03 16:52:05 +00:00
Douglas Gregor bd1db1a406 Fixed broken links
[SVN r30411]
2005-08-03 15:35:00 +00:00
Douglas Gregor d3304ebe6b Fix broken links
[SVN r30410]
2005-08-03 14:26:08 +00:00
Douglas Gregor 4bfc198d18 Fixed broken links
[SVN r30409]
2005-08-03 14:23:07 +00:00
Douglas Gregor 4196239412 Props to Jonathan Turkanis
[SVN r30408]
2005-08-03 13:59:18 +00:00
Douglas Gregor 4df52bdcba Add links to docs on Sourceforge
[SVN r30407]
2005-08-03 13:51:19 +00:00
Hartmut Kaiser 0932288218 Fixed broken links.
[SVN r30405]
2005-08-03 13:30:26 +00:00
Dave Abrahams e0e3d9a8bb merged from trunk
[SVN r30404]
2005-08-03 13:03:27 +00:00
Dave Abrahams d83ba687b3 merged from trunk
[SVN r30402]
2005-08-03 12:26:12 +00:00
Dave Abrahams 4546e46ff2 merged from trunk
[SVN r30399]
2005-08-03 11:40:17 +00:00
Dave Abrahams a586251276 merged from trunk
[SVN r30397]
2005-08-03 11:10:41 +00:00
John Maddock 432742a03d Added information about building Boost with ICU support.
[SVN r30394]
2005-08-03 10:15:06 +00:00
Jonathan Turkanis 713d96fa8a fixed broken links
[SVN r30393]
2005-08-03 04:07:21 +00:00
Jonathan Turkanis 420438d5a4 fixed broken links
[SVN r30392]
2005-08-03 03:52:20 +00:00
Jonathan Turkanis 0d859372be fixed broken links
[SVN r30391]
2005-08-03 03:28:41 +00:00
Aleksey Gurtovoy 6876d169fa Fix MetaCommunications spelling
[SVN r30390]
2005-08-03 01:58:20 +00:00
Jonathan Turkanis c8258eda90 fixed broken links
[SVN r30389]
2005-08-03 00:46:39 +00:00
Jonathan Turkanis 752b47621c fixed broken links
[SVN r30388]
2005-08-03 00:40:18 +00:00
Jonathan Turkanis cf6fcce0e8 fixed broken links
[SVN r30387]
2005-08-02 22:02:11 +00:00
Jonathan Turkanis 050a27c550 fixed broken links
[SVN r30386]
2005-08-02 20:47:34 +00:00
Jonathan Turkanis a902008193 fixed broken links
[SVN r30385]
2005-08-02 20:32:55 +00:00
Jonathan Turkanis 9143cf98e5 fixed broken links
[SVN r30384]
2005-08-02 20:24:30 +00:00
Beman Dawes 02b496ef2d Fix broken links
[SVN r30383]
2005-08-02 19:49:58 +00:00
Douglas Gregor 999df197af Revised today
[SVN r30380]
2005-08-02 17:23:34 +00:00
Jonathan Turkanis 5ebdc42682 misc
[SVN r30379]
2005-08-02 17:22:55 +00:00
Rene Rivera 0370e4d120 Fix XHTML validation, because of use of blockquote/span outside of a block element.
[SVN r30378]
2005-08-02 14:47:37 +00:00
Rene Rivera 4c01083499 Fix XHTML validation, because of use of blockquote/span outside of a block element.
[SVN r30377]
2005-08-02 14:36:42 +00:00
Jeff Garland 11b012b88b Fix problem with localtime_r and Borland
[SVN r30376]
2005-08-02 13:52:44 +00:00
Beman Dawes 3a6f599c77 Fix typo
[SVN r30375]
2005-08-02 13:03:53 +00:00
Beman Dawes c001886e21 Fix typos and capitalization, clarify TR2, operating systems
[SVN r30373]
2005-08-02 12:58:45 +00:00
Aleksey Gurtovoy 4eb2253815 merge regression report fixes from the main trunk
[SVN r30372]
2005-08-02 07:57:11 +00:00
Jonathan Turkanis f2f05517b1 made hyperlink for BOOST_IOSTREAMS_PIPABLE lowercase
[SVN r30368]
2005-08-01 16:27:36 +00:00
Douglas Gregor 0e8cf1eed7 Wildly assume that we're releasing today
[SVN r30367]
2005-08-01 15:37:54 +00:00
Douglas Gregor edd0368f5b Tidy up the XHTML
[SVN r30366]
2005-08-01 15:36:13 +00:00
Aleksey Gurtovoy 8918f60787 merge report fixes from main trunk
[SVN r30365]
2005-08-01 15:31:31 +00:00
Douglas Gregor b79d6dadcc vc-8_0 is no longer a release platform
[SVN r30364]
2005-08-01 15:16:18 +00:00
Douglas Gregor 38773aa871 A note about compiler compatibility
[SVN r30363]
2005-08-01 15:16:05 +00:00
Aleksey Gurtovoy a6ed902048 Merge user reports into 1.33.0 branch
[SVN r30359]
2005-08-01 13:42:41 +00:00
Douglas Gregor 40b3309a4f Markup the last Serialization expected failure
[SVN r30353]
2005-08-01 03:32:39 +00:00
Douglas Gregor 59ee686326 Remove unnecessary links
[SVN r30352]
2005-07-31 20:08:17 +00:00
Douglas Gregor 8a8ed5f87d Markup most of the remaining Serialization lib failures
[SVN r30351]
2005-07-31 20:01:48 +00:00
Douglas Gregor aa995f9efa Acknowledgements
[SVN r30350]
2005-07-31 19:34:17 +00:00
Douglas Gregor df5b07f4d3 Remove broken link
[SVN r30349]
2005-07-31 19:07:09 +00:00
Douglas Gregor dc9c7e9cb7 Remove references to local_time_serialize.hpp
[SVN r30348]
2005-07-31 18:59:00 +00:00
Douglas Gregor 3d9313613d Rename test project to under 32 characters
[SVN r30347]
2005-07-31 18:46:20 +00:00
Douglas Gregor a19e816e07 Fix broken link
[SVN r30346]
2005-07-31 18:36:15 +00:00
Douglas Gregor 9e5cc5375e Fix broken link
[SVN r30345]
2005-07-31 18:30:25 +00:00
Douglas Gregor 293a19614a Redirection for BoostBook docs
[SVN r30344]
2005-07-31 18:23:28 +00:00
Douglas Gregor 03d65af913 PDF manual for BBv2
[SVN r30343]
2005-07-31 18:16:51 +00:00
Douglas Gregor 6360bcc9bf Remove links to FO, DocBook, etc. They'll be released on SourceForge instead
[SVN r30342]
2005-07-31 18:05:57 +00:00
Douglas Gregor 6c009ef368 Move 1.33.0 docs over to the branch
[SVN r30340]
2005-07-31 16:48:16 +00:00
Douglas Gregor ed6bc8f4c0 A trio of harmless IBM patches from Chris Cambly
[SVN r30338]
2005-07-31 13:51:53 +00:00
Jonathan Turkanis 3325715189 updated copyright
[SVN r30336]
2005-07-30 23:49:18 +00:00
Jonathan Turkanis b1405a3b2e misc
[SVN r30335]
2005-07-30 22:14:36 +00:00
Jonathan Turkanis 7cf6f1abea misc
[SVN r30334]
2005-07-30 22:00:23 +00:00
Jonathan Turkanis fd960e722e misc
[SVN r30333]
2005-07-30 21:49:58 +00:00
Jonathan Turkanis 5ee0ce53cc misc
[SVN r30332]
2005-07-30 21:19:52 +00:00
Jonathan Turkanis baf25a6c0c misc
[SVN r30331]
2005-07-30 20:59:29 +00:00
Jonathan Turkanis 96cb55f137 misc
[SVN r30330]
2005-07-30 20:45:57 +00:00
Hartmut Kaiser 84537e34e3 Fixed failure markup for Wave.
[SVN r30329]
2005-07-30 20:39:06 +00:00
Jonathan Turkanis 9a3010daa0 misc
[SVN r30328]
2005-07-30 20:33:24 +00:00
Jonathan Turkanis cb5fb50938 misc
[SVN r30327]
2005-07-30 20:14:14 +00:00
Douglas Gregor 867d25c2a0 Make gcc-4.0.1-linux and intel-win32-9_0 release platforms, because they're already up to speed
[SVN r30326]
2005-07-30 19:49:41 +00:00
Jonathan Turkanis 821ab41e22 documented component access
[SVN r30325]
2005-07-30 19:43:43 +00:00
Jonathan Turkanis a232139f73 misc
[SVN r30324]
2005-07-30 19:24:17 +00:00
Rene Rivera 25e9577800 Account for VC8 not having single threaded runtimes. (merge from trunk)
[SVN r30322]
2005-07-30 15:55:37 +00:00
Rene Rivera 2b89c20de6 Mark up last set of CW failures.
[SVN r30318]
2005-07-30 15:22:08 +00:00
Douglas Gregor 9df556a3ab Markup some failures that will not be fixed for this release
[SVN r30317]
2005-07-30 12:23:31 +00:00
Jonathan Turkanis 391cc36780 misc
[SVN r30316]
2005-07-30 03:24:35 +00:00
Hartmut Kaiser f6698003b6 Fixed failure markup for Wave.
[SVN r30315]
2005-07-29 23:22:31 +00:00
Stefan Slapeta dc33334825 Intel 9.0 markups for random and spirit
[SVN r30314]
2005-07-29 22:47:58 +00:00
Jonathan Turkanis 46495ce9d6 documented const as optional in forwarding ctors
[SVN r30313]
2005-07-29 22:32:16 +00:00
Jonathan Turkanis 9f65b0898c changed to second person
[SVN r30312]
2005-07-29 22:13:03 +00:00
Hartmut Kaiser 4632b6f895 Marked two failing tests as expected.
[SVN r30306]
2005-07-29 03:07:56 +00:00
Beman Dawes bf4ce638c9 filesystem _dll tests, marked mingw-3_4_2 failures as expected
[SVN r30305]
2005-07-29 02:34:57 +00:00
Jonathan Turkanis 03739ec46d fixed garbled intro to stream and stream_buffer
[SVN r30304]
2005-07-28 23:38:52 +00:00
Peter Dimov da67209832 Added a paragraph for Bind
[SVN r30303]
2005-07-28 22:14:06 +00:00
nobody a433d185d4 This commit was manufactured by cvs2svn to create branch 'RC_1_33_0'.
[SVN r30300]
2005-07-28 18:22:24 +00:00
865 changed files with 93351 additions and 3325 deletions
+211 -211
View File
@@ -1,114 +1,54 @@
[submodule "format"]
path = libs/format
url = ../format.git
fetchRecurseSubmodules = on-demand
[submodule "ublas"]
path = libs/numeric/ublas
url = ../ublas.git
fetchRecurseSubmodules = on-demand
[submodule "smart_ptr"]
path = libs/smart_ptr
url = ../smart_ptr.git
fetchRecurseSubmodules = on-demand
[submodule "wave"]
path = libs/wave
url = ../wave.git
fetchRecurseSubmodules = on-demand
[submodule "integer"]
path = libs/integer
url = ../integer.git
fetchRecurseSubmodules = on-demand
[submodule "compose"]
path = libs/compose
url = ../compose.git
fetchRecurseSubmodules = on-demand
[submodule "random"]
path = libs/random
url = ../random.git
fetchRecurseSubmodules = on-demand
[submodule "utility"]
path = libs/utility
url = ../utility.git
fetchRecurseSubmodules = on-demand
[submodule "rational"]
path = libs/rational
url = ../rational.git
fetchRecurseSubmodules = on-demand
[submodule "timer"]
path = libs/timer
url = ../timer.git
fetchRecurseSubmodules = on-demand
[submodule "functional"]
path = libs/functional
url = ../functional.git
fetchRecurseSubmodules = on-demand
[submodule "conversion"]
path = libs/conversion
url = ../conversion.git
fetchRecurseSubmodules = on-demand
[submodule "config"]
path = libs/config
url = ../config.git
fetchRecurseSubmodules = on-demand
[submodule "array"]
path = libs/array
url = ../array.git
[submodule "assign"]
path = libs/assign
url = ../assign.git
fetchRecurseSubmodules = on-demand
[submodule "type_traits"]
path = libs/type_traits
url = ../type_traits.git
[submodule "format"]
path = libs/format
url = ../format.git
fetchRecurseSubmodules = on-demand
[submodule "iterator"]
path = libs/iterator
url = ../iterator.git
[submodule "wave"]
path = libs/wave
url = ../wave.git
fetchRecurseSubmodules = on-demand
[submodule "regex"]
path = libs/regex
url = ../regex.git
[submodule "timer"]
path = libs/timer
url = ../timer.git
fetchRecurseSubmodules = on-demand
[submodule "graph"]
path = libs/graph
url = ../graph.git
[submodule "utility"]
path = libs/utility
url = ../utility.git
fetchRecurseSubmodules = on-demand
[submodule "static_assert"]
path = libs/static_assert
url = ../static_assert.git
[submodule "serialization"]
path = libs/serialization
url = ../serialization.git
fetchRecurseSubmodules = on-demand
[submodule "function"]
path = libs/function
url = ../function.git
[submodule "spirit"]
path = libs/spirit
url = ../spirit.git
fetchRecurseSubmodules = on-demand
[submodule "concept_check"]
path = libs/concept_check
url = ../concept_check.git
[submodule "parameter"]
path = libs/parameter
url = ../parameter.git
fetchRecurseSubmodules = on-demand
[submodule "detail"]
path = libs/detail
url = ../detail.git
[submodule "multi_index"]
path = libs/multi_index
url = ../multi_index.git
fetchRecurseSubmodules = on-demand
[submodule "disjoint_sets"]
path = libs/disjoint_sets
url = ../disjoint_sets.git
[submodule "signals"]
path = libs/signals
url = ../signals.git
fetchRecurseSubmodules = on-demand
[submodule "property_map"]
path = libs/property_map
url = ../property_map.git
fetchRecurseSubmodules = on-demand
[submodule "python"]
path = libs/python
url = ../python.git
fetchRecurseSubmodules = on-demand
[submodule "test"]
path = libs/test
url = ../test.git
fetchRecurseSubmodules = on-demand
[submodule "any"]
path = libs/any
url = ../any.git
fetchRecurseSubmodules = on-demand
[submodule "crc"]
path = libs/crc
url = ../crc.git
[submodule "build"]
path = tools/build
url = ../build.git
fetchRecurseSubmodules = on-demand
[submodule "pool"]
path = libs/pool
@@ -118,147 +58,207 @@
path = libs/thread
url = ../thread.git
fetchRecurseSubmodules = on-demand
[submodule "tuple"]
path = libs/tuple
url = ../tuple.git
[submodule "iterator"]
path = libs/iterator
url = ../iterator.git
fetchRecurseSubmodules = on-demand
[submodule "tokenizer"]
path = libs/tokenizer
url = ../tokenizer.git
fetchRecurseSubmodules = on-demand
[submodule "math"]
path = libs/math
url = ../math.git
fetchRecurseSubmodules = on-demand
[submodule "build"]
path = tools/build
url = ../build.git
fetchRecurseSubmodules = on-demand
[submodule "compatibility"]
path = libs/compatibility
url = ../compatibility.git
fetchRecurseSubmodules = on-demand
[submodule "bind"]
path = libs/bind
url = ../bind.git
fetchRecurseSubmodules = on-demand
[submodule "date_time"]
path = libs/date_time
url = ../date_time.git
fetchRecurseSubmodules = on-demand
[submodule "multi_array"]
path = libs/multi_array
url = ../multi_array.git
fetchRecurseSubmodules = on-demand
[submodule "signals"]
path = libs/signals
url = ../signals.git
fetchRecurseSubmodules = on-demand
[submodule "preprocessor"]
path = libs/preprocessor
url = ../preprocessor.git
fetchRecurseSubmodules = on-demand
[submodule "lambda"]
path = libs/lambda
url = ../lambda.git
fetchRecurseSubmodules = on-demand
[submodule "io"]
path = libs/io
url = ../io.git
[submodule "integer"]
path = libs/integer
url = ../integer.git
fetchRecurseSubmodules = on-demand
[submodule "dynamic_bitset"]
path = libs/dynamic_bitset
url = ../dynamic_bitset.git
fetchRecurseSubmodules = on-demand
[submodule "mpl"]
path = libs/mpl
url = ../mpl.git
[submodule "optional"]
path = libs/optional
url = ../optional.git
fetchRecurseSubmodules = on-demand
[submodule "range"]
path = libs/range
url = ../range.git
[submodule "regex"]
path = libs/regex
url = ../regex.git
fetchRecurseSubmodules = on-demand
[submodule "serialization"]
path = libs/serialization
url = ../serialization.git
fetchRecurseSubmodules = on-demand
[submodule "numeric_conversion"]
path = libs/numeric/conversion
url = ../numeric_conversion.git
fetchRecurseSubmodules = on-demand
[submodule "assign"]
path = libs/assign
url = ../assign.git
fetchRecurseSubmodules = on-demand
[submodule "logic"]
path = libs/logic
url = ../logic.git
fetchRecurseSubmodules = on-demand
[submodule "exception"]
path = libs/exception
url = ../exception.git
fetchRecurseSubmodules = on-demand
[submodule "statechart"]
path = libs/statechart
url = ../statechart.git
[submodule "functional"]
path = libs/functional
url = ../functional.git
fetchRecurseSubmodules = on-demand
[submodule "variant"]
path = libs/variant
url = ../variant.git
fetchRecurseSubmodules = on-demand
[submodule "interval"]
path = libs/numeric/interval
url = ../interval.git
[submodule "lambda"]
path = libs/lambda
url = ../lambda.git
fetchRecurseSubmodules = on-demand
[submodule "optional"]
path = libs/optional
url = ../optional.git
[submodule "multi_array"]
path = libs/multi_array
url = ../multi_array.git
fetchRecurseSubmodules = on-demand
[submodule "bcp"]
path = tools/bcp
url = ../bcp.git
fetchRecurseSubmodules = on-demand
[submodule "spirit"]
path = libs/spirit
url = ../spirit.git
fetchRecurseSubmodules = on-demand
[submodule "inspect"]
path = tools/inspect
url = ../inspect.git
fetchRecurseSubmodules = on-demand
[submodule "boostbook"]
path = tools/boostbook
url = ../boostbook.git
fetchRecurseSubmodules = on-demand
[submodule "filesystem"]
path = libs/filesystem
url = ../filesystem.git
fetchRecurseSubmodules = on-demand
[submodule "multi_index"]
path = libs/multi_index
url = ../multi_index.git
fetchRecurseSubmodules = on-demand
[submodule "program_options"]
path = libs/program_options
url = ../program_options.git
fetchRecurseSubmodules = on-demand
[submodule "algorithm"]
path = libs/algorithm
url = ../algorithm.git
[submodule "detail"]
path = libs/detail
url = ../detail.git
fetchRecurseSubmodules = on-demand
[submodule "ptr_container"]
path = libs/ptr_container
url = ../ptr_container.git
fetchRecurseSubmodules = on-demand
[submodule "quickbook"]
path = tools/quickbook
url = ../quickbook.git
[submodule "graph"]
path = libs/graph
url = ../graph.git
fetchRecurseSubmodules = on-demand
[submodule "array"]
path = libs/array
url = ../array.git
fetchRecurseSubmodules = on-demand
[submodule "concept_check"]
path = libs/concept_check
url = ../concept_check.git
fetchRecurseSubmodules = on-demand
[submodule "mpl"]
path = libs/mpl
url = ../mpl.git
fetchRecurseSubmodules = on-demand
[submodule "type_traits"]
path = libs/type_traits
url = ../type_traits.git
fetchRecurseSubmodules = on-demand
[submodule "property_map"]
path = libs/property_map
url = ../property_map.git
fetchRecurseSubmodules = on-demand
[submodule "preprocessor"]
path = libs/preprocessor
url = ../preprocessor.git
fetchRecurseSubmodules = on-demand
[submodule "math"]
path = libs/math
url = ../math.git
fetchRecurseSubmodules = on-demand
[submodule "range"]
path = libs/range
url = ../range.git
fetchRecurseSubmodules = on-demand
[submodule "program_options"]
path = libs/program_options
url = ../program_options.git
fetchRecurseSubmodules = on-demand
[submodule "static_assert"]
path = libs/static_assert
url = ../static_assert.git
fetchRecurseSubmodules = on-demand
[submodule "tuple"]
path = libs/tuple
url = ../tuple.git
fetchRecurseSubmodules = on-demand
[submodule "logic"]
path = libs/logic
url = ../logic.git
fetchRecurseSubmodules = on-demand
[submodule "io"]
path = libs/io
url = ../io.git
fetchRecurseSubmodules = on-demand
[submodule "tokenizer"]
path = libs/tokenizer
url = ../tokenizer.git
fetchRecurseSubmodules = on-demand
[submodule "rational"]
path = libs/rational
url = ../rational.git
fetchRecurseSubmodules = on-demand
[submodule "python"]
path = libs/python
url = ../python.git
fetchRecurseSubmodules = on-demand
[submodule "function"]
path = libs/function
url = ../function.git
fetchRecurseSubmodules = on-demand
[submodule "test"]
path = libs/test
url = ../test.git
fetchRecurseSubmodules = on-demand
[submodule "disjoint_sets"]
path = libs/disjoint_sets
url = ../disjoint_sets.git
fetchRecurseSubmodules = on-demand
[submodule "algorithm"]
path = libs/algorithm
url = ../algorithm.git
fetchRecurseSubmodules = on-demand
[submodule "interval"]
path = libs/numeric/interval
url = ../interval.git
fetchRecurseSubmodules = on-demand
[submodule "numeric_conversion"]
path = libs/numeric/conversion
url = ../numeric_conversion.git
fetchRecurseSubmodules = on-demand
[submodule "conversion"]
path = libs/conversion
url = ../conversion.git
fetchRecurseSubmodules = on-demand
[submodule "ublas"]
path = libs/numeric/ublas
url = ../ublas.git
fetchRecurseSubmodules = on-demand
[submodule "iostreams"]
path = libs/iostreams
url = ../iostreams.git
fetchRecurseSubmodules = on-demand
[submodule "parameter"]
path = libs/parameter
url = ../parameter.git
[submodule "filesystem"]
path = libs/filesystem
url = ../filesystem.git
fetchRecurseSubmodules = on-demand
[submodule "exception"]
path = libs/exception
url = ../exception.git
fetchRecurseSubmodules = on-demand
[submodule "date_time"]
path = libs/date_time
url = ../date_time.git
fetchRecurseSubmodules = on-demand
[submodule "crc"]
path = libs/crc
url = ../crc.git
fetchRecurseSubmodules = on-demand
[submodule "compose"]
path = libs/compose
url = ../compose.git
fetchRecurseSubmodules = on-demand
[submodule "compatibility"]
path = libs/compatibility
url = ../compatibility.git
fetchRecurseSubmodules = on-demand
[submodule "bcp"]
path = tools/bcp
url = ../bcp.git
fetchRecurseSubmodules = on-demand
[submodule "inspect"]
path = tools/inspect
url = ../inspect.git
fetchRecurseSubmodules = on-demand
[submodule "quickbook"]
path = tools/quickbook
url = ../quickbook.git
fetchRecurseSubmodules = on-demand
[submodule "boostbook"]
path = tools/boostbook
url = ../boostbook.git
fetchRecurseSubmodules = on-demand
[submodule "random"]
path = libs/random
url = ../random.git
fetchRecurseSubmodules = on-demand
[submodule "any"]
path = libs/any
url = ../any.git
fetchRecurseSubmodules = on-demand
[submodule "bind"]
path = libs/bind
url = ../bind.git
fetchRecurseSubmodules = on-demand
[submodule "log"]
path = libs/log
url = ../log.git
fetchRecurseSubmodules = on-demand
+34 -5
View File
@@ -1,4 +1,4 @@
#~ Copyright 2003-2004, Rene Rivera.
#~ Copyright 2003-2005, 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)
@@ -17,6 +17,9 @@ Options:
-sTOOLS=<toolsets> Indicates the tools to build with.
--show-libraries Displays the list of Boost libraries that require
build and installation steps, then exit.
--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
@@ -67,9 +70,13 @@ Features:
--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.
Default PYTHON_ROOT; C:\\Python24 on Win32.
Default PYTHON_ROOT; /usr on Unix, Linux, Cygwin, etc.
--with-python-version[=2.4]
Build Boost.Python libraries with the Python
version indicated.
Default; 2.4.
--with-pydebug Build Boost.Python libraries using the
Python debug runtime.
@@ -128,6 +135,10 @@ include-locate ?= $(boost-locate)/include ;
local python-root = [ MATCH "^--with-python-root=(.*)" : $(ARGV) ] ;
PYTHON_ROOT ?= $(python-root) ;
# version of python
local python-version = [ MATCH "^--with-python-version=(.*)" : $(ARGV) ] ;
PYTHON_VERSION ?= $(python-version) ;
# variant for pydebug build
local with-debug-python ;
if --with-pydebug in $(ARGV)
@@ -145,6 +156,7 @@ for local arg in $(ARGV)
switch $(arg)
{
case --with-python-root=* : local _ ;
case --with-python-version=* : local _ ;
case --with-pydebug : local _ ;
case --with-* :
@@ -158,8 +170,25 @@ project-root ;
# bring in the rules for python
import python ;
# print out libraries to build/install
if --show-libraries in $(ARGV)
{
local library-jamfiles ;
library-jamfiles =
[ MATCH ^(.*build[/\\:]$(JAMFILE))$ :
[ glob-tree $(BOOST_ROOT)/libs : $(JAMFILE) ] ] ;
libraries =
[ MATCH ^.*libs[/\\:]([^/\\:]*)[/\\:]build[/\\:]Jamfile$ :
$(library-jamfiles) ] ;
EXIT $(libraries) ;
}
#
local version-tag = [ MATCH "^([^.]+).([^.]+)" : $(BOOST_VERSION) ] ;
local version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ] ;
if $(version-tag[3]) = 0
{
version-tag = $(version-tag[1-2]) ;
}
version-tag = $(version-tag:J="_") ;
#
+1 -1
View File
@@ -11,5 +11,5 @@ project boost ;
path-global BOOST_ROOT : . ;
# The current version of Boost.
BOOST_VERSION ?= 1.33.0 ;
BOOST_VERSION ?= 1.33.1 ;
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Vendored Executable
+310
View File
@@ -0,0 +1,310 @@
#!/bin/sh
# Copyright 2005 Douglas Gregor.
# 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)
BJAM=""
TOOLSET=""
BJAM_CONFIG=""
BUILD=""
PREFIX=/usr/local
EPREFIX=
LIBDIR=
INCLUDEDIR=
LIBS=""
PYTHON=python
PYTHON_VERSION=
PYTHON_ROOT=
ICU_ROOT=
# 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=\(.*\)"`
;;
-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
\`configure' configures Boost to adapt to a few kinds of systems.
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 Boost.Build toolset
[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 [disabled]
--with-icu=DIR specify the root of the ICU library installation
and enable Unicode/ICU support in Regex [disabled]
--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
# TBD: Determine where the script is located
my_dir="."
# Determine the toolset, if not already decided
if test "x$TOOLSET" = "x" ; then
TOOLSET=`$my_dir/tools/build/jam_src/build.sh --guess-toolset`
fi
rm -f config.log
# Build bjam
if test "x$BJAM" = "x" ; then
echo -n "Building Boost.Jam with toolset $TOOLSET... "
pwd=`pwd`
cd "$my_dir/tools/build/jam_src" && ./build.sh "$TOOLSET" > config.log 2>&1
cd $pwd
arch=`cd $my_dir/tools/build/jam_src && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
BJAM="$my_dir/tools/build/jam_src/$arch/bjam"
echo "tools/build/jam_src/$arch/bjam"
fi
# TBD: Turn BJAM into an absolute path
# If there is a list of libraries
if test "x$flag_show_libraries" = "xyes" ; then
libraries=`$BJAM -d0 --show-libraries`
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
for lib in $libraries
do
echo " $lib"
done
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
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]))" 2>&1`
if test $? != 0 ; then
echo "not found."
flag_no_python="yes"
LIBS="$LIBS --without-python"
else
echo $PYTHON_VERSION
fi
fi
if test "x$flag_no_python" = "x" ; then
if test "x$PYTHON_ROOT" = "x" ; then
echo -n "Detecting Python root... "
PYTHON_ROOT=`$PYTHON -c "import sys; print sys.prefix" 2>&1`
if test $? != 0 ; then
echo "not found."
flag_no_python="yes"
LIBS="$LIBS --without-python"
else
echo $PYTHON_ROOT
fi
fi
fi
echo -n "Python support?... "
if test "x$flag_no_python" = "x" ; then
echo "yes."
BJAM_CONFIG="$BJAM_CONFIG -sPYTHON_ROOT=$PYTHON_ROOT -sPYTHON_VERSION=$PYTHON_VERSION"
else
echo "no."
fi
fi
# Configure ICU
echo -n "Unicode/ICU support for Boost.Regex?... "
if test "x$flag_icu" = "xyes" ; then
if test "x$ICU_ROOT" = "x" ; then
BJAM_CONFIG="$BJAM_CONFIG -sHAVE_ICU=1"
echo "yes."
else
BJAM_CONFIG="$BJAM_CONFIG -sICU_PATH=$ICU_ROOT"
echo "$ICU_ROOT"
fi
else
echo "no."
fi
# Generate the Makefile
echo "Generating Makefile..."
cat > Makefile <<EOF
BJAM=$BJAM
TOOLSET=$TOOLSET
BJAM_CONFIG=$BJAM_CONFIG
PREFIX=$PREFIX
EPREFIX=$EPREFIX
LIBDIR=$LIBDIR
INCLUDEDIR=$INCLUDEDIR
LIBS=$LIBS
all: .dummy
@echo "\$(BJAM) \$(BJAM_CONFIG) -sTOOLS=\$(TOOLSET) \$(LIBS)"
@\$(BJAM) \$(BJAM_CONFIG) -sTOOLS=\$(TOOLSET) \$(LIBS) || \\
echo "Not all Boost libraries built properly."
clean: .dummy
rm -rf bin
distclean: clean
rm -rf Makefile config.log
check: .dummy
@cd status && ../\$(BJAM) \$(BJAM_CONFIG) -sTOOLS=\$(TOOLSET) test || echo "Some Boost regression tests failed. This is normal."
install: .dummy
@echo "\$(BJAM) \$(BJAM_CONFIG) --prefix=\$(PREFIX) --exec-prefix=\$(EPREFIX) --libdir=\$(LIBDIR) --includedir=\$(INCLUDEDIR) -sTOOLS=\$(TOOLSET) \$(LIBS) install"
@\$(BJAM) \$(BJAM_CONFIG) --prefix=\$(PREFIX) --exec-prefix=\$(EPREFIX) --libdir=\$(LIBDIR) --includedir=\$(INCLUDEDIR) -sTOOLS=\$(TOOLSET) \$(LIBS) install || echo "Not all Boost libraries built properly."
.dummy:
EOF
-859
View File
@@ -1,859 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="Template"
content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title></title>
</head>
<body bgcolor="#FFFFFF" link="#0000FF" vlink="#800080">
<h2 align="center">A Proposal for the Boost Directory Structure</h2>
<p align="center">By John Maddock.</p>
<p>The following proposal consists of three sections: A list of
requirements and objectives that the chosen structure must meet,
a set of tools to facilitate working with boost, and an actual
proposal for a structure that meets those requirements. In the
past I have argued vociferously for a &quot;do as little as
possible&quot; approach, however I have somewhat surprised myself
by coming out in favour of a radical reorganisation here. In many
ways though, the proposed directory structure is less important
than its ability to meet the requirements listed below, nor is it
the only structure that could arguably meet these requirements (especially
as some requirements are contradictory). Finally a couple of
caveats: All opinions expressed herein are my own; all ideas
expressed herein belong to over people (especially the good ones!).
Where possible credits are given, but my memory is far from
infallible so speak up if you've been missed out.</p>
<h2 align="center">Requirements</h2>
<h3>Consistency</h3>
<blockquote>
<p><b>Comment</b>: this should speak for itself.</p>
</blockquote>
<h3>Discoverability</h3>
<p>That is a casual user browsing the directory structure should
be able to immediately tell what belongs where.</p>
<blockquote>
<p><b>Rationale</b>: some users read the documentation,
others wander around aimlessly saying: &quot;I wonder what's
in here?&quot;, speak up if you recognise anyone!</p>
<p><b>Rationale</b>: automated tools should be able to glean
most of the information they need direct from the directory
structure.</p>
<p><b>Comment</b>: This is probably the most important
requirement and guides the choice of many others.</p>
</blockquote>
<h3>Boost is a single library</h3>
<blockquote>
<p>From an end users perspective boost should appear to be a
single library, with a single integrated build process etc.</p>
<p><b>Rationale</b>: This makes life much more comfortable
for end uses.</p>
</blockquote>
<h3>Boost is a collection of separate libraries</h3>
<blockquote>
<p><b>Rationale</b>: some libraries have an existence of
their own outside of boost, this should be able to continue.</p>
<p><b>Rationale</b>: different developers maintain individual
boost libraries.</p>
<p><b>Rationale</b>: as boost grows it may be necessary to
split the library into multiple zip file downloads, each
download should encapsulate one domain, and provide all the
files necessary for that domain (that may mean that some
files appear in more than one zip file).</p>
<p><b>Rationale</b>: some users will want to split off (and
maybe freeze) those parts of boost that are being used by a
particular project. These sub-libraries can then be checked
into the users own version control system (for example into a
local cvs repository as a vendor branch), and maintained
alongside the users own source for that project.</p>
<p><b>Implication:</b> that there exists some mechanism for
locating and separating off all the files associated with a
particular boost library, this should also take into account
dependencies (both for headers and for binary dependencies).</p>
</blockquote>
<h3>Individual boost libraries can be checked out from the cvs
repository</h3>
<blockquote>
<p>For example &quot;<code>cvs checkout regex</code>&quot;
would check out the regex library alone.</p>
<p><b>Rationale</b>: This makes maintenance much easier
especially when working with cvs-branches.</p>
<p><b>Implication</b>: we could isolate libraries into
separate directories, however that's only a partial solution
which takes no account of library dependencies (something
that's likely to become increasingly important). A better
solution is to use cvs module-aliases: as a test case I've
defined the regex library as a module-alias (this seems to
work very well). In this case I had to specify dependencies
by hand (an error prone process), much better would be a tool
that produced a list of library aliases to insert directly
into the cvs modules file.</p>
</blockquote>
<h3>Boost libraries can have dependencies to other libraries</h3>
<blockquote>
<p>There are three kinds of dependency possible:</p>
<ol>
<li>Libraries may depend upon the headers from other
boost libraries; these dependencies can be worked out
automatically.</li>
<li>Libraries may depend upon binaries from other boost
libraries; these dependencies can be worked out
automatically (hint: if library X depends upon header
H, and header H is from a library Y which has
mandatory source code associated with it, then there
is a binary dependency from X to Y).</li>
<li>Some domain specific libraries may depend upon third
party libraries (the python library for example).
These dependencies can not be deduced, and will
require meta-data to describe.</li>
</ol>
<p><b>Rationale: </b>these dependencies already exist in the
boost library.</p>
</blockquote>
<h3>Usable &quot;as is&quot;</h3>
<blockquote>
<p>That is the library should be usable directly from the
checked out cvs tree, or the extracted zip file, without a
mandatory install process.</p>
<p><b>Rationale:</b> For single user installations it is
sufficient and often easier to work directly from the zip/cvs
structure.</p>
<p><b>Rationale: </b>For &quot;occasional developers&quot;
this simplifies their ability to port/debug parts of the
library, and then submit patches based on changes made,
without having to get involved with &quot;wrapper compilers&quot;
and other tools that have been suggested, which may or may
not function on their platform with their toolset.</p>
<p><b>Implication:</b> that all header files are located
together, and not split between multiple library paths.</p>
<p><b>Comments:</b> during the recent discussion it was
suggested splitting the header files into separate
directories under &quot;boost-root/src/libname/boost&quot;,
however this involves specifying a large number of -I options
on the command line in order to be able to use boost direct
from the cvs tree. One suggested workaround was to use a
wrapper-compiler to pass the long list of includes to the
compiler semi-automatically. However some compilers are
integrated with their respective IDE's (this would make boost
almost impossible to use from that IDE), other platforms/compilers
have a restricted command line length (mingw32 is a
particular culprit), the command line in such cases could
easily become longer than the maximum permitted.</p>
</blockquote>
<h3>Header include mechanism reflects library name</h3>
<blockquote>
<p>We currently use:</p>
<p><code>#include &lt;boost/something.hpp&gt;</code></p>
<p>which immediately informs a casual browser of the code
that something.hpp is a part of the boost library and
separates it from:</p>
<p><code>#include &lt;rw/thread.h&gt; // this is Rogue Wave
library</code></p>
<p><b>Rationale</b>: This has worked well up to now and
should be continued.</p>
<p><b>Implication</b>: The boost-root/boost/ directory must
continue to exist (although there are possible arguments in
favour of making it boost-root/include/boost).</p>
</blockquote>
<h3>Libraries can have &quot;non-end user&quot; header files.</h3>
<blockquote>
<p>There are several kinds of header that come into this
category:</p>
<blockquote>
<p><b>Power user headers</b>: headers that should only be
used by experts.</p>
<p><b>Headers for library reuse</b>: these headers can be
used by other boost libraries, but should not be used by
end users.</p>
<p><b>Domain specific headers</b>: large domain specific
libraries may have a large number of headers that should
not make it into the main boost-root/boost/ header
directory (graph for example).</p>
<p><b>Implementation headers</b>: libraries may have
headers that contain implementation code, these headers
should never be included by anything except other headers
<i>in this library</i>.</p>
</blockquote>
<p><b>Implication: </b>the main header directory may contain
sub-directories as follows:</p>
<blockquote>
<p>boost-root/boost/library-name/ for all non-end user
headers, including domain specific headers.</p>
<p>boost-root/boost/library-name/detail/ for all
implementation detail headers.</p>
</blockquote>
</blockquote>
<h3>Libraries can be combined into domains</h3>
<blockquote>
<p>For example we may want to combine multiple math-related
libraries into a single &quot;numeric&quot; domain. In this
case each library in the domain would have it's own directory
under the domain name directory - for example headers for the
rational library may end up in boost-root/boost/numeric/rational/.</p>
<p><b>Rationale</b>: the aim here is to prevent the number of
top level libraries growing to an unmanageable number, and to
allow a logical group of libraries to be accessed with a
single name (for cvs checkouts or for building part of boost).</p>
</blockquote>
<h3>Root directory name reflects boost version</h3>
<blockquote>
<p>That is the name of the root directory in the zip file
reflects the boost version number &quot;boost_1_1_9/&quot;
etc, subsequent directories - like the boost header file
directory - then split off from this.</p>
<p><b>Rationale: </b>Allows developers to have multiple
versions coexisting on their machine within a single
directory structure, developers can switch between versions
with a by changing their compilers include and library search
paths only.</p>
</blockquote>
<h3>Consistent handling of development code</h3>
<blockquote>
<p>If there exists development or non-reviewed code in the
cvs tree then it should not interfere with release code or
exist in the same directory tree as the release code. Nor
should development code appear in zip files.</p>
<p><b>Rationale</b>: developers will typically work with
either the latest release code, or the latest development
code, they should be able to switch between them fairly
easily.</p>
<p><b>Rationale</b>: end users don't generally need to see
development code, it unnecessarily duplicates what's already
in the library and may lead to confusion as to what's release
code and what's still in development.</p>
<p><b>Implication</b>: There are a couple of ways of dealing
with this.</p>
<blockquote>
<p><b>Method 1</b>: provide a subdirectory &quot;<code>boost-root/development/library-name/</code>&quot;
that internally mirrors the directory structure of <code>boost-root/</code>,
to contain development code for library &quot;library-name&quot;.
This has the advantage of being easy to work with, but
requires setting multiple include and library search
paths, it also complicates multiple development versions
of the same library (for example multiple ports to new
platforms may proceed in parallel).</p>
<p><b>Method 2</b>: provide a separate top-level CVS
directory for development code, development code could
then be checked out with &quot;<code>cvs checkout
development&quot;</code> instead of &quot;<code>cvs
checkout boost&quot;</code>, otherwise this method is the
same as Method 1 above, and has the same pros and cons.</p>
<p><b>Method 3</b>: use a cvs branch for development work.
This allows multiple development efforts to proceed in
parallel, but may be harder to work with and keep in
synch with the main branch.</p>
</blockquote>
<p>Ideally<b> </b>I see no reason why either method 1 or 2
can't coexist with method 3, depending which method is easier
for the task in hand. Personally I prefer (2) to (1), but
that's just personal preference.</p>
</blockquote>
<h3>Mandatory Source code is centrally located</h3>
<blockquote>
<p>That is that there is some central directory (let's call
it boost-root/src/) that contains all mandatory source files
for a particular library in its sub-directories: boost-root/src/library1/,
boost-root/src/library2/ etc.</p>
<p><b>Rationale: </b>This ensures that the source is easily
discoverable by the user; for example if a user suspects that
there may be a bug in library X, and decides to try and debug
the problem, they may want to add all the source code for
library X directly to their project to facilitate debugging.
(I appreciate that the build process <i>may</i> provide
debugging versions of the library, but it is still often
easier to add the source direct to the IDE's project,
depending upon how well the IDE handles debugging of external
libraries).</p>
<p><b>Rationale: </b>some IDE's have search paths for source
files as well as headers etc, this structure shortens the
paths to mandatory source files (this is more of a feature
request than a requirement).</p>
</blockquote>
<h3>Directories containing documentation contain an index.html
file, and nothing but documentation</h3>
<blockquote>
<p><b>Rationale</b>: Some file browsers (KFM for example)
will automatically display documentation when they see either
index.htm or index.html in the current directory. Any other
files located in that directory effectively become &quot;hidden&quot;
from the user. Whether this is an annoyance or a great
feature depends upon your point of view. Separating
documentation into it's own sub-directory solves this problem
(it happens to make installation of the documentation easier
as well).</p>
<p><b>Footnote</b>: actually KFM is usually quite intelligent
about displaying documentation, however it does sometimes get
it wrong.</p>
</blockquote>
<h3>Boost supports an integrated build process</h3>
<blockquote>
<p><b>Rationale</b>: Currently most boost libraries are
&quot;headers only&quot;, those that are not have their own
build processes or none at all. This is confusing for the end
user, especially as boost is likely to get much larger.</p>
</blockquote>
<h3>Boost supports building of separate sub-libraries</h3>
<blockquote>
<p><b>Rationale</b>: Building boost as a single monolithic
library is likely to put end users off - especially as boost
grows in size - few users will use all of boost in a single
project (even if they use all of it at some time or another).</p>
<p><b>Implication</b>: Build each boost library separately
using a consistent naming scheme incorporating the library
name and the compiler name: libboost_timer_gcc.so, libboost_regex_gcc.so,
lib_boost_thread_gcc.so etc. Provide a monolithic version of
the library as an option for those that want a simple life (this
is mainly more appropriate for static libraries where unused
library code doesn't make it into the executable).</p>
</blockquote>
<h3>Boost supports multiple compiler build options.</h3>
<blockquote>
<p><b>Rationale</b>: some compilers ship with multiple run-time
libraries. For example the Borland C++ compiler comes with 6
different runtimes, any third party libraries must be built
with the same runtime options as the executable to which it
will be linked, failure to observe this rule leads to hard to
track down runtime crashes.</p>
<p><b>Implication</b>: boost libraries must each be built
multiple times with the same runtime variants that the
compiler ships with. As before name mangling separates the
variants: </p>
</blockquote>
<pre> boost_regex_bc55_cw.lib
boost_regex_bc55_cwi.lib
boost_regex_bc55_cwi.dll
boost_regex_bc55_cwm.lib
boost_regex_bc55_cwmi.lib
boost_regex_bc55_cwmi.dll
boost_regex_bc55_cp.lib
boost_regex_bc55_cpi.lib
boost_regex_bc55_cpi.dll</pre>
<blockquote>
<p>(for non-Borland users the suffixes chosen here reflect
the names of Borland's own runtime libraries).</p>
</blockquote>
<h3>Boost's build system uses the minimal amount of meta-data
required.</h3>
<blockquote>
<p><b>Rationale</b>: some meta-data is likely to be required,
but to reduce maintenance requirements this should be as
small as possible. Generally speaking the smaller the meta-data
requirement the more likely it is that the build system is in
synch with the library. The worst case would be hand-crafted
makefiles (hard to maintain), the best case no meta-data at
all; for example the directory structure describes the
library well enough that makefiles (or their equivalent) can
be automatically generated.</p>
</blockquote>
<h3>Boost supports installation to a central location</h3>
<blockquote>
<p><b>Rationale</b>: most unix variants more or less require
an install step before using third party libraries, this also
allows network installs (for multiple compilers and/or
platforms if required), from a single source tree.</p>
</blockquote>
<blockquote>
<p><b>Implication</b>: Keep the boost directory structure as
close as possible to the install structure to simplify the
installation process (strictly speaking this is not an
absolute requirement, but cross-platform installation is hard
enough with making it any harder than it needs to be). The
easiest way is to keep the documentation/header/build trees
separate.</p>
</blockquote>
<h3>The boost directory structure should be &quot;optimally
branched&quot;</h3>
<blockquote>
<p>This is a nebulous requirement that is based as much on
personal preference as anything else.</p>
<p><b>Rationale</b>: the directory structure is more &quot;discoverable&quot;
if it branches consistently - that is with no directories
with a massive number of entries.</p>
<p><b>Implication</b>: where appropriate combine related
libraries into domains.</p>
<p><b>Implication</b>: avoid directories with a single sub-directory
entry (redundancy).</p>
</blockquote>
<h2 align="center">Proposed tools to aid boost management (build
system)</h2>
<p>While writing the requirements above one theme kept
reoccurring; that of interdependency of boost libraries, and the
need for an automated tool to deal with this problem. In fact
from a code-reuse point of view, we need a library that describes
the boost library and determines library dependencies that can
then be reused in multiple tools. In my view the gains in ease of
management, and automatic generation of makefiles etc, means that
these tools should be developed regardless of the actual
directory structure chosen (although the code will probably be
dependent upon the directory structure chosen).</p>
<h3>Dependency library</h3>
<blockquote>
<p>This library would define two types:</p>
<p><b>Library</b>: defines the files that belong to a
particular library, plus header file dependencies and a list
of binary dependencies to other boost libraries.</p>
<p><b>Libraries</b>: a collection of Library objects, also
maintains a database of which header belongs to which library
(used to calculate binary dependencies).</p>
<p>As far as is possible, these types should be able to load
themselves directly from the boost directory structure, with
only a minimal amount of meta-data used to describe the
unusual cases.</p>
</blockquote>
<h3>Paths library</h3>
<p>In order for the dependency library to do it's job it is
necessary to iterate over a directory structure, join and split
path names, and convert path names to/from a platform specific
format. For example to insert relative-paths into makefiles which
may be used on platforms other than the one on which the makefile
is generated. Some, but by no means all, of this functionality is
already covered by Dietmar Kühl's dir_it library.</p>
<h3>Automatic alias generation</h3>
<p>This is a short program that just iterates through a Libraries
collection and prints out the dependencies, so that the result
can be cut and pasted into the cvs modules file.</p>
<h3>Boost distiller</h3>
<p>This is almost the same program as the alias generator, but
copies files to a new location instead of printing them out. Used
to &quot;distil&quot; out a subset of the boost library (including
dependencies). This can be used to: split boost into multiple (domain
specific) zip files for easier download, or split out that subset
of boost that is being used by a particular project (for
integration with the project without getting the whole of boost).</p>
<h3>Build system</h3>
<p>By combining the description of the boost library contained in
a Libraries object with a description of the compiler/platform in
use, it is possible to do one of two things: directly build the
library, or output compiler/platform specific makefiles for
distribution with boost. For brevity I'm going to skip over a
description of this here - my pencil and paper sketch has a list
of around 14 points of variation between compilers, and another
list of 7 options for each compiler configuration (release, debug,
static, dynamic etc). Probably even this fairly long list is not
complete.</p>
<p>I'm assuming that the build system will probably output
makefiles in the first instance; apart from anything else, most
compilers come with some kind of make, using this avoids the need
for the end user to have to build/install any tools that do not
ship with their compiler. Here I'm assuming that the boost
library maintainers periodically generate the makefiles, and then
ship them with the library.</p>
<h2 align="center">The directory structure</h2>
<table border="0" cellpadding="7" cellspacing="1" width="100%">
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#008080">Directory</td>
<td valign="top" width="43%" bgcolor="#008080">Description</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/boost/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">All entry
point boost headers, mainly these should be called &quot;library-name.hpp&quot;</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/boost/library-name/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">All domain
specific headers, all &quot;expert-user&quot; non-entry
point headers.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/boost/library-name/detail/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">All
implementation private headers.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/src/library-name/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">All
mandatory source files.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/src/library-name/config/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">Any
private configuration code (for example autoconf scripts),
if these grow then we could move to an integrated
configure system in Boost-root/config/ but that isn't
currently necessary.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/src/library-name/build/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">Temporary
location for private build systems, until the boost-wide
integrated build comes on line.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/docs/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">All common
documentation.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/docs/library-name/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">All
documentation for &quot;library-name&quot;; must include
an index.htm file.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td valign="top" bgcolor="#C0C0C0">Boost-root/licence</td>
<td bgcolor="#C0C0C0">A &quot;generic&quot; boost licence
that describes the minimal guarantees made by all boost
libraries (free for commercial use etc), with sub-directories
for those boost libraries that have their own licences (currently
just regex and graph, but this number is likely to grow).</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/tests/library-name/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">All test
programs for &quot;library-name&quot;. These may be
either: a single (multi-file) test program, multiple
single file test programs, or multiple sub-directories (one
for each test program).</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/examples/library-name/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">All
example programs for &quot;library-name&quot;. These may
be either: a single (multi-file) example program,
multiple single file example programs, or multiple sub-directories
(one for each example program).</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/tools/tool-name/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">Contains
all files required to build and use the specified tool (makefile
generators etc).</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="6%">&nbsp;</td>
<td valign="top" width="44%" bgcolor="#C0C0C0">Boost-root/build/</td>
<td valign="top" width="43%" bgcolor="#C0C0C0">The boost
build system. Consists of a collection of makefiles (one
for each supported compiler), plus subdirectories: libs/
for built libraries, bin/ for built dll's (win32 only)
and obj/ for object files.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
<p>There are a couple of myths surrounding this structure that
need exploding:</p>
<h4>It is hard to check in new libraries to the cvs repository</h4>
<p>Not true: if the submission arrives as a zip file containing
the directory structure described above, then the command:</p>
<p><code>cvs import boost library-name library-name-sub</code></p>
<p>will import the whole of the <i>current</i> directory tree and
&quot;intermingle&quot; it with the existing boost tree in the
repository.</p>
<p>There is one caveat to this however: if the imported source
contains some files that were already in the boost directory tree
(probably not a common situation), then an additional merge and
resolve conflicts step arises:</p>
<p>On the main branch working copy:</p>
<p><code>cvs checkout -jlibrary-name-sub boost</code></p>
<p>Resolve any conflicts, and then:</p>
<p><code>cvs commit</code></p>
<p>The latter two steps should not be necessary in most cases,
and occur whatever directory structure is used (it is probably
easier in most cases to resolve such conflicts manually before
importing the new sources).</p>
<h4>It is hard to checkout or to commit individual boost
libraries.</h4>
<p>By using cvs aliases (defined in the modules file) this
situation does not arise, just specify the module/alias name when
performing a checkout/commit.</p>
<h2 align="center">Migrating to the new structure</h2>
<p>This is probably the hardest and most painful part of the
whole process. I'm going to suggest a migration method as follows:</p>
<ol>
<li>Instigate a moratorium on cvs commits.</li>
<li>Copy the files to the new structure and commit the
changes, leaving the boost-root/libs/ directory in place
for now.</li>
<li>Fix html links, and documentation descriptions of file
locations.</li>
<li>Fix any library specific scripts/makefiles.</li>
<li>Publish the new structure (as a zip-file beta
distribution) and ask boost users/authors to check that
everything looks OK.</li>
<li>Delete the boost-root/libs/ directory (actually this is
quite hard, as cvs has no method for removing whole
directory trees).</li>
<li>Lift the moratorium on changes.</li>
<li>Publish the next boost revision with the new structure.</li>
</ol>
<p>The whole process described above is quite likely to take 1-2
weeks, during which no changes can be committed; this is going to
require a fair amount of co-ordination between developers (actually
this applies to any major change to the directory structure,
irrespective of what the change is).</p>
<p>You will note that I haven't mentioned a time scale for the
associated tools that I have suggested, probably these will need
to be developed after the directory structure changes - although
I believe it is possible to develop a minimal subset (the library
description and alias generator) before making the changes if
that is required.</p>
<p>&nbsp;</p>
<p>There were a couple of other directory structures that were
evaluated while preparing this document:</p>
<p><i>The &quot;half way house structure&quot;:</i></p>
<p>This is the same as the current structure, but moves mandatory
source files to boost-root/src/libname. This is easier to migrate
to from the current structure, but was felt to be neither one
thing nor the other.</p>
<p><i>The &quot;skinny root structure&quot;:</i></p>
<p>This was proposed by John David, and Lois Goldthwaite, and
moves the contents of the current boost-root/libs/ directory into
boost-root/boost/. My main objection to this proposal is that it
is less &quot;discoverable&quot; than the one presented here - my
immediate reaction was &quot;where has everything gone&quot; - I
also dislike mixing headers and non-headers in the same tree.
However I'm prepared to accept that this could just be due to
personal bias.</p>
<h2 align="center">Acknowledgements</h2>
<p>The following people have had their ideas reused,
reconstituted and reformulated :-)</p>
<p>Beman Dawes, Ed Brey, Walter E. Brown, John (EBo) David, Jeff
Garland, Lois Goldthwaite, Jens Maurer, Jeff Squyres, Gary Powell
and Daryle Walker.</p>
<p>
<hr>
<p>
<h2 align="center">An Alternative Directory Structure</h2>
<p align="center">By Jens Maurer</p>
I favor the following structure, which puts different emphasis on the
some of the requirements.
<p>
<table border="1">
<tr>
<th>Directory</th>
<th>Description</th>
</tr>
<tr>
<td>Boost-root/include/boost/</td>
<td>All entry-point boost headers, mainly these should be called
"library-name.hpp".</td>
</tr>
<tr>
<td>Boost-root/include/boost/.../</td>
<td>Domain-specific subdirectory; the "..." can be empty or
arbitrarily nested while observing the "optimally branched"
requirement.</td>
</tr>
<tr>
<td>Boost-root/include/boost/.../library-name/</td>
<td>All domain-specific headers, all "expert-user" non-entry point
headers.</td>
</tr>
<tr>
<td>Boost-root/include/boost/.../library-name/detail/</td>
<td>All implementation private headers.</td>
</tr>
<tr>
<td>Boost-root/libs/.../</td>
<td>Main directory for a given subdomain; the "..." can be empty or
arbitrarily nested while observing the "optimally branched"
requirement. The "..." must correspond to some "..." in the header
tree. The directory should contain a "index.html" which links to all
libraries and subdomains contained.</td>
</tr>
<tr>
<td>Boost-root/libs/.../library-name/</td>
<td>Main directory for a given library.</td>
</tr>
<tr>
<td>Boost-root/libs/.../library-name/src/</td>
<td>All mandatory source files for the library.</td>
</tr>
<tr>
<td>Boost-root/libs/.../library-name/build/</td>
<td>Temporary location for private build system, until the boost-wide
integrated build becomes available.</td>
</tr>
<tr>
<td>Boost-root/libs/.../library-name/config/</td>
<td>Any private configuration code (for example, autoconf
scripts).</td>
</tr>
<tr>
<td>Boost-root/libs/.../library-name/doc/</td>
<td>All documentation for the library.</td>
</tr>
<tr>
<td>Boost-root/libs/.../library-name/test/</td>
<td>All regression tests for the library, suitable for the regression
test suite. Due to test execution time constraints, not all of the tests
may actually be added to "regression.cfg".</td>
</tr>
<tr>
<td>Boost-root/libs/.../library-name/example/</td>
<td>All example programs for "library-name". These may be either: a
single (multi-file) example program, multiple single file example
programs, or multiple sub-directories (one for each example
program).</td>
</tr>
<tr>
<td>Boost-root/tools/tool-name/</td>
<td>Contains all files required to build and use the specified tool
(makefile generators etc).</td>
</tr>
<tr>
<td>Boost-root/build</td>
<td>The boost build system (user front-end; tools go in the "tools"
hierarchy). Details still hazy.</td>
</tr>
<tr>
<td>Boost-root/more/license.html</td>
<td>A "generic" boost license that describes the minimal guarantee
provided by all boost libraries. This should get a prominent link on
the main boost page.</td>
</tr>
</table>
<p>
Note that the "include" path component contains only one subdirectory
"boost" and thus violates the "optimally branched" requirement. It
helps with discoverability, though, because people know what to expect
under any directory named "include", i.e. header files.
</body>
</html>
+101
View File
@@ -0,0 +1,101 @@
<html>
<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.67.2">
<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="id903347"></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="id903366"></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="id903379"></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="id903409"></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 &amp;</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="id903472"></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="id903484"></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>
+54
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="threads/reference.html#id659497" title="Header &lt;boost/thread/once.hpp&gt;">
<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#id659497"><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 &#8212; 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="id1217349"></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#id659497"><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>
+49
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="tribool/reference.html#id1082320" title="Header &lt;boost/logic/tribool.hpp&gt;">
<link rel="prev" href="tribool/reference.html" title="Reference">
<link rel="next" href="tribool/tests.html" title="Testsuite">
</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="tribool/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="tribool/reference.html#id1082320"><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="tribool/tests.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 &#8212; 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="id1242129"></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="tribool/reference.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="tribool/reference.html#id1082320"><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="tribool/tests.html"><img src="images/next.png" alt="Next"></a>
</div>
</body>
</html>
+59
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="variant/reference.html#id1247300" title="Header &lt;boost/variant/variant_fwd.hpp&gt;">
<link rel="prev" href="BOOST_VARIANT_LIMIT_TYPES.html" title="Macro BOOST_VARIANT_LIMIT_TYPES">
<link rel="next" href="id652972.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#id1247300"><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="id652972.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 &#8212; <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="id1315177"></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#id1247300"><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="id652972.html"><img src="images/next.png" alt="Next"></a>
</div>
</body>
</html>
+52
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="variant/reference.html#id1247300" title="Header &lt;boost/variant/variant_fwd.hpp&gt;">
<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#id1247300"><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 &#8212; <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="id1315118"></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#id1247300"><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>
+165
View File
@@ -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.67.2">
<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="id904785"></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="id904800"></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="id904813"></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&lt;Iter&gt;::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&lt;Iter&gt;::iterator_category</pre>
<p>The category of the iterator</p>
</li>
</ul></div>
</div>
<div class="refsect1" lang="en">
<a name="id904853"></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="id904891"></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="id904910"></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 &amp;</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="id905002"></a><h2>Complexity</h2>
<p>
All iterator operations must take amortized constant time.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id905009"></a><h2>Invariants</h2>
<div class="variablelist"><dl>
<dt><span class="term">Predecrement must return object</span></dt>
<dd><p><code class="computeroutput">&amp;i = &amp;(--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="id905070"></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&lt;T&gt;::iterator</span></span></li>
</ul></div>
</div>
<div class="refsect1" lang="en">
<a name="id905092"></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>
+82 -8
View File
@@ -1,10 +1,84 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/CopyConstructible.html">
</head>
<body>
Automatic redirection failed, please go to
<a href="http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/CopyConstructible.html">http://www.boost.org/regression-logs/cs-win32_metacomm/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.67.2">
<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="id905845"></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="id905852"></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="id905883"></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="id905920"></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>
+83
View File
@@ -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.67.2">
<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="id905747"></a><h2>Description</h2>
<p>DefaultConstructible objects only need to have a default
constructor.</p>
</div>
<div class="refsect1" lang="en">
<a name="id905754"></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="id905774"></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="id905810"></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&lt;double&gt;</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>
+91
View File
@@ -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.67.2">
<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="id905947"></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="id905965"></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="id905996"></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="id906042"></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&lt;int&gt;</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>
+58
View File
@@ -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 &lt;boost/algorithm/string/concept.hpp&gt;">
<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 &#8212; 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>&lt;<span class="bold"><strong>typename</strong></span> FinderT, <span class="bold"><strong>typename</strong></span> IteratorT&gt;
<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>
+58
View File
@@ -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 &lt;boost/algorithm/string/concept.hpp&gt;">
<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 &#8212; 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>&lt;<span class="bold"><strong>typename</strong></span> FormatterT, <span class="bold"><strong>typename</strong></span> FinderT, <span class="bold"><strong>typename</strong></span> IteratorT&gt;
<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>
+182
View File
@@ -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.67.2">
<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="id904432"></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="id904448"></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="id904468"></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&lt;Iter&gt;::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&lt;Iter&gt;::iterator_category</pre>
<p>The category of the iterator</p>
</li>
</ul></div>
</div>
<div class="refsect1" lang="en">
<a name="id904508"></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="id904545"></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="id904564"></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 &amp;</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-&gt;{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 &amp;</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="id904698"></a><h2>Complexity</h2>
<p>
All iterator operations must take amortized constant time.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id904705"></a><h2>Invariants</h2>
<div class="variablelist"><dl>
<dt><span class="term">Predecrement must return object</span></dt>
<dd><p><code class="computeroutput">&amp;i = &amp;(++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="id904737"></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&lt;T&gt;::iterator</span></span></li>
</ul></div>
</div>
<div class="refsect1" lang="en">
<a name="id904757"></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>
+190
View File
@@ -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.67.2">
<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="id903511"></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="id903526"></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="id903555"></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&lt;Iter&gt;::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&lt;Iter&gt;::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&lt;Iter&gt;::iterator_category</pre>
<p>The category of the iterator</p>
</li>
</ul></div>
</div>
<div class="refsect1" lang="en">
<a name="id903618"></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="id903656"></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="id903726"></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 &amp;</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="id903872"></a><h2>Complexity</h2>
<p>
All iterator operations must take amortized constant time.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id903878"></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="id903891"></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>
+105
View File
@@ -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.67.2">
<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="id906077"></a><h2>Description</h2>
<p>LessThanComparable types must have <code class="computeroutput">&lt;</code>,
<code class="computeroutput">&gt;</code>, <code class="computeroutput">&lt;=</code>, and <code class="computeroutput">&gt;=</code>
operators.</p>
</div>
<div class="refsect1" lang="en">
<a name="id906106"></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="id906137"></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 &lt; 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 &lt;= 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 &gt; 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 &gt;= 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="id906230"></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>
+200
View File
@@ -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.67.2">
<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="id903942"></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="id903957"></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&lt;Iter&gt;::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&lt;Iter&gt;::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&lt;Iter&gt;::iterator_category</pre>
<p>The category of the iterator</p>
</li>
</ul></div>
</div>
<div class="refsect1" lang="en">
<a name="id904021"></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="id904073"></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="id904192"></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 &amp;</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="id904358"></a><h2>Complexity</h2>
<p>
All iterator operations must take amortized constant time.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id904365"></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="id904414"></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>
+230
View File
@@ -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.67.2">
<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="id905119"></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="id905135"></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="id905157"></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&lt;Iter&gt;::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&lt;Iter&gt;::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&lt;Iter&gt;::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="id905214"></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="id905269"></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="id905288"></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 &amp;</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 &amp;</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 &amp;</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 &amp;</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 &amp;</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 &amp;</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="id905666"></a><h2>Complexity</h2>
<p>
All iterator operations must take amortized constant time.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id905673"></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&lt;T&gt;::iterator</span></span></li>
<li><span class="simplelist"><span class="type">std::vector&lt;T&gt;::const_iterator</span></span></li>
<li><span class="simplelist"><span class="type">std::deque&lt;T&gt;::iterator</span></span></li>
<li><span class="simplelist"><span class="type">std::deque&lt;T&gt;::const_iterator</span></span></li>
</ul></div>
</div>
<div class="refsect1" lang="en">
<a name="id905720"></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>
+256
View File
@@ -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.67.2">
<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="id906256"></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="id906302"></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="id906347"></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="id906365"></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 &amp;</span></p></td>
</tr>
<tr>
<td><p>Predecrement</p></td>
<td><p>--x</p></td>
<td><p><span class="type">T &amp;</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 &amp;</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 &amp;</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 &amp;</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 &gt;&gt; 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 &gt;&gt; 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 &gt;&gt;= a</p></td>
<td><p><span class="type">T &amp;</span></p></td>
</tr>
<tr>
<td><p>Less-than comparison</p></td>
<td><p>x &lt; 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 &lt; 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 &lt; boost::sample_value &lt; std::size_t &gt;()</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 &gt; 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 &gt; 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 &lt;= 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 &lt;= 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 &gt;= 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 &gt;= 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 &gt;= 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="id906804"></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>
+107
View File
@@ -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 &lt;boost/program_options/variables_map.hpp&gt;">
<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 &#8212; </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> &amp;</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 &amp;) <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> &amp;</span> <a href="abstract_variables_map.html#id1118297-bb">get</a>(<span class="bold"><strong>const</strong></span> std::string &amp;) <span class="bold"><strong>const</strong></span>;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1277263"></a><h2>Description</h2>
<p>Implements string-&gt;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> &amp;</span> <a name="id1136288-bb"></a><span class="bold"><strong>operator</strong></span>[](<span class="bold"><strong>const</strong></span> std::string &amp; 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> &amp;</span> <a name="id1118297-bb"></a>get(<span class="bold"><strong>const</strong></span> std::string &amp; 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>
+75
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id904857" title="Header &lt;boost/date_time/local_timezone_defs.hpp&gt;">
<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#id904857"><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 &#8212; </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>&lt;<span class="bold"><strong>typename</strong></span> date_type&gt;
<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>&lt; date_type &gt; 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>&lt; date_type &gt; end_rule_functor;  
  <span class="emphasis"><em>// <a href="acst_dst_trait.html#id892702-bb">public static functions</a></em></span>
  <span class="type">day_of_week_type</span> <a href="acst_dst_trait.html#id892706-bb">start_day</a>() ;
  <span class="type">month_type</span> <a href="acst_dst_trait.html#id1031674-bb">start_month</a>() ;
  <span class="type">day_of_week_type</span> <a href="acst_dst_trait.html#id1031686-bb">end_day</a>() ;
  <span class="type">month_type</span> <a href="acst_dst_trait.html#id1031698-bb">end_month</a>() ;
  <span class="type"><span class="bold"><strong>int</strong></span></span> <a href="acst_dst_trait.html#id906960-bb">dst_start_offset_minutes</a>() ;
  <span class="type"><span class="bold"><strong>int</strong></span></span> <a href="acst_dst_trait.html#id906972-bb">dst_end_offset_minutes</a>() ;
  <span class="type"><span class="bold"><strong>int</strong></span></span> <a href="acst_dst_trait.html#id906984-bb">dst_shift_length_minutes</a>() ;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1037831"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1037834"></a><h3>
<a name="id892702-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="id892706-bb"></a>start_day() ;</pre></li>
<li><pre class="literallayout"><span class="type">month_type</span> <a name="id1031674-bb"></a>start_month() ;</pre></li>
<li><pre class="literallayout"><span class="type">day_of_week_type</span> <a name="id1031686-bb"></a>end_day() ;</pre></li>
<li><pre class="literallayout"><span class="type">month_type</span> <a name="id1031698-bb"></a>end_month() ;</pre></li>
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>int</strong></span></span> <a name="id906960-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="id906972-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="id906984-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#id904857"><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>
+64
View File
@@ -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 &lt;boost/algorithm/string/predicate.hpp&gt;">
<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 &#8212; '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>&lt;<span class="bold"><strong>typename</strong></span> RangeT, <span class="bold"><strong>typename</strong></span> PredicateT&gt;
  <span class="type"><span class="bold"><strong>bool</strong></span></span> all(<span class="bold"><strong>const</strong></span> RangeT &amp; 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>
+120
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id799078" title="Header &lt;boost/date_time/date_names_put.hpp&gt;">
<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#id799078"><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 &#8212; 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>&lt;<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&lt;charT&gt; &gt;
<span class="bold"><strong>class</strong></span> all_date_names_put : <span class="bold"><strong>public</strong></span> boost::date_time::date_names_put&lt; Config, charT, OutputIterator &gt;
{
<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#id765517-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#id725691-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#id725696-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#id795000-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#id795012-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#id795025-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#id795037-bb">get_long_weekday_names</a>() <span class="bold"><strong>const</strong></span>;
  <span class="emphasis"><em>// <a href="all_date_names_put.html#id861893-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#id861898-bb">do_put_month_short</a>(iter_type &amp;, 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#id766005-bb">do_put_month_long</a>(iter_type &amp;, 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#id832609-bb">do_put_special_value</a>(iter_type &amp;, 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#id976042-bb">do_put_weekday_short</a>(iter_type &amp;, 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#id865057-bb">do_put_weekday_long</a>(iter_type &amp;, 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#id1008218-bb">do_month_sep_char</a>(iter_type &amp;) <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#id756356-bb">do_day_sep_char</a>(iter_type &amp;) <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#id968854-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#id732024-bb">do_month_format</a>() <span class="bold"><strong>const</strong></span>;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1008108"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1008112"></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="id765517-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="id1008210"></a><h3>
<a name="id725691-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="id725696-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="id795000-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="id795012-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="id795025-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="id795037-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="id1008394"></a><h3>
<a name="id861893-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="id861898-bb"></a>do_put_month_short(iter_type &amp; 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="id766005-bb"></a>do_put_month_long(iter_type &amp; 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="id832609-bb"></a>do_put_special_value(iter_type &amp; 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="id976042-bb"></a>do_put_weekday_short(iter_type &amp; 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="id865057-bb"></a>do_put_weekday_long(iter_type &amp; 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="id1008218-bb"></a>do_month_sep_char(iter_type &amp; 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="id756356-bb"></a>do_day_sep_char(iter_type &amp; 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="id968854-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="id732024-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#id799078"><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>
+71
View File
@@ -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 &lt;boost/program_options/errors.hpp&gt;">
<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 &#8212; </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 &amp;, <span class="bold"><strong>const</strong></span> std::vector&lt; std::string &gt; &amp;);
  <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&lt; std::string &gt; 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 &amp; name,
                 <span class="bold"><strong>const</strong></span> std::vector&lt; std::string &gt; &amp; 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>
+62
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id927431" title="Header &lt;boost/date_time/local_time/local_date_time.hpp&gt;">
<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#id927431"><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 &#8212; 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#id1034271-bb">ambiguous_result</a>(std::string = "");
  <span class="emphasis"><em>// <a href="ambiguous_result.html#id1034266-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1109236"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1109239"></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="id1034271-bb"></a>ambiguous_result(std::string _msg = "");</pre></li></ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1109274"></a><h3>
<a name="id1034266-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#id927431"><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 -8
View File
@@ -1,10 +1,106 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/any.html">
</head>
<body>
Automatic redirection failed, please go to
<a href="http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/any.html">http://www.boost.org/regression-logs/cs-win32_metacomm/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.67.2">
<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#id897898">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 &lt;boost/any.hpp&gt;</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="id897898"></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: November 03, 2005 at 06:08:29 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>
+87
View File
@@ -0,0 +1,87 @@
<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.67.2">
<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 &lt;boost/any.hpp&gt;</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 &lt;<a href="../../../boost/any.hpp" target="_top">boost/any.hpp</a>&gt;</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>&lt;<span class="bold"><strong>typename</strong></span> T&gt; <span class="type">T</span> <a href="../any_cast.html" title="Function any_cast">any_cast</a>(<a href="../boost/any.html" title="Class any">any</a> &amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T&gt; <span class="type">T</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> &amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> ValueType&gt; <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>&lt;<span class="bold"><strong>typename</strong></span> ValueType&gt; <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>
+144
View File
@@ -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.67.2">
<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="id898046"></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 &lt;list&gt;
#include &lt;boost/any.hpp&gt;
using <code class="computeroutput"><a href="../any_cast.html" title="Function any_cast">boost::any_cast</a></code>;
typedef std::list&lt;<code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code>&gt; many;
void append_int(many &amp; 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 &amp; values, const std::string &amp; value)
{
values.push_back(value);
}
void append_char_ptr(many &amp; values, const char * value)
{
values.push_back(value);
}
void append_any(many &amp; values, const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> &amp; value)
{
values.push_back(value);
}
void append_nothing(many &amp; 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> &amp; operand)
{
return operand.<code class="computeroutput"><a href="../boost/any.html#id104096-bb">empty</a></code>();
}
bool is_int(const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> &amp; operand)
{
return operand.<code class="computeroutput"><a href="../boost/any.html#id691727-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> &amp; operand)
{
try
{
<code class="computeroutput"><a href="../any_cast.html" title="Function any_cast">any_cast</a></code>&lt;const char *&gt;(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> &amp;)
{
return false;
}
}
bool is_string(const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> &amp; operand)
{
return <code class="computeroutput"><a href="../any_cast.html" title="Function any_cast">any_cast</a></code>&lt;std::string&gt;(&amp;operand);
}
void count_all(many &amp; values, std::ostream &amp; out)
{
out &lt;&lt; "#empty == "
&lt;&lt; std::count_if(values.begin(), values.end(), is_empty) &lt;&lt; std::endl;
out &lt;&lt; "#int == "
&lt;&lt; std::count_if(values.begin(), values.end(), is_int) &lt;&lt; std::endl;
out &lt;&lt; "#const char * == "
&lt;&lt; std::count_if(values.begin(), values.end(), is_char_ptr) &lt;&lt; std::endl;
out &lt;&lt; "#string == "
&lt;&lt; std::count_if(values.begin(), values.end(), is_string) &lt;&lt; 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 &amp;, const <code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> &amp;);
std::string name;
<code class="computeroutput"><a href="../boost/any.html" title="Class any">boost::any</a></code> value;
};
typedef std::list&lt;property&gt; 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> &amp;) = 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>
+39
View File
@@ -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.67.2">
<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="id899756"></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>
+67
View File
@@ -0,0 +1,67 @@
<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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="any/reference.html#header.boost.any.hpp" title="Header &lt;boost/any.hpp&gt;">
<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 &#8212; <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>&lt;<span class="bold"><strong>typename</strong></span> T&gt; <span class="type">T</span> any_cast(<a href="boost/any.html" title="Class any">any</a> &amp; operand);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T&gt; <span class="type">T</span> any_cast(<span class="bold"><strong>const</strong></span> <a href="boost/any.html" title="Class any">any</a> &amp; operand);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> ValueType&gt; <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>&lt;<span class="bold"><strong>typename</strong></span> ValueType&gt; <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="id899698"></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 T is ValueType, it returns a copy of the held value, otherwise, if T is a reference
to (possibly const qualified) ValueType, it returns a reference to the held
value.<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; overloads 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.</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>
+111
View File
@@ -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.67.2">
<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="id1174336"></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>
+103
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="variant/reference.html#id1143203" title="Header &lt;boost/variant/apply_visitor.hpp&gt;">
<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#id1143203"><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 &#8212; <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>&lt;<span class="bold"><strong>typename</strong></span> Visitor, <span class="bold"><strong>typename</strong></span> Variant&gt;
  <span class="type"><span class="bold"><strong>typename</strong></span> Visitor::result_type</span>
  apply_visitor(Visitor &amp; visitor, Variant &amp; operand);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Visitor, <span class="bold"><strong>typename</strong></span> Variant&gt;
  <span class="type"><span class="bold"><strong>typename</strong></span> Visitor::result_type</span>
  apply_visitor(<span class="bold"><strong>const</strong></span> Visitor &amp; visitor, Variant &amp; operand);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> BinaryVisitor, <span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2&gt;
  <span class="type"><span class="bold"><strong>typename</strong></span> BinaryVisitor::result_type</span>
  apply_visitor(BinaryVisitor &amp; visitor, Variant1 &amp; operand1,
                Variant2 &amp; operand2);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> BinaryVisitor, <span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2&gt;
  <span class="type"><span class="bold"><strong>typename</strong></span> BinaryVisitor::result_type</span>
  apply_visitor(<span class="bold"><strong>const</strong></span> BinaryVisitor &amp; visitor, Variant1 &amp; operand1,
                Variant2 &amp; operand2);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Visitor&gt;
  <span class="type"><a href="apply_visitor_delayed_t.html" title="Class template apply_visitor_delayed_t">apply_visitor_delayed_t</a>&lt;Visitor&gt;</span> apply_visitor(Visitor &amp; visitor);</pre></div>
<div class="refsect1" lang="en">
<a name="id1321222"></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#id1143203"><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>
+91
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="variant/reference.html#id1143203" title="Header &lt;boost/variant/apply_visitor.hpp&gt;">
<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#id1143203"><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 &#8212; 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>&lt;<span class="bold"><strong>typename</strong></span> Visitor&gt;
<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#id1069124-bb">apply_visitor_delayed_t</a>(Visitor &amp;);
  <span class="emphasis"><em>// <a href="apply_visitor_delayed_t.html#id892968-bb">function object interface</a></em></span>
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Variant&gt; <span class="type">result_type</span> <a href="apply_visitor_delayed_t.html#id1176265-bb"><span class="bold"><strong>operator</strong></span>()</a>(Variant &amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2&gt;
    <span class="type">result_type</span> <a href="apply_visitor_delayed_t.html#id656108-bb"><span class="bold"><strong>operator</strong></span>()</a>(Variant1 &amp;, Variant2 &amp;);
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1320846"></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="id1320881"></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="id1069124-bb"></a>apply_visitor_delayed_t(Visitor &amp; 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="id1320932"></a><h3>
<a name="id892968-bb"></a><code class="computeroutput">apply_visitor_delayed_t</code> function object interface</h3>
<div class="orderedlist"><ol type="1"><li>
<p><a name="id1042641-bb"></a></p>
<pre class="literallayout"><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Variant&gt; <span class="type">result_type</span> <a name="id1176265-bb"></a><span class="bold"><strong>operator</strong></span>()(Variant &amp; operand);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2&gt;
  <span class="type">result_type</span> <a name="id656108-bb"></a><span class="bold"><strong>operator</strong></span>()(Variant1 &amp; operand1, Variant2 &amp; 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#id1143203"><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 -8
View File
@@ -1,10 +1,116 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/array.html">
</head>
<body>
Automatic redirection failed, please go to
<a href="http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/array.html">http://www.boost.org/regression-logs/cs-win32_metacomm/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.67.2">
<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="id899791"></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 &lt;boost/array.hpp&gt;</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&lt;&gt;</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 &#8220;Design Rationale&#8221;</a>).</li>
<li>
<code class="computeroutput"><a href="boost/array.html#id693451">swap</a></code>() has no constant complexity.</li>
<li>
<code class="computeroutput"><a href="boost/array.html#id682468-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#id614158-bb">front</a></code>() and <code class="computeroutput"><a href="boost/array.html#id693304-bb">back</a></code>() are provided.</li>
<li>
<code class="computeroutput"><a href="boost/array.html#id618483-bb">operator[]</a></code> and <code class="computeroutput"><a href="boost/array.html#id619567-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>
+39
View File
@@ -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.67.2">
<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>
+48
View File
@@ -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.67.2">
<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>
+74
View File
@@ -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.67.2">
<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>&lt;int,4&gt; 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>&lt;int,4&gt; 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>
+59
View File
@@ -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.67.2">
<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 &lt;boost/array.hpp&gt;</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 &lt;<a href="../../../boost/array.hpp" target="_top">boost/array.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost {
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T, std::size_t N&gt; <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>&lt;<span class="bold"><strong>typename</strong></span> T, std::size_t N&gt; <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="../boost/array.html#id693451">swap</a>(<a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;, <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T, std::size_t N&gt;
    <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id693509"><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>&lt;T, N&gt;&amp;, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T, std::size_t N&gt;
    <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id693568"><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>&lt;T, N&gt;&amp;, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T, std::size_t N&gt;
    <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id693617"><span class="bold"><strong>operator</strong></span>&lt;</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T, std::size_t N&gt;
    <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id693678"><span class="bold"><strong>operator</strong></span>&gt;</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T, std::size_t N&gt;
    <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id693726"><span class="bold"><strong>operator</strong></span>&lt;=</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> T, std::size_t N&gt;
    <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="../boost/array.html#id693774"><span class="bold"><strong>operator</strong></span>&gt;=</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;, <span class="bold"><strong>const</strong></span> <a href="../boost/array.html" title="Class template array">array</a>&lt;T, N&gt;&amp;);
}</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>
+62
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id796826" title="Header &lt;boost/date_time/local_time/posix_time_zone.hpp&gt;">
<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#id796826"><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 &#8212; 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#id651144-bb">bad_adjustment</a>(std::string = "");
  <span class="emphasis"><em>// <a href="bad_adjustment.html#id651139-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1112242"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1112245"></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="id651144-bb"></a>bad_adjustment(std::string _msg = "");</pre></li></ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1112279"></a><h3>
<a name="id651139-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#id796826"><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>
+53
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="any/reference.html#header.boost.any.hpp" title="Header &lt;boost/any.hpp&gt;">
<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 &#8212; 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#id659048-bb">what</a>() <span class="bold"><strong>const</strong></span>;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id898637"></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="id659048-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>
+66
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id754023" title="Header &lt;boost/date_time/gregorian/greg_day.hpp&gt;">
<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#id754023"><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 &#8212; 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#id904710-bb">bad_day_of_month</a>();
  <a href="bad_day_of_month.html#id904712-bb">bad_day_of_month</a>(<span class="bold"><strong>const</strong></span> std::string &amp;);
  <span class="emphasis"><em>// <a href="bad_day_of_month.html#id904705-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1078761"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1078764"></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="id904710-bb"></a>bad_day_of_month();</pre></li>
<li><pre class="literallayout"><a name="id904712-bb"></a>bad_day_of_month(<span class="bold"><strong>const</strong></span> std::string &amp; s);</pre></li>
</ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1078817"></a><h3>
<a name="id904705-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#id754023"><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>
+62
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id999735" title="Header &lt;boost/date_time/gregorian/greg_day_of_year.hpp&gt;">
<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#id999735"><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 &#8212; 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#id829693-bb">bad_day_of_year</a>();
  <span class="emphasis"><em>// <a href="bad_day_of_year.html#id829688-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1079244"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1079247"></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="id829693-bb"></a>bad_day_of_year();</pre></li></ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1079280"></a><h3>
<a name="id829688-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#id999735"><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>
+62
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id929135" title="Header &lt;boost/date_time/tz_db_base.hpp&gt;">
<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#id929135"><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 &#8212; </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#id869275-bb">bad_field_count</a>(<span class="bold"><strong>const</strong></span> std::string &amp;);
  <span class="emphasis"><em>// <a href="bad_field_count.html#id869270-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1075228"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1075231"></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="id869275-bb"></a>bad_field_count(<span class="bold"><strong>const</strong></span> std::string &amp; s);</pre></li></ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1075270"></a><h3>
<a name="id869270-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#id929135"><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>
+61
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="function/reference.html#header.boost.function.hpp" title="Header &lt;boost/function.hpp&gt;">
<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 &#8212; 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#id906546-bb">bad_function_call</a>();
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1117378"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1117382"></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="id906546-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>
+53
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="variant/reference.html#id1039788" title="Header &lt;boost/variant/get.hpp&gt;">
<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#id1039788"><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 &#8212; <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#id870374-bb">what</a>() <span class="bold"><strong>const</strong></span>;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1321687"></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="id870374-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#id1039788"><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>
+62
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id1037441" title="Header &lt;boost/date_time/gregorian/greg_month.hpp&gt;">
<link rel="prev" href="id612209.html" title="Function template operator&lt;&lt;">
<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="id612209.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id1037441"><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 &#8212; 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#id865877-bb">bad_month</a>();
  <span class="emphasis"><em>// <a href="bad_month.html#id865872-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1080962"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1080965"></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="id865877-bb"></a>bad_month();</pre></li></ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1080998"></a><h3>
<a name="id865872-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="id612209.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id1037441"><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>
+62
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id796826" title="Header &lt;boost/date_time/local_time/posix_time_zone.hpp&gt;">
<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#id796826"><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 &#8212; 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#id732405-bb">bad_offset</a>(std::string = "");
  <span class="emphasis"><em>// <a href="bad_offset.html#id732401-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1112125"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1112128"></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="id732405-bb"></a>bad_offset(std::string _msg = "");</pre></li></ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1112163"></a><h3>
<a name="id732401-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#id796826"><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>
+52
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="variant/reference.html#id1179989" title="Header &lt;boost/variant/bad_visit.hpp&gt;">
<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#id1179989"><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 &#8212; <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#id822915-bb">what</a>() <span class="bold"><strong>const</strong></span>;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1322284"></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="id822915-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#id1179989"><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>
+62
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id897676" title="Header &lt;boost/date_time/gregorian/greg_weekday.hpp&gt;">
<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#id897676"><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 &#8212; 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#id833020-bb">bad_weekday</a>();
  <span class="emphasis"><em>// <a href="bad_weekday.html#id833016-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1082104"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1082107"></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="id833020-bb"></a>bad_weekday();</pre></li></ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1082141"></a><h3>
<a name="id833016-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#id897676"><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>
+62
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id900964" title="Header &lt;boost/date_time/gregorian/greg_year.hpp&gt;">
<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#id900964"><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 &#8212; 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#id975347-bb">bad_year</a>();
  <span class="emphasis"><em>// <a href="bad_year.html#id975342-bb">public member functions</a></em></span>
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1082808"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1082811"></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="id975347-bb"></a>bad_year();</pre></li></ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1082844"></a><h3>
<a name="id975342-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#id900964"><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>
+117
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="threads/reference.html#id1080963" title="Header &lt;boost/thread/barrier.hpp&gt;">
<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#id1080963"><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 &#8212; <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#id1109680-bb">barrier</a>(size_t);
  <a href="barrier.html#id972451-bb">~barrier</a>();
  <span class="emphasis"><em>// <a href="barrier.html#id726664-bb">waiting</a></em></span>
  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="barrier.html#id835379-bb">wait</a>();
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1214081"></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="id1214160"></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="id1109680-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="id972451-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="id1214259"></a><h3>
<a name="id726664-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="id835379-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#id1080963"><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>
+129
View File
@@ -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.67.2">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id759436" title="Header &lt;boost/date_time/time.hpp&gt;">
<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#id759436"><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 &#8212; 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>&lt;<span class="bold"><strong>typename</strong></span> T, <span class="bold"><strong>typename</strong></span> time_system&gt;
<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#id764195-bb">base_time</a>(<span class="bold"><strong>const</strong></span> date_type &amp;, <span class="bold"><strong>const</strong></span> time_duration_type &amp;,
            dst_flags = not_dst);
  <a href="base_time.html#id764232-bb">base_time</a>(special_values);
  <a href="base_time.html#id764245-bb">base_time</a>(<span class="bold"><strong>const</strong></span> time_rep_type &amp;);
  <span class="emphasis"><em>// <a href="base_time.html#id759541-bb">public member functions</a></em></span>
  <span class="type">date_type</span> <a href="base_time.html#id759545-bb">date</a>() <span class="bold"><strong>const</strong></span>;
  <span class="type">time_duration_type</span> <a href="base_time.html#id759557-bb">time_of_day</a>() <span class="bold"><strong>const</strong></span>;
  <span class="type">std::string</span> <a href="base_time.html#id759569-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#id759605-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#id795601-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#id795618-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#id795634-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#id795650-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#id795667-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#id795683-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#id795699-bb"><span class="bold"><strong>operator</strong></span>==</a>(<span class="bold"><strong>const</strong></span> time_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="base_time.html#id795726-bb"><span class="bold"><strong>operator</strong></span>&lt;</a>(<span class="bold"><strong>const</strong></span> time_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">time_duration_type</span> <a href="base_time.html#id795752-bb"><span class="bold"><strong>operator</strong></span>-</a>(<span class="bold"><strong>const</strong></span> time_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">time_type</span> <a href="base_time.html#id733483-bb"><span class="bold"><strong>operator</strong></span>+</a>(<span class="bold"><strong>const</strong></span> date_duration_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">time_type</span> <a href="base_time.html#id767934-bb"><span class="bold"><strong>operator</strong></span>+=</a>(<span class="bold"><strong>const</strong></span> date_duration_type &amp;) ;
  <span class="type">time_type</span> <a href="base_time.html#id767956-bb"><span class="bold"><strong>operator</strong></span>-</a>(<span class="bold"><strong>const</strong></span> date_duration_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">time_type</span> <a href="base_time.html#id767981-bb"><span class="bold"><strong>operator</strong></span>-=</a>(<span class="bold"><strong>const</strong></span> date_duration_type &amp;) ;
  <span class="type">time_type</span> <a href="base_time.html#id768608-bb"><span class="bold"><strong>operator</strong></span>+</a>(<span class="bold"><strong>const</strong></span> time_duration_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">time_type</span> <a href="base_time.html#id726693-bb"><span class="bold"><strong>operator</strong></span>+=</a>(<span class="bold"><strong>const</strong></span> time_duration_type &amp;) ;
  <span class="type">time_type</span> <a href="base_time.html#id764146-bb"><span class="bold"><strong>operator</strong></span>-</a>(<span class="bold"><strong>const</strong></span> time_duration_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">time_type</span> <a href="base_time.html#id764172-bb"><span class="bold"><strong>operator</strong></span>-=</a>(<span class="bold"><strong>const</strong></span> time_duration_type &amp;) ;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1044894"></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="id1044905"></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="id764195-bb"></a>base_time(<span class="bold"><strong>const</strong></span> date_type &amp; day, <span class="bold"><strong>const</strong></span> time_duration_type &amp; td,
          dst_flags dst = not_dst);</pre></li>
<li><pre class="literallayout"><a name="id764232-bb"></a>base_time(special_values sv);</pre></li>
<li><pre class="literallayout"><a name="id764245-bb"></a>base_time(<span class="bold"><strong>const</strong></span> time_rep_type &amp; rhs);</pre></li>
</ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1044985"></a><h3>
<a name="id759541-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="id759545-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="id759557-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="id759569-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="id759605-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="id795601-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="id795618-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="id795634-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="id795650-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="id795667-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="id795683-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="id795699-bb"></a><span class="bold"><strong>operator</strong></span>==(<span class="bold"><strong>const</strong></span> time_type &amp; 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="id795726-bb"></a><span class="bold"><strong>operator</strong></span>&lt;(<span class="bold"><strong>const</strong></span> time_type &amp; rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">time_duration_type</span> <a name="id795752-bb"></a><span class="bold"><strong>operator</strong></span>-(<span class="bold"><strong>const</strong></span> time_type &amp; rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id733483-bb"></a><span class="bold"><strong>operator</strong></span>+(<span class="bold"><strong>const</strong></span> date_duration_type &amp; dd) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id767934-bb"></a><span class="bold"><strong>operator</strong></span>+=(<span class="bold"><strong>const</strong></span> date_duration_type &amp; dd) ;</pre></li>
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id767956-bb"></a><span class="bold"><strong>operator</strong></span>-(<span class="bold"><strong>const</strong></span> date_duration_type &amp; dd) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id767981-bb"></a><span class="bold"><strong>operator</strong></span>-=(<span class="bold"><strong>const</strong></span> date_duration_type &amp; dd) ;</pre></li>
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id768608-bb"></a><span class="bold"><strong>operator</strong></span>+(<span class="bold"><strong>const</strong></span> time_duration_type &amp; td) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id726693-bb"></a><span class="bold"><strong>operator</strong></span>+=(<span class="bold"><strong>const</strong></span> time_duration_type &amp; td) ;</pre></li>
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id764146-bb"></a><span class="bold"><strong>operator</strong></span>-(<span class="bold"><strong>const</strong></span> time_duration_type &amp; rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">time_type</span> <a name="id764172-bb"></a><span class="bold"><strong>operator</strong></span>-=(<span class="bold"><strong>const</strong></span> time_duration_type &amp; 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#id759436"><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>
+101
View File
@@ -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 &lt;boost/program_options/parsers.hpp&gt;">
<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 &#8212; </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>&lt;<span class="bold"><strong>typename</strong></span> charT&gt;
<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&lt; std::basic_string&lt; charT &gt; &gt; &amp;);
  <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> &amp;</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> &amp;) ;
  <span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &amp;</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> &amp;) ;
  <span class="type"><a href="basic_command_line_parser.html" title="Class template basic_command_line_parser">basic_command_line_parser</a> &amp;</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> &amp;</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>&lt; charT &gt;</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&lt; std::basic_string&lt; charT &gt; &gt; &amp; 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> &amp;</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> &amp; 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> &amp;</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> &amp; 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> &amp;</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> &amp;</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>&lt; charT &gt;</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>
+74
View File
@@ -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 &lt;boost/program_options/option.hpp&gt;">
<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 &#8212; </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>&lt;<span class="bold"><strong>typename</strong></span> charT&gt;
<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 &amp;, <span class="bold"><strong>const</strong></span> std::vector&lt; std::string &gt; &amp;);
  <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&lt; std::basic_string&lt; charT &gt; &gt; 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 &amp; string_key,
             <span class="bold"><strong>const</strong></span> std::vector&lt; std::string &gt; &amp; 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>
+71
View File
@@ -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 &lt;boost/program_options/parsers.hpp&gt;">
<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&lt;wchar_t&gt;">
</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 &#8212; </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>&lt;<span class="bold"><strong>typename</strong></span> charT&gt;
<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&lt; <a href="basic_option.html" title="Class template basic_option">basic_option</a>&lt; charT &gt; &gt; 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&lt;wchar_t&gt;">Class basic_parsed_options&lt;wchar_t&gt;</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>
+124
View File
@@ -0,0 +1,124 @@
<html>
<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.67.2">
<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#id1361218">
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>
+255
View File
@@ -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.67.2">
<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#id1356644">Build request</a></span></dt>
<dt><span class="section"><a href="advanced/build_process.html#id1356686">Building a main target</a></span></dt>
<dt><span class="section"><a href="advanced/build_process.html#id1356791">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#id1356849">Programs</a></span></dt>
<dt><span class="section"><a href="advanced/builtins/targets.html#id1356911">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 &#8220;Initialization&#8221;</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 &#8220;usual
name&#8221; and is in the <code class="envar">PATH</code>,
or</p></li>
<li><p>was installed in a standard
&#8220;installation directory&#8221;,
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 : : &lt;compileflags&gt;-m64 &lt;linkflags&gt;-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>
+194
View File
@@ -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.67.2">
<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#id1356644">Build request</a></span></dt>
<dt><span class="section"><a href="build_process.html#id1356686">Building a main target</a></span></dt>
<dt><span class="section"><a href="build_process.html#id1356791">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 &#8220;metatarget.&#8221;
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="id1356644"></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 &#8220;Command line&#8221;</a>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id1356686"></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 &#8220;Build process&#8221;</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="id1356791"></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.67.2">
<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">
&lt;optimization&gt;off &lt;debug-symbols&gt;on &lt;inlining&gt;off &lt;runtime-debugging&gt;on
</pre>
<p>The value <code class="literal">release</code> expands to</p>
<pre class="programlisting">
&lt;optimization&gt;speed &lt;debug-symbols&gt;off &lt;inlining&gt;full &lt;runtime-debugging&gt;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">
&lt;profiling&gt;on &lt;debug-symbols&gt;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">&lt;source&gt;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">&lt;source&gt;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 &lt;source&gt; 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 &#8220;Why are the <code class="computeroutput">dll-path</code> and
<code class="computeroutput">hardcode-dll-paths</code> properties useful?
&#8221;</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">&lt;hardcode-dll-paths&gt;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.67.2">
<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#id1356849">Programs</a></span></dt>
<dt><span class="section"><a href="targets.html#id1356911">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="id1356849"></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
: &lt;threading&gt;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="id1356911"></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 : &lt;include&gt;boost : : &lt;include&gt;. ;
</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
&lt;link&gt; 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 : : &lt;name&gt;z &lt;search&gt;/home/ghost ;
lib compress : : &lt;file&gt;/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 : : &lt;variant&gt;release &lt;file&gt;/pool/release/a.so ;
lib a : : &lt;variant&gt;debug &lt;file&gt;/pool/debug/a.so ;
lib b : : &lt;variant&gt;release &lt;file&gt;/pool/release/b.so ;
lib b : : &lt;variant&gt;debug &lt;file&gt;/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 : : &lt;name&gt;z ;
lib gui : : &lt;name&gt;gui ;
lib db : : &lt;name&gt;db ;
lib aux : : &lt;name&gt;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 : &lt;name&gt;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 : : : &lt;include&gt;. ;
</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 : &lt;use&gt;b : : &lt;library&gt;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 : &lt;link&gt;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 : : : : &lt;include&gt;/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 : : : &lt;include&gt;. ;
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 : &lt;location&gt;/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 : &lt;variant&gt;release:&lt;location&gt;dist/release
&lt;variant&gt;debug:&lt;location&gt;dist/debug ;
install dist2 : hello helpers : &lt;location&gt;$(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
: &lt;install-dependencies&gt;on &lt;install-type&gt;EXE
&lt;install-type&gt;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="id1357529" href="#ftn.id1357529">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.id1357529" href="#id1357529">6</a>] </sup>see the definition of "free" in <a href="../../reference/definitions.html#bbv2.reference.features.attributes" title="Feature Attributes">the section called &#8220;Feature Attributes&#8221;</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.67.2">
<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 &#8220;Configuration&#8221;</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 &#8220;Projects&#8221;</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">&lt;link&gt;</code>
feature</a>. If your target should be only built in one way, you
can add <code class="computeroutput">&lt;link&gt;shared</code> or <code class="computeroutput">&lt;link&gt;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 &lt;lib&gt;../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>
+465
View File
@@ -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.67.2">
<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&#8212;
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 &#8220;Builtin target types&#8221;</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 &#8220;Main target rules&#8221;</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>&#8194;<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
(&#8216;<code class="computeroutput">-</code>&#8217;), and underscores
(&#8216;<code class="computeroutput">_</code>&#8217;).
</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 &#8220;Projects&#8221;</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 &#8220;Dependent Targets&#8221;</a> and <a href="../reference/definitions.html#bbv2.reference.ids" title="Target identifiers and references">the section called &#8220;Target identifiers and references&#8221;</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 : &lt;include&gt;/opt/boost &lt;define&gt;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 : &lt;link&gt;static ;
obj main : main.cpp : &lt;optimization&gt;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 : &lt;toolset&gt;msvc:&lt;link&gt;static ;
</pre>
<p>
Whenever <code class="computeroutput">&lt;toolset&gt;msvc</code> property is
in build properties, the <code class="computeroutput">&lt;link&gt;static</code> property will
be included as well. Conditional requirements can be &#8220;chained&#8221;:
</p>
<pre class="programlisting">
lib util : util.cpp : &lt;toolset&gt;msvc:&lt;link&gt;static
&lt;link&gt;static:&lt;define&gt;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 : : &lt;threading&gt;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 : &lt;toolset&gt;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 : &lt;optimization&gt;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 &lt;threading&gt;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="id1356309"></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 &#8220;Jamfile Utility Rules&#8221;</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
&#8220;<code class="filename">Jamroot</code>&#8221; 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="id1356529"></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>
+77
View File
@@ -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.67.2">
<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>
+196
View File
@@ -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.67.2">
<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 : &lt;toolset&gt;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, &lt;debug-symbols&gt;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>
+396
View File
@@ -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.67.2">
<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" &#8212; 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#id1362085">Support for different scanning algorithms</a></span></dt>
<dt><span class="section"><a href="targets.html#id1362093">Ability to scan the same file several times</a></span></dt>
<dt><span class="section"><a href="targets.html#id1362128">Proper detection of dependencies on generated files.</a></span></dt>
<dt><span class="section"><a href="targets.html#id1362262">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="id1362085"></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="id1362093"></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 &#8212; 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 (&lt;toolset&gt;gcc) &lt;--(compile)-- a.cpp (scanner1) ----+
a.o (&lt;toolset&gt;msvc) &lt;--(compile)-- a.cpp (scanner2) ----|
a.cpp (installed copy) &lt;--(copy) ----------------------- a.cpp (no scanner)
^
|
a.verbose --------------------------------+
</pre>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="id1362128"></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 -----&gt; &lt;scanner1&gt;header.h [search path: d1, d2, d3]
&lt;d2&gt;header.h --------&gt; header.y
[generated in d2]
b.cpp -----&gt; &lt;scanner2&gt;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 ----
\
\
&gt;----&gt; &lt;d2&gt;header.h --------&gt; header.y
/ [generated in d2]
/
b.cpp ----
</pre>
<p>
or
</p>
<pre class="programlisting">
a.cpp -----&gt; &lt;scanner1&gt;header.h [search path: d1, d2, d3]
|
(includes)
V
&lt;d2&gt;header.h --------&gt; header.y
[generated in d2]
^
(includes)
|
b.cpp -----&gt; &lt;scanner2&gt;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
&lt;scanner1&gt;header.h will also depend on &lt;d2&gt;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="id1362262"></a>Proper detection of dependencies from generated files</h4></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="targets.html#id1362363">File targets</a></span></dt>
<dt><span class="section"><a href="targets.html#id1362395">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 &#8212; which some people consider a good
thing &#8212; 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&amp;cd=//public/jam/src/&amp;ra=s&amp;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 -------&gt; C ----&gt; C.pro
/
B --/ C-includes ---&gt; 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 ---&gt; a.cpp
a.cpp-includes --&gt; a.h (scanned)
a.h-includes ------&gt; a.h (generated)
|
|
a.pro &lt;-------------------------------------------+
</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="id1362363"></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="id1362381"></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="id1362395"></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">&lt;feature-name&gt;-&lt;feature-value&gt;</code> for
ordinary features and <code class="literal">&lt;feature-value&gt;</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-&lt;name&gt;</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>
+48
View File
@@ -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.67.2">
<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>
+139
View File
@@ -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.67.2">
<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" $(&lt;) $(&gt;)
}
</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>
+262
View File
@@ -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.67.2">
<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 &lt;verbatim-options&gt; ;
# Use the "OPTIONS" variable
actions inline-file
{
"./inline-file.py" $(OPTIONS) $(&lt;) $(&gt;)
}
</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">&lt;optimization&gt;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">&lt;cxxflags&gt;</code> feature allows you to pass any command line
options to a C++ compiler. The <code class="computeroutput">&lt;include&gt;</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 &#8220;Can I get output of external program as a variable in a Jamfile?
&#8221;</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 &#8220;raw&#8221; 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="id1359093"></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 &#8220;propagated,&#8221; 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 &#8220;free.&#8221; 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 &#8220;path&#8221;
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 &#8220;dependency&#8221; 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="id1359172"></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 : &lt;def-file&gt;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 &lt;def-file&gt; ;
</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 $(&lt;) : [ on $(&lt;) 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="id1359269"></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">&lt;variant&gt;</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 : &lt;optimization&gt;speed &lt;inlining&gt;off
&lt;debug-symbols&gt;on &lt;profiling&gt;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 : &lt;define&gt;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 &lt;parallelism&gt;mpi : &lt;library&gt;/mpi//mpi/&lt;parallelism&gt;none ;
feature.compose &lt;parallelism&gt;fake : &lt;library&gt;/mpi//fake/&lt;parallelism&gt;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>
+109
View File
@@ -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.67.2">
<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 &#8220;<code class="computeroutput">exe</code>&#8221;
Or &#8220;<code class="computeroutput">lib</code>&#8221;) 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>
+148
View File
@@ -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.67.2">
<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 : &lt;toolset&gt;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>
+247
View File
@@ -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.67.2">
<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" $(&lt;) $(&gt;)
}
</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="id1358837"></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.67.2">
<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>
+149
View File
@@ -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.67.2">
<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#id1361218">
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="id1361218"></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 : &lt;include&gt;/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 : &lt;include&gt;/usr/local/include ;
exe b : a.cpp : &lt;include&gt;/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 : &lt;include&gt;/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 ] : &lt;include&gt;/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>
+110
View File
@@ -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.67.2">
<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 : &lt;dll-path&gt;/usr/lib/snake
&lt;location&gt;/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>
+72
View File
@@ -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.67.2">
<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 : &lt;include&gt;$(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>
+77
View File
@@ -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.67.2">
<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 : : : :
&lt;cflags&gt;"`pkg-config --cflags gtk+-2.0`"
&lt;inkflags&gt;"`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>
+80
View File
@@ -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.67.2">
<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="id1361341"></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 : &lt;include&gt;b &lt;include&gt;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 : &lt;include&gt;a&amp;&amp;b ;
</pre>
<p>The <code class="computeroutput">&amp;&amp;</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>
+82
View File
@@ -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.67.2">
<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="id1361374"></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
&lt;use&gt; 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 : &lt;use&gt;b ;
</pre>
<p>
The same approach works for searched libraries, too:
</p>
<pre class="programlisting">
lib z ;
lib png : : &lt;use&gt;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>
+61
View File
@@ -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.67.2">
<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="id1361448"></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>
+76
View File
@@ -0,0 +1,76 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>How to change compilation flags for one file?
</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="s06.html" title="How to get the project-root location?
">
<link rel="next" href="dll-path.html" title="Why are the dll-path and
hardcode-dll-paths properties useful?
">
</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="s06.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="dll-path.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="id1361468"></a>How to change compilation flags for one file?
</h2></div></div></div>
<p>If one file must be compiled with special options, you need to
explicitly declare an <code class="computeroutput">obj</code> target for that file and then use
that target in your <code class="computeroutput">exe</code> or <code class="computeroutput">lib</code> target:
</p>
<pre class="programlisting">
exe a : a.cpp b ;
obj b : b.cpp : &lt;optimization&gt;off ;
</pre>
<p>
Of course you can use other properties, for example to specify specific
compiler options:
</p>
<pre class="programlisting">
exe a : a.cpp b ;
obj b : b.cpp : &lt;cflags&gt;-g ;
</pre>
<p>
You can also use <a href="../tutorial/conditions.html" title="Conditions and alternatives">conditional
properties</a> for finer control:
</p>
<pre class="programlisting">
exe a : a.cpp b ;
obj b : b.cpp : &lt;variant&gt;release:&lt;optimization&gt;off ;
</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="s06.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="dll-path.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+66
View File
@@ -0,0 +1,66 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter 21. How to use this document</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../bbv2.html" title="Part III. Boost.Build v2 User Manual">
<link rel="next" href="installation.html" title="Chapter 22. Installation">
</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="../bbv2.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="installation.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.howto"></a>Chapter 21. How to use this document</h2></div></div></div>
<p>
If you've just found out about Boost.Build V2 and want to know
if it will work for you, start with <a href="tutorial.html" title="Chapter 23. Tutorial">Chapter 23, <i>Tutorial</i></a>. You can continue with the <a href="advanced.html" title="Chapter 24. User documentation">Chapter 24, <i>User documentation</i></a>. When you're ready to try Boost.Build
in practice, go to <a href="installation.html" title="Chapter 22. Installation">Chapter 22, <i>Installation</i></a>.
</p>
<p>
If you are about to use Boost.Build on your project, or already
using it and have a problem, look at <a href="advanced.html" title="Chapter 24. User documentation">Chapter 24, <i>User documentation</i></a>.
</p>
<p>
If you're trying to build a project which uses Boost.Build,
look at <a href="installation.html" title="Chapter 22. Installation">Chapter 22, <i>Installation</i></a> and then read about
<a href="reference.html#bbv2.reference.commandline" title="Command line">the section called &#8220;Command line&#8221;</a>.
</p>
<p>
If you have questions, please post them to our <a href="http://boost.org/more/mailing_lists.htm#jamboost" target="_top">mailing
list</a>, and be sure to indicate in the subject line that
you're asking about Boost.Build <span class="bold"><strong>V2</strong></span>.
</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="../bbv2.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="installation.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+170
View File
@@ -0,0 +1,170 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter 22. Installation</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="howto.html" title="Chapter 21. How to use this document">
<link rel="next" href="tutorial.html" title="Chapter 23. Tutorial">
</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="howto.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="tutorial.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.installation"></a>Chapter 22. Installation</h2></div></div></div>
<p>
This section describes how to install Boost.Build from a
released <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">Boost
source distribution</a>
or <a href="http://sourceforge.net/cvs/?group_id=7586" target="_top">CVS
image</a>.
<sup>[<a name="id1353443" href="#ftn.id1353443">2</a>]</sup>
All paths are given relative to
the <em class="firstterm">Boost.Build v2 root directory</em>, which is
located in the <code class="filename">tools/build/v2</code> subdirectory
of a full Boost <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">distribution</a>.
<sup>[<a name="id1353480" href="#ftn.id1353480">3</a>]</sup></p>
<div class="orderedlist"><ol type="1">
<li>
Boost.Build uses <a href="../../../tools/build/jam_src/index.html" target="_top">Boost.Jam</a>, an
extension of the <a href="http://www.perforce.com/jam/jam.html" target="_top">Perforce
Jam</a> portable <span><strong class="command">make</strong></span> replacement. The
recommended way to get Boost.Jam is to <span class="bold"><strong><a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=72941" target="_top">download
a prebuilt executable</a></strong></span> from SourceForge.
If a prebuilt executable is not provided for your platform
or you are using Boost's sources in an unreleased state, it
may be necessary to <a href="../../../tools/build/jam_src/index.html#building_bjam" target="_top">build <span><strong class="command">bjam</strong></span>
from sources</a> included in the Boost source tree.
</li>
<li>
<p>
To install Boost.Jam, copy the executable,
called <span><strong class="command">bjam</strong></span>
or <span><strong class="command">bjam.exe</strong></span> to a location accessible in
your <code class="envar">PATH</code>. Go to the Boost.Build root
directory and
run <span><strong class="command">bjam <code class="option">--version</code></strong></span>. You
should see:
</p>
<pre class="screen">
Boost.Build V2 (Milestone N)
Boost.Jam xx.xx.xx
</pre>
<p>
where N is the version of Boost.Build you're using.
</p>
</li>
<li>
Configure Boost.Build to recognize the build resources (such
as compilers and libraries) you have installed on your
system. Open the
<code class="filename">user-config.jam</code> file in the Boost.Build
root directory and follow the instructions there to describe
your toolsets and libraries, and, if necessary, where they
are located.
</li>
<li>
You should now be able to go to the
<code class="filename">example/hello/</code> directory and run
<span><strong class="command">bjam</strong></span> there. A simple application will be
built. You can also play with other projects in the
<code class="filename">example/</code> directory.
</li>
</ol></div>
<p>
If you are using Boost's CVS state, be sure to
rebuild <span><strong class="command">bjam</strong></span> even if you have a previous
version. The CVS version of Boost.Build requires the CVS
version of Boost.Jam.
</p>
<p>
When <span><strong class="command">bjam</strong></span> is invoked, it always needs to be
able to find the Boost.Build root directory, where the
interpreted source code of Boost.Build is located. There are
two ways to tell <span><strong class="command">bjam</strong></span> about the root directory:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
Set the environment variable <code class="envar">BOOST_BUILD_PATH</code>
to the absolute path of the Boost.Build root directory.
</li>
<li>
<p>
At the root directory of your project or in any of its
parent directories, create a file called
<code class="filename">boost-build.jam</code>, with a single line:
</p>
<pre class="programlisting">
boost-build <em class="replaceable"><code>/path/to/boost.build</code></em> ;
</pre>
</li>
</ul></div>
<p><span class="bold"><strong>N.B.</strong></span>
When <span><strong class="command">bjam</strong></span> is invoked from anywhere in the Boost
directory tree <span class="emphasis"><em>other than</em></span> the Boost.Build root
and its subdirectories, <a href="../../../tools/build" target="_top">Boost.Build
v1</a> is used by default. To override the default and use
Boost.Build v2, you have to add the <code class="option">--v2</code> command
line option to all <span><strong class="command">bjam</strong></span> invocations.</p>
<div class="footnotes">
<br><hr width="100" align="left">
<div class="footnote"><p><sup>[<a name="ftn.id1353443" href="#id1353443">2</a>] </sup>Note that packages prepared for
Unix/Linux systems usually make their own choices about where to
put things and even which parts of Boost to include. When we
say &#8220;released source distribution&#8221; we mean a
distribution of Boost as released on its SourceForge
<a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">project
page</a>.
</p></div>
<div class="footnote"><p><sup>[<a name="ftn.id1353480" href="#id1353480">3</a>] </sup>The Boost.Build subset of boost is also distributed
separately, for those who are only interested in getting a
build tool. The top-level directory of a <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=80982" target="_top">Boost.Build
distribution</a> contains all the subdirectories of the
<code class="filename">tools/build/v2</code> subdirectory from a full
Boost distribution, so it is itself a valid Boost.Build root
directory. It also contains the
<code class="filename">tools/build/jam_src</code> subdirectory of a
full Boost distribution, so you can rebuild Boost.Jam from
source.
</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="howto.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="tutorial.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+69
View File
@@ -0,0 +1,69 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Targets in site-config.jam</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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/dll-path.html" title="Why are the dll-path and
hardcode-dll-paths properties useful?
">
<link rel="next" href="../arch.html" title="Appendix B. Boost.Build v2 architecture">
</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/dll-path.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="../arch.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.recipies.site-config"></a>Targets in site-config.jam</h2></div></div></div>
<p>It is desirable to declare standard libraries available on a
given system. Putting target declaration in Jamfile is not really
good, since locations of the libraries can vary. The solution is
to put the following to site-config.jam.</p>
<pre class="programlisting">
import project ;
project.initialize $(__name__) ;
project site-config ;
lib zlib : : &lt;name&gt;z ;
</pre>
<p>The second line allows this module to act as project. The
third line gives id to this project &#8212; it really has no location
and cannot be used otherwise. The fourth line just declares a
target. Now, one can write:
</p>
<pre class="programlisting">
exe hello : hello.cpp /site-config//zlib ;
</pre>
<p>
in any 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="../faq/dll-path.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="../arch.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+337
View File
@@ -0,0 +1,337 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter 26. Detailed reference</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="extending/toolset_modules.html" title="Toolset modules">
<link rel="next" href="reference/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="extending/toolset_modules.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="reference/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.reference"></a>Chapter 26. Detailed reference</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"><a href="reference.html#bbv2.reference.general">General information</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="reference.html#bbv2.reference.init">Initialization</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.commandline">Command line</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="reference/jamfiles.html">Writing Jamfiles</a></span></dt>
<dd><dl><dt><span class="section"><a href="reference/jamfiles.html#bbv2.reference.headers">Generated headers</a></span></dt></dl></dd>
<dt><span class="section"><a href="reference/buildprocess.html">Build process</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="reference/buildprocess.html#bbv2.reference.buildprocess.alternatives">Alternative selection</a></span></dt>
<dt><span class="section"><a href="reference/buildprocess.html#bbv2.reference.buildprocess.common">Determining common properties</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="reference/definitions.html">Definitions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="reference/definitions.html#bbv2.reference.features">Features and properties</a></span></dt>
<dt><span class="section"><a href="reference/definitions.html#bbv2.reference.variants">Build Variants</a></span></dt>
<dt><span class="section"><a href="reference/definitions.html#bbv2.reference.variants.proprefine">Property refinement</a></span></dt>
<dt><span class="section"><a href="reference/definitions.html#bbv2.reference.variants.propcond">Conditional properties</a></span></dt>
<dt><span class="section"><a href="reference/definitions.html#bbv2.reference.ids">Target identifiers and references</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="reference/generators.html">Generators</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="reference/generators.html#id1361082">Selecting and ranking viable generators</a></span></dt>
<dt><span class="section"><a href="reference/generators.html#id1361123">Running generators</a></span></dt>
<dt><span class="section"><a href="reference/generators.html#id1361148">Selecting dependency graph</a></span></dt>
<dt><span class="section"><a href="reference/generators.html#id1361160">Property adjustment</a></span></dt>
<dt><span class="section"><a href="reference/generators.html#id1361195">Transformations cache</a></span></dt>
</dl></dd>
</dl>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bbv2.reference.general"></a>General information</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="reference.html#bbv2.reference.init">Initialization</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.commandline">Command line</a></span></dt>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.init"></a>Initialization</h3></div></div></div>
<p>bjam's first job upon startup is to load the Jam code that
implements the build system. To do this, it searches for a file
called <code class="filename">boost-build.jam</code>, first in the invocation directory, then
in its parent and so forth up to the filesystem root, and finally
in the directories specified by the environment variable
BOOST_BUILD_PATH. When found, the file is interpreted, and should
specify the build system location by calling the boost-build
rule:</p>
<pre class="programlisting">
rule boost-build ( location ? )
</pre>
<p>
If location is a relative path, it is treated as relative to
the directory of <code class="filename">boost-build.jam</code>. The directory specified by
that location and the directories in BOOST_BUILD_PATH are then searched for
a file called <code class="filename">bootstrap.jam</code>, which is expected to
bootstrap the build system. This arrangement allows the build
system to work without any command-line or environment variable
settings. For example, if the build system files were located in a
directory "build-system/" at your project root, you might place a
<code class="filename">boost-build.jam</code> at the project root containing:
</p>
<pre class="programlisting">
boost-build build-system ;
</pre>
<p>
In this case, running bjam anywhere in the project tree will
automatically find the build system.</p>
<p>The default <code class="filename">bootstrap.jam</code>, after loading some standard
definitions, loads two files, which can be provided/customised by
user: <code class="filename">site-config.jam</code> and <code class="filename">user-config.jam</code>.</p>
<p>Locations where those files a search are summarized below:</p>
<div class="table">
<a name="bbv2.reference.init.config"></a><p class="title"><b>Table 26.1. Search paths for configuration files</b></p>
<table class="table" summary="Search paths for configuration files">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th> </th>
<th>site-config.jam</th>
<th>user-config.jam</th>
</tr></thead>
<tbody>
<tr>
<td>Linux</td>
<td>
<p><code class="computeroutput">/etc</code></p>
<p><code class="computeroutput">$HOME</code></p>
<p><code class="computeroutput">$BOOST_BUILD_PATH</code></p>
</td>
<td>
<p><code class="computeroutput">$HOME</code></p>
<p><code class="computeroutput">$BOOST_BUILD_PATH</code></p>
</td>
</tr>
<tr>
<td>Windows</td>
<td>
<p><code class="computeroutput">%SystemRoot%</code></p>
<p><code class="computeroutput">%HOMEDRIVE%%HOMEPATH%</code></p>
<p><code class="computeroutput">%HOME%</code></p>
<p><code class="computeroutput">%BOOST_BUILD_PATH%</code></p>
</td>
<td>
<p><code class="computeroutput">%HOMEDRIVE%%HOMEPATH%</code></p>
<p><code class="computeroutput">%HOME%</code></p>
<p><code class="computeroutput">%BOOST_BUILD_PATH%</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Boost.Build comes with default versions of those files,
which can serve as templates for customized versions.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.commandline"></a>Command line</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="reference.html#bbv2.reference.init.args">Command line arguments</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.init.options">Command line options</a></span></dt>
</dl></div>
<p>The command line may contain:</p>
<div class="itemizedlist"><ul type="disc">
<li>Jam options,</li>
<li>Boost.Build <a href="reference.html#bbv2.reference.init.options" title="Command line options">options</a>,</li>
<li>Command line arguments</li>
</ul></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.init.args"></a>Command line arguments</h4></div></div></div>
<p>
Command line arguments specify targets and build
request using the following rules.
</p>
<div class="itemizedlist"><ul type="disc">
<li>
An argument that does not contain slashes or the <code class="computeroutput">=</code>
symbol is either a value of an implicit feature or of a target to
be built. It is taken to be value of a feature if an appropriate
feature exists. Otherwise, it is considered a <a href="reference/definitions.html#bbv2.reference.ids" title="Target identifiers and references">target id</a>. Building the
special target name &#8220;clean&#8221; has the same effect as
using the <code class="computeroutput">--clean</code> option.
</li>
<li>
<p>
An argument containing either slashes or
the <code class="computeroutput">=</code> symbol specifies a number of build
request elements (see ???). In its simplest
form, it's just a set of properties, separated by
slashes, which become a single build request element,
for example:
</p>
<pre class="programlisting">
borland/&lt;runtime-link&gt;static
</pre>
<p>
A more complex form can be used to save typing. For example,
instead of
</p>
<pre class="programlisting">
borland/runtime-link=static borland/runtime-link=dynamic
</pre>
<p>
one can use
</p>
<pre class="programlisting">
borland/runtime-link=static,dynamic
</pre>
<p>
Exactly, the conversion from argument to build request
elements is performed by (1) splitting the argument at each slash,
(2) converting each split part into a set of properties and (3)
taking all possible combinations
of the property sets. Each split
part should have the either the form
</p>
<pre class="programlisting"><span class="emphasis"><em>feature-name</em></span>=<span class="emphasis"><em>feature-value1</em></span>[","<span class="emphasis"><em>feature-valueN</em></span>]*
</pre>
<p>
or, in case of implicit features
</p>
<pre class="programlisting"><span class="emphasis"><em>feature-value1</em></span>[","<span class="emphasis"><em>feature-valueN</em></span>;]*
</pre>
<p>
will be converted into the property set
</p>
<pre class="programlisting">
&lt;feature-name&gt;feature-value1 .... &lt;feature-name&gt;feature-valueN
</pre>
</li>
</ul></div>
<p>
For example, the command line
</p>
<pre class="programlisting">
target1 debug gcc/runtime-link=dynamic,static
</pre>
<p>
would cause target called <code class="literal">target1</code> to be rebuilt in
debug mode, except that for gcc, both dynamically and statically
linked binaries would be created.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.init.options"></a>Command line options</h4></div></div></div>
<p>All of the Boost.Build options start with the "--" prefix.
They are described in the following table.</p>
<div class="table">
<a name="id1360016"></a><p class="title"><b>Table 26.2. Command line options</b></p>
<table class="table" summary="Command line options">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>Option</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td><code class="literal">--version</code></td>
<td>Prints information on Boost.Build and Boost.Jam
versions.</td>
</tr>
<tr>
<td>
<a name="bbv2.reference.init.options.help"></a><code class="literal">--help</code>
</td>
<td>Access to the online help system. This prints general
information on how to use the help system with additional
--help* options.</td>
</tr>
<tr>
<td><code class="literal">--clean</code></td>
<td>Removes everything instead of building. Unlike
<code class="literal">clean</code> target in make, it is possible to clean only
some targets.</td>
</tr>
<tr>
<td><code class="literal">--debug</code></td>
<td>Enables internal checks.</td>
</tr>
<tr>
<td><code class="literal">--dump-projects</code></td>
<td>Cause the project structure to be output.</td>
</tr>
<tr>
<td><code class="literal">--no-error-backtrace</code></td>
<td>Don't print backtrace on errors. Primary useful for
testing.</td>
</tr>
<tr>
<td><code class="literal">--ignore-config</code></td>
<td>Do not load <code class="literal">site-config.jam</code> and
<code class="literal">user-config.jam</code>
</td>
</tr>
</tbody>
</table>
</div>
</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="extending/toolset_modules.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="reference/jamfiles.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+141
View File
@@ -0,0 +1,141 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Build process</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../reference.html" title="Chapter 26. Detailed reference">
<link rel="prev" href="jamfiles.html" title="Writing Jamfiles">
<link rel="next" href="definitions.html" title="Definitions">
</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="../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="definitions.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.reference.buildprocess"></a>Build process</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="buildprocess.html#bbv2.reference.buildprocess.alternatives">Alternative selection</a></span></dt>
<dt><span class="section"><a href="buildprocess.html#bbv2.reference.buildprocess.common">Determining common properties</a></span></dt>
</dl></div>
<p>The general overview of the build process was given in the
<a href="../advanced/build_process.html" title="The Build Process">user documentation</a>.
This section provides additional details, and some specific rules.
</p>
<p>To recap, building a target with specific properties includes the
following steps:
</p>
<div class="orderedlist"><ol type="1">
<li><p>applying default build,</p></li>
<li><p>selecting the main target alternative to use,
</p></li>
<li><p>determining "common" properties</p></li>
<li><p>building targets referred by the sources list and
dependency properties</p></li>
<li><p>adding the usage requirements produces when building
dependencies to the "common" properties</p></li>
<li><p>building the target using generators</p></li>
<li><p>computing the usage requirements to be returned</p></li>
</ol></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.buildprocess.alternatives"></a>Alternative selection</h3></div></div></div>
<p>When there are several alternatives, one of them must be
selected. The process is as follows:</p>
<div class="orderedlist"><ol type="1">
<li>
For each alternative <span class="emphasis"><em>condition</em></span> is defined
as the set of base properies in requirements. [Note: it might be
better to specify the condition explicitly, as in
conditional requirements].
</li>
<li>
An alternative is viable only if all properties in condition
are present in build request.
</li>
<li>
If there's one viable alternative, it's choosen. Otherwise,
an attempt is made to find one best alternative. An alternative
a is better than another alternative b, iff set of properties
in b's condition is strict subset of the set of properities of
'a's condition. If there's one viable alternative, which is
better than all other, it's selected. Otherwise, an error is
reported.
</li>
</ol></div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.buildprocess.common"></a>Determining common properties</h3></div></div></div>
<p>The "common" properties is a somewhat artificial term. Those are
the intermediate property set from which both the build request for
dependencies and properties for building the target are derived.
</p>
<p>Since default build and alternatives are already handled, we have
only two inputs: build requests and requirements. Here are the rules
about common properties.
</p>
<div class="orderedlist"><ol type="1">
<li><p>Non-free feature can have only one
value</p></li>
<li><p>A non-conditional property in requirement in always
present in common properties.</p></li>
<li><p>A property in build request is present in
common properties, unless (2) tells otherwise.</p></li>
<li><p>If either build request, or requirements (non-conditional
or conditional) include an expandable property (either composite,
or property with specified subfeature value), the behaviour is
equivalent to explicitly adding all expanded properties to build
request or requirements.</p></li>
<li><p>If requirements include a conditional property, and
condiiton of this property is true in context of common
properties, then the conditional property should be in common
properties as well.</p></li>
<li><p>If no value for a feature is given by other rules
here, it has default value in common properties.</p></li>
</ol></div>
<p>Those rules are declarative, they don't specify how to compute the
common properties. However, they provide enough information for the
user. The important point is the handling of conditional
requirements. The condition can be satisfied either by property in
build request, by non-conditional requirements, or even by another
conditional property. For example, the following example works as
expected:
</p>
<pre class="programlisting">
exe a : a.cpp
: &lt;toolset&gt;gcc:&lt;variant&gt;release
&lt;variant&gt;release:&lt;define&gt;FOO ;
</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="jamfiles.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../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="definitions.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+379
View File
@@ -0,0 +1,379 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Definitions</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../reference.html" title="Chapter 26. Detailed reference">
<link rel="prev" href="buildprocess.html" title="Build process">
<link rel="next" href="generators.html" title="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="buildprocess.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../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="generators.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.reference.definitions"></a>Definitions</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="definitions.html#bbv2.reference.features">Features and properties</a></span></dt>
<dt><span class="section"><a href="definitions.html#bbv2.reference.variants">Build Variants</a></span></dt>
<dt><span class="section"><a href="definitions.html#bbv2.reference.variants.proprefine">Property refinement</a></span></dt>
<dt><span class="section"><a href="definitions.html#bbv2.reference.variants.propcond">Conditional properties</a></span></dt>
<dt><span class="section"><a href="definitions.html#bbv2.reference.ids">Target identifiers and references</a></span></dt>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.features"></a>Features and properties</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="definitions.html#bbv2.reference.features.validity">Property Validity</a></span></dt>
<dt><span class="section"><a href="definitions.html#bbv2.reference.features.attributes">Feature Attributes</a></span></dt>
<dt><span class="section"><a href="definitions.html#bbv2.reference.features.declaration">Feature Declaration</a></span></dt>
</dl></div>
<p>A <span class="emphasis"><em>feature</em></span> is a normalized (toolset-independent)
aspect of a build configuration, such as whether inlining is
enabled. Feature names may not contain the '<code class="literal">&gt;</code>'
character.</p>
<p>Each feature in a build configuration has one or more
associated <span class="emphasis"><em>value</em></span>s. Feature values for non-free features
may not contain the '<code class="literal">&lt;</code>', '<code class="literal">:</code>', or
'<code class="literal">=</code>' characters. Feature values for free features may not
contain the '<code class="literal">&lt;</code>' character.</p>
<p>A <span class="emphasis"><em>property</em></span> is a (feature,value) pair, expressed as
&lt;feature&gt;value.</p>
<p>A <span class="emphasis"><em>subfeature</em></span> is a feature that only exists in the
presence of its parent feature, and whose identity can be derived
(in the context of its parent) from its value. A subfeature's
parent can never be another subfeature. Thus, features and their
subfeatures form a two-level hierarchy.</p>
<p>A <span class="emphasis"><em>value-string</em></span> for a feature <span class="bold"><strong>F</strong></span> is a string of
the form
<code class="literal">value-subvalue1-subvalue2</code>...<code class="literal">-subvalueN</code>, where
<code class="literal">value</code> is a legal value for <span class="bold"><strong>F</strong></span> and
<code class="literal">subvalue1</code>...<code class="literal">subvalueN</code> are legal values of some
of <span class="bold"><strong>F</strong></span>'s subfeatures. For example, the properties
<code class="literal">&lt;toolset&gt;gcc &lt;toolset-version&gt;3.0.1</code> can be
expressed more conscisely using a value-string, as
<code class="literal">&lt;toolset&gt;gcc-3.0.1</code>.</p>
<p>A <span class="emphasis"><em>property set</em></span> is a set of properties (i.e. a
collection without duplicates), for instance:
<code class="literal">&lt;toolset&gt;gcc &lt;runtime-link&gt;static</code>.</p>
<p>A <span class="emphasis"><em>property path</em></span> is a property set whose elements have
been joined into a single string separated by slashes. A property
path representation of the previous example would be
<code class="literal">&lt;toolset&gt;gcc/&lt;runtime-link&gt;static</code>.</p>
<p>A <span class="emphasis"><em>build specification</em></span> is a property set that fully
describes the set of features used to build a target.</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.features.validity"></a>Property Validity</h4></div></div></div>
<p>
For <a href="definitions.html#bbv2.reference.features.attributes.free">free</a>
features, all values are valid. For all other features,
the valid values are explicitly specified, and the build
system will report an error for the use of an invalid
feature-value. Subproperty validity may be restricted so
that certain values are valid only in the presence of
certain other subproperties. For example, it is possible
to specify that the <code class="computeroutput">&lt;gcc-target&gt;mingw</code>
property is only valid in the presence of
<code class="computeroutput">&lt;gcc-version&gt;2.95.2</code>.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.features.attributes"></a>Feature Attributes</h4></div></div></div>
<p>Each feature has a collection of zero or more of the following
attributes. Feature attributes are low-level descriptions of how the
build system should interpret a feature's values when they appear in
a build request. We also refer to the attributes of properties, so
that an <span class="emphasis"><em>incidental</em></span> property, for example, is
one whose feature has the <span class="emphasis"><em>incidental</em></span>
attribute.</p>
<div class="itemizedlist"><ul type="disc">
<li>
<p><span class="emphasis"><em>incidental</em></span></p>
<p>Incidental features are assumed not to affect build
products at all. As a consequence, the build system may use
the same file for targets whose build specification differs
only in incidental features. A feature that controls a
compiler's warning level is one example of a likely
incidental feature.</p>
<p>Non-incidental features are assumed to affect build
products, so the files for targets whose build specification
differs in non-incidental features are placed in different
directories as described in "target paths" below. [ where? ]
</p>
</li>
<li>
<p><a name="bbv2.reference.features.attributes.propagated"></a><span class="emphasis"><em>propagated</em></span></p>
<p>Features of this kind are
propagated to dependencies. That is, if a <a href="../advanced/jamfiles.html#bbv2.advanced.targets.main">main target</a> is built using a
propagated
property, the build systems attempts to use the same property
when building any of its dependencies as part of that main
target. For instance, when an optimized exectuable is
requested, one usually wants it to be linked with optimized
libraries. Thus, the <code class="literal">&lt;optimization&gt;</code> feature is
propagated.</p>
</li>
<li>
<p><a name="bbv2.reference.features.attributes.free"></a><span class="emphasis"><em>free</em></span></p>
<p>Most features have a finite set of allowed values, and can
only take on a single value from that set in a given build
specification. Free features, on the other hand, can have
several values at a time and each value can be an arbitrary
string. For example, it is possible to have several
preprocessor symbols defined simultaneously:</p>
<pre class="programlisting">
&lt;define&gt;NDEBUG=1 &lt;define&gt;HAS_CONFIG_H=1
</pre>
</li>
<li>
<p><span class="emphasis"><em>optional</em></span></p>
<p>An optional feature is a feature that is not required to
appear in a build specification. Every non-optional non-free
feature has a default value that is used when a value for
the feature is not otherwise specified, either in a target's
requirements or in the user's build request. [A feature's
default value is given by the first value listed in the
feature's declaration. -- move this elsewhere - dwa]</p>
</li>
<li>
<p><span class="emphasis"><em>symmetric</em></span></p>
<p>A symmetric feature's default value is not automatically
included in <a href="definitions.html#bbv2.reference.variants" title="Build Variants">build variants</a>. Normally
a feature only generates a subvariant directory when its
value differs from the value specified by the build variant,
leading to an assymmetric subvariant directory structure for
certain values of the feature. A symmetric feature, when
relevant to the toolset, always generates a corresponding
subvariant directory.</p>
</li>
<li>
<p><span class="emphasis"><em>path</em></span></p>
<p>The value of a path feature specifies a path. The path is
treated as relative to the directory of Jamfile where path
feature is used and is translated appropriately by the build
system when the build is invoked from a different
directory</p>
</li>
<li>
<p><span class="emphasis"><em>implicit</em></span></p>
<p>Values of implicit features alone identify the feature.
For example, a user is not required to write
"&lt;toolset&gt;gcc", but can simply write "gcc". Implicit
feature names also don't appear in variant paths, although
the values do. Thus: bin/gcc/... as opposed to
bin/toolset-gcc/.... There should typically be only a few
such features, to avoid possible name clashes.</p>
</li>
<li>
<p><span class="emphasis"><em>composite</em></span></p>
<p>Composite features actually correspond to groups of
properties. For example, a build variant is a composite
feature. When generating targets from a set of build
properties, composite features are recursively expanded and
<span class="emphasis"><em>added</em></span> to the build property set, so rules can find
them if necessary. Non-composite non-free features override
components of composite features in a build property set.</p>
</li>
<li>
<p><span class="emphasis"><em>dependency</em></span></p>
<p>The value of dependency feature if a target reference.
When used for building of a main target, the value of
dependency feature is treated as additional dependency.</p>
<p>For example, dependency features allow to state that
library A depends on library B. As the result, whenever an
application will link to A, it will also link to B.
Specifying B as dependency of A is different from adding B to
the sources of A. </p>
</li>
</ul></div>
<p>Features that are neither free nor incidental are called
<span class="emphasis"><em>base</em></span> features.</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.features.declaration"></a>Feature Declaration</h4></div></div></div>
<p>The low-level feature declaration interface is the
<code class="literal">feature</code> rule from the
<code class="literal">feature</code> module:
</p>
<pre class="programlisting">
rule feature ( name : allowed-values * : attributes * )
</pre>
<p>
A feature's allowed-values may be extended with the
<code class="computeroutput">feature.extend</code> rule.
</p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.variants"></a>Build Variants</h3></div></div></div>
<p>
A build variant, or (simply variant) is a special kind of composite
feature that automatically incorporates the default values of
features that . Typically you'll want at least two separate
variants: one for debugging, and one for your release code. [
Volodya says: "Yea, we'd need to mention that it's a composite
feature and describe how they are declared, in pacticular that
default values of non-optional features are incorporated into
build variant automagically. Also, do we wan't some variant
inheritance/extension/templates. I don't remember how it works in
V1, so can't document this for V2.". Will clean up soon -DWA ]
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.variants.proprefine"></a>Property refinement</h3></div></div></div>
<p>When a target with certain properties is requested, and that
target requires some set of properties, it is needed to find the
set of properties to use for building. This process is called
<span class="emphasis"><em>property refinement</em></span> and is performed by these rules</p>
<div class="orderedlist"><ol type="1">
<li>
Each property in the required set is added to the original
property set
</li>
<li>
If the original property set includes property with a different
value of non free feature, that property is removed.
</li>
</ol></div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.variants.propcond"></a>Conditional properties</h3></div></div></div>
<p>Sometime it's desirable to apply certain requirements only for
a specific combination of other properties. For example, one of
compilers that you use issues a pointless warning that you want to
suppress by passing a command line option to it. You would not
want to pass that option to other compilers. Conditional
properties allow you to do just that. Their syntax is:</p>
<pre class="programlisting">
property ( "," property ) * ":" property
</pre>
<p>
For example, the problem above would be solved by:
</p>
<pre class="programlisting">
exe hello : hello.cpp : &lt;toolset&gt;yfc:&lt;cxxflags&gt;-disable-pointless-warning ;
</pre>
<p>The syntax also allows several properties in the condition, for
example:
</p>
<pre class="programlisting">
exe hello : hello.cpp : &lt;os&gt;NT,&lt;toolset&gt;gcc:&lt;link&gt;static ;
</pre>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.ids"></a>Target identifiers and references</h3></div></div></div>
<p><span class="emphasis"><em>Target identifier</em></span> is used to denote a
target. The syntax is:</p>
<pre class="programlisting">
target-id -&gt; (project-id | target-name | file-name )
| (project-id | directory-name) "//" target-name
project-id -&gt; path
target-name -&gt; path
file-name -&gt; path
directory-name -&gt; path
</pre>
<p>
This grammar allows some elements to be recognized as either
</p>
<div class="itemizedlist"><ul type="disc">
<li>
project id (at this point, all project ids start with slash).
</li>
<li>
name of target declared in current Jamfile (note that target
names may include slash).
</li>
<li>
a regular file, denoted by absolute name or name relative to
project's sources location.
</li>
</ul></div>
<p>
To determine the real meaning a check is made if project-id
by the specified name exists, and then if main target of that
name exists. For example, valid target ids might be:
</p>
<pre class="screen">
a -- target in current project
lib/b.cpp -- regular file
/boost/thread -- project "/boost/thread"
/home/ghost/build/lr_library//parser -- target in specific project
</pre>
<p><span class="bold"><strong>Rationale:</strong></span>Target is separated from project by special
separator (not just slash), because:</p>
<div class="itemizedlist"><ul type="disc">
<li>
It emphasises that projects and targets are different things.
</li>
<li>
It allows to have main target names with slashes.
</li>
</ul></div>
<p><a name="bbv2.reference.targets.references"></a><span class="emphasis"><em>Target reference</em></span> is used to
specify a source target, and may additionally specify desired
properties for that target. It has this syntax:</p>
<pre class="programlisting">
target-reference -&gt; target-id [ "/" requested-properties ]
requested-properties -&gt; property-path
</pre>
<p>
For example,
</p>
<pre class="programlisting">
exe compiler : compiler.cpp libs/cmdline/&lt;optimization&gt;space ;
</pre>
<p>
would cause the version of <code class="literal">cmdline</code> library,
optimized for space, to be linked in even if the
<code class="literal">compiler</code> executable is build with optimization for
speed.
</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="buildprocess.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../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="generators.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+196
View File
@@ -0,0 +1,196 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Generators</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../reference.html" title="Chapter 26. Detailed reference">
<link rel="prev" href="definitions.html" title="Definitions">
<link rel="next" href="../faq.html" title="Chapter 27. Frequently Asked Questions">
</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="definitions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../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="../faq.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.reference.generators"></a>Generators</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="generators.html#id1361082">Selecting and ranking viable generators</a></span></dt>
<dt><span class="section"><a href="generators.html#id1361123">Running generators</a></span></dt>
<dt><span class="section"><a href="generators.html#id1361148">Selecting dependency graph</a></span></dt>
<dt><span class="section"><a href="generators.html#id1361160">Property adjustment</a></span></dt>
<dt><span class="section"><a href="generators.html#id1361195">Transformations cache</a></span></dt>
</dl></div>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p>The information is this section is likely to be outdated
and misleading.
</p>
</div>
<p>To construct a main target with given properties from sources,
it is required to create a dependency graph for that main target,
which will also include actions to be run. The algorithm for
creating the dependency graph is described here.</p>
<p>The fundamental concept is <span class="emphasis"><em>generator</em></span>. If encapsulates
the notion of build tool and is capable to converting a set of
input targets into a set of output targets, with some properties.
Generator matches a build tool as closely as possible: it works
only when the tool can work with requested properties (for
example, msvc compiler can't work when requested toolset is gcc),
and should produce exactly the same targets as the tool (for
example, if Borland's linker produces additional files with debug
information, generator should also).</p>
<p>Given a set of generators, the fundamental operation is to
construct a target of a given type, with given properties, from a
set of targets. That operation is performed by rule
<code class="literal">generators.construct</code> and the used algorithm is described
below.</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id1361082"></a>Selecting and ranking viable generators</h3></div></div></div>
<p>Each generator, in addition to target types that it can
produce, have attribute that affects its applicability in
particular sitiation. Those attributes are:</p>
<div class="orderedlist"><ol type="1">
<li>
Required properties, which are properties absolutely
necessary for the generator to work. For example, generator
encapsulating the gcc compiler would have &lt;toolset&gt;gcc as
required property.
</li>
<li>
Optional properties, which increase the generators
suitability for a particual build.
</li>
</ol></div>
<p>
Generator's required and optional properties may not include
either free or incidental properties. (Allowing this would
greatly complicate caching targets).
</p>
<p>When trying to construct a target, the first step is to select
all possible generators for the requested target type, which
required properties are a subset of requested properties.
Generators that were already selected up the call stack are
excluded. In addition, if any composing generators were selected
up the call stack, all other composing generators are ignored
(TODO: define composing generators). The found generators
are assigned a rank, which is the number of optional properties
present in requested properties. Finally, generators with highest
rank are selected for futher processing.</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id1361123"></a>Running generators</h3></div></div></div>
<p>When generators are selected, each is run to produce a list of
created targets. This list might include targets that are not of
requested types, because generators create the same targets as
some tool, and tool's behaviour is fixed. (Note: should specify
that in some cases we actually want extra targets). If generator
fails, it returns an empty list. Generator is free to call
'construct' again, to convert sources to the types it can handle.
It also can pass modified properties to 'construct'. However, a
generator is not allowed to modify any propagated properties,
otherwise when actually consuming properties we might discover
that the set of propagated properties is different from what was
used for building sources.</p>
<p>For all targets that are not of requested types, we try to
convert them to requested type, using a second call to
<code class="literal">construct</code>. This is done in order to support
transformation sequences where single source file expands to
several later. See <a href="http://groups.yahoo.com/group/jamboost/message/1667" target="_top">this
message</a> for details.</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id1361148"></a>Selecting dependency graph</h3></div></div></div>
<p>
After all generators are run,
it is necessary to decide which of successfull invocation will be
taken as final result. At the moment, this is not done. Instead,
it is checked whether all successfull generator invocation
returned the same target list. Error is issued otherwise.
</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id1361160"></a>Property adjustment</h3></div></div></div>
<p>Because target location is determined by the build system, it
is sometimes necessary to adjust properties, in order to not
break actions. For example, if there's an action that generates
a header, say "a_parser.h", and a source file "a.cpp" which
includes that file, we must make everything work as if a_parser.h
is generated in the same directory where it would be generated
without any subvariants.</p>
<p>Correct property adjustment can be done only after all targets
are created, so the approach taken is:</p>
<div class="orderedlist"><ol type="1">
<li><p>
When dependency graph is constructed, each action can be
assigned a rule for property adjustment.
</p></li>
<li><p>
When virtual target is actualized, that rule is run and
return the final set of properties. At this stage it can use
information of all created virtual targets.
</p></li>
</ol></div>
<p>In case of quoted includes, no adjustment can give 100% correct
results. If target dirs are not changed by build system, quoted
includes are searched in "." and then in include path, while angle
includes are searched only in include path. When target dirs are
changed, we'd want to make quoted includes to be search in "." then in
additional dirs and then in the include path and make angle includes
be searched in include path, probably with additional paths added at
some position. Unless, include path already has "." as the first
element, this is not possible. So, either generated headers should not
be included with quotes, or first element of include path should be
".", which essentially erases the difference between quoted and angle
includes. <span class="bold"><strong>Note:</strong></span> the only way to get
"." as include path into compiler command line is via verbatim
compiler option. In all other case, Boost.Build will convert "." into
directory where it occurs.</p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id1361195"></a>Transformations cache</h3></div></div></div>
<p>
Under certain conditions, an
attempt is made to cache results of transformation search. First,
the sources are replaced with targets with special name and the
found target list is stored. Later, when properties, requested
type, and source type are the same, the store target list is
retrieved and cloned, with appropriate change in names.
</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="definitions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../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="../faq.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+79
View File
@@ -0,0 +1,79 @@
<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.67.2">
<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="../reference.html" title="Chapter 26. Detailed reference">
<link rel="prev" href="../reference.html" title="Chapter 26. Detailed reference">
<link rel="next" href="buildprocess.html" title="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="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../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="buildprocess.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.reference.jamfiles"></a>Writing Jamfiles</h2></div></div></div>
<div class="toc"><dl><dt><span class="section"><a href="jamfiles.html#bbv2.reference.headers">Generated headers</a></span></dt></dl></div>
<p>This section describes specific information about writing Jamfiles.</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.headers"></a>Generated headers</h3></div></div></div>
<p>Usually, Boost.Build handles implicit dependendies completely
automatically. For example, for C++ files, all <code class="literal">#include</code>
statements are found and handled. The only aspect where user help
might be needed is implicit dependency on generated files.</p>
<p>By default, Boost.Build handles such dependencies within one
main target. For example, assume that main target "app" has two
sources, "app.cpp" and "parser.y". The latter source is converted
into "parser.c" and "parser.h". Then, if "app.cpp" includes
"parser.h", Boost.Build will detect this dependency. Moreover,
since "parser.h" will be generated into a build directory, the
path to that directory will automatically added to include
path.</p>
<p>Making this mechanism work across main target boundaries is
possible, but imposes certain overhead. For that reason, if
there's implicit dependency on files from other main targets, the
<code class="literal">&lt;implicit-dependency&gt;</code> [ link ] feature must
be used, for example:</p>
<pre class="programlisting">
lib parser : parser.y ;
exe app : app.cpp : &lt;implicit-dependency&gt;parser ;
</pre>
<p>
The above example tells the build system that when scanning
all sources of "app" for implicit-dependencies, it should consider
targets from "parser" as potential 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="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../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="buildprocess.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+135
View File
@@ -0,0 +1,135 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter 23. Tutorial</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="installation.html" title="Chapter 22. Installation">
<link rel="next" href="tutorial/properties.html" title="Properties">
</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="installation.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="tutorial/properties.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.tutorial"></a>Chapter 23. Tutorial</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"><a href="tutorial.html#bbv2.tutorial.hello">Hello, world</a></span></dt>
<dt><span class="section"><a href="tutorial/properties.html">Properties</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="tutorial/properties.html#bbv2.tutorial.properties.requirements">Build Requests and Target Requirements</a></span></dt>
<dt><span class="section"><a href="tutorial/properties.html#bbv2.tutorial.properties.project_attributes">Project Attributes</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="tutorial/hierarchy.html">Project Hierarchies</a></span></dt>
<dt><span class="section"><a href="tutorial/libs.html">Dependent Targets</a></span></dt>
<dt><span class="section"><a href="tutorial/linkage.html">Static and shared libaries</a></span></dt>
<dt><span class="section"><a href="tutorial/conditions.html">Conditions and alternatives</a></span></dt>
<dt><span class="section"><a href="tutorial/prebuilt.html">Prebuilt targets</a></span></dt>
</dl>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bbv2.tutorial.hello"></a>Hello, world</h2></div></div></div>
<p>The simplest project that Boost.Build can construct is
stored in <code class="filename">example/hello/</code> directory. The
project is described by a file
called <code class="filename">Jamroot</code> that contains:
</p>
<pre class="programlisting">
exe hello : hello.cpp ;
</pre>
<p>
Even with this simple setup, you can do some interesting
things. First of all, just invoking <span><strong class="command">bjam</strong></span> will
build the <code class="filename">hello</code>
executable by compiling and
linking <code class="filename">hello.cpp</code>. By default, debug variant
is built. Now, to build the
release variant of <code class="filename">hello</code>, invoke
</p>
<pre class="screen">
bjam release
</pre>
<p>
Note that debug and release variants are created in different
directories, so you can switch between variants or even build
multiple variants at once, without any unnecessary
recompilation. Let's extend the example by adding another line
to our project's <code class="filename">Jamroot</code>:
</p>
<pre class="programlisting">
exe hello2 : hello.cpp ;
</pre>
<p>
Now let us build both the debug and release variants of our project
again:
</p>
<pre class="screen">
bjam debug release
</pre>
<p>
Note that two variants of <code class="filename">hello2</code> are linked.
Since we have already built both variants
of <code class="filename">hello</code>, hello.cpp won't be recompiled;
instead the existing object files will just be linked into the
corresponding variants of <code class="filename">hello2</code>. Now
let's remove all the built products:
</p>
<pre class="screen">
bjam --clean debug release
</pre>
<p>
It's also possible to build or clean specific targets. The
following two commands, respectively, build or clean only the
debug version of <code class="filename">hello2</code>.
</p>
<pre class="screen">
bjam hello2
bjam --clean hello2
</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="installation.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="tutorial/properties.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+88
View File
@@ -0,0 +1,88 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Conditions and alternatives</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../tutorial.html" title="Chapter 23. Tutorial">
<link rel="prev" href="linkage.html" title="Static and shared libaries">
<link rel="next" href="prebuilt.html" title="Prebuilt 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="linkage.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="prebuilt.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.tutorial.conditions"></a>Conditions and alternatives</h2></div></div></div>
<p>Sometimes, particular relationships need to be maintained
among a target's build properties. This can be achieved with
<em class="firstterm">conditional
requirement</em>. For example, you might want to set
specific <code class="computeroutput">#defines</code> when a library is built as shared,
or when a target's <code class="computeroutput">release</code> variant is built in
release mode.
</p>
<pre class="programlisting">
lib network : network.cpp
: <span class="bold"><strong>&lt;link&gt;shared:&lt;define&gt;NEWORK_LIB_SHARED</strong></span>
&lt;variant&gt;release:&lt;define&gt;EXTRA_FAST
;
</pre>
<p>
In the example above, whenever <code class="filename">network</code> is
built with <code class="computeroutput">&lt;link&gt;shared</code>,
<code class="computeroutput">&lt;define&gt;NEWORK_LIB_SHARED</code> will be in its
properties, too.
</p>
<p>
Sometimes the ways a target is built are so different that
describing them using conditional requirements would be
hard. For example, imagine that a library actually uses
different source files depending on the toolset used to build
it. We can express this situation using <em class="firstterm">target
alternatives</em>:
</p>
<pre class="programlisting">
lib demangler : dummy_demangler.cpp ; # alternative 1
lib demangler : demangler_gcc.cpp : &lt;toolset&gt;gcc ; # alternative 2
lib demangler : demangler_msvc.cpp : &lt;toolset&gt;msvc ; # alternative 3
</pre>
<p>
In the example above, when built with <code class="literal">gcc</code>
or <code class="literal">msvc</code>, <code class="filename">demangler</code>
will use a source file specific to the toolset. Otherwise, it
will use a generic source file,
<code class="filename">dummy_demangler.cpp</code>.
</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="linkage.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="prebuilt.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+144
View File
@@ -0,0 +1,144 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Project Hierarchies</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../tutorial.html" title="Chapter 23. Tutorial">
<link rel="prev" href="properties.html" title="Properties">
<link rel="next" href="libs.html" title="Dependent 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="properties.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="libs.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.tutorial.hierarchy"></a>Project Hierarchies</h2></div></div></div>
<p>So far we've only considered examples with one project
(i.e. with one user-written Boost.Jam file,
<code class="filename">Jamroot</code>). A typical large codebase would be
composed of many projects organized into a tree. The top of the
tree is called the <em class="firstterm">project root</em>. Every
subproject is defined by a file called
<code class="filename">Jamfile</code> in a descendant directory of the
project root. The parent project of a subproject is defined by
the nearest <code class="filename">Jamfile</code> or
<code class="filename">Jamroot</code> file in an ancestor directory. For
example, in the following directory layout:
</p>
<pre class="screen">
top/
|
+-- Jamroot
|
+-- app/
| |
| +-- Jamfile
| `-- app.cpp
|
`-- util/
|
+-- foo/
. |
. +-- Jamfile
. `-- bar.cpp
</pre>
<p>
the project root is <code class="filename">top/</code>. Because there is
no <code class="filename">Jamfile</code> in
<code class="filename">top/util/</code>, the projects in
<code class="filename">top/app/</code> and
<code class="filename">top/util/foo/</code> are immediate children of the
root project.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
When we refer to a &#8220;Jamfile,&#8221; set in normal
type, we mean a file called either
<code class="filename">Jamfile</code> or
<code class="filename">Jamroot</code>. When we need to be more
specific, the filename will be set as
&#8220;<code class="filename">Jamfile</code>&#8221; or
&#8220;<code class="filename">Jamroot</code>.&#8221;
</p>
</div>
<p>
Projects inherit all attributes (such as requirements)
from their parents. Inherited requirements are combined with
any requirements specified by the sub-project.
For example, if <code class="filename">top/Jamroot</code> has
</p>
<pre class="programlisting">
&lt;include&gt;/home/ghost/local
</pre>
<p>
in its requirements, then all of its sub-projects will have it
in their requirements, too. Of course, any project can add
include paths to those specified by its parents. <sup>[<a name="id1354320" href="#ftn.id1354320">5</a>]</sup>
More details can be found in
<a href="../advanced/jamfiles.html#bbv2.advanced.projects" title="Projects">the section called &#8220;Projects&#8221;</a>.
</p>
<p>
Invoking <span><strong class="command">bjam</strong></span> without explicitly specifying
any targets on the command-line builds the project rooted in the
current directory. Building a project does not automatically
cause its sub-projects to be built unless the parent project's
Jamfile explicitly requests it. In our example,
<code class="filename">top/Jamroot</code> might contain:
</p>
<pre class="programlisting">
build-project app ;
</pre>
<p>
which would cause the project in <code class="filename">top/app/</code>
to be built whenever the project in <code class="filename">top/</code> is
built. However, targets in <code class="filename">top/util/foo/</code>
will be built only if they are needed by targets in
<code class="filename">top/</code> or <code class="filename">top/app/</code>.
</p>
<div class="footnotes">
<br><hr width="100" align="left">
<div class="footnote"><p><sup>[<a name="ftn.id1354320" href="#id1354320">5</a>] </sup>Many
features will be overridden,
rather than added-to, in sub-projects. See <a href="../reference/definitions.html#bbv2.reference.features.attributes" title="Feature Attributes">the section called &#8220;Feature Attributes&#8221;</a> for more
information</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="properties.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="libs.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+170
View File
@@ -0,0 +1,170 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Dependent Targets</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../tutorial.html" title="Chapter 23. Tutorial">
<link rel="prev" href="hierarchy.html" title="Project Hierarchies">
<link rel="next" href="linkage.html" title="Static and shared libaries">
</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="hierarchy.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="linkage.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.tutorial.libs"></a>Dependent Targets</h2></div></div></div>
<p>
Targets that are &#8220;needed&#8221; by other targets are called
<em class="firstterm">dependencies</em> of those other targets. The
targets that need the other targets are called
<em class="firstterm">dependent</em> targets.
</p>
<p>To get a feeling of target dependencies, let's continue the
above example and see how <code class="filename">top/app/Jamfile</code> can
use libraries from <code class="filename">top/util/foo</code>. If
<code class="filename">top/util/foo/Jamfile</code> contains
</p>
<pre class="programlisting">
lib bar : bar.cpp ;
</pre>
<p>
then to use this library in <code class="filename">top/app/Jamfile</code>, we can
write:
</p>
<pre class="programlisting">
exe app : app.cpp ../util/foo//bar ;
</pre>
<p>
While <code class="computeroutput">app.cpp</code> refers to a regular source file,
<code class="computeroutput">../util/foo//bar</code> is a reference to another target:
a library <code class="filename">bar</code> declared in the Jamfile at
<code class="filename">../util/foo</code>.
</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Tip</h3>
<p>Some other build system have special syntax for listing dependent
libraries, for example <code class="varname">LIBS</code> variable. In Boost.Build,
you just add the library to the list of sources.
</p>
</div>
<p>Suppose we build <code class="filename">app</code> with:
</p>
<pre class="screen">
bjam app optimization=full define=USE_ASM
</pre>
<p>
Which properties will be used to build <code class="computeroutput">foo</code>? The answer is
that some features are
<em class="firstterm">propagated</em>&#8212;Boost.Build attempts to use
dependencies with the same value of propagated features. The
<code class="varname">&lt;optimization&gt;</code> feature is propagated, so both
<code class="filename">app</code> and <code class="filename">foo</code> will be compiled
with full optimization. But <code class="varname">&lt;define&gt;</code> is not
propagated: its value will be added as-is to the compiler flags for
<code class="filename">a.cpp</code>, but won't affect <code class="filename">foo</code>.
</p>
<p>Let's improve this project further.
The library
probably has some headers that must be used when compiling
<code class="filename">app.cpp</code>. We could manually add the necessary
<code class="computeroutput">#include</code> paths to <code class="filename">app</code>'s
requirements as values of the
<code class="varname">&lt;include&gt;</code> feature, but then this work will
be repeated for all programs
that use <code class="filename">foo</code>. A better solution is to modify
<code class="filename">util/foo/Jamfile</code> in this way:
</p>
<pre class="programlisting">
project
: usage-requirements &lt;include&gt;.
;
lib foo : foo.cpp ;
</pre>
<p>
Usage requirements are applied not to the target being declared
but to its
dependents. In this case, <code class="literal">&lt;include&gt;.</code> will be applied to all
targets that directly depend on <code class="filename">foo</code>.
</p>
<p>Another improvement is using symbolic identifiers to refer to
the library, as opposed to <code class="filename">Jamfile</code> location.
In a large project, a library can be used by many targets, and if
they all use <code class="filename">Jamfile</code> location,
a change in directory organization entails much work.
The solution is to use project ids&#8212;symbolic names
not tied to directory layout. First, we need to assign a project id by
adding this code to
<code class="filename">Jamroot</code>:</p>
<pre class="programlisting">
use-project /library-example/foo : util/foo ;
</pre>
<p>Second, we modify <code class="filename">app/Jamfile</code> to use the
project id:
</p>
<pre class="programlisting">
exe app : app.cpp /library-example/foo//bar ;
</pre>
<p>
The <code class="filename">/library-example/foo//bar</code> syntax is used
to refer to the target <code class="filename">bar</code> in
the project with id <code class="filename">/library-example/foo</code>.
We've achieved our goal&#8212;if the library is moved to a different
directory, only <code class="filename">Jamroot</code> must be modified.
Note that project ids are global&#8212;two Jamfiles are not
allowed to assign the same project id to different directories.
</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Tip</h3>
<p>If you want all applications in some project to link
to a certain library, you can avoid having to specify it directly the sources of every
target by using the
<code class="varname">&lt;source&gt;</code> property. For example, if <code class="filename">/boost/filesystem//fs</code>
should be linked to all applications in your project, you can add
<code class="computeroutput">&lt;source&gt;/boost/filesystem//fs</code> to the project's requirements, like this:</p>
<pre class="programlisting">
project
: requirements &lt;source&gt;/boost/filesystem//fs
;
</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="hierarchy.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="linkage.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+149
View File
@@ -0,0 +1,149 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Static and shared libaries</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../tutorial.html" title="Chapter 23. Tutorial">
<link rel="prev" href="libs.html" title="Dependent Targets">
<link rel="next" href="conditions.html" title="Conditions and alternatives">
</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="libs.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="conditions.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.tutorial.linkage"></a>Static and shared libaries</h2></div></div></div>
<p>Libraries can be either
<span class="emphasis"><em>static</em></span>, which means they are included in executable
files that use them, or <span class="emphasis"><em>shared</em></span> (a.k.a.
<span class="emphasis"><em>dynamic</em></span>), which are only referred to from executables,
and must be available at run time. Boost.Build can create and use both kinds.
</p>
<p>The kind of library produced from a <code class="computeroutput">lib</code> target is
determined by the value of the <code class="varname">link</code> feature. Default
value is <code class="literal">shared</code>, and to build static library, the value
should be <code class="literal">static</code>. You can either requiest static build
on the command line:
</p>
<pre class="screen">
bjam link=static
</pre>
<p>
or in the library's requirements:
</p>
<pre class="programlisting">
lib l : l.cpp : &lt;link&gt;static ;
</pre>
<p>
We can also use the <code class="varname">&lt;link&gt;</code> property
to express linking requirements on a per-target basis.
For example, if a particular executable can be correctly built
only with the static version of a library, we can qualify the
executable's <a href="../reference/definitions.html#bbv2.reference.targets.references">target
reference</a> to the library as follows:
</p>
<pre class="programlisting">
exe important : main.cpp helpers/&lt;link&gt;static ;</pre>
<p>
No matter what arguments are specified on the <span><strong class="command">bjam</strong></span>
command-line, <code class="filename">important</code> will only be linked with
the static version of <code class="filename">helpers</code>.
</p>
<p>
Specifying properties in target references is especially useful if you
use a library defined in some other project (one you can't
change) but you still want static (or dynamic) linking to that library
in all cases. If that library is used by many targets,
you <span class="emphasis"><em>could</em></span> use target references
everywhere:
</p>
<pre class="programlisting">
exe e1 : e1.cpp /other_project//bar/&lt;link&gt;static ;
exe e10 : e10.cpp /other_project//bar/&lt;link&gt;static ;</pre>
<p>
but that's far from being convenient. A better approach is
to introduce a level of indirection. Create a local
<span class="type">alias</span> target that refers to the static (or
dynamic) version of <code class="filename">foo</code>:
</p>
<pre class="programlisting">
alias foo : /other_project//bar/&lt;link&gt;static ;
exe e1 : e1.cpp foo ;
exe e10 : e10.cpp foo ;</pre>
<p>
The <a href="../advanced/builtins/targets.html#bbv2.builtins.alias" title="Alias"><code class="computeroutput">alias</code></a>
rule is specifically used to rename a reference to a target and possibly
change the properties.
</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Tip</h3>
<p>
When one library uses another, you put the second library is
the source list of the first. For example:
</p>
<pre class="programlisting">
lib utils : utils.cpp /boost/filesystem//fs ;
lib core : core.cpp utils ;
exe app : app.cpp core ;</pre>
<p>
This works no matter what kind of linking is used. When
<code class="filename">core</code> is built as a shared library, it is linked
directly into <code class="filename">utils</code>. Static libraries can't
link to other libraries, so when <code class="filename">core</code> is built
as a static library, its dependency on <code class="filename">utils</code> is passed along to
<code class="filename">core</code>'s dependents, causing
<code class="filename">app</code> to be linked with both
<code class="filename">core</code> and <code class="filename">utils</code>."
</p>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>(Note for non-UNIX system). Typically, shared libraries must be
installed to a directory in the dynamic linker's search
path. Otherwise, applications that use shared libraries can't be
started. On Windows, the dynamic linker's search path is given by the
<code class="envar">PATH</code> environment variable. This restriction is lifted
when you use Boost.Build testing facilities&#8212;the
<code class="envar">PATH</code> variable will be automatically adjusted before
running executable.
</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="libs.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="conditions.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+124
View File
@@ -0,0 +1,124 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Prebuilt targets</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../tutorial.html" title="Chapter 23. Tutorial">
<link rel="prev" href="conditions.html" title="Conditions and alternatives">
<link rel="next" href="../advanced.html" title="Chapter 24. User documentation">
</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="conditions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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.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.tutorial.prebuilt"></a>Prebuilt targets</h2></div></div></div>
<p>
To link to libraries whose build instructions aren't given in a Jamfile,
you need to create <code class="computeroutput">lib</code> targets with an appropriate
<code class="varname">file</code> property. Target alternatives can be used to
associate multiple library files with a single conceptual target. For
example:
</p>
<pre class="programlisting">
# util/lib2/Jamfile
lib lib2
:
: &lt;file&gt;lib2_release.a &lt;variant&gt;release
;
lib lib2
:
: &lt;file&gt;lib2_debug.a &lt;variant&gt;debug
;
</pre>
<p>
This example defines two alternatives for <code class="filename">lib2</code>, and
for each one names a prebuilt file. Naturally, there are no sources.
Instead, the <code class="varname">&lt;file&gt;</code> feature is used to specify
the file name.
</p>
<p>
Once a prebuilt target has been declared, it can be used just like any other target:
</p>
<pre class="programlisting">
exe app : app.cpp ../util/lib2//lib2 ;
</pre>
<p>
As with any target, the alternative selected depends on the
properties propagated from <code class="filename">lib2</code>'s dependents.
If we build the the release and debug versions of <code class="filename">app</code> will be linked
with <code class="filename">lib2_release.a</code> and <code class="filename">lib2_debug.a</code>, respectively.
</p>
<p>
System libraries&#8212;those that are automatically found by
the toolset by searching through some set of predetermined
paths&#8212;should be declared almost like regular ones:
</p>
<pre class="programlisting">
lib pythonlib : : &lt;name&gt;python22 ;
</pre>
<p>
We again don't specify any sources, but give a
<code class="varname">name</code> that should be passed to the
compiler. If the gcc toolset were used to link an executable
target to <code class="filename">pythonlib</code>, <code class="option">-lpython22</code>
would appear in the command line (other compilers may use
different options).
</p>
<p>
We can also specify where the toolset should look for the library:
</p>
<pre class="programlisting">
lib pythonlib : : &lt;name&gt;python22 &lt;search&gt;/opt/lib ;
</pre>
<p>
And, of course, target alternatives can be used in the usual way:
</p>
<pre class="programlisting">
lib pythonlib : : &lt;name&gt;python22 &lt;variant&gt;release ;
lib pythonlib : : &lt;name&gt;python22_d &lt;variant&gt;debug ;
</pre>
<p>A more advanced use of prebuilt targets is described in <a href="../recipies/site-config.html" title="Targets in site-config.jam">the section called &#8220;Targets in site-config.jam&#8221;</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></small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="conditions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+173
View File
@@ -0,0 +1,173 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Properties</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
<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="../tutorial.html" title="Chapter 23. Tutorial">
<link rel="prev" href="../tutorial.html" title="Chapter 23. Tutorial">
<link rel="next" href="hierarchy.html" title="Project Hierarchies">
</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.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="hierarchy.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.tutorial.properties"></a>Properties</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="properties.html#bbv2.tutorial.properties.requirements">Build Requests and Target Requirements</a></span></dt>
<dt><span class="section"><a href="properties.html#bbv2.tutorial.properties.project_attributes">Project Attributes</a></span></dt>
</dl></div>
<p>
To portably represent aspects of target configuration such as
debug and release variants, or single- and multi-threaded
builds, Boost.Build uses <em class="firstterm">features</em> with
associated <em class="firstterm">values</em>. For
example, the <code class="computeroutput">debug-symbols</code> feature can have a value of <code class="computeroutput">on</code> or
<code class="computeroutput">off</code>. A <em class="firstterm">property</em> is just a (feature,
value) pair. When a user initiates a build, Boost.Build
automatically translates the requested properties into appropriate
command-line flags for invoking toolset components like compilers
and linkers.</p>
<p>There are many built-in features that can be combined to
produce arbitrary build configurations. The following command
builds the project's <code class="computeroutput">release</code> variant with inlining
disabled and debug symbols enabled:
</p>
<pre class="screen">
bjam release inlining=off debug-symbols=on
</pre>
<p>Properties on the command-line are specified with the syntax:
</p>
<pre class="screen"><em class="replaceable"><code>feature-name</code></em>=<em class="replaceable"><code>feature-value</code></em></pre>
<p>The <code class="option">release</code> and <code class="option">debug</code> that we've seen
in <span><strong class="command">bjam</strong></span> invocations are just a shorthand way to
specify values of the <code class="varname">variant</code> feature. For example, the command
above could also have been written this way:
</p>
<pre class="screen">
bjam variant=release inlining=off debug-symbols=on
</pre>
<p><code class="varname">variant</code> is so commonly-used that it has
been given special status as an <em class="firstterm">implicit</em>
feature&#8212;Boost.Build will deduce the its identity just
from the name of one of its values.
</p>
<p>
A complete description of features can be found in <a href="../reference/definitions.html#bbv2.reference.features" title="Features and properties">the section called &#8220;Features and properties&#8221;</a>.
</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.tutorial.properties.requirements"></a>Build Requests and Target Requirements</h3></div></div></div>
<p>
The set of properties specified on the command line constitute
a <em class="firstterm">build request</em>&#8212;a description of
the desired properties for building the requested targets (or,
if no targets were explicitly requested, the project in the
current directory). The <span class="emphasis"><em>actual</em></span>
properties used for building targets are typically a
combination of the build request and properties derived from
the project's <code class="filename">Jamroot</code> (and its other
Jamfiles, as described in <a href="hierarchy.html" title="Project Hierarchies">the section called &#8220;Project Hierarchies&#8221;</a>). For example, the
locations of <code class="computeroutput">#include</code>d header files are normally
not specified on the command-line, but described in
Jamfiles as <em class="firstterm">target
requirements</em> and automatically combined with the
build request for those targets. Multithread-enabled
compilation is another example of a typical target
requirement. The Jamfile fragment below
illustrates how these requirements might be specified.
</p>
<pre class="programlisting">
exe hello
: hello.cpp
: &lt;include&gt;boost &lt;threading&gt;multi
;
</pre>
<p>
When <code class="filename">hello</code> is built, the two
requirements specified above will always be present.
If the build request given on the <span><strong class="command">bjam</strong></span>
command-line explictly contradicts a target's requirements,
the target requirements usually override (or, in the case of
&#8220;free&#8221;&#8221; features like
<code class="varname">&lt;include&gt;</code>,
<sup>[<a name="id1354091" href="#ftn.id1354091">4</a>]</sup>
augments) the build request.
</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Tip</h3>
<p>The value of the <code class="varname">&lt;include&gt;</code> feature is
relative to the location of <code class="filename">Jamroot</code> where it's
used.
</p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.tutorial.properties.project_attributes"></a>Project Attributes</h3></div></div></div>
<p>
If we want the same requirements for our other
target, <code class="filename">hello2</code>, we could simply duplicate
them. However, as projects grow, that approach leads to a great
deal of repeated boilerplate in Jamfiles.
Fortunately, there's a better way. Each project can specify a
set of <em class="firstterm">attributes</em>, including
requirements:
</p>
<pre class="programlisting">
project
: requirements &lt;include&gt;/home/ghost/Work/boost &lt;threading&gt;multi
;
exe hello : hello.cpp ;
exe hello2 : hello.cpp ;
</pre>
<p>
The effect would be as if we specified the same requirement for
both <code class="filename">hello</code> and <code class="filename">hello2</code>.
</p>
</div>
<div class="footnotes">
<br><hr width="100" align="left">
<div class="footnote"><p><sup>[<a name="ftn.id1354091" href="#id1354091">4</a>] </sup>
See <a href="../reference/definitions.html#bbv2.reference.features.attributes" title="Feature Attributes">the section called &#8220;Feature Attributes&#8221;</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="../tutorial.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.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="hierarchy.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
+49
View File
@@ -0,0 +1,49 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Function bool_switch</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#id857530" title="Header &lt;boost/program_options/value_semantic.hpp&gt;">
<link rel="prev" href="wvalue.html" title="Function wvalue">
<link rel="next" href="abstract_variables_map.html" title="Class abstract_variables_map">
</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="wvalue.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id857530"><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="abstract_variables_map.html"><img src="images/next.png" alt="Next"></a>
</div>
<div class="refentry" lang="en">
<a name="bool_switch"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Function bool_switch</span></h2>
<p>boost::program_options::bool_switch &#8212; </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="type">BOOST_PROGRAM_OPTIONS_DECL <a href="typed_value.html" title="Class template typed_value">typed_value</a>&lt; <span class="bold"><strong>bool</strong></span> &gt; *</span> bool_switch();
<span class="type">BOOST_PROGRAM_OPTIONS_DECL <a href="typed_value.html" title="Class template typed_value">typed_value</a>&lt; <span class="bold"><strong>bool</strong></span> &gt; *</span> bool_switch(<span class="bold"><strong>bool</strong></span> * v);</pre></div>
<div class="refsect1" lang="en">
<a name="id1276862"></a><h2>Description</h2>
<p>Works the same way as the 'value' function, but the created value_semantic won't accept any explicit value. So, if the option is present on the command line, the value will be 'true'. </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 Vladimir Prus</small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="wvalue.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id857530"><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="abstract_variables_map.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