rasdaman complete source
qtintervaldata.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 */
23 /*************************************************************
24  *
25  *
26  * COMMENTS:
27  *
28  ************************************************************/
29 
30 #ifndef _QTINTERVALDATA_
31 #define _QTINTERVALDATA_
32 
33 #include "qlparser/qtdata.hh"
34 
35 #include "raslib/sinterval.hh"
36 
37 #ifndef CPPSTDLIB
38 #include <ospace/string.h> // STL<ToolKit>
39 #else
40 #include <string>
41 #endif
42 
43 #include <iostream>
44 // removed deprecated ostrstream -- PB 2005-jan-14
45 // #include <strstream.h>
46 
47 //@ManMemo: Module: {\bf qlparser}
48 
49 /*@Doc:
50  The class encapsulates an interval.
51 */
52 
53 class QtIntervalData : public QtData
54 {
55 public:
57  QtIntervalData( const r_Sinterval& interval );
58 
59  //@Man: Read/Write methods:
61  inline const r_Sinterval& getIntervalData() const;
65  inline void setIntervalData( const r_Sinterval& interval );
66 
68  virtual char* getTypeStructure() const;
73 
75 
77  virtual QtDataType getDataType() const;
78 
80  virtual bool equal( const QtData* obj ) const;
81 
83  virtual std::string getSpelling() const;
84 
86  virtual void printStatus( std::ostream& stream = std::cout ) const;
87 
88 private:
90  QtIntervalData() {};
91 
93  r_Sinterval intervalData;
94 };
95 
96 #include "qlparser/qtintervaldata.icc"
97 
98 #endif
99 
100 
101 
102 
Definition: sinterval.hh:233
Definition: qtdata.hh:83
const r_Sinterval & getIntervalData() const
virtual std::string getSpelling() const
returns content dependent string representation
Definition: qtintervaldata.hh:53
virtual bool equal(const QtData *obj) const
compares data content
virtual QtDataType getDataType() const
returns { QT_INTERVAL}
virtual void printStatus(std::ostream &stream=std::cout) const
print status of the object to the specified stream
QtDataType
Definition: qtdata.hh:48
void setIntervalData(const r_Sinterval &interval)
virtual char * getTypeStructure() const
returns a null-terminated string describing the type structure