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
CMD_EvtMonitoringReader.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
* COMMENTS:
7
* This class lets you read a line with a UT_CmdLineReader while
8
* waiting for events from FS_EventGenerators.
9
*/
10
11
#ifndef __CMD_EvtMonitoringReader_h__
12
#define __CMD_EvtMonitoringReader_h__
13
14
#include "
CMD_API.h
"
15
16
#include <
UT/UT_SysClone.h
>
17
#include <
UT/UT_ValArray.h
>
18
19
class
UT_CmdLineReader
;
20
class
UT_WorkBuffer
;
21
class
FS_EventGenerator
;
22
class
cmd_PollingEvtGeneratorWrapper;
23
24
class
CMD_API
CMD_EvtMonitoringReader
25
{
26
public
:
27
28
// The singleton instance of this class will only be created if the
29
// static inst() method is called. When the instance is created,
30
// it will register itself as the place where all generators should
31
// be installed.
32
static
CMD_EvtMonitoringReader
& inst();
33
34
// Read a line of input using the command line reader into the buffer,
35
// processing any events generated by installed event generators.
36
// Returns true if a line of input was read.
37
enum
GetlineResult
{
SUCCESS
, FAILED,
INTERRUPTED
};
38
GetlineResult getline(
UT_CmdLineReader
&cmdline_reader,
UT_WorkBuffer
&
buf
);
39
40
private
:
41
static
int
installGeneratorCallback(
FS_EventGenerator
*generator,
int
mode
);
42
static
void
pollEventGeneratorsCallback(
bool
/*drain_queue*/
);
43
44
int
installGenerator(
FS_EventGenerator
&
gen
,
int
mode
);
45
void
pollEventGenerators();
46
47
CMD_EvtMonitoringReader
();
48
49
UT_ValArray<cmd_PollingEvtGeneratorWrapper*>
myEventGenerators;
50
};
51
52
#endif
53
FS_EventGenerator
Definition:
FS_EventGenerator.h:29
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition:
glcorearb.h:2540
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:74
GU_Flatten2::INTERRUPTED
Definition:
GU_Flatten2.h:39
UT_ValArray< cmd_PollingEvtGeneratorWrapper * >
CMD_EvtMonitoringReader
Definition:
CMD_EvtMonitoringReader.h:24
UT_ValArray.h
GA_Names::gen
GA_API const UT_StringHolder gen
CMD_API.h
CMD_EvtMonitoringReader::SUCCESS
Definition:
CMD_EvtMonitoringReader.h:37
mode
GLenum mode
Definition:
glcorearb.h:99
CMD_API
#define CMD_API
Definition:
CMD_API.h:10
UT_CmdLineReader
Definition:
UT_CmdLineReader.h:24
CMD_EvtMonitoringReader::GetlineResult
GetlineResult
Definition:
CMD_EvtMonitoringReader.h:37
UT_SysClone.h
CMD
CMD_EvtMonitoringReader.h
Generated on Sun Nov 24 2024 02:44:15 for HDK by
1.8.6