Lexis  1.1.0
Vocabulary of events and shared objects for BBP and HBP software
progress.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 data
13 {
14 namespace detail
15 {
16 
17 class Progress;
18 typedef std::unique_ptr< const Progress > ConstProgressPtr;
19 
20 class Progress : public ::zerobuf::Zerobuf
21 {
22 public:
23  typedef ::zerobuf::Vector< char > Operation;
30  Progress::Operation& getOperation();
31  const Progress::Operation& getOperation() const;
39  void setOperation( char const * value, size_t size );
40  std::string getOperationString() const;
47  void setOperation( const std::string& value );
48 
49  float getAmount() const;
56  void setAmount( float value );
57 
58  void compact( float threshold = 0.1f ) final;
59  Progress();
60  Progress( const std::string& operationValue, const float& amountValue );
61  Progress( const Progress& rhs );
62  Progress( Progress&& rhs ) noexcept;
63  Progress( const ::zerobuf::Zerobuf& rhs );
64  explicit Progress( ::zerobuf::AllocatorPtr allocator );
65  virtual ~Progress();
66  Progress& operator = ( const Progress& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs ); return *this; }
67  Progress& operator = ( Progress&& rhs );
68 
69  // Introspection
70  std::string getSchema() const final;
71  static std::string ZEROBUF_SCHEMA();
72  std::string getTypeName() const final { return "lexis::data::detail::Progress"; }
73  static std::string ZEROBUF_TYPE_NAME() { return "lexis::data::detail::Progress"; }
74  ::zerobuf::uint128_t getTypeIdentifier() const final { return ::zerobuf::uint128_t( 0x48dc1196c8ead1d5ull, 0xf0670fa13df40409ull ); }
75  static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0x48dc1196c8ead1d5ull, 0xf0670fa13df40409ull ); }
76  size_t getZerobufStaticSize() const final { return 24; }
77  static size_t ZEROBUF_STATIC_SIZE() { return 24; }
78  size_t getZerobufNumDynamics() const final { return 1; }
79  static size_t ZEROBUF_NUM_DYNAMICS() { return 1; }
80  static ConstProgressPtr create( const void* data, const size_t size ) { return ConstProgressPtr( new Progress( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
81 
82  void _parseJSON( const Json::Value& json ) final;
83  void _createJSON( Json::Value& json ) const final;
84 
85 private:
86  Operation _operation;
87 };
88 
89 }
90 }
91 }
92 namespace zerobuf
93 {
94 }
95 
void setAmount(float value)
Set the Amount value.
Progress::Operation & getOperation()
Get a reference to the Operation dynamic member.
void setOperation(char const *value, size_t size)
Set the value of the Operation dynamic object from a char* and size.