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
OH_OpEventHandler.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: OH_OpEventHandler.h ( Op Handler Library, C++)
7
*
8
* COMMENTS: Read the documentation in DOCS/index.html
9
*/
10
11
#ifndef __OH_OpEventHandler__
12
#define __OH_OpEventHandler__
13
14
#include "
OH_API.h
"
15
#include "
OH_EventHandler.h
"
16
#include <
UT/UT_ValArray.h
>
17
#include <
OP/OP_Node.h
>
18
19
class
OH_OpInfo
;
20
21
class
OH_API
OH_OpEventHandler
:
public
OH_EventHandler
22
{
23
public
:
24
OH_OpEventHandler
(
OH_TriggerObject
&);
25
~
OH_OpEventHandler
()
override
;
26
27
const
char
*
ohClassName
()
const override
28
{
return
"OH_OpEventHandler"
; }
29
30
// These methods are used to add interests to the nodes that you
31
// want this object to watch. When you add an interest in a node,
32
// an OH_OpInfo corresponding to your node will be added to this
33
// OH gadget to track that node.
34
OH_OpInfo
*ohAddOpInterest(
OP_Node
*node);
35
void
ohRemoveOpInterest(
OP_Node
*node);
36
void
ohRemoveOpInterest(
long
index
);
37
void
ohRemoveAllOpInterests();
38
39
// You override this method so that you can respond to the events
40
// that are sent out by the nodes in which you are interested.
41
//
42
// Typically, your response is to use ohFindOpInfo to get the OH_OpInfo
43
// for the specified node, and then set the OpInfo's UpdatePendingFlag,
44
// and call ohRequestDeferredUpdate() on this object.
45
virtual
void
ohHandleOpEvent(
OP_Node
*node,
OP_EventType
type
,
46
void
*
data
) = 0;
47
48
// OH_OpEventHandler overrides the base-class ohHandleDeferredUpdate
49
// so that it splits the "Update" task into a per Node operation and
50
// calls ohHandleDeferredNodeUpdate on each node. You will typically
51
// only override the latter.
52
void
ohHandleDeferredUpdate
()
override
;
53
virtual
void
ohHandleDeferredNodeUpdate(
OH_OpInfo
*nodeinfo);
54
55
// These are the low-level OpInfo Management methods. You override
56
// ohCreateOpInfo to create a subclass of OH_OpInfo if you want to
57
// extend the OH_OpInfo structure.
58
virtual
OH_OpInfo
*ohCreateOpInfo(
OP_Node
*node);
59
int
ohGetOpInfoCount
()
60
{
return
myOpInfos.entries(); }
61
int
ohFindOpInfoIndex(
OP_Node
*node);
62
OH_OpInfo
*ohFindOpInfo(
OP_Node
*node);
63
OH_OpInfo
*
ohGetOpInfo
(
long
index
)
64
{
return
myOpInfos(index); }
65
66
67
private
:
68
static
void
ohHandleOpEvent(
OP_Node
*caller,
void
*callee,
69
OP_EventType
type
,
void
*
data
);
70
71
UT_ValArray<OH_OpInfo *>
myOpInfos;
72
};
73
74
#endif
OH_EventHandler.h
OH_API
#define OH_API
Definition:
OH_API.h:10
UI_OHEventHandler
Definition:
UI_OHEventHandler.h:26
UT_ValArray< OH_OpInfo * >
OP_Node.h
OP_Node
Definition:
OP_Node.h:503
UT_ValArray.h
OH_API.h
OH_OpEventHandler
Definition:
OH_OpEventHandler.h:21
OH_OpEventHandler::ohGetOpInfo
OH_OpInfo * ohGetOpInfo(long index)
Definition:
OH_OpEventHandler.h:63
OH_OpInfo
Definition:
OH_OpInfo.h:27
index
GLuint index
Definition:
glcorearb.h:786
OH_OpEventHandler::ohClassName
const char * ohClassName() const override
Definition:
OH_OpEventHandler.h:27
OP_EventType
OP_EventType
Definition:
OP_Value.h:22
UI_OHEventHandler::ohHandleDeferredUpdate
virtual void ohHandleDeferredUpdate()
UI_OHTriggerObject
Definition:
UI_OHTriggerObject.h:26
type
type
Definition:
core.h:1059
OH_OpEventHandler::ohGetOpInfoCount
int ohGetOpInfoCount()
Definition:
OH_OpEventHandler.h:59
data
Definition:
format.h:895
OH
OH_OpEventHandler.h
Generated on Sun Nov 17 2024 03:01:32 for HDK by
1.8.6