HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BM_ResourceManager.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: BM_ResourceManager.h ( Direct Manipulation Library, C++)
7  *
8  * COMMENTS:
9  * This class maintains a table of all states, handles, op-handle links,
10  * and input selectors. All state, handle, and op-handle link objects
11  * are created and deleted through a BM_ResourceManager. The active one
12  * is obtained via the global function BMgetResourceManager().
13  */
14 
15 #ifndef __BM_ResourceManager_H__
16 #define __BM_ResourceManager_H__
17 
18 #include "BM_API.h"
19 #include <UT/UT_Array.h>
20 #include <UT/UT_String.h>
21 #include <UT/UT_SymbolTable.h>
22 #include <PI/PI_ResourceManager.h>
23 
24 class BM_View;
25 class BM_State;
26 class BM_Handle;
27 class BM_OpHandleLink;
28 class BM_SceneManager;
29 class BM_InputSelector;
30 
31 typedef BM_State *(*BM_StateConstructor)(BM_View &, PI_StateTemplate &,
32  BM_SceneManager *);
33 typedef BM_Handle *(*BM_HandleConstructor)(BM_SceneManager &,
35 typedef BM_OpHandleLink *(*BM_PIConstructor)(BM_SceneManager &,
36  PI_PITemplate &);
37 typedef BM_InputSelector*(*BM_SelectorConstructor)(BM_View &,
39 
41 {
42 public:
43  BM_State *newState(BM_View &view,
44  PI_StateTemplate &templ,
45  BM_SceneManager *scene = 0) const;
46  virtual
47  BM_State *newState(BM_View &view,
48  const char *name, const char *type,
49  BM_SceneManager *scene = 0) const;
50  BM_State *newState(BM_View &view,
51  PI_NetworkType nettype, int state_idx,
52  BM_SceneManager *scene = 0) const;
53 
54  BM_Handle *newHandle(BM_SceneManager &sm,
55  const char *name) const;
56  BM_OpHandleLink *newOpHandleLink(BM_SceneManager &sm,
57  const char *name,
58  const char *description) const;
59  BM_InputSelector *newSelector(BM_View &view,
60  const char *name) const;
61 
62  void deleteState(BM_State *state);
63  void deleteHandle(BM_Handle *handle);
64  void deleteOpHandleLink(BM_OpHandleLink *link);
65  void deleteSelector(BM_InputSelector *selector);
66 
67  virtual void findVolatileKeys(const char *volatile_hotkey_name,
68  UT_Array<int> &volatile_keys,
69  UT_Array<int> &keys_modifiers)
70  const;
71  virtual void updateViewports(int id, const char *opname,
72  bool open_only = false) const;
73  virtual void removePISettingsFromTables(OP_Operator &op_type);
74 
75  static void startParmsCache();
76  static void stopParmsCache();
77 
78  static void lookupVolatileKeys(const char *volatile_hotkey_name,
79  UT_Array<int> &volatile_keys,
80  UT_Array<int> &keys_modifiers);
81 protected:
83  virtual ~BM_ResourceManager();
84 };
85 
87 
88 extern "C" {
94 };
95 
96 #endif
#define SYS_VISIBILITY_EXPORT
static void stopParmsCache()
PI_NetworkType
virtual void removePISettingsFromTables(OP_Operator &op_type)
static void startParmsCache()
SYS_VISIBILITY_EXPORT void newOpHandleLink(BM_ResourceManager *m)
virtual void updateViewports(int id, const char *opname, bool open_only=false) const
GLuint const GLchar * name
Definition: glcorearb.h:785
BM_API BM_ResourceManager * BMgetResourceManager()
#define BM_API
Definition: BM_API.h:10
SYS_VISIBILITY_EXPORT void newSelector(BM_ResourceManager *m)
virtual void findVolatileKeys(const char *volatile_hotkey_name, UT_Array< int > &volatile_keys, UT_Array< int > &keys_modifiers) const
SYS_VISIBILITY_EXPORT void newModelState(BM_ResourceManager *m)
SYS_VISIBILITY_EXPORT void newOpHandleBinding(BM_ResourceManager *m)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
SYS_VISIBILITY_EXPORT void newHandle(BM_ResourceManager *m)