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_AttributeQuery.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_QUERY_H__
10
#define __PDG_ATTRIBUTE_QUERY_H__
11
12
#include "
PDG_API.h
"
13
14
#include <
UT/UT_Array.h
>
15
#include <
UT/UT_StringHolder.h
>
16
17
class
UT_WorkBuffer
;
18
19
/**
20
* Stores a list of parsed attribute query tokens, to speed up evaluation
21
* when matching the same query across multiple parm expression evaluations
22
*/
23
class
PDG_API
PDG_AttributeQuery
24
{
25
public
:
26
/// Query entry, with a pre-parsed integer value to avoid having to
27
/// parse the string each time the query is applied to an attribute.
28
struct
Entry
29
{
30
UT_StringHolder
myString
;
31
exint
myInteger
;
32
bool
myHasInteger
;
33
};
34
35
using
EntryArray
=
UT_Array<Entry>
;
36
37
/// Constructs an empty query, which can be initialized later from a
38
/// string
39
PDG_AttributeQuery
();
40
41
/// Constructs a new query from an input string in the form
42
/// first.second.3.third... etc
43
explicit
PDG_AttributeQuery
(
44
const
char
* query_string);
45
46
/// Builds a query from the specified string
47
void
initialize
(
const
char
* query_string);
48
49
/// Returns the parsed entries
50
const
EntryArray
&
entries
()
const
51
{
return
myQueryEntries; }
52
53
/// Returns the size of the query
54
exint
size
()
const
55
{
return
myQueryEntries.size(); }
56
57
/// Returns the raw query string
58
const
UT_StringHolder
&
query
()
const
59
{
return
myQueryString; }
60
61
/// Returns the query string up to the specified index
62
UT_StringHolder
queryIndex(
exint
index
)
const
;
63
64
private
:
65
UT_StringHolder
myQueryString;
66
EntryArray myQueryEntries;
67
};
68
69
#endif
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:74
PDG_AttributeQuery
Definition:
PDG_AttributeQuery.h:23
PDG_API
#define PDG_API
Definition:
PDG_API.h:23
PDG_AttributeQuery::Entry::myString
UT_StringHolder myString
Definition:
PDG_AttributeQuery.h:30
exint
int64 exint
Definition:
SYS_Types.h:125
UT_Array.h
UT_Array< Entry >
PDG_AttributeQuery::Entry::myInteger
exint myInteger
Definition:
PDG_AttributeQuery.h:31
PDG_AttributeQuery::Entry::myHasInteger
bool myHasInteger
Definition:
PDG_AttributeQuery.h:32
UT_StringHolder
Definition:
UT_StringHolder.h:999
PDG_AttributeQuery::size
exint size() const
Returns the size of the query.
Definition:
PDG_AttributeQuery.h:54
PDG_AttributeQuery::query
const UT_StringHolder & query() const
Returns the raw query string.
Definition:
PDG_AttributeQuery.h:58
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
PDG_API.h
UT_StringHolder.h
index
GLuint index
Definition:
glcorearb.h:786
PDG_AttributeQuery::Entry
Definition:
PDG_AttributeQuery.h:28
PDG_AttributeQuery::entries
const EntryArray & entries() const
Returns the parsed entries.
Definition:
PDG_AttributeQuery.h:50
PDG
PDG_AttributeQuery.h
Generated on Tue Dec 17 2024 03:40:30 for HDK by
1.8.6