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
SIM_QueryArrays.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
*/
7
8
#ifndef __SIM_QueryArrays_h__
9
#define __SIM_QueryArrays_h__
10
11
#include "
SIM_API.h
"
12
#include <
UT/UT_IntArray.h
>
13
#include <
UT/UT_StringArray.h
>
14
#include "
SIM_Query.h
"
15
16
class
UT_BitArray
;
17
18
/// This class provides an interface between a SIM_Data and the Houdini
19
/// expression language. It also helps in building the tree view of a
20
/// simulation.
21
class
SIM_API
SIM_QueryArrays
:
public
SIM_Query
22
{
23
public
:
24
/// Constructor which takes a const SIM_Data as our owner.
25
explicit
SIM_QueryArrays
(
const
SIM_Data
*owner);
26
/// Destructor for this class.
27
~
SIM_QueryArrays
()
override
;
28
29
void
addArray(
const
char
*recordtype,
30
const
char
*fieldname,
31
const
UT_BitArray
*array);
32
void
addArray(
const
char
*recordtype,
33
const
char
*fieldname,
34
const
UT_IntArray
*array);
35
void
addArray(
const
char
*recordtype,
36
const
char
*fieldname,
37
const
UT_FloatArray
*array);
38
void
addArray(
const
char
*recordtype,
39
const
char
*fieldname,
40
const
UT_StringArray
*array);
41
void
addArray(
const
char
*recordtype,
42
const
char
*fieldname,
43
const
UT_Vector2Array
*array);
44
void
addArray(
const
char
*recordtype,
45
const
char
*fieldname,
46
const
UT_Vector3Array
*array);
47
void
addArray(
const
char
*recordtype,
48
const
char
*fieldname,
49
const
UT_Vector4Array
*array);
50
51
protected
:
52
int
getNumRecordTypesSubclass
()
const override
;
53
const
char
*
getRecordTypeNameSubclass
(
54
int
recordtypenum)
const override
;
55
56
int
getNumRecordsSubclass
(
57
const
char
*recordtype)
const override
;
58
int
getNumFieldsSubclass
(
59
const
char
*recordtype)
const override
;
60
const
char
*
getFieldNameSubclass
(
61
const
char
*recordtype,
62
int
fieldnum)
const override
;
63
UT_OptionType
getFieldTypeSubclass
(
64
const
char
*recordtype,
65
int
fieldnum)
const override
;
66
bool
getFieldRawSubclass
(
67
const
char
*recordtype,
68
int
recordnum,
69
const
char
*fieldname,
70
UT_OptionEntryPtr
&
result
71
)
const override
;
72
73
private
:
74
class
SIM_QueryArrayField
75
{
76
public
:
77
SIM_QueryArrayField(
78
const
UT_BitArray
*array);
79
SIM_QueryArrayField(
80
const
UT_IntArray
*array);
81
SIM_QueryArrayField(
82
const
UT_FloatArray
*array);
83
SIM_QueryArrayField(
84
const
UT_StringArray
*array);
85
SIM_QueryArrayField(
86
const
UT_Vector2Array
*array);
87
SIM_QueryArrayField(
88
const
UT_Vector3Array
*array);
89
SIM_QueryArrayField(
90
const
UT_Vector4Array
*array);
91
~SIM_QueryArrayField();
92
93
UT_OptionType
getFieldType()
const
;
94
int
getNumEntries()
const
;
95
bool
getValueRaw(
int
entrynum,
96
UT_OptionEntryPtr
&result)
const
;
97
98
private
:
99
void
initialize
();
100
101
UT_OptionType
myFieldType;
102
const
UT_BitArray
*myBitArray;
103
const
UT_IntArray
*myIntArray;
104
const
UT_FloatArray
*myFloatArray;
105
const
UT_StringArray
*myStringArray;
106
const
UT_Vector2Array
*myVector2Array;
107
const
UT_Vector3Array
*myVector3Array;
108
const
UT_Vector4Array
*myVector4Array;
109
};
110
111
class
SIM_QueryArrayRecord
112
{
113
public
:
114
SIM_QueryArrayRecord();
115
~SIM_QueryArrayRecord();
116
117
void
addField(
const
char
*fieldname,
118
SIM_QueryArrayField *field);
119
int
getNumFields()
const
;
120
const
char
*getFieldName(
int
fieldnum)
const
;
121
UT_OptionType
getFieldType(
int
fieldnum)
const
;
122
const
SIM_QueryArrayField *getField(
int
fieldnum)
const
;
123
int
getNumEntries()
const
;
124
bool
getValueRaw(
const
char
*fieldname,
125
int
entrynum,
126
UT_OptionEntryPtr
&result)
const
;
127
128
private
:
129
UT_StringArray
myFieldNames;
130
UT_ValArray<SIM_QueryArrayField *>
myFields;
131
};
132
133
SIM_QueryArrayRecord *getRecord(
const
char
*recordtype);
134
135
UT_StringArray
myRecordNames;
136
UT_ValArray<SIM_QueryArrayRecord *>
myRecords;
137
};
138
139
#endif
140
UT_BitArray
Definition:
UT_BitArray.h:29
UT_IntArray.h
SIM_Data
Definition:
SIM_Data.h:137
UT_OptionType
UT_OptionType
Definition:
UT_Options.h:44
UT_StringArray.h
result
**But if you need a result
Definition:
thread.h:613
UT_ValArray< int >
SIM_Query::getNumRecordsSubclass
virtual int getNumRecordsSubclass(const char *recordtype) const
SIM_API.h
UT_StringArray
Definition:
UT_StringArray.h:24
SIM_Query::getNumRecordTypesSubclass
virtual int getNumRecordTypesSubclass() const
SIM_Query
Definition:
SIM_Query.h:24
SIM_Query::getFieldRawSubclass
virtual bool getFieldRawSubclass(const char *recordtype, int recordnum, const char *fieldname, UT_OptionEntryPtr &result) const
SIM_QueryArrays
Definition:
SIM_QueryArrays.h:21
openvdb::OPENVDB_VERSION_NAME::initialize
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition:
logging.h:294
SIM_Query::getFieldNameSubclass
virtual const char * getFieldNameSubclass(const char *recordtype, int fieldnum) const
SIM_Query.h
SIM_Query::getNumFieldsSubclass
virtual int getNumFieldsSubclass(const char *recordtype) const
SIM_Query::getFieldTypeSubclass
virtual UT_OptionType getFieldTypeSubclass(const char *recordtype, int fieldnum) const
SIM_API
#define SIM_API
Definition:
SIM_API.h:12
UT_OptionEntryPtr
UT_UniquePtr< UT_OptionEntry > UT_OptionEntryPtr
Definition:
UT_OptionEntry.h:30
SIM_Query::getRecordTypeNameSubclass
virtual const char * getRecordTypeNameSubclass(int recordtypenum) const
SIM
SIM_QueryArrays.h
Generated on Sun Nov 17 2024 03:03:19 for HDK by
1.8.6