VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
mtl
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
23
class
DT_DLL_MTL
DtlInputStream
24
{
25
public
:
26
DtlInputStream
();
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
43
class
DT_DLL_MTL
DtlFileInputStream
:
public
DtlInputStream
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
64
class
DT_DLL_MTL
DtlStringInputStream
:
public
DtlInputStream
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
Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)