4 #include <zerobuf/ConstAllocator.h> 5 #include <zerobuf/Vector.h> 6 #include <zerobuf/Zerobuf.h> 16 typedef std::unique_ptr< const ImageJPEG > ConstImageJPEGPtr;
21 typedef ::zerobuf::Vector< uint8_t > Data;
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 );
47 void compact(
float threshold = 0.1f )
final;
49 ImageJPEG(
const std::vector< uint8_t >& dataValue );
52 ImageJPEG( const ::zerobuf::Zerobuf& rhs );
53 explicit ImageJPEG( ::zerobuf::AllocatorPtr allocator );
55 ImageJPEG& operator = (
const ImageJPEG& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs );
return *
this; }
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 )))); }
71 void _parseJSON(
const Json::Value& json )
final;
72 void _createJSON( Json::Value& json )
const final;
void setData(uint8_t const *value, size_t size)
Set the value of the Data dynamic object from a uint8_t* and size.
ImageJPEG::Data & getData()
Get a reference to the Data dynamic member.