HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_BundleFilter.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  * NAME: OP_BundleFilter.h ( OP Library, C++)
7  *
8  * COMMENTS: Filter class for bundles
9  */
10 
11 #ifndef __OP_BundleFilter__
12 #define __OP_BundleFilter__
13 
14 #include "OP_API.h"
15 #include "OP_DataTypes.h"
16 #include <UT/UT_IntArray.h>
17 
18 class OP_Node;
19 class OP_Bundle;
20 
22 public:
23  //
24  // The constructor of the bundle will automatically register the filter in
25  // the filter database.
26  //
28  virtual ~OP_BundleFilter();
29 
30  static const OP_BundleFilter *findFilter(const char *name);
31  static int getFilterCount();
32  static const OP_BundleFilter *getFilter(int index);
33 
34  static const char *getNullFilterName();
35  // Guesses most restrictive filter that allows all the listed nodes.
36  // Returns the best fitting filter, or NULL if could not find best guess.
37  static const OP_BundleFilter *findTightFilter(
38  const OP_Bundle *bundle,
39  const OP_NodeList &list);
40 
41  virtual const char *getName() const = 0;
42  virtual const char *getLabel() const = 0;
43  virtual bool isNodeValid(const OP_Bundle *bundle,
44  const OP_Node *node) const = 0;
45 
46  virtual int findAllNodes(const OP_Bundle *bundle,
47  UT_IntArray &list,
48  const OP_Node *net,
49  const OP_Node *relativeto) const;
50 
51  /// Check whether the @c needle node is in the bundle.
52  /// The base class implementation checks that @c isNodeValid() is true an
53  /// that the @c needle is a child of the patternNode.
54  virtual bool matchNode(const OP_Bundle *bundle,
55  const OP_Node *needle,
56  const OP_Node *patternNode,
57  const OP_Node *relativeTo) const;
58 
59 private:
60 };
61 
62 #endif
63 
GLuint const GLchar * name
Definition: glcorearb.h:785
#define OP_API
Definition: OP_API.h:10
GLuint index
Definition: glcorearb.h:785