VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
mtl
fedReader.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
6
#ifndef fedReader_H_
7
#define fedReader_H_
8
12
13
#include <stdio.h>
14
#include <
vlutil/vlFedTarget.h
>
15
#include <
vlutil/vlString.h
>
16
18
struct
_xmlNode;
19
struct
_xmlDoc;
20
typedef
unsigned
char
xmlChar
;
21
typedef
struct
_xmlNode
xmlNode
;
22
typedef
struct
_xmlDoc
xmlDoc
;
23
24
#ifdef DtUSE_UTILITIES_NAMESPACE
25
namespace
DtUSE_UTILITIES_NAMESPACE
26
{
27
#endif
28
29
class
DtFilename
;
30
31
enum
DtFedReadStatus
32
{
33
DtFedReadOK
,
34
DtCouldNotOpenFed
,
35
DtErrorReadingFed
,
36
DtUnknownFileFormat
37
};
38
44
class
DT_DLL_MTL
DtFedReader
45
{
46
public
:
47
49
DtFedReader
();
50
52
virtual
~
DtFedReader
();
53
54
private
:
55
57
DtFedReader
(
const
DtFedReader
& );
58
DtFedReader
& operator=(
const
DtFedReader
& );
59
60
public
:
61
63
static
DtFomType
checkFomType(
const
char
* fedFileName,
64
void
* fedFilePtr );
65
68
virtual
DtFedReadStatus
readFed(
const
char
* fedFileName,
69
DtFedTarget
* fedTarget,
bool
strictCheckingEnabled=
false
,
bool
useDTD=
false
,
bool
dontParseSwitches=
false
);
70
73
virtual
DtFedReadStatus
readFedFilePtr( FILE* fedFilePtr,
DtFedTarget
* fedTarget,
74
DtFilename
filename,
bool
strictCheckingEnabled=
false
,
bool
useDTD=
false
,
bool
dontParseSwitches=
false
) = 0;
75
78
virtual
FILE* openFedFileWithErrCheck(
const
char
* fileName,
bool
isBinary =
false
);
79
81
virtual
void
setStrictChecking(
bool
enable);
82
virtual
bool
strictChecking()
const
;
83
85
virtual
void
setExpectedFomType(
DtFomType
fomType);
86
virtual
DtFomType
expectedFomType()
const
;
87
89
virtual
DtFomType
lastFomType()
const
;
90
92
virtual
const
DtString
& lastError()
const
;
93
95
char
*
myCurrFddBuffer
;
97
unsigned
int
myCurrFddBufferSize
;
98
99
char
* takeCurrFddData();
100
102
static
FILE* openFedFile(
const
char
* fileName,
bool
isBinary =
false
);
104
static
bool
readFileIntoBuffer( FILE* fileHandle,
char
** fileBuffer,
unsigned
int
* fileSize );
105
protected
:
106
107
void
appendErrorLine(
xmlNode
* node,
DtString
& output)
const
;
108
109
DtFedTarget
*
myFedTarget
;
110
DtFedReader
*
myChildReader
;
111
bool
myStrictChecking
;
112
bool
myDontParseSwitchTable
;
113
115
DtFomType
myExpectedFomType
;
116
118
DtFomType
myLastFomType
;
119
121
DtString
myLastError
;
122
123
};
124
125
#ifdef DtUSE_UTILITIES_NAMESPACE
126
}
127
#endif
128
129
130
#endif
131
Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)