ZorbaIOStream.h
Go to the documentation of this file.
1 /*
2  * Copyright 2006-2012 The FLWOR Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #ifndef API_ZORBA_IO_STREAM_H
20 #define API_ZORBA_IO_STREAM_H
21 
22 #include <streambuf>
23 #include <cstdio>
24 #include <cstdlib>
25 #include <vector>
26 
28 {
29 public:
31  virtual ~ZorbaIOStream() {};
32 
33  //STREAM TO ZORBA
34  virtual void fillStreamCallback();
35  void setStream(const char *BYTE, size_t aLen);
36  void setStream(const char *aStream, size_t aLen, int aBufferLength);
37  char * getStream();
38  int getLen();
39 
40  //STREAM FROM ZORBA
41  virtual void write(const char *BYTE, size_t aLen);
42 
43 private:
44  //FOR STREAM TO ZORBA
45  char buffer[ZORBA_STREAM_BUFFER_SIZE];
46  int len;
47 
48  // Copy contructor and assignment not allowed
49  ZorbaIOStream (const ZorbaIOStream &);
50  ZorbaIOStream &operator= (const ZorbaIOStream &);
51 
52 };
53 
54 #endif
blog comments powered by Disqus