MAK Legion 1.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
viewManager.h
Go to the documentation of this file.
1 /*********************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "legionDataStore/export.h"
12 
15 #include "legionDataStore/view.h"
16 
17 #include <string>
18 #include <map>
19 
20 namespace Legion
21 {
22  class SimulationDatabase;
23  class View;
24  class ViewManager;
25 
26  typedef UInt64 ViewHandle;
27  typedef UInt32 AttributeSetId;
28 
31 
34  {
35  std::string name;
38  };
39 
42  class LEGION_DLL ViewManager
43  {
44  public:
46  virtual View* createView(const std::string& viewName, ViewScope scope = ViewScope::Remote);
47 
49  template<typename SET_TYPE>
50  View* createSetView(const char* setViewName = "SetView", ViewScope scope = ViewScope::Remote);
51 
53  virtual void destroyView(View* view);
54 
56  virtual void registerView(const std::string& viewName, ViewDescriptor descriptor);
57 
59  virtual SimulationDatabase& database() const;
60 
61  protected:
63 
66 
68  virtual ~ViewManager();
69  friend class SimulationDatabase;
70 
71 
74 
75  std::map<std::string, ViewDescriptor> myViewCreatorMap;
76  };
77 }
78 
The View is an abstract base class for class that provide read only access to instances of a single a...
Definition: view.h:42
The ViewManager creates and manages the views of a database.
Definition: viewManager.h:42
unsigned int UInt32
Definition: c_api.h:54
UInt64 ViewHandle
Definition: view.h:25
Defines a template callback object to make binding member function pointers easier.
UInt32 AttributeSetId
Definition: readStateInstance.h:22
AttributeSetId setType
Definition: viewManager.h:36
The SimulationDatabase stores all data for the simulation. It also owns the event, control, and view managers.
Definition: simulationDatabase.h:42
UInt64 ViewManagerHandle
Definition: viewManager.h:62
std::string name
Definition: viewManager.h:35
ViewScope
View Scope selects if only local entities, remote (network) entities or a mix should be considered fo...
Definition: view.h:31
unsigned long long UInt64
Definition: dataTypes.h:46
View descriptor provides a way for the database ViewManager to create a view of a given type...
Definition: viewManager.h:33
std::map< std::string, ViewDescriptor > myViewCreatorMap
Definition: viewManager.h:75
ViewManagerHandle myHandle
Definition: viewManager.h:72
SimulationDatabase & myDatabase
Definition: viewManager.h:73
Callback< View *(ViewHandle handle, SimulationDatabase &database)> ViewCreator
Typedef for a View Creation function.
Definition: viewManager.h:30
ViewCreator creator
Definition: viewManager.h:37
unsigned long long UInt64
Definition: c_api.h:56

Document ID: Generated on Wed May 26 15:17:05 EDT 2021 from SVN revision 229676
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)