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_NonCopyable.h>
19 #include <UT/UT_SharedPtr.h>
20 #include <UT/UT_StringHolder.h>
21 
22 /// Attempt to resolve the given path to a clip represented by a CHOP, whose
23 /// unique id will be returned in op_id. If not represented by a node, then
24 /// op_id will be negative and NULL returned. Since this may cause CHOP
25 /// cooking, so you should run this from a UT_TaskArena::lockedExecute() using
26 /// the appropriate lock. If cwd_op_id is non-negative, then it will be used
27 /// to resolve relative paths. Otherwise, OPgetDirector()->getCwd() gets used.
29  int& op_id,
30  const UT_StringRef& path,
31  const int cwd_op_id = -1);
32 
33 /// Provides a helper for resolving CL_Clip objects given a path. This object
34 /// registers itself on construction and deregisters upon destruction in an
35 /// non-thread-safe fashion.
37 {
38 public:
40  virtual ~CL_ClipResolverHelper();
41 
43 
44  /// Given a path to a clip resolve it to a loaded clip. If lock is given,
45  /// then it will be resolved via a UT_TaskArena::lockedExecute() using it.
46  virtual const CL_Clip* resolveClip(
47  int& op_id,
48  const UT_StringRef& path,
49  const int source_op_id) const = 0;
50 
51 private:
52  int myId;
53 };
54 
55 #endif // __CL_CLIPRESOLVER_H_INCLUDED__
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
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
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.