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