Boost C++ Libraries Home Libraries People FAQ More

Next

Chapter 1. Boost.Proto

Eric Niebler

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Table of Contents

Preface
Users' Guide
Getting Started
Installing Proto
Naming Conventions
Hello World
Hello Calculator
Fronts Ends: Defining Terminals and Non-Terminals of Your EDSL
Making Terminals
Proto's Operator Overloads
Making Lazy Functions
Customizing Expressions in Your Domain
Domains
The extends<> Expression Wrapper
Expression Generators
Controlling Operator Overloads
Controlling How Child Expressions Are Captured
EDSL Interoperatability: Sub-Domains
Adapting Existing Types to Proto
Generating Repetitive Code with the Preprocessor
Intermediate Form: Understanding and Introspecting Expressions
Accessing Parts of an Expression
Deep-copying Expressions
Debugging Expressions
Operator Tags and Metafunctions
Expressions as Fusion Sequences
Expression Introspection: Defining a Grammar
Finding Patterns in Expressions
Fuzzy and Exact Matches of Terminals
if_<>, and_<>, and not_<>
Improving Compile Times With switch_<>
Matching Vararg Expressions
Defining EDSL Grammars
Back Ends: Making Expression Templates Do Useful Work
Expression Evaluation: Imparting Behaviors with a Context
Evaluating an Expression with proto::eval()
Defining an Evaluation Context
Proto's Built-In Contexts
Expression Transformation: Semantic Actions
Activating Your Grammars
Handling Alternation and Recursion
Callable Transforms
Object Transforms
Example: Calculator Arity
Transforms With State Accumulation
Passing Auxiliary Data to Transforms
Implicit Parameters to Primitive Transforms
Unpacking Expressions
Separating Grammars And Transforms
Proto's Built-In Transforms
Building Custom Primitive Transforms
Making Your Transform Callable
Examples
Hello World: Building an Expression Template and Evaluating It
Calc1: Defining an Evaluation Context
Calc2: Adding Members Using proto::extends<>
Calc3: Defining a Simple Transform
Lazy Vector: Controlling Operator Overloads
RGB: Type Manipulations with Proto Transforms
TArray: A Simple Linear Algebra Library
Vec3: Computing With Transforms and Contexts
Vector: Adapting a Non-Proto Terminal Type
Mixed: Adapting Several Non-Proto Terminal Types
Map Assign: An Intermediate Transform
Future Group: A More Advanced Transform
Lambda: A Simple Lambda Library with Proto
Checked Calculator: A Simple Example of External Transforms
Background and Resources
Glossary
Reference
Concepts
Classes
Functions
Header <boost/proto/args.hpp>
Header <boost/proto/core.hpp>
Header <boost/proto/debug.hpp>
Header <boost/proto/deep_copy.hpp>
Header <boost/proto/domain.hpp>
Header <boost/proto/eval.hpp>
Header <boost/proto/expr.hpp>
Header <boost/proto/extends.hpp>
Header <boost/proto/functional.hpp>
Header <boost/proto/functional/fusion.hpp>
Header <boost/proto/functional/fusion/at.hpp>
Header <boost/proto/functional/fusion/pop_back.hpp>
Header <boost/proto/functional/fusion/pop_front.hpp>
Header <boost/proto/functional/fusion/push_back.hpp>
Header <boost/proto/functional/fusion/push_front.hpp>
Header <boost/proto/functional/fusion/reverse.hpp>
Header <boost/proto/functional/range/begin.hpp>
Header <boost/proto/functional/range/empty.hpp>
Header <boost/proto/functional/range/end.hpp>
Header <boost/proto/functional/range/rbegin.hpp>
Header <boost/proto/functional/range/rend.hpp>
Header <boost/proto/functional/range/size.hpp>
Header <boost/proto/functional/std.hpp>
Header <boost/proto/functional/std/iterator.hpp>
Header <boost/proto/functional/std/utility.hpp>
Header <boost/proto/fusion.hpp>
Header <boost/proto/generate.hpp>
Header <boost/proto/literal.hpp>
Header <boost/proto/make_expr.hpp>
Header <boost/proto/matches.hpp>
Header <boost/proto/operators.hpp>
Header <boost/proto/proto.hpp>
Header <boost/proto/proto_fwd.hpp>
Header <boost/proto/proto_typeof.hpp>
Header <boost/proto/repeat.hpp>
Header <boost/proto/tags.hpp>
Header <boost/proto/traits.hpp>
Header <boost/proto/transform.hpp>
Header <boost/proto/transform/arg.hpp>
Header <boost/proto/transform/call.hpp>
Header <boost/proto/transform/default.hpp>
Header <boost/proto/transform/env.hpp>
Header <boost/proto/transform/fold.hpp>
Header <boost/proto/transform/fold_tree.hpp>
Header <boost/proto/transform/impl.hpp>
Header <boost/proto/transform/integral_c.hpp>
Header <boost/proto/transform/lazy.hpp>
Header <boost/proto/transform/make.hpp>
Header <boost/proto/transform/pass_through.hpp>
Header <boost/proto/transform/when.hpp>
Header <boost/proto/context.hpp>
Header <boost/proto/context/callable.hpp>
Header <boost/proto/context/default.hpp>
Header <boost/proto/context/null.hpp>
Appendices
Appendix A: Release Notes
Appendix B: History
Appendix C: Rationale
Static Initialization
Why Not Reuse MPL, Fusion, et cetera?
Appendix D: Implementation Notes
Quick-n-Dirty Type Categorization
Detecting the Arity of Function Objects
Appendix E: Acknowledgements

Last revised: September 03, 2013 at 18:55:27 GMT


Next