HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CL_ClipResolver.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: CL_ClipResolver.h (CL Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __CL_CLIPRESOLVER_H_INCLUDED__
12 #define __CL_CLIPRESOLVER_H_INCLUDED__
13 
14 #include "CL_API.h"
15 #include "CL_Clip.h"
16 
17 #include <UT/UT_Functor.h>
18 #include <UT/UT_SharedPtr.h>
19 #include <UT/UT_StringHolder.h>
20 
21 /// Attempt to resolve the given path to a clip represented by a CHOP, whose
22 /// unique id will be returned in op_id. If not represented by a node, then
23 /// op_id will be negative and NULL returned. Since this may cause CHOP
24 /// cooking, so you should run this from a UT_TaskArena::lockedExecute() using
25 /// the appropriate lock. If cwd_op_id is non-negative, then it will be used
26 /// to resolve relative paths. Otherwise, OPgetDirector()->getCwd() gets used.
28  int& op_id,
29  const UT_StringRef& path,
30  const int cwd_op_id = -1);
31 
32 /// Provides a helper for resolving CL_Clip objects given a path. This object
33 /// registers itself on construction and deregisters upon destruction in an
34 /// non-thread-safe fashion.
36 {
37 public:
39  virtual ~CL_ClipResolverHelper();
40 
41  /// Given a path to a clip resolve it to a loaded clip. If lock is given,
42  /// then it will be resolved via a UT_TaskArena::lockedExecute() using it.
43  virtual const CL_Clip* resolveClip(
44  int& op_id,
45  const UT_StringRef& path,
46  const int source_op_id) const = 0;
47 
48 private:
49  int myId;
50 };
51 
52 #endif // __CL_CLIPRESOLVER_H_INCLUDED__
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
CL_API const CL_Clip * CLresolveClip(int &op_id, const UT_StringRef &path, const int cwd_op_id=-1)
#define CL_API
Definition: CL_API.h:10