VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtlstream.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #ifndef mtlstream_H_
7 #define mtlstream_H_
8 
12 
13 #include <stdio.h>
14 
15 #ifdef DtUSE_UTILITIES_NAMESPACE
16 namespace DtUSE_UTILITIES_NAMESPACE
17 {
18 #endif
19 
20 
24 {
25  public:
27  virtual ~DtlInputStream() {}
28 
29  virtual int peekc(void) = 0;
30  virtual int ungetc(int c) = 0;
31  virtual int fgetc(void) = 0;
32  virtual int fgetc_past_whitespace(void) = 0;
33  virtual int flush_until(char terminator) = 0;
34 
35  virtual int lineCount() { return lines;};
36  virtual void incLineCount() { lines++;};
37  protected:
38  int lines;
39 };
40 
44 {
45  public:
46 
49  DtlFileInputStream(FILE *);
50  virtual ~DtlFileInputStream();
51 
52  int peekc(void);
53  int ungetc(int c);
54  int fgetc(void);
55  int fgetc_past_whitespace(void);
56  int flush_until(char terminator);
57 
58  private:
59  FILE *fp;
60 };
61 
65 {
66  public:
67  DtlStringInputStream(char*);
68  virtual ~DtlStringInputStream();
69 
70  int peekc(void);
71  int ungetc(int c);
72  int fgetc(void);
73  int fgetc_past_whitespace(void);
74  int flush_until(char terminator);
75 
76  private:
77  char* input_string;
78  int index;
79 };
80 
81 #ifdef DtUSE_UTILITIES_NAMESPACE
82 }
83 #endif
84 
85 #endif
86 
virtual int lineCount()
Definition: mtlstream.h:35
int index
Definition: mtlstream.h:78
virtual ~DtlInputStream()
Definition: mtlstream.h:27
File Input stream.
Definition: mtlstream.h:43
FILE * fp
Definition: mtlstream.h:59
String Input stream.
Definition: mtlstream.h:64
#define DT_DLL_MTL
Definition: vlMachineTypes.h:106
Input stream.
Definition: mtlstream.h:23
char * input_string
Definition: mtlstream.h:77

Document ID: Generated on Tue Aug 10 00:12:31 EDT 2021 from SVN revision 232765
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)