Lexis  1.0.0
Vocabulary of events and shared objects for BBP and HBP software
cellSetBinaryOp.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 
15 enum class CellSetBinaryOpType
16 {
17  Projections,
18 };
19 
20  std::string to_string( const CellSetBinaryOpType& val );
21  CellSetBinaryOpType from_string( const std::string& val );
22  std::ostream& operator << ( std::ostream& os, const CellSetBinaryOpType& val );
23 
24 class CellSetBinaryOp;
25 typedef std::unique_ptr< const CellSetBinaryOp > ConstCellSetBinaryOpPtr;
26 
27 class CellSetBinaryOp : public ::zerobuf::Zerobuf
28 {
29 public:
30  typedef ::zerobuf::Vector< uint32_t > First;
37  CellSetBinaryOp::First& getFirst();
38  const CellSetBinaryOp::First& getFirst() const;
46  void setFirst( uint32_t const * value, size_t size );
47  std::vector< uint32_t > getFirstVector() const;
54  void setFirst( const std::vector< uint32_t >& value );
55 
56  typedef ::zerobuf::Vector< uint32_t > Second;
63  CellSetBinaryOp::Second& getSecond();
64  const CellSetBinaryOp::Second& getSecond() const;
72  void setSecond( uint32_t const * value, size_t size );
73  std::vector< uint32_t > getSecondVector() const;
80  void setSecond( const std::vector< uint32_t >& value );
81 
82  CellSetBinaryOpType getOperation() const;
89  void setOperation( CellSetBinaryOpType value );
90 
91  void compact( float threshold = 0.1f ) final;
93  CellSetBinaryOp( const std::vector< uint32_t >& firstValue, const std::vector< uint32_t >& secondValue, const CellSetBinaryOpType& operationValue );
94  CellSetBinaryOp( const CellSetBinaryOp& rhs );
95  CellSetBinaryOp( CellSetBinaryOp&& rhs ) noexcept;
96  CellSetBinaryOp( const ::zerobuf::Zerobuf& rhs );
97  explicit CellSetBinaryOp( ::zerobuf::AllocatorPtr allocator );
98  virtual ~CellSetBinaryOp();
99  CellSetBinaryOp& operator = ( const CellSetBinaryOp& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs ); return *this; }
100  CellSetBinaryOp& operator = ( CellSetBinaryOp&& rhs );
101 
102  // Introspection
103  std::string getSchema() const final;
104  static std::string ZEROBUF_SCHEMA();
105  std::string getTypeName() const final { return "lexis::data::CellSetBinaryOp"; }
106  static std::string ZEROBUF_TYPE_NAME() { return "lexis::data::CellSetBinaryOp"; }
107  ::zerobuf::uint128_t getTypeIdentifier() const final { return ::zerobuf::uint128_t( 0x6f17efb37fd8ef59ull, 0x77ea04162eeacb02ull ); }
108  static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0x6f17efb37fd8ef59ull, 0x77ea04162eeacb02ull ); }
109  size_t getZerobufStaticSize() const final { return 40; }
110  static size_t ZEROBUF_STATIC_SIZE() { return 40; }
111  size_t getZerobufNumDynamics() const final { return 2; }
112  static size_t ZEROBUF_NUM_DYNAMICS() { return 2; }
113  static ConstCellSetBinaryOpPtr create( const void* data, const size_t size ) { return ConstCellSetBinaryOpPtr( new CellSetBinaryOp( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
114 
115  void _parseJSON( const Json::Value& json ) final;
116  void _createJSON( Json::Value& json ) const final;
117 
118 private:
119  First _first;
120  Second _second;
121 };
122 
123 }
124 }