VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtThreadCameraStreamDataManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
18 #include <vrvUtil/signalslib.h>
19 
20 #include <osg/observer_ptr>
21 
22 #include <tbb/concurrent_hash_map.h>
23 #include <tbb/concurrent_unordered_set.h>
24 #include <tbb/concurrent_vector.h>
25 #include <tbb/concurrent_queue.h>
26 
27 #include <thread>
28 #include <boost/bind/bind.hpp>
29 
30 namespace osg
31 {
32  class Camera;
33 }
34 
35 namespace makVrv
36 {
37  class DtDe;
38 
39  class DtKeyedData;
40  class DtKeyedDataUserData;
41 
44  {
45  public:
47 
49  DtOsgTcsKeyType(const osg::Camera* osgCamera);
50 
52  ~DtOsgTcsKeyType();
53  public:
54  virtual bool valid(void) const;
55  public:
56  std::thread::id myThreadId;
57  osg::observer_ptr<const osg::Camera> myOsgCameraObserver;
58  void* myStream;
59 
60  std::string myName;
61  };
62 
65  {
66  size_t hash(const DtOsgTcsKeyType& key) const;
67  bool equal(const DtOsgTcsKeyType& lhs, const DtOsgTcsKeyType& rhs) const;
68 
69  static std::hash<std::thread::id> theThreadHasher;
70  };
71 
75 
78 
80  template <>
81  inline const char* creatorTypeName<DtThreadCameraStreamDataManagerBase>(void) { return "DtThreadCameraStreamDataManagerBaseCreator"; }
82 
87  {
88  public:
91 
93  static DtThreadCameraStreamDataManager& instance(DtDe& de);
94  protected:
97  private:
104  };
105 }
osg::observer_ptr< const osg::Camera > myOsgCameraObserver
Definition: DtThreadCameraStreamDataManager.h:57
Manager for DtThreadCameraStreamData Holds them as cameras come in. Deletes them as cameras go out (v...
Definition: DtThreadCameraStreamDataManager.h:86
size_t hash(const DtOsgTcsKeyType &key) const
std::string myName
Definition: DtThreadCameraStreamDataManager.h:60
This is a key type keyed on an osg::Camera, thread id and a stream.
Definition: DtThreadCameraStreamDataManager.h:43
DtVirtualBaseClassCreator< DtThreadCameraStreamDataManagerBase, const DtThreadCameraStreamDataManagerBase::FlushKeysLocation & > DtThreadCameraStreamDataManagerBaseCreator
creator
Definition: DtThreadCameraStreamDataManager.h:77
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains the DtKeyedDataManagerTemplate class declaration.
const char * creatorTypeName< DtThreadCameraStreamDataManagerBase >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtThreadCameraStreamDataManager.h:81
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
DtKeyedDataManagerTemplate< DtOsgTcsKeyType, DtOsgTcsKeyTypeHasher > DtThreadCameraStreamDataManagerBase
Declare a manager for the above keytype. We generally use this base manager throughout vrvOsg...
Definition: DtThreadCameraStreamDataManager.h:74
static std::hash< std::thread::id > theThreadHasher
Definition: DtThreadCameraStreamDataManager.h:69
std::thread::id myThreadId
Definition: DtThreadCameraStreamDataManager.h:56
Hasher for the DtOsgTcsKeyType.
Definition: DtThreadCameraStreamDataManager.h:64
Manager for DtKeyedData Used to create/manage DtKeyedData Each entry of DtKeyedData is associated wit...
Definition: DtKeyedDataManagerTemplate.h:48
bool equal(const DtOsgTcsKeyType &lhs, const DtOsgTcsKeyType &rhs) const
Base class to provide boost signal/slot management.
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
void * myStream
Definition: DtThreadCameraStreamDataManager.h:58

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)