HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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_ValArray.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  BM_State *newState(BM_View &view,
47  const char *name, const char *type,
48  BM_SceneManager *scene = 0) const;
49  BM_State *newState(BM_View &view,
50  PI_NetworkType nettype, int state_idx,
51  BM_SceneManager *scene = 0) const;
52 
53  BM_Handle *newHandle(BM_SceneManager &sm,
54  const char *name) const;
55  BM_OpHandleLink *newOpHandleLink(BM_SceneManager &sm,
56  const char *name,
57  const char *description) const;
58  BM_InputSelector *newSelector(BM_View &view,
59  const char *name) const;
60 
61  void deleteState(BM_State *state);
62  void deleteHandle(BM_Handle *handle);
63  void deleteOpHandleLink(BM_OpHandleLink *link);
64  void deleteSelector(BM_InputSelector *selector);
65 
66  virtual void findVolatileKeys(const char *volatile_hotkey_name,
67  std::vector<int> &volatile_keys,
68  std::vector<int> &keys_modifiers)
69  const;
70  virtual void updateViewports(int id, const char *opname,
71  bool open_only = false) const;
72  virtual void removePISettingsFromTables(OP_Operator &op_type);
73 
74  static void startParmsCache();
75  static void stopParmsCache();
76 
77  static void lookupVolatileKeys(const char *volatile_hotkey_name,
78  std::vector<int> &volatile_keys,
79  std::vector<int> &keys_modifiers);
80 protected:
82  virtual ~BM_ResourceManager();
83 };
84 
86 
87 extern "C" {
93 };
94 
95 #endif
#define SYS_VISIBILITY_EXPORT
static void stopParmsCache()
PI_NetworkType
virtual void removePISettingsFromTables(OP_Operator &op_type)
virtual void findVolatileKeys(const char *volatile_hotkey_name, std::vector< int > &volatile_keys, std::vector< int > &keys_modifiers) const
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)
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)