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
PDG_AttributeEvaluator.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
*/
8
9
#ifndef __PDG_ATTRIBUTE_EVALUATOR_H__
10
#define __PDG_ATTRIBUTE_EVALUATOR_H__
11
12
#include "
PDG_API.h
"
13
14
#include "
PDG_AttributeQuery.h
"
15
#include "
PDG_AttributeTypes.h
"
16
17
#include <
UT/UT_AttributeEvaluator.h
>
18
#include <
UT/UT_StringHolder.h
>
19
20
class
PDG_AttributeOwner
;
21
class
PDG_EvaluationContext
;
22
class
PDG_Node
;
23
class
PDG_WorkItem
;
24
25
/**
26
* Caches an attribute name and component, for use with @ expression in HScript
27
*/
28
class
PDG_API
PDG_AttributeEvaluator
:
public
UT_AttributeEvaluator
29
{
30
public
:
31
PDG_AttributeEvaluator
(
const
char
*
name
);
32
PDG_AttributeEvaluator
(
33
const
char
* name,
34
int
component);
35
PDG_AttributeEvaluator
(
36
PDG_AttributeIntrinsic
type
,
37
int
component);
38
~
PDG_AttributeEvaluator
()
override
;
39
40
// Note that these are not the proper overrides for the virtual
41
// evaluateF and evaluateS methods. Because PDG is built before CH,
42
// we have to be passed the current frame number by a wrapper
43
// UT_AttributeEvaluator subclass defined in OP.
44
bool
evaluateAtFrameF(
fpreal
frame,
int
thread
,
45
fpreal
&
result
,
46
EvalDiagnostics
&diagnostics)
const
;
47
bool
evaluateAtFrameS(
fpreal
frame,
int
thread,
48
UT_StringHolder
&result,
49
EvalDiagnostics
&diagnostics)
const
;
50
bool
isStringValue
()
const override
;
51
52
PDG_AttributeIntrinsic
attributeType()
const
;
53
void
setMetadata(
const
UT_StringHolder
& tag,
54
bool
localize,
55
bool
all_values);
56
57
bool
isLocalize
()
const
58
{
return
myIsLocalize; }
59
bool
isAllValues
()
const
60
{
return
myIsAllValues; }
61
const
UT_StringHolder
&
tag
()
const
62
{
return
myTag; }
63
const
PDG_AttributeQuery
&
64
query
()
const
65
{
return
myQuery; }
66
67
void
setWrapperEvaluator(
UT_AttributeEvaluator
*wrapper);
68
UT_AttributeEvaluator
*wrapperEvaluator()
const
;
69
void
checkTimeDependent();
70
71
72
static
void
recordAttribute(
const
UT_StringHolder
& name,
73
int
thread);
74
75
static
bool
isSuppressWarnings();
76
static
bool
setSuppressWarnings(
bool
suppress);
77
78
private
:
79
void
reportWarning(
80
PDG_AttributeCast
cast_result,
81
const
PDG_AttributeOwner
* owner,
82
const
PDG_Node
* node,
83
bool
is_string
,
84
int
thread)
const
;
85
void
recordAttribute(
86
PDG_EvaluationContext
* ctx,
87
int
thread)
const
;
88
89
bool
isInputFile()
const
;
90
bool
isOutputFile()
const
;
91
92
private
:
93
UT_AttributeEvaluator
*myWrapperEvaluator;
94
PDG_AttributeQuery
myQuery;
95
UT_StringHolder
myTag;
96
PDG_AttributeIntrinsic
myAttributeType;
97
bool
myIsLocalize;
98
bool
myIsAllValues;
99
};
100
101
#endif
PDG_AttributeQuery.h
PDG_Node
Definition:
PDG_Node.h:63
PDG_AttributeIntrinsic
PDG_AttributeIntrinsic
Enumeration of types of attribute that can be queried from work items.
Definition:
PDG_AttributeTypes.h:225
PDG_AttributeQuery
Definition:
PDG_AttributeQuery.h:21
PDG_EvaluationContext
Definition:
PDG_EvaluationContext.h:49
is_string
Definition:
core.h:590
PDG_API
#define PDG_API
Definition:
PDG_API.h:23
PDG_AttributeOwner
Definition:
PDG_AttributeOwner.h:27
PDG_AttributeEvaluator::tag
const UT_StringHolder & tag() const
Definition:
PDG_AttributeEvaluator.h:61
result
**But if you need a result
Definition:
thread.h:613
UT_StringHolder
Definition:
UT_StringHolder.h:999
PDG_AttributeEvaluator::isLocalize
bool isLocalize() const
Definition:
PDG_AttributeEvaluator.h:57
PDG_AttributeCast
PDG_AttributeCast
Enumeration of attribute cast results.
Definition:
PDG_AttributeTypes.h:101
name
GLuint const GLchar * name
Definition:
glcorearb.h:786
PDG_AttributeTypes.h
UT_AttributeEvaluator::isStringValue
virtual bool isStringValue() const
Definition:
UT_AttributeEvaluator.h:80
thread
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
PDG_WorkItem
Definition:
PDG_WorkItem.h:46
PDG_API.h
UT_StringHolder.h
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
PDG_AttributeEvaluator::query
const PDG_AttributeQuery & query() const
Definition:
PDG_AttributeEvaluator.h:64
PDG_AttributeEvaluator::isAllValues
bool isAllValues() const
Definition:
PDG_AttributeEvaluator.h:59
PDG_AttributeEvaluator
Definition:
PDG_AttributeEvaluator.h:28
UT_AttributeEvaluator.h
UT_AttributeEvaluator
Definition:
UT_AttributeEvaluator.h:29
type
type
Definition:
core.h:1059
UT_AttributeEvaluator::EvalDiagnostics
Definition:
UT_AttributeEvaluator.h:37
PDG
PDG_AttributeEvaluator.h
Generated on Thu Nov 21 2024 02:44:21 for HDK by
1.8.6