read method
Reads the TObject from the given input protocol.
Implementation
read(TProtocol iprot) {
TField field;
iprot.readStructBegin();
while (true) {
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case COORDLISTLIST:
if (field.type == TType.LIST) {
{
TList _list30 = iprot.readListBegin();
this.coordListList = <List<Coordinate>>[];
for (int _i31 = 0; _i31 < _list30.length; ++_i31) {
List<Coordinate> _elem32;
{
TList _list33 = iprot.readListBegin();
_elem32 = <Coordinate>[];
for (int _i34 = 0; _i34 < _list33.length; ++_i34) {
Coordinate _elem35;
_elem35 = new Coordinate();
_elem35.read(iprot);
_elem32.add(_elem35);
}
iprot.readListEnd();
}
this.coordListList?.add(_elem32);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}