'ODTONE - Open Dot Twenty One'

PrevUpHomeNext

Class function

odtone::conf::function

Synopsis

// In header: </home/carlos/Projectos/odtone/inc/odtone/conf.hpp>


class function {
public:
  // member classes/structs/unions
  template<typename F> 
  struct adaptor_<F, boost::mpl::false_, 1> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::false_, 2> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::false_, 3> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::false_, 4> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::false_, 5> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::true_, 1> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::true_, 2> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::true_, 3> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::true_, 4> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F> 
  struct adaptor_<F, boost::mpl::true_, 5> {
    // construct/copy/destruct
    adaptor_(F);

    // public member functions
    void operator()(args_type const &, pset_type const &) const;

    // public data members
    F f;
  };
  template<typename F, size_t N> 
  class at_ {
  public:
    // types
    typedef boost::remove_cv< typename boost::remove_reference< tp >::type >::type type;
  };

  struct push_arg_id_ {
    // construct/copy/destruct
    push_arg_id_(std::vector< uint > &);

    // public member functions
    template<typename T> void operator()(T);

    // public data members
    std::vector< uint > & args_id;
  };
  template<typename F> 
  class traits_<F, boost::mpl::false_> {
  public:
    // types
    typedef boost::function_types::parameter_types< F >::type arg_types;

    // private member functions
     ODTONE_STATIC_ASSERT((boost::is_same< void, typename boost::function_types::result_type< F >::type >::value), 
                          "Result type must be void");

    // public data members
    static const size_t arg_count;
  };
  template<typename F> 
  class traits_<F, boost::mpl::true_> {
  public:
    // types
    typedef boost::mpl::erase< tmp, last >::type arg_types;

    // private member functions
     ODTONE_STATIC_ASSERT((boost::is_same< void, typename boost::function_types::result_type< F >::type >::value), 
                          "Result type must be void");
     ODTONE_STATIC_ASSERT((boost::is_same< pset_type const &, typename boost::mpl::deref< last >::type >::value), 
                          "Last argument must a const reference to a pset_type");

    // public data members
    static const size_t arg_count;
  };
  // construct/copy/destruct
  function();
  template<typename F> function(F);
  template<typename F, size_t N> function(F, property_class const (&));

  // private static functions
  template<typename F, size_t N> 
    static const at_< F, N >::type & get_(arg_type const &);

  // public member functions
  void operator()(args_type const &, pset_type const &) const;
  size_t max_args() const;
  uint arg_id(uint) const;
  property_class const * get_prop_class(std::string const &) const;
};

Description

function public construct/copy/destruct

  1. function();
  2. template<typename F> function(F f);
  3. template<typename F, size_t N> function(F f, property_class const (&) pc);

function private static functions

  1. template<typename F, size_t N> 
      static const at_< F, N >::type & get_(arg_type const & arg);

function public member functions

  1. void operator()(args_type const & args, pset_type const & pset) const;
  2. size_t max_args() const;
  3. uint arg_id(uint n) const;
  4. property_class const * get_prop_class(std::string const & name) const;

PrevUpHomeNext