Lexis  1.0.0
Vocabulary of events and shared objects for BBP and HBP software
imageJPEG.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 ImageJPEG;
16 typedef std::unique_ptr< const ImageJPEG > ConstImageJPEGPtr;
17 
18 class ImageJPEG : public ::zerobuf::Zerobuf
19 {
20 public:
21  typedef ::zerobuf::Vector< uint8_t > Data;
28  ImageJPEG::Data& getData();
29  const ImageJPEG::Data& getData() const;
37  void setData( uint8_t const * value, size_t size );
38  std::vector< uint8_t > getDataVector() const;
45  void setData( const std::vector< uint8_t >& value );
46 
47  void compact( float threshold = 0.1f ) final;
48  ImageJPEG();
49  ImageJPEG( const std::vector< uint8_t >& dataValue );
50  ImageJPEG( const ImageJPEG& rhs );
51  ImageJPEG( ImageJPEG&& rhs ) noexcept;
52  ImageJPEG( const ::zerobuf::Zerobuf& rhs );
53  explicit ImageJPEG( ::zerobuf::AllocatorPtr allocator );
54  virtual ~ImageJPEG();
55  ImageJPEG& operator = ( const ImageJPEG& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs ); return *this; }
56  ImageJPEG& operator = ( ImageJPEG&& rhs );
57 
58  // Introspection
59  std::string getSchema() const final;
60  static std::string ZEROBUF_SCHEMA();
61  std::string getTypeName() const final { return "lexis::render::ImageJPEG"; }
62  static std::string ZEROBUF_TYPE_NAME() { return "lexis::render::ImageJPEG"; }
63  ::zerobuf::uint128_t getTypeIdentifier() const final { return ::zerobuf::uint128_t( 0xf34124c775bac584ull, 0x0b78c3557d36fc88ull ); }
64  static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0xf34124c775bac584ull, 0x0b78c3557d36fc88ull ); }
65  size_t getZerobufStaticSize() const final { return 20; }
66  static size_t ZEROBUF_STATIC_SIZE() { return 20; }
67  size_t getZerobufNumDynamics() const final { return 1; }
68  static size_t ZEROBUF_NUM_DYNAMICS() { return 1; }
69  static ConstImageJPEGPtr create( const void* data, const size_t size ) { return ConstImageJPEGPtr( new ImageJPEG( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
70 
71  void _parseJSON( const Json::Value& json ) final;
72  void _createJSON( Json::Value& json ) const final;
73 
74 private:
75  Data _data;
76 };
77 
78 }
79 }
void setData(uint8_t const *value, size_t size)
Set the value of the uint8_t dynamic object from a uint8_t* and size.
ImageJPEG::Data & getData()
Get a reference to the uint8_t dynamic member.