00001 // SPUC - Signal processing using C++ - A DSP library 00002 /* 00003 * This program is free software; you can redistribute it and/or modify 00004 * it under the terms of the GNU General Public License as published by 00005 * the Free Software Foundation; either version 2, or (at your option) 00006 * any later version. 00007 * 00008 * This program is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 * GNU General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00016 */ 00017 #ifndef MODTYPE 00018 #define MODTYPE 00019 namespace SPUC { 00024 class slicer_type { 00025 public: 00026 virtual cmplx<double> slicer(cmplx<double> in); 00027 }; 00030 class bpsk_slicer : public slicer_type { 00031 public: 00032 cmplx<double> slicer(cmplx<double> in) {return(SGN(in.real())); } 00033 }; 00036 class qpsk_slicer : public slicer_type { 00037 public: 00038 cmplx<double> slicer(cmplx<double> in) {return(signbit(in)); } 00039 }; 00040 } 00041 #endif 00042