Lexis  1.0.0
Vocabulary of events and shared objects for BBP and HBP software
stream.h
1 // Generated by zerobufCxx.py
2 
3 #pragma once
4 #include <zerobuf/ConstAllocator.h> // static create
5 #include <zerobuf/Vector.h> // member
6 #include <zerobuf/Zerobuf.h> // base class
7 #include <array> // member
8 #include <memory> // std::unique_ptr
9 
10 namespace lexis
11 {
12 namespace render
13 {
14 
15 class Stream;
16 typedef std::unique_ptr< const Stream > ConstStreamPtr;
17 
18 class Stream : public ::zerobuf::Zerobuf
19 {
20 public:
21  typedef ::zerobuf::Vector< char > Host;
28  Stream::Host& getHost();
29  const Stream::Host& getHost() const;
37  void setHost( char const * value, size_t size );
38  std::string getHostString() const;
45  void setHost( const std::string& value );
46 
47  typedef ::zerobuf::Vector< char > Id;
54  Stream::Id& getId();
55  const Stream::Id& getId() const;
63  void setId( char const * value, size_t size );
64  std::string getIdString() const;
71  void setId( const std::string& value );
72 
73  bool getEnabled() const;
80  void setEnabled( bool value );
81 
82  uint16_t getPort() const;
89  void setPort( uint16_t value );
90 
91  bool getCompression() const;
98  void setCompression( bool value );
99 
100  uint16_t getQuality() const;
107  void setQuality( uint16_t value );
108 
109  void compact( float threshold = 0.1f ) final;
110  Stream();
111  Stream( const std::string& hostValue, const bool& enabledValue, const std::string& idValue, const uint16_t& portValue, const bool& compressionValue, const uint16_t& qualityValue );
112  Stream( const Stream& rhs );
113  Stream( Stream&& rhs ) noexcept;
114  Stream( const ::zerobuf::Zerobuf& rhs );
115  explicit Stream( ::zerobuf::AllocatorPtr allocator );
116  virtual ~Stream();
117  Stream& operator = ( const Stream& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs ); return *this; }
118  Stream& operator = ( Stream&& rhs );
119 
120  // Introspection
121  std::string getSchema() const final;
122  static std::string ZEROBUF_SCHEMA();
123  std::string getTypeName() const final { return "lexis::render::Stream"; }
124  static std::string ZEROBUF_TYPE_NAME() { return "lexis::render::Stream"; }
125  ::zerobuf::uint128_t getTypeIdentifier() const final { return ::zerobuf::uint128_t( 0x07310e6c2a2ca214ull, 0xe61f9c7a352b5417ull ); }
126  static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0x07310e6c2a2ca214ull, 0xe61f9c7a352b5417ull ); }
127  size_t getZerobufStaticSize() const final { return 42; }
128  static size_t ZEROBUF_STATIC_SIZE() { return 42; }
129  size_t getZerobufNumDynamics() const final { return 2; }
130  static size_t ZEROBUF_NUM_DYNAMICS() { return 2; }
131  static ConstStreamPtr create( const void* data, const size_t size ) { return ConstStreamPtr( new Stream( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
132 
133  void _parseJSON( const Json::Value& json ) final;
134  void _createJSON( Json::Value& json ) const final;
135 
136 private:
137  Host _host;
138  Id _id;
139 };
140 
141 }
142 }
void setPort(uint16_t value)
Set the value of the uint16_t fixed size member.
void setCompression(bool value)
Set the value of the bool fixed size member.
void setQuality(uint16_t value)
Set the value of the uint16_t fixed size member.
void setHost(char const *value, size_t size)
Set the value of the char dynamic object from a char* and size.
Stream::Host & getHost()
Get a reference to the char dynamic member.
void setId(char const *value, size_t size)
Set the value of the char dynamic object from a char* and size.
Stream::Id & getId()
Get a reference to the char dynamic member.
void setEnabled(bool value)
Set the value of the bool fixed size member.