CLAM-Development
1.1
|
00001 /* 00002 * Copyright (c) 2004 MUSIC TECHNOLOGY GROUP (MTG) 00003 * UNIVERSITAT POMPEU FABRA 00004 * 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 #ifndef __SpecTypeFlags__ 00023 #define __SpecTypeFlags__ 00024 00025 #include "Flags.hxx" 00026 00027 namespace CLAM 00028 { 00029 00042 struct SpecTypeFlags : public Flags<4> 00043 { 00044 public: 00045 static tFlagValue sFlagValues[]; 00046 static tValue sDefault; 00047 virtual Component * Species() const { 00048 return new SpecTypeFlags(); 00049 } 00050 typedef enum { 00051 eComplex=0, 00052 ePolar=1, 00053 eMagPhase=2, 00054 eMagPhaseBPF=3 00055 } tFlags; 00056 // Constructors 00057 SpecTypeFlags () : 00058 Flags<4>(sFlagValues), 00059 bComplex(operator[](eComplex)), 00060 bPolar(operator[](ePolar)), 00061 bMagPhase(operator[](eMagPhase)), 00062 bMagPhaseBPF(operator[](eMagPhaseBPF)) 00063 { 00064 bComplex = 0; 00065 bPolar = 0; 00066 bMagPhase = 1; 00067 bMagPhaseBPF = 0; 00068 } 00069 00070 00071 SpecTypeFlags (const SpecTypeFlags &t) : 00072 Flags<4>(sFlagValues,t), 00073 bComplex(operator[](eComplex)), 00074 bPolar(operator[](ePolar)), 00075 bMagPhase(operator[](eMagPhase)), 00076 bMagPhaseBPF(operator[](eMagPhaseBPF)) 00077 {}; 00078 00079 /* 00080 template <typename T1, typename T2> SpecTypeFlags (const T1 &t1,const T2 &t2) : 00081 Flags<4>(sFlagValues,t1,t2), 00082 bComplex(operator[](eComplex)), 00083 bPolar(operator[](ePolar)), 00084 bMagPhase(operator[](eMagPhase)), 00085 bMagPhaseBPF(operator[](eMagPhaseBPF)) 00086 {}; 00087 */ 00088 00089 reference bComplex; 00090 reference bPolar; 00091 reference bMagPhase; 00092 reference bMagPhaseBPF; 00093 00094 }; 00095 00096 } 00097 00098 #endif 00099