read() public method

public read ( $input )
コード例 #1
0
ファイル: Client_types.php プロジェクト: mr-justin/hypertable
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::LST) {
                     $this->row_intervals = array();
                     $_size0 = 0;
                     $_etype3 = 0;
                     $xfer += $input->readListBegin($_etype3, $_size0);
                     for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
                         $elem5 = null;
                         $elem5 = new Hypertable_ThriftGen_RowInterval();
                         $xfer += $elem5->read($input);
                         $this->row_intervals[] = $elem5;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::LST) {
                     $this->cell_intervals = array();
                     $_size6 = 0;
                     $_etype9 = 0;
                     $xfer += $input->readListBegin($_etype9, $_size6);
                     for ($_i10 = 0; $_i10 < $_size6; ++$_i10) {
                         $elem11 = null;
                         $elem11 = new Hypertable_ThriftGen_CellInterval();
                         $xfer += $elem11->read($input);
                         $this->cell_intervals[] = $elem11;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->return_deletes);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->revs);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->row_limit);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->start_time);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->end_time);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == TType::LST) {
                     $this->columns = array();
                     $_size12 = 0;
                     $_etype15 = 0;
                     $xfer += $input->readListBegin($_etype15, $_size12);
                     for ($_i16 = 0; $_i16 < $_size12; ++$_i16) {
                         $elem17 = null;
                         $xfer += $input->readString($elem17);
                         $this->columns[] = $elem17;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
コード例 #2
0
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::LST) {
                     $this->row_intervals = array();
                     $_size0 = 0;
                     $_etype3 = 0;
                     $xfer += $input->readListBegin($_etype3, $_size0);
                     for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
                         $elem5 = null;
                         $elem5 = new Hypertable_ThriftGen_RowInterval();
                         $xfer += $elem5->read($input);
                         $this->row_intervals[] = $elem5;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::LST) {
                     $this->cell_intervals = array();
                     $_size6 = 0;
                     $_etype9 = 0;
                     $xfer += $input->readListBegin($_etype9, $_size6);
                     for ($_i10 = 0; $_i10 < $_size6; ++$_i10) {
                         $elem11 = null;
                         $elem11 = new Hypertable_ThriftGen_CellInterval();
                         $xfer += $elem11->read($input);
                         $this->cell_intervals[] = $elem11;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->return_deletes);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->versions);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->row_limit);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->start_time);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->end_time);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == TType::LST) {
                     $this->columns = array();
                     $_size12 = 0;
                     $_etype15 = 0;
                     $xfer += $input->readListBegin($_etype15, $_size12);
                     for ($_i16 = 0; $_i16 < $_size12; ++$_i16) {
                         $elem17 = null;
                         $xfer += $input->readString($elem17);
                         $this->columns[] = $elem17;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 9:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->keys_only);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 14:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->cell_limit);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 10:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->cell_limit_per_family);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 11:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->row_regexp);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 12:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->value_regexp);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 13:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->scan_and_filter_rows);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 15:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->row_offset);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 16:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->cell_offset);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 17:
                 if ($ftype == TType::LST) {
                     $this->column_predicates = array();
                     $_size18 = 0;
                     $_etype21 = 0;
                     $xfer += $input->readListBegin($_etype21, $_size18);
                     for ($_i22 = 0; $_i22 < $_size18; ++$_i22) {
                         $elem23 = null;
                         $elem23 = new Hypertable_ThriftGen_ColumnPredicate();
                         $xfer += $elem23->read($input);
                         $this->column_predicates[] = $elem23;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }