ADTF File Library
Loading...
Searching...
No Matches
stream_type.h
Go to the documentation of this file.
1
16
17#ifndef ADTF_FILE_STREAM_TYPE
18#define ADTF_FILE_STREAM_TYPE
19
20#include <string>
21#include <unordered_map>
22#include <functional>
23#include "stream_item.h"
24
25namespace adtf_file
26{
27
32{
33 public:
38 virtual void setMetaType(const std::string& meta_type) = 0;
46 virtual PropertyStreamType& setProperty(const std::string& name, const std::string& type, const std::string& value) = 0;
51 virtual std::string getMetaType() const = 0;
57 virtual std::pair<std::string, std::string> getProperty(const std::string& name) const = 0;
62 virtual void iterateProperties(std::function<void(const char*, const char*, const char*)> functor) const = 0;
63};
64
69{
70 public:
74 DefaultStreamType() = default;
79 DefaultStreamType(const std::string& meta_type);
80
81 void setMetaType(const std::string& meta_type) override;
82 PropertyStreamType& setProperty(const std::string& name, const std::string& type, const std::string& value) override;
83
84 std::string getMetaType() const override;
85 std::pair<std::string, std::string> getProperty(const std::string& name) const override;
86 void iterateProperties(std::function<void(const char*, const char*, const char*)> functor) const override;
87
88 private:
89 std::string _meta_type;
90 std::unordered_map<std::string, std::pair<std::string, std::string>> _properties;
91};
92
93
94}
95
96#endif
void iterateProperties(std::function< void(const char *, const char *, const char *)> functor) const override
iterates the properties
DefaultStreamType()=default
CTOR.
std::pair< std::string, std::string > getProperty(const std::string &name) const override
Get a Property.
void setMetaType(const std::string &meta_type) override
Set the Meta Type.
std::string getMetaType() const override
Get the Meta Type.
PropertyStreamType & setProperty(const std::string &name, const std::string &type, const std::string &value) override
Set a Property.
DefaultStreamType(const std::string &meta_type)
CTOR.
The default interface class for stream types.
Definition stream_type.h:32
virtual std::string getMetaType() const =0
Get the Meta Type.
virtual std::pair< std::string, std::string > getProperty(const std::string &name) const =0
Get a Property.
virtual void iterateProperties(std::function< void(const char *, const char *, const char *)> functor) const =0
iterates the properties
virtual void setMetaType(const std::string &meta_type)=0
Set the Meta Type.
virtual PropertyStreamType & setProperty(const std::string &name, const std::string &type, const std::string &value)=0
Set a Property.
Stream Type base class.
Definition stream_item.h:43
namespace for ADTF File library
Definition adtf2_adtf_core_media_sample_deserializer.h:25