libpsynth 0.2.1
Classes | Namespaces | Defines | Functions
/home/raskolnikov/dev/psynth/trunk/src/psynth/sound/apply_operation_base.hpp File Reference

Time-stamp: <2010-11-05 13:54:13 raskolnikov> More...

#include <psynth/base/compat.hpp>
#include <psynth/sound/util.hpp>
#include <boost/mpl/begin.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/size.hpp>
#include <boost/preprocessor/repeat.hpp>
Include dependency graph for apply_operation_base.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  psynth::sound::detail::apply_operation_fwd_fn< N >
struct  psynth::sound::detail::reduce_bind1< T2, Op >
struct  psynth::sound::detail::reduce_bind2< Types1, Bits1, Op >

Namespaces

namespace  psynth
namespace  psynth::sound
namespace  psynth::sound::detail
 

interleaved_range_get_raw_data, planar_range_get_raw_data - return pointers to the raw data (the samples) of a basic homogeneous range.


Defines

#define PSYNTH_FWD_TYPEDEFS(z, N, text)
#define PSYNTH_FWD_CASE(z, N, SUM)
#define PSYNTH_FWD_CONST_CASE(z, N, SUM)
#define PSYNTH_FWD_CASE_WITH_INFO(z, N, SUM)
#define PSYNTH_FWD_CONST_CASE_WITH_INFO(z, N, SUM)
#define PSYNTH_APPLY_FWD_OP(z, N, text)
#define PSYNTH_GENERATE_APPLY_FWD_OPS(N)   BOOST_PP_REPEAT(N, PSYNTH_APPLY_FWD_OP, BOOST_PP_EMPTY)

Functions

template<typename Types , typename Bits , typename Op >
Op::result_type PSYNTH_FORCEINLINE psynth::sound::apply_operation_basec (const Bits &bits, std::size_t index, Op op)
template<typename Types , typename Bits , typename Op >
Op::result_type PSYNTH_FORCEINLINE psynth::sound::apply_operation_base (Bits &bits, std::size_t index, Op op)

Detailed Description

Time-stamp: <2010-11-05 13:54:13 raskolnikov>

Author:
Juan Pedro Bolivar Puente <raskolnikov@es.gnu.org>
Date:
Wed Nov 3 20:45:49 2010

Given an object with run-time specified type (denoted as an array of Bits, dynamic index, and a static set of Types) and a generic operation, casts the object to its appropriate type and applies the operation.

Todo:
Lets see if we can get rid of all that preprocessor crap and use variadic templates.

Define Documentation

#define PSYNTH_APPLY_FWD_OP (   z,
  N,
  text 
)
#define PSYNTH_FWD_CASE (   z,
  N,
  SUM 
)
Value:
case N: return op(                                                      \
        *psynth_reinterpret_cast<typename boost::mpl::deref<T##N>::type*>( \
            &bits));
#define PSYNTH_FWD_CASE_WITH_INFO (   z,
  N,
  SUM 
)
Value:
case N: return op(                                                      \
        *psynth_reinterpret_cast<typename boost::mpl::deref<T##N>::type*>( \
            &bits), info);
#define PSYNTH_FWD_CONST_CASE (   z,
  N,
  SUM 
)
Value:
case N: return op(                                                      \
        *psynth_reinterpret_cast_c<const typename boost::mpl::deref<T##N>::type*>( \
            &bits));
#define PSYNTH_FWD_CONST_CASE_WITH_INFO (   z,
  N,
  SUM 
)
Value:
case N: return op(                                                      \
        *psynth_reinterpret_cast_c<const typename boost::mpl::deref<T##N>::type*>( \
            &bits), info);
#define PSYNTH_FWD_TYPEDEFS (   z,
  N,
  text 
)
Value:
T##N;                                           \
    typedef typename boost::mpl::next<T##N>::type
#define PSYNTH_GENERATE_APPLY_FWD_OPS (   N)    BOOST_PP_REPEAT(N, PSYNTH_APPLY_FWD_OP, BOOST_PP_EMPTY)