#include <Nsound/AudioStreamSelection.h>
Public Member Functions | |
| AudioStreamSelection (AudioStream &as, const BooleanVectorVector &bv) | |
| AudioStreamSelection (const AudioStreamSelection ©) | |
| ~AudioStreamSelection () | |
| AudioStreamSelection & | operator+= (const float64 &rhs) |
| AudioStreamSelection & | operator-= (const float64 &rhs) |
| AudioStreamSelection & | operator*= (const float64 &rhs) |
| AudioStreamSelection & | operator/= (const float64 &rhs) |
| AudioStreamSelection & | operator= (const float64 &rhs) |
| void | set (const float64 &rhs) |
Private Member Functions | |
| AudioStreamSelection & | operator= (const AudioStreamSelection &rhs) |
Private Attributes | |
| AudioStream * | target_as_ |
| BooleanVectorVector | bv_ |
A helper class for advance operators.
Definition at line 50 of file AudioStreamSelection.h.
| Nsound::AudioStreamSelection::AudioStreamSelection | ( | AudioStream & | as, | |
| const BooleanVectorVector & | bv | |||
| ) |
Definition at line 42 of file AudioStreamSelection.cc.
00044 : 00045 target_as_(&as), 00046 bv_(bv) 00047 { };
| Nsound::AudioStreamSelection::AudioStreamSelection | ( | const AudioStreamSelection & | copy | ) |
Definition at line 52 of file AudioStreamSelection.cc.
00054 : 00055 target_as_(copy.target_as_), 00056 bv_(copy.bv_) 00057 { };
| Nsound::AudioStreamSelection::~AudioStreamSelection | ( | ) | [inline] |
Definition at line 56 of file AudioStreamSelection.h.
| AudioStreamSelection & Nsound::AudioStreamSelection::operator+= | ( | const float64 & | rhs | ) |
Definition at line 80 of file AudioStreamSelection.cc.
References bv_, Nsound::AudioStream::getNChannels(), and target_as_.
00081 { 00082 uint32 n_channels = target_as_->getNChannels(); 00083 uint32 n_bv = bv_.size(); 00084 00085 for(uint32 i = 0; i < n_channels && i < n_bv; ++i) 00086 { 00087 (*target_as_)[i](bv_[i]) += rhs; 00088 } 00089 00090 return *this; 00091 }
| AudioStreamSelection & Nsound::AudioStreamSelection::operator-= | ( | const float64 & | rhs | ) |
Definition at line 97 of file AudioStreamSelection.cc.
References bv_, Nsound::AudioStream::getNChannels(), and target_as_.
00098 { 00099 uint32 n_channels = target_as_->getNChannels(); 00100 uint32 n_bv = bv_.size(); 00101 00102 for(uint32 i = 0; i < n_channels && i < n_bv; ++i) 00103 { 00104 (*target_as_)[i](bv_[i]) -= rhs; 00105 } 00106 00107 return *this; 00108 }
| AudioStreamSelection & Nsound::AudioStreamSelection::operator*= | ( | const float64 & | rhs | ) |
Definition at line 114 of file AudioStreamSelection.cc.
References bv_, Nsound::AudioStream::getNChannels(), and target_as_.
00115 { 00116 uint32 n_channels = target_as_->getNChannels(); 00117 uint32 n_bv = bv_.size(); 00118 00119 for(uint32 i = 0; i < n_channels && i < n_bv; ++i) 00120 { 00121 (*target_as_)[i](bv_[i]) *= rhs; 00122 } 00123 00124 return *this; 00125 }
| AudioStreamSelection & Nsound::AudioStreamSelection::operator/= | ( | const float64 & | rhs | ) |
Definition at line 131 of file AudioStreamSelection.cc.
References bv_, Nsound::AudioStream::getNChannels(), and target_as_.
00132 { 00133 uint32 n_channels = target_as_->getNChannels(); 00134 uint32 n_bv = bv_.size(); 00135 00136 for(uint32 i = 0; i < n_channels && i < n_bv; ++i) 00137 { 00138 (*target_as_)[i](bv_[i]) /= rhs; 00139 } 00140 00141 return *this; 00142 }
| AudioStreamSelection & Nsound::AudioStreamSelection::operator= | ( | const float64 & | rhs | ) |
Definition at line 148 of file AudioStreamSelection.cc.
References bv_, Nsound::AudioStream::getNChannels(), and target_as_.
Referenced by set().
00149 { 00150 uint32 n_channels = target_as_->getNChannels(); 00151 uint32 n_bv = bv_.size(); 00152 00153 for(uint32 i = 0; i < n_channels && i < n_bv; ++i) 00154 { 00155 (*target_as_)[i](bv_[i]) = rhs; 00156 } 00157 00158 return *this; 00159 }
| void Nsound::AudioStreamSelection::set | ( | const float64 & | rhs | ) | [inline] |
Definition at line 67 of file AudioStreamSelection.h.
References operator=().
00067 {this->operator=(rhs);};
| AudioStreamSelection & Nsound::AudioStreamSelection::operator= | ( | const AudioStreamSelection & | rhs | ) | [private] |
Definition at line 63 of file AudioStreamSelection.cc.
References bv_, and target_as_.
00064 { 00065 if(this == & rhs) 00066 { 00067 return *this; 00068 } 00069 00070 target_as_ = rhs.target_as_; 00071 bv_ = rhs.bv_; 00072 return *this; 00073 };
Definition at line 74 of file AudioStreamSelection.h.
Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and operator=().
Definition at line 75 of file AudioStreamSelection.h.
Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and operator=().
1.6.3