rasdaman complete source
complex.hh
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community 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.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 /
34 #ifndef _D_COMPLEX_
35 #define _D_COMPLEX_
36 
37 #include <iostream>
38 class r_Error;
39 class r_Complex_Type;
40 
41 #include "raslib/odmgtypes.hh"
42 #include "raslib/mddtypes.hh"
43 #include "raslib/primitive.hh"
44 
45 
46 //@ManMemo: Module: {\bf raslib}
47 
48 /*@Doc:
49 
50  Class \Ref{r_Complex} represents a complex type value.
51 
52 */
53 
54 
55 class r_Complex: public r_Primitive
56 {
57 public:
58 
59  explicit
61  r_Complex(const char* newBuffer, const r_Complex_Type* newType);
62 
64  r_Complex(const r_Complex& obj);
65 
67  ~r_Complex();
68 
69  virtual bool isComplex() const;
70 
72  virtual r_Scalar* clone() const;
73 
75  virtual const r_Complex& operator =(const r_Complex&);
76 
77  r_Double get_re() const throw(r_Error);
78  r_Double get_im() const throw(r_Error);
79 
80  void set_re(r_Double) throw(r_Error);
81  void set_im(r_Double) throw(r_Error);
82 
83 };
84 
85 
86 #endif
87 
r_Double get_im() const
Definition: error.hh:88
virtual const r_Complex & operator=(const r_Complex &)
operator for assigning a primitive
r_Complex(const char *newBuffer, const r_Complex_Type *newType)
constructs a scalar type value
void set_im(r_Double)
double r_Double
Definition: odmgtypes.hh:138
r_Double get_re() const
Definition: complex.hh:55
virtual bool isComplex() const
Definition: scalar.hh:53
virtual r_Scalar * clone() const
clone operator
~r_Complex()
destructor
Definition: primitive.hh:54
Definition: raslib/complextype.hh:40
void set_re(r_Double)