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_Array.h>
17 
18 class OP_Node;
19 class OP_Bundle;
20 
22 {
23 public:
24  //
25  // The constructor of the bundle will automatically register the filter in
26  // the filter database.
27  //
29  virtual ~OP_BundleFilter();
30 
31  static const OP_BundleFilter *findFilter(const char *name);
32  static int getFilterCount();
33  static const OP_BundleFilter *getFilter(int index);
34 
35  static const char *getNullFilterName();
36  // Guesses most restrictive filter that allows all the listed nodes.
37  // Returns the best fitting filter, or NULL if could not find best guess.
38  static const OP_BundleFilter *findTightFilter(
39  const OP_Bundle *bundle,
40  const OP_NodeList &list);
41 
42  virtual const char *getName() const = 0;
43  virtual const char *getLabel() const = 0;
44  virtual bool isNodeValid(const OP_Bundle *bundle,
45  const OP_Node *node) const = 0;
46 
47  virtual int findAllNodes(const OP_Bundle *bundle,
48  UT_Array<int> &list,
49  const OP_Node *net,
50  const OP_Node *relativeto) const;
51 
52  /// Check whether the @c needle node is in the bundle.
53  /// The base class implementation checks that @c isNodeValid() is true an
54  /// that the @c needle is a child of the patternNode.
55  virtual bool matchNode(const OP_Bundle *bundle,
56  const OP_Node *needle,
57  const OP_Node *patternNode,
58  const OP_Node *relativeTo) const;
59 
60 private:
61 };
62 
63 #endif
64 
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
GLuint const GLchar * name
Definition: glcorearb.h:786
#define OP_API
Definition: OP_API.h:10
GLuint index
Definition: glcorearb.h:786