VR-Vantage API Documentation
DtMetadataPublisher.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
16 #include <vrvCore/DtUniqueID.h>
17 
18 #include <vrvUtil/DtUnicode.h>
19 
20 #include <matrix/vlVector.h>
21 
22 #include <vector>
23 
24 namespace makArchives
25 {
26  class DtMetadataPublisherRecord;
27 }
28 
29 namespace makVrv
30 {
31  class DtObserver;
32  class DtDe;
33  class DtVideoStream;
34  class DtSceneObject;
35 
40  {
41  public:
44 
46  virtual ~DtMetadataPublisher();
47 
49  virtual void realize( const makArchives::DtMetadataPublisherRecord& metadataConfig );
50 
52  virtual void setObserverName( const DtUnicode& observerName );
53 
56  virtual bool isAttached();
57 
59  virtual void attachEntity( makVrv::DtUniqueID entity );
60 
63  virtual void detach();
64 
68  virtual void addMetadataElement( DtMetadataElement* element );
69 
71  virtual void tick( double dt );
72 
73  // Get the total number of bytes currently in the publisher's buffer
74  virtual int numBytes();
75 
77  virtual unsigned char* getBytes();
78 
83  virtual const DtVideoStream& videoStream();
84 
91  virtual const DtSceneObject& attachedEntitySceneObject();
92 
100  virtual const DtObserver& observer();
101 
105  virtual bool haveValidTargetPoint() const;
106 
109  virtual DtVector targetPoint() const;
110 
115  virtual DtDe& de();
116 
117  protected:
118 
120  DtMetadataPublisher( DtDe& de, const DtVideoStream& videoStream );
121 
123  virtual void slot_attachToChanged( makVrv::DtObserver* obs );
124 
127  virtual DtSceneObject* findSceneObjectFromElement( const DtElementID& id );
128 
131  virtual void updateTargetPoint();
132 
133  private:
134 
137 
140 
142  DtMetadataPublisher& operator=( const DtMetadataPublisher& rhs );
143 
144  protected:
147  std::vector<DtMetadataElement*> myElements;
149 
153 
154  unsigned char* myBuffer;
157  DtVector myTargetPoint;
158  };
159 
161  {
162  public:
164  virtual ~DtMetadataPublisherCreator();
165 
166  virtual DtMetadataPublisher* create( DtDe& de, const DtVideoStream& videoStream ) = 0;
167  };
168 }


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)