vmd_modifiers.qbk 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. [/
  2. (C) Copyright Edward Diener 2011-2015
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:vmd_modifiers Macros with modifiers]
  8. The basic functionality for VMD macros parsing data types
  9. has been given using the required parameters of those
  10. macros. This basic functionality may be perfectly adequate for
  11. macro programmers to use VMD effectively in their programming efforts.
  12. A number of those macros take optional parameters,
  13. called in general "modifiers", which enhance or change the
  14. functionality of those macros in various ways. All modifiers
  15. are VMD identifiers.
  16. In all situations modifiers are optional parameters which are parsed
  17. by VMD to provide enhanced functionality for some of its macros.
  18. They are never required as part of the basic functionality of a macro.
  19. When modifiers are used as optional arguments to a macro they
  20. can be input after the required parameters in any order and
  21. VMD will still handle the optional parameters correctly.
  22. There are two general types of modifiers, 'specific modifiers' and
  23. 'user-defined modifiers'. Specific modifers start with BOOST_VMD_
  24. and are both registered and pre-detected identifiers known to VMD.
  25. The specific modifiers change the expansion of particular macros
  26. in various ways which will be subsequently explained. User-defined
  27. modifiers are user-defined identifiers which the end-user of
  28. specific macros must register and pre-detect for himself. They also
  29. change the expansion of particular macros in various ways which
  30. will be subsequently explained.
  31. For any particular macro if a specific modifier
  32. is not appropriate it is just ignored. This means that VMD never
  33. generates a preprocessing error or gives an incorrect result
  34. just because a specific modifier does not apply for a particular
  35. macro. Any modifier which is not recognized as a specific modifier
  36. is treated as a user-defined modifier. In cases where a user-defined
  37. modifier is not appropriate it is also just ignored.
  38. The situations where modifiers can be used to enhance the basic
  39. functionality of VMD macros can be divided by particular types
  40. of specific modifiers. Each particular type of a specific modifier
  41. has a name given to it, functionality, and set of identifiers
  42. associated with that particular type.
  43. Each particular type of a specific modifier may be used as optional
  44. parameters in one or more designated macros depending on the specific
  45. modifier type.
  46. When more than one mutually exclusive specific modifier from a particular type of modifier is
  47. specified as an optional parameter the last specified takes effect. This
  48. allows the programmer to override a specific modifier by adding the
  49. overridden identifier as an optional argument to the end of the
  50. macro's invocation.
  51. Header files for specific modifiers are automatically included when
  52. the header files for macros taking those specific modifiers are
  53. included.
  54. Header files for user-defined modifiers, which register and pre-detect
  55. those user-defined modifiers, must be included as needed by the programmer
  56. using those modifiers.
  57. The following topics will explain each particular type of modifier
  58. and where it may be used.
  59. [include vmd_modifiers_return_type.qbk]
  60. [include vmd_modifiers_filter.qbk]
  61. [include vmd_modifiers_identifier.qbk]
  62. [include vmd_modifiers_splitting.qbk]
  63. [include vmd_modifiers_index.qbk]
  64. [include vmd_modifiers_single_element.qbk]
  65. [endsect]