HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CPP_TokenStream.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: CPP_TokenStream.h ( FS Library, C++)
7
*
8
* COMMENTS: Reads a stream of tokens using CPP
9
*/
10
11
#ifndef __CPP_TokenStream__
12
#define __CPP_TokenStream__
13
14
#include "
FS_API.h
"
15
#include <
UT/UT_NonCopyable.h
>
16
#include <
UT/UT_String.h
>
17
#include <
UT/UT_WorkArgs.h
>
18
#include <
UT/UT_WorkBuffer.h
>
19
20
class
CPP_Manager;
21
class
UT_IStream
;
22
23
class
FS_API
CPP_TokenStream
24
{
25
public
:
26
CPP_TokenStream
(
const
char
*
filename
,
int
pathvar=-1,
27
const
char
**cpp_options=0);
28
CPP_TokenStream
(
UT_IStream
&is,
const
char
*filename=
"<internal>"
,
29
const
char
**cpp_options=0);
30
virtual
~
CPP_TokenStream
();
31
32
UT_NON_COPYABLE
(
CPP_TokenStream
)
33
34
void
addIncludePath(
const
char
*
path
);
35
void
addIncludePathRaw(
const
char
*path);
36
37
/// Set additional CPP options
38
void
setCPPOptions(
const
char
**cpp_options);
39
40
int
getLineNumber();
41
const
char
*getFileName();
42
43
// Set to true to preserve backslashes in the stream. Otherwise escaped
44
// backslashes and quotes ('\\' and '\"') get expanded automatically.
45
// The default is to expand automatically (false).
46
void
setPreserveBackslashes(
bool
flag);
47
48
int
getToken(
UT_String
&token);
49
void
ungetToken(
const
UT_String
&token);
50
51
virtual
void
cppError(
const
char
*
message
)
const
;
52
virtual
void
cppWarning(
const
char
*message)
const
;
53
54
protected
:
55
void
init(
int
pathvar,
const
char
**cpp_options);
56
57
UT_WorkArgs
myArgs
;
58
UT_WorkBuffer
myArgBuf
;
59
UT_String
myUnget
;
60
CPP_Manager *
myCPP
;
61
int
myOptind
;
62
bool
myPreserveBackslashes
;
63
};
64
65
#endif
66
UT_WorkArgs
Definition:
UT_WorkArgs.h:25
message
GLuint GLsizei const GLchar * message
Definition:
glcorearb.h:2543
CPP_TokenStream::myOptind
int myOptind
Definition:
CPP_TokenStream.h:61
GT_Names::filename
GT_API const UT_StringHolder filename
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:73
UT_IStream
Definition:
UT_IStream.h:56
path
GLsizei const GLchar *const * path
Definition:
glcorearb.h:3341
UT_WorkArgs.h
CPP_TokenStream::myArgBuf
UT_WorkBuffer myArgBuf
Definition:
CPP_TokenStream.h:58
UT_String.h
FS_API.h
UT_WorkBuffer.h
CPP_TokenStream::myArgs
UT_WorkArgs myArgs
Definition:
CPP_TokenStream.h:57
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
UT_NonCopyable.h
CPP_TokenStream::myCPP
CPP_Manager * myCPP
Definition:
CPP_TokenStream.h:60
CPP_TokenStream
Definition:
CPP_TokenStream.h:23
CPP_TokenStream::myPreserveBackslashes
bool myPreserveBackslashes
Definition:
CPP_TokenStream.h:62
UT_String
Definition:
UT_String.h:73
CPP_TokenStream::myUnget
UT_String myUnget
Definition:
CPP_TokenStream.h:59
FS_API
#define FS_API
Definition:
FS_API.h:10
FS
CPP_TokenStream.h
Generated on Fri Dec 1 2023 01:31:08 for HDK by
1.8.6