MAK Legion 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"
14 
15 #include <string>
16 #include <map>
17 
18 namespace Legion
19 {
20  class SimulationDatabase;
21  class View;
22  class ViewManager;
23 
24  typedef UInt64 ViewHandle;
25  typedef UInt32 AttributeSetId;
26 
29 
31  enum class Scope : UInt32
32  {
33  Local = 0,
34  Remote,
35  All
36  };
37 
40  {
41  std::string name;
44  };
45 
49  {
50  public:
52  virtual View* createView(const std::string& viewName, Scope scope = Scope::Remote);
53 
55  template<typename SET_TYPE>
56  View* createSetView(const char* setViewName = "SetView", Scope scope = Scope::Remote);
57 
59  virtual void destroyView(View* view);
60 
62  virtual void registerView(const std::string& viewName, ViewDescriptor descriptor);
63 
65  virtual SimulationDatabase& database() const;
66 
67  protected:
69 
72 
74  virtual ~ViewManager();
75  friend class SimulationDatabase;
76 
77 
80 
81  std::map<std::string, ViewDescriptor> myViewCreatorMap;
82  };
83 }
84 
The View is an abstract base class for class that provide read only access to instances of a single a...
Definition: view.h:34
The ViewManager creates and manages the views of a database.
Definition: viewManager.h:48
unsigned int UInt32
Definition: c_api.h:53
UInt64 ViewHandle
Definition: view.h:26
Defines a template callback object to make binding member function pointers easier.
UInt32 AttributeSetId
Definition: readStateInstance.h:22
AttributeSetId setType
Definition: viewManager.h:42
#define LEGION_DLL
Definition: legionDataStore/export.h:24
unsigned int UInt32
Definition: dataTypes.h:44
The SimulationDatabase stores all data for the simulation. It also owns the event, control, and view managers.
Definition: simulationDatabase.h:39
UInt64 ViewManagerHandle
Definition: viewManager.h:68
std::string name
Definition: viewManager.h:41
Scope
View Scope selects if only local entities, remote (network) entities or a mix should be considered fo...
Definition: viewManager.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:39
std::map< std::string, ViewDescriptor > myViewCreatorMap
Definition: viewManager.h:81
ViewManagerHandle myHandle
Definition: viewManager.h:78
SimulationDatabase & myDatabase
Definition: viewManager.h:79
Callback< View *(ViewHandle handle, SimulationDatabase &database)> ViewCreator
Typedef for a View Creation function.
Definition: viewManager.h:28
ViewCreator creator
Definition: viewManager.h:43
unsigned long long UInt64
Definition: c_api.h:55

Document ID: Generated on Mon Mar 8 15:11:30 EST 2021 from SVN revision 225633
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)