Lines Matching refs:out_file
203 def OutputMarshal(self, out_file, typemap): argument
215 out_file.write(
220 typemap[self.field_type].OutputMarshalCall(out_file, self)
222 def OutputUnmarshal(self, out_file, typemap): argument
234 out_file.write(
239 typemap[self.field_type].OutputUnmarshalCall(out_file, self)
306 def _GetBaseType(self, out_file, marshalled_types, typemap): argument
332 out_file, marshalled_types, typemap)
339 def OutputMarshalCall(self, out_file, field): argument
349 out_file.write(self._MARSHAL_CALL % {'type': field.field_type,
352 def OutputUnmarshalCall(self, out_file, field): argument
365 out_file.write(self._UNMARSHAL_CALL % {'type': obj_type,
368 def _OutputTypedefMarshalDecl(self, out_file, declared_types, typemap): argument
384 out_file, declared_types, typemap)
385 out_file.write(self._MARSHAL_DECLARATION % {'type': self.new_type})
388 def _OutputStructOrUnionMarshalDecl(self, out_file, declared_types): argument
404 out_file.write(self._MARSHAL_DECLARATION % {'type': self.name})
436 def OutputMarshalImpl(self, out_file, marshalled_types, typemap): argument
447 base_type = self._GetBaseType(out_file, marshalled_types, typemap)
448 out_file.write(self._TYPEDEF_MARSHAL_FUNCTION % {'old_type': base_type,
450 out_file.write(
455 def OutputMarshalDecl(self, out_file, declared_types, typemap): argument
464 self._OutputTypedefMarshalDecl(out_file, declared_types, typemap)
512 def OutputMarshalImpl(self, out_file, marshalled_types, typemap): argument
523 base_type = self._GetBaseType(out_file, marshalled_types, typemap)
524 out_file.write(self._TYPEDEF_MARSHAL_FUNCTION % {'old_type': base_type,
526 out_file.write(self._TYPEDEF_UNMARSHAL_START % {'old_type': base_type,
530 out_file.write(self._CHECK_VALUE_IFDEF % {'value': value})
532 out_file.write(self._CHECK_VALUE % {'value': value})
533 out_file.write(self._UNMARSHAL_END % {'error_code': self.error_code})
536 def OutputMarshalDecl(self, out_file, declared_types, typemap): argument
545 self._OutputTypedefMarshalDecl(out_file, declared_types, typemap)
594 def OutputMarshalImpl(self, out_file, marshalled_types, typemap): argument
605 base_type = self._GetBaseType(out_file, marshalled_types, typemap)
606 out_file.write(self._ATTRIBUTE_MARSHAL_FUNCTION %
609 out_file.write(self._ATTRIBUTE_UNMARSHAL_START %
613 out_file.write(self._CHECK_RESERVED % {'bits': bits})
614 out_file.write(self._UNMARSHAL_END)
617 def OutputMarshalDecl(self, out_file, declared_types, typemap): argument
626 self._OutputTypedefMarshalDecl(out_file, declared_types, typemap)
749 def OutputMarshalImpl(self, out_file, marshalled_types, typemap): argument
760 base_type = self._GetBaseType(out_file, marshalled_types, typemap)
761 out_file.write(self._TYPEDEF_MARSHAL_FUNCTION % {'old_type': base_type,
764 out_file.write(self._INTERFACE_CONDITIONAL_UNMARSHAL_START %
768 out_file.write(
773 out_file.write(self._SETUP_CHECK_SUPPORTED_VALUES %
776 out_file.write(self._SETUP_CHECK_VALUES)
777 out_file.write(self._UNMARSHAL_VALUE_ALLOW_RC_VALUE %
780 out_file.write(self._UNMARSHAL_VALUE % {'old_type': base_type})
783 out_file.write(self._CHECK_SUPPORTED_VALUES %
787 out_file.write(
793 out_file.write(self._VALUE_START_SWITCH % {'name': '*target'})
796 out_file.write(self._VALUE_CASE_IFDEF % {'value': value})
798 out_file.write(self._VALUE_CASE % {'value': value})
799 out_file.write(self._VALUE_END_SWITCH)
801 out_file.write(
803 out_file.write(self._CHECK_VALUES_END % {'error_code': self.error_code})
805 out_file.write(self._UNMARSHAL_END)
808 def OutputMarshalDecl(self, out_file, declared_types, typemap): argument
824 out_file, declared_types, typemap)
826 out_file.write(
829 out_file.write(self._MARSHAL_DECLARATION % {'type': self.new_type})
833 self, out_file, field): argument
845 out_file.write(
850 out_file.write(self._UNMARSHAL_CALL % {'type': field.field_type,
970 def OutputMarshalImpl(self, out_file, marshalled_types, typemap): argument
986 out_file, marshalled_types, typemap)
989 out_file.write(self._STRUCTURE_MARSHAL_START % {'name': self.name})
993 out_file.write(self._SETUP_ARRAY_FIELD)
1005 field.OutputMarshal(out_file, typemap)
1007 out_file.write(self._FIX_SIZE_FIELD % {'size_field_type': self.fields[0].field_type})
1008 out_file.write(self._MARSHAL_END)
1010 out_file.write(self._STRUCTURE_UNMARSHAL_START % {'name': self.name})
1012 out_file.write(self._CHECK_SIZE_START)
1016 out_file.write(self._SETUP_ARRAY_FIELD)
1019 field.OutputUnmarshal(out_file, typemap)
1022 out_file.write(self._TPM2B_ZERO_SIZE % {'return_value': 'TPM_RC_SIZE'})
1024 out_file.write(
1031 out_file.write(self._CHECK_BOUND %
1041 out_file.write(self._CHECK_BOUND %
1047 out_file.write(self._VALUE_START_SWITCH % {'name': 'target->tag'})
1049 out_file.write(self._VALUE_CASE % {'value': value})
1050 out_file.write(self._VALUE_END_SWITCH % {'error_code': 'TPM_RC_TAG'})
1052 out_file.write(self._CHECK_SIZE_END)
1057 out_file.write(' (void)result;\n')
1058 out_file.write(self._UNMARSHAL_END)
1062 def OutputMarshalDecl(self, out_file, declared_types, _): argument
1070 self._OutputStructOrUnionMarshalDecl(out_file, declared_types)
1189 self, out_file, field_type, field_name, array_length): argument
1200 out_file.write(self._MARSHAL_FIELD_ARRAY % {'type': field_type,
1204 out_file.write(self._MARSHAL_FIELD % {'type': field_type,
1208 self, out_file, field_type, field_name, array_length, typemap): argument
1220 out_file.write(
1225 out_file.write(
1229 out_file.write(self._UNMARSHAL_FIELD % {'type': field_type,
1232 def OutputMarshalImpl(self, out_file, marshalled_types, typemap): argument
1259 out_file, marshalled_types, typemap)
1265 out_file.write(self._UNION_MARSHAL_START % {'name': self.name,
1274 out_file.write(self._IFDEF % {'type': selector})
1275 out_file.write(self._CASE_SELECTOR % {'selector': selector})
1278 out_file.write(self._MARSHAL_EMPTY)
1280 out_file.write(self._ENDIF)
1284 self._OutputMarshalField(out_file, field_type, field_name, array_length)
1286 out_file.write(self._ENDIF)
1287 out_file.write(self._MARSHAL_END)
1288 out_file.write(self._UNION_UNMARSHAL_START % {'name': self.name})
1291 out_file.write(self._SETUP_UNMARSHAL_FIELD_ARRAY)
1298 out_file.write(self._IFDEF % {'type': selector})
1299 out_file.write(self._CASE_SELECTOR % {'selector': selector})
1302 out_file.write(self._UNMARSHAL_EMPTY)
1304 out_file.write(self._ENDIF)
1309 out_file, field_type, field_name, array_length, typemap)
1311 out_file.write(self._ENDIF)
1312 out_file.write(self._UNMARSHAL_END)
1315 def OutputMarshalDecl(self, out_file, declared_types, _): argument
1323 self._OutputStructOrUnionMarshalDecl(out_file, declared_types)
1325 def OutputMarshalCall(self, out_file, field): argument
1334 out_file.write(self._UNION_MARSHAL_CALL %
1339 def OutputUnmarshalCall(self, out_file, field): argument
1348 out_file.write(self._UNION_UNMARSHAL_CALL %
1360 out_file = open(_OUTPUT_FILE_H, 'w')
1361 out_file.write(COPYRIGHT_HEADER)
1363 out_file.write(HEADER_FILE_GUARD_HEADER % {'name': guard_name})
1364 out_file.write(_HEADER_FILE_INCLUDES)
1370 out_file.write(_STANDARD_MARSHAL_DECLARATION % {'type': basic_type})
1372 tpm_type.OutputMarshalDecl(out_file, declared_types, typemap)
1373 out_file.write(HEADER_FILE_GUARD_FOOTER % {'name': guard_name})
1374 out_file.close()
1384 out_file = open(_OUTPUT_FILE_CC, 'w')
1385 out_file.write(COPYRIGHT_HEADER)
1386 out_file.write(_IMPLEMENTATION_FILE_INCLUDES)
1389 out_file.write(_MARSHAL_BASIC_TYPE % {'type': basic_type})
1391 tpm_type.OutputMarshalImpl(out_file, marshalled_types, typemap)
1392 out_file.close()