Mark Erickson | 932c470 | 2015-08-29 10:46:51 -0500 | [diff] [blame] | 1 | /// Licensed to the Apache Software Foundation (ASF) under one |
| 2 | /// or more contributor license agreements. See the NOTICE file |
| 3 | /// distributed with this work for additional information |
| 4 | /// regarding copyright ownership. The ASF licenses this file |
| 5 | /// to you under the Apache License, Version 2.0 (the |
| 6 | /// "License"); you may not use this file except in compliance |
| 7 | /// with the License. You may obtain a copy of the License at |
| 8 | /// |
| 9 | /// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | /// |
| 11 | /// Unless required by applicable law or agreed to in writing, |
| 12 | /// software distributed under the License is distributed on an |
| 13 | /// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | /// KIND, either express or implied. See the License for the |
| 15 | /// specific language governing permissions and limitations |
| 16 | /// under the License. |
| 17 | |
| 18 | part of thrift; |
| 19 | |
| 20 | abstract class TBase { |
| 21 | /// Reads the TObject from the given input protocol. |
| 22 | void read(TProtocol iprot); |
| 23 | |
| 24 | /// Writes the objects out to the [oprot] protocol. |
| 25 | void write(TProtocol oprot); |
| 26 | |
| 27 | /// Check if a field is currently set or unset, using the [fieldId]. |
| 28 | bool isSet(int fieldId); |
| 29 | |
| 30 | /// Get a field's value by [fieldId]. Primitive types will be wrapped in the |
| 31 | /// appropriate "boxed" types. |
| 32 | getFieldValue(int fieldId); |
| 33 | |
| 34 | /// Set a field's value by [fieldId]. Primitive types must be "boxed" in the |
| 35 | /// appropriate object wrapper type. |
| 36 | setFieldValue(int fieldId, Object value); |
| 37 | } |