HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_GlobContext.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_GlobContext.h (OP Library, C++)
7  *
8  * COMMENTS:
9  * An object passed to various globbing functions/methods that abstracts
10  * license checks.
11  */
12 
13 #ifndef __OP_GlobContext__
14 #define __OP_GlobContext__
15 
16 #include "OP_API.h"
17 
18 class OP_Node;
19 class OP_NetworkBox;
20 
21 //
22 // An OP_GlobContext object can cache some data across multiple queries, which
23 // will only remain valid for a particular security context. Consequently, it
24 // is not a good idea to store these objects.
25 //
27 {
28 public:
29  // An OP_GlobContext() initialized by this constructor will look up the
30  // current context from the script access manager.
32  {
33  // Intentionally initialize the minimum set of members required for
34  // our code paths.
35  myOverrideContextFlag = false;
36  myContextLookupPendingFlag = true;
37  myCaseSensitiveFlag = true;
38  }
39 
40  OP_GlobContext(const OP_Node *context_node)
41  {
42  // Intentionally initialize the minimum set of members required for
43  // our code paths.
44  myContextNode = context_node;
45  myContextRoot = 0;
46  myOverrideContextFlag = true;
47  myCaseSensitiveFlag = true;
48  }
49 
50  bool canSearchContents(const OP_Node *);
51  bool canSearchContents(const OP_NetworkBox *);
52  bool canSearchParms(const OP_Node *);
53 
54  bool isCaseSensitiveSearch() const;
55  void setCaseSensitiveSearch(bool case_sensitive);
56 
57 private:
58  void resolveAndCacheContext(int thread);
59 
60  const OP_Node *myContextNode;
61  const OP_Node *myContextRoot;
62  void *myOpaqueData;
63  bool myOverrideContextFlag;
64  bool myContextLookupPendingFlag;
65  bool myContextInternalEvalFlag;
66  bool myCaseSensitiveFlag;
67 };
68 
69 #endif
70 
OP_GlobContext(const OP_Node *context_node)
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
#define OP_API
Definition: OP_API.h:10