HDK
 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  */
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  {
31  };
32 
34 
35  /// Constructs an empty query, which can be initialized later from a
36  /// string
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
#define PDG_API
Definition: PDG_API.h:23
UT_StringHolder myString
int64 exint
Definition: SYS_Types.h:125
exint myInteger
bool myHasInteger
exint size() const
Returns the size of the query.
const UT_StringHolder & query() const
Returns the raw query string.
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition: logging.h:294
const EntryArray & entries() const
Returns the parsed entries.