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
OP_ParmIterator.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: OP_ParmIterator.h ( Operator Library, C++)
7
*
8
* COMMENTS:
9
* This class implements an object that can be used to iterate
10
* through parms (and their subindices) for a given node.
11
*/
12
#ifndef __OP_ParmIterator_h__
13
#define __OP_ParmIterator_h__
14
15
#include "
OP_API.h
"
16
#include <
UT/UT_String.h
>
17
18
class
PRM_Parm
;
19
class
OP_Parameters
;
20
21
enum
OP_ParmIteratorMask
22
{
23
OP_PIM_NONE
= 0x00,
// No parms will pass this
24
OP_PIM_ORDINAL
= 0x01,
// ordinal parms
25
OP_PIM_STRING
= 0x02,
// string parms
26
OP_PIM_ANIMATED
= 0x04,
// Animatable parms
27
OP_PIM_CHANNELS
= 0x08,
// Parms with CH_Channels present
28
OP_PIM_AUTOSCOPED
= 0x10,
// Parm with the auto-scope flag
29
OP_PIM_ALL
= 0xff
30
};
31
32
enum
OP_ParmIteratorExcludeMask
33
{
34
OP_PIEM_NONE
= 0x00,
// No exclusions
35
OP_PIEM_LOCKED
= 0x01,
// Exclude locked parms
36
OP_PIEM_ALL
= 0x0f
37
};
38
39
inline
OP_ParmIteratorMask
40
operator|
(
OP_ParmIteratorMask
a
,
OP_ParmIteratorMask
b
)
41
{
42
return
(
OP_ParmIteratorMask
)((
unsigned
int
)a | (
unsigned
int
)
b
);
43
}
44
45
inline
OP_ParmIteratorExcludeMask
46
operator|
(
OP_ParmIteratorExcludeMask
a
,
OP_ParmIteratorExcludeMask
b
)
47
{
48
return
(
OP_ParmIteratorExcludeMask
)((
unsigned
int
)a | (
unsigned
int
)
b
);
49
}
50
51
class
OP_API
OP_ParmIterator
52
{
53
public
:
54
OP_ParmIterator
(
OP_Parameters
&node,
55
OP_ParmIteratorMask
mask
=
OP_PIM_ALL
,
56
OP_ParmIteratorExcludeMask
exclude_mask =
57
OP_PIEM_NONE
);
58
~
OP_ParmIterator
();
59
60
// Returns true when the iterator has finished iterating through all
61
// the parameters.
62
bool
atEnd
()
const
{
return
myAtEnd; }
63
64
// This methods gets the name of the next channel in the list. The reason
65
// this is called getNextChannel because this method returns names of
66
// channels not parm names. This does not imply that the name returned will
67
// actually have a CH_Channel associated with it.
68
// It will return true if successful and false otherwise. (It shouldn't
69
// fail if you check for atEnd before you call it).
70
bool
getNextChannel(
UT_String
&channame,
UT_String
*chanalias=NULL);
71
72
// This methods gets the parm pointer and subindex of the next one in the
73
// list.
74
bool
getNextParm(
PRM_Parm
* &parm,
int
&vi);
75
76
// This method will return true if the parm passes the mask in this
77
// iterator.
78
bool
passesMasks(
PRM_Parm
*parm,
int
subindex);
79
protected
:
80
81
void
scrollToNext(
bool
first_time);
82
83
84
private
:
85
OP_Parameters
&myNode;
86
OP_ParmIteratorMask
myMask;
87
OP_ParmIteratorExcludeMask
myExcludeMask;
88
bool
myAtEnd;
89
int
myCurrentParmIndex;
90
int
myCurrentParmSubIndex;
91
UT_String
myCurrentToken;
92
UT_String
myCurrentAlias;
93
};
94
95
#endif
OP_ParmIteratorMask
OP_ParmIteratorMask
Definition:
OP_ParmIterator.h:21
int
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
OP_PIM_CHANNELS
Definition:
OP_ParmIterator.h:27
OP_ParmIterator
Definition:
OP_ParmIterator.h:51
a
GLboolean GLboolean GLboolean GLboolean a
Definition:
glcorearb.h:1222
OP_PIM_ALL
Definition:
OP_ParmIterator.h:29
OP_ParmIteratorExcludeMask
OP_ParmIteratorExcludeMask
Definition:
OP_ParmIterator.h:32
OP_API.h
UT_String.h
OP_PIEM_LOCKED
Definition:
OP_ParmIterator.h:35
OP_PIEM_NONE
Definition:
OP_ParmIterator.h:34
mask
GLint GLuint mask
Definition:
glcorearb.h:124
OP_PIM_NONE
Definition:
OP_ParmIterator.h:23
OP_PIM_ORDINAL
Definition:
OP_ParmIterator.h:24
operator|
OP_ParmIteratorMask operator|(OP_ParmIteratorMask a, OP_ParmIteratorMask b)
Definition:
OP_ParmIterator.h:40
b
GLboolean GLboolean GLboolean b
Definition:
glcorearb.h:1222
OP_API
#define OP_API
Definition:
OP_API.h:10
OP_ParmIterator::atEnd
bool atEnd() const
Definition:
OP_ParmIterator.h:62
UT_String
Definition:
UT_String.h:73
OP_Parameters
Definition:
OP_Parameters.h:157
OP_PIEM_ALL
Definition:
OP_ParmIterator.h:36
OP_PIM_AUTOSCOPED
Definition:
OP_ParmIterator.h:28
OP_PIM_STRING
Definition:
OP_ParmIterator.h:25
PRM_Parm
Definition:
PRM_Parm.h:131
OP_PIM_ANIMATED
Definition:
OP_ParmIterator.h:26
OP
OP_ParmIterator.h
Generated on Tue Dec 17 2024 03:40:04 for HDK by
1.8.6