示例#1
0
 static void decode(Decoder& d, kaa_configuration::_configuration_avsc_Union__0__& v) {
     size_t n = d.decodeUnionIndex();
     if (n >= 2) { throw avro::Exception("Union index too big"); }
     switch (n) {
     case 0:
         d.decodeNull();
         v.set_null();
         break;
     case 1:
         {
             boost::array<uint8_t, 16> vv;
             avro::decode(d, vv);
             v.set_uuidT(vv);
         }
         break;
     }
 }
示例#2
0
 static void decode(Decoder& d, _configuration_schema_Union__4__& v) {
     size_t n = d.decodeUnionIndex();
     if (n >= 3) { throw avro::Exception("Union index too big"); }
     switch (n) {
     case 0:
         {
             strategyT vv;
             avro::decode(d, vv);
             v.set_strategyT(vv);
         }
         break;
     case 1:
         {
             unchangedT vv;
             avro::decode(d, vv);
             v.set_unchangedT(vv);
         }
         break;
     case 2:
         d.decodeNull();
         v.set_null();
         break;
     }
 }