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
UN_Parm.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: UN_Parm.h ( UN Library, C++)
7
*
8
* COMMENTS:
9
*
10
*/
11
12
#ifndef __UN_Parm_h__
13
#define __UN_Parm_h__
14
15
#include "
UN_API.h
"
16
#include "
UN_Handle.h
"
17
#include <
UT/UT_OptionEntry.h
>
18
#include <
UT/UT_StringHolder.h
>
19
20
class
UN_Node
;
21
22
23
// ============================================================================
24
/// A light-weight handle for a node parameter data.
25
///
26
/// The actual parameter data (UN_ParmData) is owned and managed by
27
/// UN_GraphData, and UN_Parm serves as a handle for clients to refer to
28
/// that parm data.
29
30
class
UN_API
UN_Parm
:
public
UN_Handle
31
{
32
public
:
33
/// Convenience constructor for the wire handle.
34
UN_Parm
( UN_GraphData *graph_data,
35
UN_ParmIndex
parm_index,
36
UN_ParmID
parm_id );
37
38
/// @{ Default destructor, constructors and assignment operators.
39
UN_Parm
();
40
~
UN_Parm
();
41
UN_Parm
(
const
UN_Parm
& );
42
UN_Parm
(
UN_Parm
&& );
43
UN_Parm
&
operator=
(
const
UN_Parm
& );
44
UN_Parm
&
operator=
(
UN_Parm
&& );
45
/// @}
46
47
/// @{ Returns true if the parameter exists; false otherwise.
48
bool
isValid()
const
;
49
explicit
operator
bool()
const
50
{
return
isValid(); }
51
/// @}
52
53
/// @{ Comparison operators
54
bool
operator==
(
const
UN_Parm
&other )
const
55
{
return
UN_Handle::operator==
( other ); }
56
bool
operator!=
(
const
UN_Parm
&other )
const
57
{
return
UN_Handle::operator!=
( other ); }
58
/// @}
59
60
/// Returns the node this parameter belongs to.
61
UN_Node
node()
const
;
62
63
/// Returns the name of the parameter.
64
UT_StringHolder
name
()
const
;
65
66
/// Returns the name of the type of the parameter.
67
UT_StringHolder
typeName()
const
;
68
69
/// @{ Sets the parameter value.
70
void
setValue(
const
UT_OptionEntry
&opt )
const
;
71
void
setValue(
UT_OptionEntryPtr
&&opt )
const
;
72
/// @}
73
74
/// Returns the value of the parameter.
75
UT_OptionEntryPtr
value
()
const
;
76
77
/// Deletes this parameter.
78
void
destroy()
const
;
79
80
/// Returns the parm data index this handle refers to.
81
UN_ParmIndex
parmIndex
()
const
82
{
return
UN_ParmIndex
(
dataIndex
() ); }
83
84
/// Returns the unique ID of the parm data this handle refers to.
85
UN_ParmID
parmID
()
const
86
{
return
UN_ParmID
(
dataID
() ); }
87
};
88
89
#endif
90
UN_Parm::parmID
UN_ParmID parmID() const
Returns the unique ID of the parm data this handle refers to.
Definition:
UN_Parm.h:85
UN_Node
Definition:
UN_Node.h:50
UN_ParmIndex
Definition:
UN_Types.h:221
UN_API.h
value
GLsizei const GLfloat * value
Definition:
glcorearb.h:824
UN_Handle::dataID
UN_DataID dataID() const
The unique ID of a data object during the lifespan of the owner graph.
Definition:
UN_Handle.h:74
UN_Parm::operator==
bool operator==(const UN_Parm &other) const
Comparison operators.
Definition:
UN_Parm.h:54
UN_API
#define UN_API
Definition:
UN_API.h:11
UN_Handle.h
UT_OptionEntry
Definition:
UT_OptionEntry.h:33
UT_OptionEntry.h
UN_Handle::operator==
bool operator==(const UN_Handle &other) const
Comparison operators.
Definition:
UN_Handle.h:53
UT_StringHolder
Definition:
UT_StringHolder.h:999
UN_ParmID
A parameter ID.
Definition:
UN_Types.h:309
UN_Handle::dataIndex
UN_DataIndex dataIndex() const
Definition:
UN_Handle.h:70
UN_Parm::parmIndex
UN_ParmIndex parmIndex() const
Returns the parm data index this handle refers to.
Definition:
UN_Parm.h:81
UN_Handle::operator!=
bool operator!=(const UN_Handle &other) const
Comparison operators.
Definition:
UN_Handle.h:60
UN_Handle::operator=
UN_Handle & operator=(const UN_Handle &)=default
Default destructor, constructors and assignment operators.
UT_StringHolder.h
UN_Handle
Definition:
UN_Handle.h:27
UN_Parm::operator!=
bool operator!=(const UN_Parm &other) const
Comparison operators.
Definition:
UN_Parm.h:56
UN_Parm
Definition:
UN_Parm.h:30
UT_OptionEntryPtr
UT_UniquePtr< UT_OptionEntry > UT_OptionEntryPtr
Definition:
UT_OptionEntry.h:30
arg_id_kind::name
UN
UN_Parm.h
Generated on Wed May 8 2024 03:16:51 for HDK by
1.8.6