/[marvin]/marvin/src/libsip/type/type.cc
ViewVC logotype

Diff of /marvin/src/libsip/type/type.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by hannibal, Mon Aug 11 21:59:06 2003 UTC revision 1.3 by hannibal, Wed Aug 13 10:01:12 2003 UTC
# Line 1  Line 1 
1    /******************************************************************
2    * [LibSip - Signal Processing Library]
3    * Copyright (C) 2002 - 2003  BOUILLET Olivier LEMAIRE Kévin ROUGET Paul
4    *
5    * This program is free software; you can redistribute it and/or
6    * modify it under the terms of the GNU General Public License
7    * as published by the Free Software Foundation; either version 2
8    * of the License, or (at your option) any later version. This
9    * program is distributed in the hope that it will be useful,
10    * but WITHOUT ANY WARRANTY; without even the implied warranty of
11    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    * GNU General Public License for more details. You should have
13    * received a copy of the GNU General Public License
14    * along with this program; if not, write to the Free Software
15    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
16    * USA.
17    *
18    *  SPECIAL NOTE (the beerware clause):
19    *  This software is free software. However, it also falls under the beerware
20    *  special category. That is, if you find this software useful, or use it
21    *  every day, or want to grant us for our modest contribution to the
22    *  free software community, feel free to send us a beer from one of
23    *  your local brewery. Our preference goes to Belgium abbey beers and
24    *  irish stout (Guiness for strength!), but we like to try new stuffs.
25    *
26    * Authors:
27    *
28    * BOUILLET Olivier
29    * Paper mail :
30    * E-mail :
31    *
32    * LEMAIRE Kevin
33    * Paper mail : 34 rue Général Lecler 94270 LE KREMLIN BICETRE, FRANCE
34    * E-mail : hannibal@marvinproject.org
35    *
36    * ROUGET Paul
37    * Paper mail :
38    * E-mail :
39    *
40    *******************************************************************/
41  #include "type.hh"  #include "type.hh"
42    
43    Type::Type()
44    {
45      _signal = new Signal();
46    }
47    
48    Type::Type( double *data )
49    {
50      _signal = new Signal(data);
51    }
52    
53    Type::Type( double *data, int length )
54    {
55      _signal = new Signal(data, length);
56    }
57    
58    double &Type::operator [] ( int val )
59    {
60      return _signal->get_data()[val];
61    }
62    
63    double Type::operator [] ( int val ) const
64    {
65      return _signal->get_data()[val];
66    }
67    
68    
69    void Type::operator = ( double *src )
70    {
71      _signal->set_data(src);
72    }
73      
74    int Type::length()
75    {
76      return _signal->get_length();
77    }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26