rasdaman complete source
qtoncstream.hh
Go to the documentation of this file.
1 #ifndef _QTONCSTREAM_
2 #define _QTONCSTREAM_
3 
4 #ifndef CPPSTDLIB
5 #include <ospace/string.h> // STL<ToolKit>
6 #else
7 #include <string>
8 #endif
9 
10 #include "qlparser/qtnode.hh"
11 
12 /*
13 * This file is part of rasdaman community.
14 *
15 * Rasdaman community is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * Rasdaman community is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
27 *
28 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
29 rasdaman GmbH.
30 *
31 * For more information please see <http://www.rasdaman.org>
32 * or contact Peter Baumann via <baumann@rasdaman.com>.
33 */
34 /************************************************************
35  *
36  *
37  * COMMENTS:
38  *
39  ************************************************************/
40 
41 
42 //@ManMemo: Module: {\bf qlparser}
43 
44 /*@Doc:
45 
46 This class is super class for every class supporting the ONC protocol
47 which means that, first, a stream has to be opened with open(),
48 then the elements are received through invoking next(),
49 and at the end, the stream is closed with the close() method. The
50 next() method returns a tupel of QtData or any subclass of QtData.
51 
52 */
53 
54 class QtONCStream : public QtNode
55 {
56 public:
58  QtONCStream();
59 
61  QtONCStream( QtNode* node );
62 
63  //@Man: Operations of the ONC protocol
65  virtual void open()=0;
68  virtual QtDataList* next()=0;
70  virtual void close()=0;
72  virtual void reset()=0;
74 
76  virtual const QtTypeTuple& checkType() = 0;
82  //@Man: Read/Write methods
84  inline void setDataStreamType( const QtTypeTuple& type );
88  inline const QtTypeTuple& getDataStreamType() const;
90 
91 
92 protected:
95 
96 private:
98  static const QtNodeType nodeType;
99 };
100 
101 #endif
102 
QtONCStream()
default constructor
std::vector< QtData * > QtDataList
list of QtData pointers
Definition: qtnode.hh:77
Definition: qtnode.hh:463
QtNodeType
Definition: qtnode.hh:93
virtual QtDataList * next()=0
Definition: qtoncstream.hh:54
void setDataStreamType(const QtTypeTuple &type)
const QtTypeTuple & getDataStreamType() const
virtual void open()=0
virtual void reset()=0
Definition: qtnode.hh:73
QtTypeTuple dataStreamType
result type of the node
Definition: qtoncstream.hh:94
virtual void close()=0
virtual const QtTypeTuple & checkType()=0
type checking of the subtree