Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Reference

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Chapter 29. Boost.Proto

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

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>

Classes

Содержит определения proto::term<>, proto::list1<>, proto::list2<> и т.д. шаблоны классов.

namespace boost {
  namespace proto {
    template<typename T> struct term;
    template<typename... Arg> struct listN;
  }
}

Включает в себя все Proto, кроме контекстов, трансформаций, отладочных утилит и Boost. Тип регистрации.

Удобства для отладки деревьев экспрессии Proto

BOOST_PROTO_ASSERT_MATCHES(expr, Grammar)
BOOST_PROTO_ASSERT_MATCHES_NOT(expr, Grammar)
namespace boost {
  namespace proto {
    template<typename Expr> void display_expr(Expr const &, std::ostream &);
    template<typename Expr> void display_expr(Expr const &);
    template<typename Grammar, typename Expr> 
      void assert_matches(Expr const &);
    template<typename Grammar, typename Expr> 
      void assert_matches_not(Expr const &);
    namespace functional {
      struct display_expr;
    }
  }
}

Заменить все узлы, хранящиеся по ссылке, узлами, хранящимися по значению.

namespace boost {
  namespace proto {
    template<typename Expr> 
      typename proto::result_of::deep_copy<Expr>::type deep_copy(Expr const &);
    namespace result_of {
      template<typename Expr> struct deep_copy;
    }
    namespace functional {
      struct deep_copy;
    }
  }
}

Содержит определение proto::domain<> шаблона классов и помощников для определения доменов с генератором для настройки конструкции выражения и грамматики для управления перегрузкой оператора.

namespace boost {
  namespace proto {
    template<typename Generator = proto::default_generator, 
             typename Grammar = proto::_, typename Super = unspecified> 
      struct domain;
    struct default_domain;
    struct basic_default_domain;
    struct deduce_domain;
    template<typename T> struct is_domain;
    template<typename T> struct domain_of;
  }
}

Содержит прото::eval() оценщик выражения.

namespace boost {
  namespace proto {
    template<typename Expr, typename Context> 
      typename proto::result_of::eval< Expr, Context >::type 
      eval(Expr &, Context &);
    template<typename Expr, typename Context> 
      typename proto::result_of::eval< Expr, Context >::type 
      eval(Expr &, Context const &);
    namespace functional {
      struct eval;
    }
    namespace result_of {
      template<typename Expr, typename Context> struct eval;
    }
  }
}
namespace boost {
  namespace proto {
    template<typename Tag, typename Args, long Arity = Args::arity> 
      struct basic_expr;
    template<typename Tag, typename Args, long Arity = Args::arity> struct expr;
    template<typename Expr> struct unexpr;
  }
}

Макрос и базовый класс для определения типов выражения конечного пользователя

BOOST_PROTO_EXTENDS(Expr, Derived, Domain)
BOOST_PROTO_BASIC_EXTENDS(Expr, Derived, Domain)
BOOST_PROTO_EXTENDS_ASSIGN()
BOOST_PROTO_EXTENDS_FUNCTION()
BOOST_PROTO_EXTENDS_SUBSCRIPT()
BOOST_PROTO_EXTENDS_USING_ASSIGN(Derived)
BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT(Derived)
namespace boost {
  namespace proto {
    struct is_proto_expr;
    template<typename Expr, typename Derived, 
             typename Domain = proto::default_domain> 
      struct extends;
  }
}

Включает в себя все функциональные расширения Proto.

Включает все функциональные расширения для Proto for the Boost. Библиотека Fusion.

Включает Proto callable boost::proto::functional::at.

namespace boost {
  namespace proto {
    namespace functional {
      struct at;
    }
  }
}

Включает Proto callable boost::proto::functional::pop_back.

namespace boost {
  namespace proto {
    namespace functional {
      struct pop_back;
    }
  }
}

Включает Proto callable boost::proto::functional::pop_front.

namespace boost {
  namespace proto {
    namespace functional {
      struct pop_front;
    }
  }
}

Включает Proto callable boost::proto::functional::push_back.

namespace boost {
  namespace proto {
    namespace functional {
      struct push_back;
    }
  }
}

Включает Proto callable boost::proto::functional::push_front.

namespace boost {
  namespace proto {
    namespace functional {
      struct push_front;
    }
  }
}

Включает Proto callable boost::proto::functional::reverse.

namespace boost {
  namespace proto {
    namespace functional {
      struct reverse;
    }
  }
}

Включает Proto callable boost::proto::functional::begin.

namespace boost {
  namespace proto {
    namespace functional {
      struct begin;
    }
  }
}

Включает Proto callable boost::proto::functional::empty.

namespace boost {
  namespace proto {
    namespace functional {
      struct empty;
    }
  }
}

Включает Proto callable boost::proto::functional::end.

namespace boost {
  namespace proto {
    namespace functional {
      struct end;
    }
  }
}

Включает Proto callable boost::proto::functional::rbegin.

namespace boost {
  namespace proto {
    namespace functional {
      struct rbegin;
    }
  }
}

Включает Proto callable boost::proto::functional::rend.

namespace boost {
  namespace proto {
    namespace functional {
      struct rend;
    }
  }
}

Включает Proto callable boost::proto::functional::size.

namespace boost {
  namespace proto {
    namespace functional {
      struct size;
    }
  }
}

Включает все функциональные расширения Proto для стандартной библиотеки.

Включает вызовы Proto для функций, найденных в стандарте header.

namespace boost {
  namespace proto {
    namespace functional {
      struct advance;
      struct distance;
      struct next;
      struct prior;
    }
  }
}

Определяет Proto callables boost::proto::functional::make_pair, boost::proto::functional::first и boost::proto::functional::second.

namespace boost {
  namespace proto {
    namespace functional {
      struct make_pair;
      struct first;
      struct second;
    }
  }
}

Сделайте любое выражение Proto действительной последовательностью Fusion

namespace boost {
  namespace proto {
    template<typename Expr> 
      typename proto::result_of::flatten< Expr >::type const flatten(Expr &);
    template<typename Expr> 
      typename proto::result_of::flatten< Expr const >::type const 
      flatten(Expr const &);
    namespace functional {
      struct flatten;
    }
    namespace result_of {
      template<typename Expr> struct flatten;
    }
  }
}

Содержит определение proto::default_generator, proto::generator<>, proto::pod_generator<> и другие утилиты, которые пользователи могут использовать для постобработки новых объектов выражения, создаваемых Proto.

namespace boost {
  namespace proto {
    struct default_generator;
    struct basic_default_generator;
    template<template< typename > class Extends> struct generator;
    template<template< typename > class Extends> struct pod_generator;
    struct by_value_generator;
    template<typename First, typename Second> struct compose_generators;
    template<typename Generator> struct use_basic_expr;
    template<typename Generator> struct wants_basic_expr;
  }
}

proto::literal<> терминальная обертка, и proto::lit() функция для создания proto::literal<> обертки.

namespace boost {
  namespace proto {
    template<typename T, typename Domain = proto::default_domain> 
      struct literal;
    template<typename T> proto::literal< T & > const lit(T &);
    template<typename T> proto::literal< T const & > const lit(T const &);
  }
}

Определение proto::make_expr() и proto::unpack_expr() утилиты для строительства Узлы экспрессии прото из детских узлов или из последовательности Fusion детских узлов соответственно.

namespace boost {
  namespace proto {
    template<typename Tag, typename... A> 
      typename proto::result_of::make_expr<Tag, A const...>::type const 
      make_expr(A const &...);
    template<typename Tag, typename Domain, typename... A> 
      typename proto::result_of::make_expr<Tag, Domain, A const...>::type const 
      make_expr(A const &...);
    template<typename Tag, typename Sequence> 
      typename proto::result_of::unpack_expr<Tag, Sequence const>::type const 
      unpack_expr(Sequence const &);
    template<typename Tag, typename Domain, typename Sequence> 
      typename proto::result_of::unpack_expr<Tag, Domain, Sequence const>::type const 
      unpack_expr(Sequence const &);
    namespace functional {
      template<typename Tag, typename Domain = proto::deduce_domain> 
        struct make_expr;
      template<typename Tag, typename Domain = proto::deduce_domain> 
        struct unpack_expr;
    }
    namespace result_of {
      template<typename Tag, typename... A> struct make_expr;
      template<typename Tag, typename Domain, typename... A> 
        struct make_expr<Tag, Domain, A...>;
      template<typename Tag, typename Sequence, typename Void = void> 
        struct unpack_expr;
      template<typename Tag, typename Domain, typename Sequence> 
        struct unpack_expr<Tag, Domain, Sequence>;
    }
  }
}

Содержит определение proto::matches<> метафункция для определения, соответствует ли данное выражение заданному шаблону.

namespace boost {
  namespace proto {
    struct _;
    template<typename Grammar> struct not_;
    template<typename If, typename Then = proto::_, 
             typename Else = proto::not_<proto::_> > 
      struct if_;
    template<typename... G> struct or_;
    template<typename... G> struct and_;
    template<typename Cases, typename Transform> struct switch_;
    template<typename T> struct exact;
    template<typename T> struct convertible_to;
    template<typename Grammar> struct vararg;
    template<typename Expr, typename Grammar> struct matches;
  }
}

Содержит все перегруженные операторы, которые позволяют строить деревья экспрессии Прото.

BOOST_PROTO_DEFINE_OPERATORS(Trait, Domain)
namespace boost {
  namespace proto {
    template<typename T> struct is_extension;
    template<typename Arg> unspecified operator+(Arg & arg);
    template<typename Arg> unspecified operator+(Arg const & arg);
    template<typename Arg> unspecified operator-(Arg & arg);
    template<typename Arg> unspecified operator-(Arg const & arg);
    template<typename Arg> unspecified operator*(Arg & arg);
    template<typename Arg> unspecified operator*(Arg const & arg);
    template<typename Arg> unspecified operator~(Arg & arg);
    template<typename Arg> unspecified operator~(Arg const & arg);
    template<typename Arg> unspecified operator&(Arg & arg);
    template<typename Arg> unspecified operator&(Arg const & arg);
    template<typename Arg> unspecified operator!(Arg & arg);
    template<typename Arg> unspecified operator!(Arg const & arg);
    template<typename Arg> unspecified operator++(Arg & arg);
    template<typename Arg> unspecified operator++(Arg const & arg);
    template<typename Arg> unspecified operator--(Arg & arg);
    template<typename Arg> unspecified operator--(Arg const & arg);
    template<typename Arg> unspecified operator++(Arg & arg, int);
    template<typename Arg> unspecified operator++(Arg const & arg, int);
    template<typename Arg> unspecified operator--(Arg & arg, int);
    template<typename Arg> unspecified operator--(Arg const & arg, int);
    template<typename Left, typename Right> 
      unspecified operator<<(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator<<(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator<<(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator<<(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator>>(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator>>(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator>>(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator>>(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator*(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator*(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator*(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator*(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator/(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator/(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator/(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator/(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator%(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator%(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator%(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator%(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator+(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator+(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator+(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator+(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator-(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator-(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator-(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator-(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator<(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator<(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator<(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator<(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator>(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator>(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator>(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator>(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator<=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator<=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator<=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator<=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator>=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator>=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator>=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator>=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator==(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator==(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator==(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator==(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator!=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator!=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator!=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator!=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator||(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator||(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator||(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator||(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator&&(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator&&(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator&&(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator&&(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator&(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator&(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator&(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator&(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator|(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator|(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator|(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator|(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator^(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator^(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator^(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator^(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator,(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator,(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator,(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator,(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator->*(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator->*(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator->*(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator->*(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator<<=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator<<=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator<<=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator<<=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator>>=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator>>=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator>>=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator>>=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator*=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator*=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator*=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator*=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator/=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator/=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator/=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator/=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator%=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator%=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator%=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator%=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator+=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator+=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator+=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator+=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator-=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator-=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator-=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator-=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator&=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator&=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator&=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator&=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator|=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator|=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator|=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator|=(Left const & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator^=(Left & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator^=(Left & left, Right const & right);
    template<typename Left, typename Right> 
      unspecified operator^=(Left const & left, Right & right);
    template<typename Left, typename Right> 
      unspecified operator^=(Left const & left, Right const & right);
    template<typename A0, typename A1, typename A2> 
      typename proto::result_of::make_expr<
        proto::tag::if_else_, 
        proto::deduce_domain,
        A0 const &, 
        A1 const &, 
        A2 const &
      >::type const 
      if_else(A0 const & a0, A1 const & a1, A2 const & a2);
  }
}

Включает в себя все Proto, кроме Boost. Тип регистрации.

Передовые декларации всех публичных типов и функций прото.

BOOST_PROTO_MAX_ARITY
BOOST_PROTO_MAX_LOGICAL_ARITY
BOOST_PROTO_MAX_FUNCTION_CALL_ARITY
namespace boost {
  namespace proto {
    struct callable;
    int const N;
    typedef proto::functional::flatten _flatten;
    typedef proto::functional::make_pair _make_pair;
    typedef proto::functional::first _first;
    typedef proto::functional::second _second;
    typedef proto::functional::pop_back _pop_back;
    typedef proto::functional::pop_front _pop_front;
    typedef proto::functional::push_back _push_back;
    typedef proto::functional::push_front _push_front;
    typedef proto::functional::reverse _reverse;
    typedef proto::functional::eval _eval;
    typedef proto::functional::deep_copy _deep_copy;
    typedef proto::functional::make_expr< proto::tag::terminal > _make_terminal;
    typedef proto::functional::make_expr< proto::tag::unary_plus > _make_unary_plus;
    typedef proto::functional::make_expr< proto::tag::negate > _make_negate;
    typedef proto::functional::make_expr< proto::tag::dereference > _make_dereference;
    typedef proto::functional::make_expr< proto::tag::complement > _make_complement;
    typedef proto::functional::make_expr< proto::tag::address_of > _make_address_of;
    typedef proto::functional::make_expr< proto::tag::logical_not > _make_logical_not;
    typedef proto::functional::make_expr< proto::tag::pre_inc > _make_pre_inc;
    typedef proto::functional::make_expr< proto::tag::pre_dec > _make_pre_dec;
    typedef proto::functional::make_expr< proto::tag::post_inc > _make_post_inc;
    typedef proto::functional::make_expr< proto::tag::post_dec > _make_post_dec;
    typedef proto::functional::make_expr< proto::tag::shift_left > _make_shift_left;
    typedef proto::functional::make_expr< proto::tag::shift_right > _make_shift_right;
    typedef proto::functional::make_expr< proto::tag::multiplies > _make_multiplies;
    typedef proto::functional::make_expr< proto::tag::divides > _make_divides;
    typedef proto::functional::make_expr< proto::tag::modulus > _make_modulus;
    typedef proto::functional::make_expr< proto::tag::plus > _make_plus;
    typedef proto::functional::make_expr< proto::tag::minus > _make_minus;
    typedef proto::functional::make_expr< proto::tag::less > _make_less;
    typedef proto::functional::make_expr< proto::tag::greater > _make_greater;
    typedef proto::functional::make_expr< proto::tag::less_equal > _make_less_equal;
    typedef proto::functional::make_expr< proto::tag::greater_equal > _make_greater_equal;
    typedef proto::functional::make_expr< proto::tag::equal_to > _make_equal_to;
    typedef proto::functional::make_expr< proto::tag::not_equal_to > _make_not_equal_to;
    typedef proto::functional::make_expr< proto::tag::logical_or > _make_logical_or;
    typedef proto::functional::make_expr< proto::tag::logical_and > _make_logical_and;
    typedef proto::functional::make_expr< proto::tag::bitwise_and > _make_bitwise_and;
    typedef proto::functional::make_expr< proto::tag::bitwise_or > _make_bitwise_or;
    typedef proto::functional::make_expr< proto::tag::bitwise_xor > _make_bitwise_xor;
    typedef proto::functional::make_expr< proto::tag::comma > _make_comma;
    typedef proto::functional::make_expr< proto::tag::mem_ptr > _make_mem_ptr;
    typedef proto::functional::make_expr< proto::tag::assign > _make_assign;
    typedef proto::functional::make_expr< proto::tag::shift_left_assign > _make_shift_left_assign;
    typedef proto::functional::make_expr< proto::tag::shift_right_assign > _make_shift_right_assign;
    typedef proto::functional::make_expr< proto::tag::multiplies_assign > _make_multiplies_assign;
    typedef proto::functional::make_expr< proto::tag::divides_assign > _make_divides_assign;
    typedef proto::functional::make_expr< proto::tag::modulus_assign > _make_modulus_assign;
    typedef proto::functional::make_expr< proto::tag::plus_assign > _make_plus_assign;
    typedef proto::functional::make_expr< proto::tag::minus_assign > _make_minus_assign;
    typedef proto::functional::make_expr< proto::tag::bitwise_and_assign > _make_bitwise_and_assign;
    typedef proto::functional::make_expr< proto::tag::bitwise_or_assign > _make_bitwise_or_assign;
    typedef proto::functional::make_expr< proto::tag::bitwise_xor_assign > _make_bitwise_xor_assign;
    typedef proto::functional::make_expr< proto::tag::subscript > _make_subscript;
    typedef proto::functional::make_expr< proto::tag::if_else_ > _make_if_else;
    typedef proto::functional::make_expr< proto::tag::function > _make_function;
    typedef proto::_child_c< N > _childN;  // For each N in [0,BOOST_PROTO_MAX_ARITY)
    typedef proto::_child0 _child;
    typedef proto::_child0 _left;
    typedef proto::_child1 _right;
    namespace functional {
      typedef proto::functional::make_expr< proto::tag::terminal > make_terminal;
      typedef proto::functional::make_expr< proto::tag::unary_plus > make_unary_plus;
      typedef proto::functional::make_expr< proto::tag::negate > make_negate;
      typedef proto::functional::make_expr< proto::tag::dereference > make_dereference;
      typedef proto::functional::make_expr< proto::tag::complement > make_complement;
      typedef proto::functional::make_expr< proto::tag::address_of > make_address_of;
      typedef proto::functional::make_expr< proto::tag::logical_not > make_logical_not;
      typedef proto::functional::make_expr< proto::tag::pre_inc > make_pre_inc;
      typedef proto::functional::make_expr< proto::tag::pre_dec > make_pre_dec;
      typedef proto::functional::make_expr< proto::tag::post_inc > make_post_inc;
      typedef proto::functional::make_expr< proto::tag::post_dec > make_post_dec;
      typedef proto::functional::make_expr< proto::tag::shift_left > make_shift_left;
      typedef proto::functional::make_expr< proto::tag::shift_right > make_shift_right;
      typedef proto::functional::make_expr< proto::tag::multiplies > make_multiplies;
      typedef proto::functional::make_expr< proto::tag::divides > make_divides;
      typedef proto::functional::make_expr< proto::tag::modulus > make_modulus;
      typedef proto::functional::make_expr< proto::tag::plus > make_plus;
      typedef proto::functional::make_expr< proto::tag::minus > make_minus;
      typedef proto::functional::make_expr< proto::tag::less > make_less;
      typedef proto::functional::make_expr< proto::tag::greater > make_greater;
      typedef proto::functional::make_expr< proto::tag::less_equal > make_less_equal;
      typedef proto::functional::make_expr< proto::tag::greater_equal > make_greater_equal;
      typedef proto::functional::make_expr< proto::tag::equal_to > make_equal_to;
      typedef proto::functional::make_expr< proto::tag::not_equal_to > make_not_equal_to;
      typedef proto::functional::make_expr< proto::tag::logical_or > make_logical_or;
      typedef proto::functional::make_expr< proto::tag::logical_and > make_logical_and;
      typedef proto::functional::make_expr< proto::tag::bitwise_and > make_bitwise_and;
      typedef proto::functional::make_expr< proto::tag::bitwise_or > make_bitwise_or;
      typedef proto::functional::make_expr< proto::tag::bitwise_xor > make_bitwise_xor;
      typedef proto::functional::make_expr< proto::tag::comma > make_comma;
      typedef proto::functional::make_expr< proto::tag::mem_ptr > make_mem_ptr;
      typedef proto::functional::make_expr< proto::tag::assign > make_assign;
      typedef proto::functional::make_expr< proto::tag::shift_left_assign > make_shift_left_assign;
      typedef proto::functional::make_expr< proto::tag::shift_right_assign > make_shift_right_assign;
      typedef proto::functional::make_expr< proto::tag::multiplies_assign > make_multiplies_assign;
      typedef proto::functional::make_expr< proto::tag::divides_assign > make_divides_assign;
      typedef proto::functional::make_expr< proto::tag::modulus_assign > make_modulus_assign;
      typedef proto::functional::make_expr< proto::tag::plus_assign > make_plus_assign;
      typedef proto::functional::make_expr< proto::tag::minus_assign > make_minus_assign;
      typedef proto::functional::make_expr< proto::tag::bitwise_and_assign > make_bitwise_and_assign;
      typedef proto::functional::make_expr< proto::tag::bitwise_or_assign > make_bitwise_or_assign;
      typedef proto::functional::make_expr< proto::tag::bitwise_xor_assign > make_bitwise_xor_assign;
      typedef proto::functional::make_expr< proto::tag::subscript > make_subscript;
      typedef proto::functional::make_expr< proto::tag::if_else_ > make_if_else;
      typedef proto::functional::make_expr< proto::tag::function > make_function;
    }
  }
}

Повышаю. Тип регистрации для типов Proto и определение макроса BOOST_PROTO_AUTO().

BOOST_PROTO_AUTO(Var, Expr)

Содержит макросы для облегчения генерации повторяющихся конструкций кода.

BOOST_PROTO_REPEAT(MACRO)
BOOST_PROTO_REPEAT_FROM_TO(FROM, TO, MACRO)
BOOST_PROTO_REPEAT_EX(MACRO, typename_A, A, A_a, a)
BOOST_PROTO_REPEAT_FROM_TO_EX(FROM, TO, MACRO, typename_A, A, A_a, a)
BOOST_PROTO_LOCAL_ITERATE()
BOOST_PROTO_typename_A(N)
BOOST_PROTO_A_const_ref(N)
BOOST_PROTO_A_ref(N)
BOOST_PROTO_A(N)
BOOST_PROTO_A_const(N)
BOOST_PROTO_A_const_ref_a(N)
BOOST_PROTO_A_ref_a(N)
BOOST_PROTO_ref_a(N)
BOOST_PROTO_a(N)

Содержит теги для всех перегруженных операторов на C++

namespace boost {
  namespace proto {
    namespace tag {
      struct terminal;
      struct unary_plus;
      struct negate;
      struct dereference;
      struct complement;
      struct address_of;
      struct logical_not;
      struct pre_inc;
      struct pre_dec;
      struct post_inc;
      struct post_dec;
      struct shift_left;
      struct shift_right;
      struct multiplies;
      struct divides;
      struct modulus;
      struct plus;
      struct minus;
      struct less;
      struct greater;
      struct less_equal;
      struct greater_equal;
      struct equal_to;
      struct not_equal_to;
      struct logical_or;
      struct logical_and;
      struct bitwise_and;
      struct bitwise_or;
      struct bitwise_xor;
      struct comma;
      struct mem_ptr;
      struct assign;
      struct shift_left_assign;
      struct shift_right_assign;
      struct multiplies_assign;
      struct divides_assign;
      struct modulus_assign;
      struct plus_assign;
      struct minus_assign;
      struct bitwise_and_assign;
      struct bitwise_or_assign;
      struct bitwise_xor_assign;
      struct subscript;
      struct if_else_;
      struct function;
    }
  }
}

Содержит определения для различных признаков выражения и утилит, таких как proto::tag_of и proto::arity_of<>; функции proto::value(), proto::left() и proto::right(); proto::child(), proto::child_c(), proto::as_expr(), proto::as_child() и различные помощники.

namespace boost {
  namespace proto {
    template<typename T> struct is_callable;
    template<typename T> struct is_transform;
    template<typename T> struct is_aggregate;
    template<typename T> struct terminal;
    template<typename T, typename U, typename V> struct if_else_;
    template<typename T> struct unary_plus;
    template<typename T> struct negate;
    template<typename T> struct dereference;
    template<typename T> struct complement;
    template<typename T> struct address_of;
    template<typename T> struct logical_not;
    template<typename T> struct pre_inc;
    template<typename T> struct pre_dec;
    template<typename T> struct post_inc;
    template<typename T> struct post_dec;
    template<typename T, typename U> struct shift_left;
    template<typename T, typename U> struct shift_right;
    template<typename T, typename U> struct multiplies;
    template<typename T, typename U> struct divides;
    template<typename T, typename U> struct modulus;
    template<typename T, typename U> struct plus;
    template<typename T, typename U> struct minus;
    template<typename T, typename U> struct less;
    template<typename T, typename U> struct greater;
    template<typename T, typename U> struct less_equal;
    template<typename T, typename U> struct greater_equal;
    template<typename T, typename U> struct equal_to;
    template<typename T, typename U> struct not_equal_to;
    template<typename T, typename U> struct logical_or;
    template<typename T, typename U> struct logical_and;
    template<typename T, typename U> struct bitwise_and;
    template<typename T, typename U> struct bitwise_or;
    template<typename T, typename U> struct bitwise_xor;
    template<typename T, typename U> struct comma;
    template<typename T, typename U> struct mem_ptr;
    template<typename T, typename U> struct assign;
    template<typename T, typename U> struct shift_left_assign;
    template<typename T, typename U> struct shift_right_assign;
    template<typename T, typename U> struct multiplies_assign;
    template<typename T, typename U> struct divides_assign;
    template<typename T, typename U> struct modulus_assign;
    template<typename T, typename U> struct plus_assign;
    template<typename T, typename U> struct minus_assign;
    template<typename T, typename U> struct bitwise_and_assign;
    template<typename T, typename U> struct bitwise_or_assign;
    template<typename T, typename U> struct bitwise_xor_assign;
    template<typename T, typename U> struct subscript;
    template<typename... A> struct function;
    template<typename Tag, typename T> struct nullary_expr;
    template<typename Tag, typename T> struct unary_expr;
    template<typename Tag, typename T, typename U> struct binary_expr;
    template<typename Tag, typename... A> struct nary_expr;
    template<typename T> struct is_expr;
    template<typename Expr> struct tag_of;
    template<typename Expr> struct arity_of;
    template<typename T> 
      typename proto::result_of::as_expr< T >::type as_expr(T &);
    template<typename T> 
      typename proto::result_of::as_expr< T const >::type as_expr(T const &);
    template<typename Domain, typename T> 
      typename proto::result_of::as_expr< T, Domain >::type as_expr(T &);
    template<typename Domain, typename T> 
      typename proto::result_of::as_expr< T const, Domain >::type 
      as_expr(T const &);
    template<typename T> 
      typename proto::result_of::as_child< T >::type as_child(T &);
    template<typename T> 
      typename proto::result_of::as_child< T const >::type as_child(T const &);
    template<typename Domain, typename T> 
      typename proto::result_of::as_child< T, Domain >::type as_child(T &);
    template<typename Domain, typename T> 
      typename proto::result_of::as_child< T const, Domain >::type 
      as_child(T const &);
    template<typename N, typename Expr> 
      typename proto::result_of::child< Expr &, N >::type child(Expr &);
    template<typename N, typename Expr> 
      typename proto::result_of::child< Expr const &, N >::type 
      child(Expr const &);
    template<typename Expr> 
      typename proto::result_of::child< Expr & >::type child(Expr &);
    template<typename Expr> 
      typename proto::result_of::child< Expr const & >::type 
      child(Expr const &);
    template<long N, typename Expr> 
      typename proto::result_of::child_c< Expr &, N >::type child_c(Expr &);
    template<long N, typename Expr> 
      typename proto::result_of::child_c< Expr const &, N >::type 
      child_c(Expr const &);
    template<typename Expr> 
      typename proto::result_of::value< Expr & >::type value(Expr &);
    template<typename Expr> 
      typename proto::result_of::value< Expr const & >::type 
      value(Expr const &);
    template<typename Expr> 
      typename proto::result_of::left< Expr & >::type left(Expr &);
    template<typename Expr> 
      typename proto::result_of::left< Expr const & >::type left(Expr const &);
    template<typename Expr> 
      typename proto::result_of::right< Expr & >::type right(Expr &);
    template<typename Expr> 
      typename proto::result_of::right< Expr const & >::type 
      right(Expr const &);
    namespace functional {
      template<typename Domain = proto::default_domain> struct as_expr;
      template<typename Domain = proto::default_domain> struct as_child;
      template<long N> struct child_c;
      template<typename N = mpl::long_<0> > struct child;
      struct value;
      struct left;
      struct right;
    }
    namespace result_of {
      template<typename T, typename Domain = proto::default_domain> 
        struct as_expr;
      template<typename T, typename Domain = proto::default_domain> 
        struct as_child;
      template<typename Expr, typename N = mpl::long_<0> > struct child;
      template<typename Expr> struct value;
      template<typename Expr> struct left;
      template<typename Expr> struct right;
      template<typename Expr, long N> struct child_c;
    }
  }
}

Включает в себя все встроенные преобразования Proto.

Содержит определение ребенка Преобразования и друзья.

namespace boost {
  namespace proto {
    struct _expr;
    struct _state;
    struct _data;
    template<int N> struct _child_c;
    struct _value;
    struct _void;
    struct _byref;
    struct _byval;
  }
}

Содержит определение вызова<> преобразования.

namespace boost {
  namespace proto {
    template<typename T> struct call;
  }
}
namespace boost {
  namespace proto {
    template<typename Grammar = unspecified> struct _default;
  }
}
BOOST_PROTO_DEFINE_ENV_VAR(Type, Name)
namespace boost {
  namespace proto {
    struct key_not_found;
    struct empty_env;
    template<typename Key, typename Value, typename Env = proto::empty_env> 
      struct env;
    template<typename T> struct is_env;
    struct data_type;
    proto::data_type const data;
    template<typename Key> struct _env_var;
    struct _env;
    template<typename T> 
      typename proto::result_of::as_env<T &>::type as_env(T &);
    template<typename T> 
      typename proto::result_of::as_env<T const &>::type as_env(T const &);
    template<typename Key, typename Env> 
      typename proto::result_of::has_env_var<Env &, Key>::type 
      has_env_var(Env &);
    template<typename Key, typename Env> 
      typename proto::result_of::has_env_var<Env const &, Key>::type 
      has_env_var(Env const &);
    template<typename Key, typename Env> 
      typename proto::result_of::env_var<Env &, Key>::type env_var(Env &);
    template<typename Key, typename Env> 
      typename proto::result_of::env_var<Env const &, Key>::type 
      env_var(Env const &);
    template<typename Env, typename Key, typename Value> 
      proto::env<Key, Value, UNCVREF(typename proto::result_of::as_env<Env &>::type)> 
      operator,(Env &, proto::env<Key, Value> const &);
    template<typename Env, typename Key, typename Value> 
      proto::env<Key, Value, UNCVREF(typename proto::result_of::as_env<Env const &>::type)> 
      operator,(Env const &, proto::env<Key, Value> const &);
    namespace functional {
      struct as_env;
      template<typename Key> struct has_env_var;
      template<typename Key> struct env_var;
    }
    namespace result_of {
      template<typename T> struct as_env;
      template<typename Env, typename Key> struct has_env_var;
      template<typename Env, typename Key> struct env_var;
    }
  }
}

Содержит определение преобразований proto::fold<> и proto::reverse_fold<> .

namespace boost {
  namespace proto {
    template<typename Sequence, typename State0, typename Fun> struct fold;
    template<typename Sequence, typename State0, typename Fun> 
      struct reverse_fold;
  }
}

Содержит определение proto::fold_tree<> и proto::reverse_fold_tree<> трансформируется.

namespace boost {
  namespace proto {
    template<typename Sequence, typename State0, typename Fun> struct fold_tree;
    template<typename Sequence, typename State0, typename Fun> 
      struct reverse_fold_tree;
  }
}

Содержит определение трансформационных и трансформационных помощников.

namespace boost {
  namespace proto {
    template<typename PrimitiveTransform> struct transform;
    template<typename Expr, typename State, typename Data> 
      struct transform_impl;
    struct pack;
  }
}

Содержит определение интегрального преобразования и друзей.

namespace boost {
  namespace proto {
    template<typename T, T I> struct integral_c;
    template<char I> struct char_;
    template<int I> struct int_;
    template<long I> struct long_;
    template<std::size_t I> struct size_t;
  }
}

Содержит определение преобразования proto::lazy<> .

namespace boost {
  namespace proto {
    template<typename T> struct lazy;
  }
}

Содержит определение преобразований proto::make<> и proto::protect<> .

namespace boost {
  namespace proto {
    template<typename T> struct noinvoke;
    template<typename PrimitiveTransform> struct protect;
    template<typename T> struct make;
  }
}

Определение преобразования proto::pass_through<>, которое представляет собой преобразование по умолчанию всех метафункций генератора экспрессии, таких как proto::unary_plus<>, proto::plus<> и proto::nary_expr<>.

namespace boost {
  namespace proto {
    template<typename Grammar, typename Domain = proto::deduce_domain> 
      struct pass_through;
  }
}

Определение proto:: when<> и proto::otherwise<> трансформируется.

namespace boost {
  namespace proto {
    struct transforms_type;
    proto::transforms_type const transforms;
    template<typename Grammar, typename PrimitiveTransform = Grammar> 
      struct when;
    template<typename Grammar, typename Fun> struct when<Grammar, Fun *>;
    template<typename Grammar, typename R, typename... A> 
      struct when<Grammar, R(A...)>;
    template<typename Grammar, typename R, typename... A> 
      struct when<Grammar, R(A..., ...)>;
    template<typename Grammar> struct when<Grammar, proto::external_transform>;
    template<typename Fun> struct otherwise;
    struct external_transform;
    template<typename... When> struct external_transforms;
  }
}

Включает все встроенные контексты оценки Proto.

Определение proto::context::callable_context<>, контекст оценки для proto::eval(), который вентилирует каждый узел и называет производный тип контекста с компонентами выражений. Если исходный контекст не имеет перегрузки, которая обрабатывает этот узел, вернитесь к другому контексту.

namespace boost {
  namespace proto {
    namespace context {
      template<typename Expr, typename Context> struct callable_eval;
      template<typename Context, 
               typename DefaultCtx = proto::context::default_context> 
        struct callable_context;
    }
  }
}
namespace boost {
  namespace proto {
    namespace context {
      template<typename Expr, typename Context> struct default_eval;
      struct default_context;
    }
  }
}

Определение proto::context::null_context<>, контекст оценки для proto::eval(), который просто оценивает каждое детское выражение, вообще не комбинирует результаты и возвращает пустоту.

namespace boost {
  namespace proto {
    namespace context {
      template<typename Expr, typename Context> struct null_eval;
      struct null_context;
    }
  }
}

PrevUpHomeNext

Статья Reference раздела The Boost C++ Libraries BoostBook Documentation Subset Chapter 29. Boost.Proto может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Chapter 29. Boost.Proto ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-19 17:50:53/0.021034955978394/0