VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMetadataElement.h
Go to the documentation of this file.
1 // /******************************************************************************
2 // ** Copyright (c) 2022 VT-MAK Technologies, Inc.
3 // ** All rights reserved.
4 // ******************************************************************************/
5 
9 
10 #pragma once
12 
13 #include <vector>
14 
15 namespace makVrv
16 {
17  class DtMetadataPublisher;
18 
23  {
24  public:
27 
29  virtual ~DtMetadataElement();
30 
32  virtual void setPublisher( DtMetadataPublisher* publisher );
33 
35  virtual unsigned int encodedLength() = 0;
36 
38  virtual unsigned char* encode( unsigned char* buffer ) = 0;
39 
42  virtual void decode( unsigned char* buffer, unsigned int length ) = 0;
43 
45  virtual bool timeForUpdate();
46 
48  virtual void tick(double dt);
49 
52  virtual void setFrequency( float timeInSeconds );
53 
55  virtual void addChild( DtMetadataElement* element );
56 
58  virtual DtKlvKey& key();
59 
62  virtual bool isMetadataSynchronous() const;
63 
66  virtual void setIsMetadataSynchronous(bool isMetadataSynchronous);
67 
68 
69  protected:
72  virtual void update() = 0;
73 
76  virtual unsigned int encodedLengthChildren();
77 
78  protected:
80  std::vector<DtMetadataElement*> myChildren;
82 
83  bool myIsDirty;
85 
86  float myFrequency;
88 
91  };
92 }
A DtKlvKey instance represents a KLV (Key-Length-Value) Key field.
Definition: DtKlvKey.h:20
float myFrequency
Definition: DtMetadataElement.h:86
bool myTimeToUpdate
Definition: DtMetadataElement.h:87
DtMetadataPublisher defines the interface for all metadata publishers, as well as the implementation ...
Definition: DtMetadataPublisher.h:37
#define DT_DLL_VRVVIDEOSTREAM
Definition: vrvVideoStream.h:20
DtKlvKey myKey
Definition: DtMetadataElement.h:84
DtMetadataElement * myParent
Definition: DtMetadataElement.h:79
bool myIsMetadataSynchronous
Is the metadata send synchronously or async.
Definition: DtMetadataElement.h:90
bool myIsDirty
Definition: DtMetadataElement.h:83
DtMetadataElement is an abstract class that defines the interface common to all metadata elements...
Definition: DtMetadataElement.h:22
DT_DLL_readerWriter char * encode(const DtFilename &val, char *buffer)
Serializes the provided value val into buffer. buffer must have at least the number of bytes returned...
std::vector< DtMetadataElement * > myChildren
Definition: DtMetadataElement.h:80
DtMetadataPublisher * myPublisher
Definition: DtMetadataElement.h:81
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
DT_DLL_readerWriter const char * decode(DtString &val, const char *buffer)
Decodes a value from buffer and places the result in val of the type specified by val...
Contains the DtKlvKey class declaration.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)