rasdaman complete source
qtscalardata.hh
Go to the documentation of this file.
1 #ifndef _QTSCALARDATA_HH_
2 #define _QTSCALARDATA_HH_
3 
4 #ifndef CPPSTDLIB
5 #include <ospace/string.h> // STL<ToolKit>
6 #else
7 #include <string>
8 #endif
9 
10 #include "qlparser/qtdata.hh"
12 
13 
14 /*
15 * This file is part of rasdaman community.
16 *
17 * Rasdaman community is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation, either version 3 of the License, or
20 * (at your option) any later version.
21 *
22 * Rasdaman community is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
29 *
30 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
31 rasdaman GmbH.
32 *
33 * For more information please see <http://www.rasdaman.org>
34 * or contact Peter Baumann via <baumann@rasdaman.com>.
35 */
36 /*************************************************************
37  *
38  *
39  * COMMENTS:
40  *
41  ************************************************************/
42 
43 //@ManMemo: Module: {\bf qlparser}
44 
45 /*@Doc:
46 
47  The abstract class represents a scalar data handled by the
48  query tree. It can either be atomic (\Ref{QtAtomicData})
49  or complex (\Ref{QtComplexData}).
50 
51 */
52 
53 class QtScalarData : public QtData
54 {
55 public:
57  QtScalarData();
58 
60  QtScalarData( const QtScalarData& obj );
61 
63  virtual ~QtScalarData();
64 
65  //@Man: Read/Write methods:
67 
70  virtual QtDataType getDataType() const;
71 
73  virtual bool isScalarData() const;
74 
76  inline const BaseType* getValueType() const;
77 
79  inline void setValueType( const BaseType* newType );
80 
82  inline const char* getValueBuffer() const;
83 
85  inline void setValueBuffer( char* buffer );
86 
88  virtual char* getTypeStructure() const;
93 
95 
97  virtual bool equal( const QtData* obj ) const;
98 
100  virtual std::string getSpelling() const;
101 
103  virtual void printStatus( std::ostream& stream = std::cout ) const;
104 
105 protected:
108 
110  char* valueBuffer;
111 };
112 
113 #include "qlparser/qtscalardata.icc"
114 
115 #endif
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
const char * getValueBuffer() const
returns a pointer to the internal character representation
void setValueBuffer(char *buffer)
sets the value buffer
void setValueType(const BaseType *newType)
sets the value type
Definition: qtdata.hh:83
virtual bool isScalarData() const
returns true meaning that the data is of type scalar
char * valueBuffer
pointer to the value buffer
Definition: qtscalardata.hh:110
QtScalarData()
default constructor
virtual ~QtScalarData()
virtual destructor
Definition: qtscalardata.hh:53
virtual std::string getSpelling() const
returns content dependent string representation
virtual char * getTypeStructure() const
returns a null-terminated string describing the type structure
virtual void printStatus(std::ostream &stream=std::cout) const
print status of the object to the specified stream
const BaseType * valueType
pointer to the value type
Definition: qtscalardata.hh:107
virtual bool equal(const QtData *obj) const
compares data content
Definition: relcatalogif/basetype.hh:66
const BaseType * getValueType() const
returns a pointer to the value type
virtual QtDataType getDataType() const
returns data type
QtDataType
Definition: qtdata.hh:48