-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparse_cdx.py
1688 lines (1554 loc) · 80.6 KB
/
parse_cdx.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
from pkg_resources import parse_version
from kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO
from enum import Enum
import struct
if parse_version(ks_version) < parse_version('0.7'):
raise Exception("Incompatible Kaitai Struct Python API: 0.7 or later is required, but you have %s" % (ks_version))
class Cdx(KaitaiStruct):
class Proptype(Enum):
end_object = 0
creation_user_name = 1
creation_date = 2
creation_program = 3
modification_user_name = 4
modification_date = 5
modification_program = 6
unused1 = 7
name = 8
comment = 9
z_order = 10
registry_number = 11
registry_authority = 12
unused2 = 13
represents_property = 14
ignore_warnings = 15
chemical_warning = 16
visible = 17
font_table = 256
x2d_position = 512
x3d_position = 513
x2d_extent = 514
x3d_extent = 515
bounding_box = 516
rotation_angle = 517
bounds_in_parent = 518
x3d_head = 519
x3d_tail = 520
top_left = 521
top_right = 522
bottom_right = 523
bottom_left = 524
color_table = 768
foreground_color = 769
background_color = 770
node_type = 1024
node_label_display = 1025
node_element = 1026
atom_element_list = 1027
atom_formula = 1028
atom_isotope = 1056
atom_charge = 1057
atom_radical = 1058
atom_restrict_free_sites = 1059
atom_restrict_implicit_hydrogens = 1060
atom_restrict_ring_bond_count = 1061
atom_restrict_unsaturated_bonds = 1062
atom_restrict_rxn_change = 1063
atom_restrict_rxn_stereo = 1064
atom_abnormal_valence = 1065
unused3 = 1066
atom_num_hydrogens = 1067
unused4 = 1068
unused5 = 1069
atom_h_dot = 1070
atom_h_dash = 1071
atom_geometry = 1072
atom_bond_ordering = 1073
node_attachments = 1074
atom_generic_nickname = 1075
atom_alt_group_id = 1076
atom_restrict_substituents_up_to = 1077
atom_restrict_substituents_exactly = 1078
atom_cip_stereochemistry = 1079
atom_translation = 1080
atom_atom_number = 1081
atom_show_query = 1082
atom_show_stereo = 1083
atom_show_atom_number = 1084
atom_link_count_low = 1085
atom_link_count_high = 1086
atom_isotopic_abundance = 1087
atom_external_connection_type = 1088
mole_racemic = 1280
mole_absolute = 1281
mole_relative = 1282
mole_formula = 1283
mole_weight = 1284
frag_connection_order = 1285
bond_order = 1536
bond_display = 1537
bond_display2 = 1538
bond_double_position = 1539
bond_begin = 1540
bond_end = 1541
bond_restrict_topology = 1542
bond_restrict_rxn_participation = 1543
bond_begin_attach = 1544
bond_end_attach = 1545
bond_cip_stereochemistry = 1546
bond_bond_ordering = 1547
bond_show_query = 1548
bond_show_stereo = 1549
bond_crossing_bonds = 1550
bond_show_rxn = 1551
text = 1792
justification = 1793
line_height = 1794
word_wrap_width = 1795
line_starts = 1796
label_alignment = 1797
label_line_height = 1798
caption_line_height = 1799
interpret_chemically = 1800
mac_print_info = 2048
win_print_info = 2049
print_margins = 2050
chain_angle = 2051
bond_spacing = 2052
bond_length = 2053
bold_width = 2054
line_width = 2055
margin_width = 2056
hash_spacing = 2057
label_style = 2058
caption_style = 2059
caption_justification = 2060
fractional_widths = 2061
magnification = 2062
width_pages = 2063
height_pages = 2064
drawing_space_type = 2065
width = 2066
height = 2067
page_overlap = 2068
header = 2069
header_position = 2070
footer = 2071
footer_position = 2072
print_trim_marks = 2073
label_style_font = 2074
caption_style_font = 2075
label_style_size = 2076
caption_style_size = 2077
label_style_face = 2078
caption_style_face = 2079
label_style_color = 2080
caption_style_color = 2081
bond_spacing_abs = 2082
label_justification = 2083
fix_inplace_extent = 2084
side = 2085
fix_inplace_gap = 2086
window_is_zoomed = 2304
window_position = 2305
window_size = 2306
graphic_type = 2560
line_type = 2561
arrow_type = 2562
rectangle_type = 2563
oval_type = 2564
orbital_type = 2565
bracket_type = 2566
symbol_type = 2567
curve_type = 2568
arrow_head_size = 2592
arc_angular_size = 2593
bracket_lip_size = 2594
curve_points = 2595
bracket_usage = 2596
polymer_repeat_pattern = 2597
polymer_flip_type = 2598
bracketed_objects = 2599
bracket_repeat_count = 2600
bracket_component_order = 2601
bracket_sru_label = 2602
bracket_graphic_id = 2603
bracket_bond_id = 2604
bracket_inner_atom_id = 2605
curve_points3d = 2606
picture_edition = 2656
picture_edition_alias = 2657
mac_pict = 2658
windows_metafile = 2659
ole_object = 2660
enhanced_metafile = 2661
spectrum_x_spacing = 2688
spectrum_x_low = 2689
spectrum_x_type = 2690
spectrum_y_type = 2691
spectrum_x_axis_label = 2692
spectrum_y_axis_label = 2693
spectrum_data_point = 2694
spectrum_class = 2695
spectrum_y_low = 2696
spectrum_y_scale = 2697
tlc_origin_fraction = 2720
tlc_solvent_front_fraction = 2721
tlc_show_origin = 2722
tlc_show_solvent_front = 2723
tlc_show_borders = 2724
tlc_show_side_ticks = 2725
tlc_rf = 2736
tlc_tail = 2737
tlc_show_rf = 2738
named_alternative_group_text_frame = 2816
named_alternative_group_group_frame = 2817
named_alternative_group_valence = 2818
geometric_feature = 2944
relation_value = 2945
basis_objects = 2946
constraint_type = 2947
constraint_min = 2948
constraint_max = 2949
ignore_unconnected_atoms = 2950
dihedral_is_chiral = 2951
point_is_directed = 2952
reaction_step_atom_map = 3072
reaction_step_reactants = 3073
reaction_step_products = 3074
reaction_step_plusses = 3075
reaction_step_arrows = 3076
reaction_step_objects_above_arrow = 3077
reaction_step_objects_below_arrow = 3078
reaction_step_atom_map_manual = 3079
reaction_step_atom_map_auto = 3080
object_tag_type = 3328
unused6 = 3329
unused7 = 3330
object_tag_tracking = 3331
object_tag_persistent = 3332
object_tag_value = 3333
positioning = 3334
positioning_angle = 3335
positioning_offset = 3336
sequence_identifier = 3584
cross_reference_container = 3840
cross_reference_document = 3841
cross_reference_identifier = 3842
cross_reference_sequence = 3843
template_pane_height = 4096
template_num_rows = 4097
template_num_columns = 4098
group_integral = 4352
splitter_positions = 8176
page_definition = 8177
user_temporary_begin = 16384
user_temporary_end = 17408
obj_document = 32768
obj_page = 32769
obj_group = 32770
obj_fragment = 32771
obj_node = 32772
obj_bond = 32773
obj_text = 32774
obj_graphic = 32775
obj_curve = 32776
obj_embedded_object = 32777
obj_named_alternative_group = 32778
obj_template_grid = 32779
obj_registry_number = 32780
obj_reaction_scheme = 32781
obj_reaction_step = 32782
obj_object_definition = 32783
obj_spectrum = 32784
obj_object_tag = 32785
obj_ole_client_item = 32786
obj_sequence = 32787
obj_cross_reference = 32788
obj_splitter = 32789
obj_table = 32790
obj_bracketed_group = 32791
obj_bracket_attachment = 32792
obj_crossing_bond = 32793
obj_border = 32800
obj_geometry = 32801
obj_constraint = 32802
obj_tlc_plate = 32803
obj_tlc_lane = 32804
obj_tlc_spot = 32805
obj_unknown_object = 36863
@classmethod
def _missing_(cls, value):
from types import SimpleNamespace
val = SimpleNamespace()
setattr(val, 'value', value)
return val
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.header = self._root.Header(self._io, self, self._root)
self._raw_document = self._io.read_bytes_full()
io = KaitaiStream(BytesIO(self._raw_document))
self.document = self._root.Document(io, self, self._root)
class CdxCipStereoAtom(KaitaiStruct):
class Stereo(Enum):
u = 0
n = 1
r = 2
s = 3
pr = 4
ps = 5
unspecified = 6
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.stereo = self._root.CdxCipStereoAtom.Stereo(self._io.read_s1())
class CdxRawString(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.value = (self._io.read_bytes_full()).decode(u"cp1251")
class Int16ListWithCounts(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.num_values = self._io.read_u2le()
self.values = [None] * (self.num_values)
for i in range(self.num_values):
self.values[i] = self._io.read_u2le()
class CdxFontTable(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.platform = self._io.read_u2le()
self.num_styleruns = self._io.read_u2le()
self.styleruns = [None] * (self.num_styleruns)
for i in range(self.num_styleruns):
self.styleruns[i] = self._root.CdxFontTable.Stylerun(self._io, self, self._root)
class Stylerun(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.font_id = self._io.read_u2le()
self.charset = self._io.read_u2le()
self.font_name_length = self._io.read_u2le()
self.font_name = (self._io.read_bytes(self.font_name_length)).decode(u"cp1251")
class CdxString(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.num_styleruns = self._io.read_u2le()
self.styleruns = [None] * (self.num_styleruns)
for i in range(self.num_styleruns):
self.styleruns[i] = self._root.CdxString.Stylerun(self._io, self, self._root)
self.text = (self._io.read_bytes_full()).decode(u"cp1251")
class Stylerun(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.starts = self._io.read_u2le()
self.style = self._root.CdxFontStyle(self._io, self, self._root)
class Document(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.content = []
i = 0
while not self._io.is_eof():
self.content.append(self._root.Entity(self._io, self, self._root))
i += 1
class CdxObjectId(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.obj_id = self._io.read_u4le()
class CdxFontStyle(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.font_table_index = self._io.read_u2le()
self.flags = self._io.read_u2le()
self.size = self._io.read_u2le()
self.color = self._io.read_u2le()
class CdxDate(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.year = self._io.read_s2le()
self.month = self._io.read_s2le()
self.day = self._io.read_s2le()
self.hour = self._io.read_s2le()
self.minute = self._io.read_s2le()
self.second = self._io.read_s2le()
self.milliseconds = self._io.read_s2le()
class CdxObjectIdArrayWithCounts(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.num_objs = self._io.read_u2le()
self.objs = [None] * (self.num_objs)
for i in range(self.num_objs):
self.objs[i] = self._root.CdxObjectId(self._io, self, self._root)
class Obj(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.obj_id = self._io.read_u4le()
self.content = []
i = 0
while True:
_ = self._root.Entity(self._io, self, self._root)
self.content.append(_)
if _.tag == self._root.Proptype.end_object:
break
i += 1
class CdxRectangle(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.tlbr = [None] * (4)
for i in range(4):
self.tlbr[i] = self._io.read_s4le()
class CdxObject(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.value = self._root.CdxUnknown(self._io, self, self._root)
class CdxCurvePoints3d(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.num_points = self._io.read_u2le()
self.points = [None] * (self.num_points)
for i in range(self.num_points):
self.points[i] = self._root.CdxPoint3d(self._io, self, self._root)
class CdxObjectIdArray(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.objs = []
i = 0
while not self._io.is_eof():
self.objs.append(self._root.CdxObjectId(self._io, self, self._root))
i += 1
class CdxPoint3d(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.zyx = [None] * (3)
for i in range(3):
self.zyx[i] = self._io.read_s4le()
class CdxRepresentsProperty(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.obj_id = self._root.CdxObjectId(self._io, self, self._root)
self.prop_tag = self._io.read_u2le()
class CdxCipStereoBond(KaitaiStruct):
class Stereo(Enum):
u = 0
n = 1
e = 2
z = 3
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.stereo = self._root.CdxCipStereoBond.Stereo(self._io.read_s1())
class Entity(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.tag = self._root.Proptype(self._io.read_u2le())
if ((self.tag.value < 32768) and (self.tag != self._root.Proptype.end_object)) :
self.prop = self._root.Prop(self._io, self, self._root)
if ((self.tag.value >= 32768) and (self.tag != self._root.Proptype.end_object)) :
self.obj = self._root.Obj(self._io, self, self._root)
class CdxBooleanImplied(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.content = self._io.read_bytes(self._parent.len)
@property
def value(self):
if hasattr(self, '_m_value'):
return self._m_value if hasattr(self, '_m_value') else None
self._m_value = self._parent.len > 0
return self._m_value if hasattr(self, '_m_value') else None
class CdxCoordinate(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.value = self._io.read_s4le()
class CdxBoolean(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.value = self._io.read_s1()
class Header(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.magic = self._io.ensure_fixed_contents(struct.pack('22b', 86, 106, 67, 68, 48, 49, 48, 48, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
class CdxFormula(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.value = self._root.CdxUnknown(self._io, self, self._root)
class Prop(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.len = self._io.read_u2le()
_on = self._parent.tag
if _on == self._root.Proptype.fix_inplace_extent:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxPoint2d(io, self, self._root)
elif _on == self._root.Proptype.tlc_tail:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxCoordinate(io, self, self._root)
elif _on == self._root.Proptype.creation_date:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxDate(io, self, self._root)
elif _on == self._root.Proptype.rotation_angle:
self.content = self._io.read_s4le()
elif _on == self._root.Proptype.bond_double_position:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.obj_group:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.atom_external_connection_type:
self.content = self._io.read_s1()
elif _on == self._root.Proptype.atom_restrict_substituents_up_to:
self.content = self._io.read_u1()
elif _on == self._root.Proptype.word_wrap_width:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.obj_sequence:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.tlc_show_rf:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBoolean(io, self, self._root)
elif _on == self._root.Proptype.registry_authority:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxString(io, self, self._root)
elif _on == self._root.Proptype.atom_restrict_free_sites:
self.content = self._io.read_u1()
elif _on == self._root.Proptype.arrow_head_size:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.obj_curve:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.window_size:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxPoint2d(io, self, self._root)
elif _on == self._root.Proptype.bold_width:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxCoordinate(io, self, self._root)
elif _on == self._root.Proptype.oval_type:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.windows_metafile:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxUnknown(io, self, self._root)
elif _on == self._root.Proptype.polymer_flip_type:
self.content = self._io.read_s1()
elif _on == self._root.Proptype.atom_show_atom_number:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBoolean(io, self, self._root)
elif _on == self._root.Proptype.basis_objects:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectIdArray(io, self, self._root)
elif _on == self._root.Proptype.atom_abnormal_valence:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBooleanImplied(io, self, self._root)
elif _on == self._root.Proptype.bond_end_attach:
self.content = self._io.read_u1()
elif _on == self._root.Proptype.header:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxString(io, self, self._root)
elif _on == self._root.Proptype.top_left:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxPoint2d(io, self, self._root)
elif _on == self._root.Proptype.constraint_type:
self.content = self._io.read_s1()
elif _on == self._root.Proptype.atom_show_stereo:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBoolean(io, self, self._root)
elif _on == self._root.Proptype.tlc_show_borders:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBoolean(io, self, self._root)
elif _on == self._root.Proptype.obj_fragment:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.bond_display2:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.header_position:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxCoordinate(io, self, self._root)
elif _on == self._root.Proptype.atom_isotopic_abundance:
self.content = self._io.read_s1()
elif _on == self._root.Proptype.node_attachments:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectIdArrayWithCounts(io, self, self._root)
elif _on == self._root.Proptype.spectrum_x_type:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.bracket_component_order:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.color_table:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxColorTable(io, self, self._root)
elif _on == self._root.Proptype.tlc_solvent_front_fraction:
self.content = self._io.read_f8le()
elif _on == self._root.Proptype.bracket_inner_atom_id:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectId(io, self, self._root)
elif _on == self._root.Proptype.atom_restrict_implicit_hydrogens:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBooleanImplied(io, self, self._root)
elif _on == self._root.Proptype.magnification:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.label_style_color:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.unused2:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxUnknown(io, self, self._root)
elif _on == self._root.Proptype.obj_tlc_plate:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.atom_element_list:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxElementList(io, self, self._root)
elif _on == self._root.Proptype.label_style_size:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.bracket_graphic_id:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectId(io, self, self._root)
elif _on == self._root.Proptype.reaction_step_atom_map:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectIdArray(io, self, self._root)
elif _on == self._root.Proptype.atom_alt_group_id:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectId(io, self, self._root)
elif _on == self._root.Proptype.atom_restrict_ring_bond_count:
self.content = self._io.read_s1()
elif _on == self._root.Proptype.obj_object_tag:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.x3d_tail:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxPoint3d(io, self, self._root)
elif _on == self._root.Proptype.bond_length:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxCoordinate(io, self, self._root)
elif _on == self._root.Proptype.x3d_head:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxPoint3d(io, self, self._root)
elif _on == self._root.Proptype.spectrum_y_axis_label:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxString(io, self, self._root)
elif _on == self._root.Proptype.mole_relative:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBoolean(io, self, self._root)
elif _on == self._root.Proptype.top_right:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxPoint2d(io, self, self._root)
elif _on == self._root.Proptype.chemical_warning:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxString(io, self, self._root)
elif _on == self._root.Proptype.reaction_step_arrows:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectIdArray(io, self, self._root)
elif _on == self._root.Proptype.footer_position:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxCoordinate(io, self, self._root)
elif _on == self._root.Proptype.atom_restrict_substituents_exactly:
self.content = self._io.read_u1()
elif _on == self._root.Proptype.reaction_step_plusses:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectIdArray(io, self, self._root)
elif _on == self._root.Proptype.creation_user_name:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxString(io, self, self._root)
elif _on == self._root.Proptype.bond_spacing:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.width_pages:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.spectrum_y_scale:
self.content = self._io.read_f8le()
elif _on == self._root.Proptype.atom_geometry:
self.content = self._io.read_s1()
elif _on == self._root.Proptype.window_position:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxPoint2d(io, self, self._root)
elif _on == self._root.Proptype.named_alternative_group_text_frame:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxRectangle(io, self, self._root)
elif _on == self._root.Proptype.obj_tlc_spot:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.atom_radical:
self.content = self._io.read_u1()
elif _on == self._root.Proptype.bond_begin_attach:
self.content = self._io.read_u1()
elif _on == self._root.Proptype.named_alternative_group_group_frame:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxRectangle(io, self, self._root)
elif _on == self._root.Proptype.label_style_font:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.positioning:
self.content = self._io.read_s1()
elif _on == self._root.Proptype.reaction_step_products:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectIdArray(io, self, self._root)
elif _on == self._root.Proptype.obj_document:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.label_line_height:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.obj_cross_reference:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.atom_h_dot:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBooleanImplied(io, self, self._root)
elif _on == self._root.Proptype.bond_bond_ordering:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectIdArray(io, self, self._root)
elif _on == self._root.Proptype.end_object:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.reaction_step_objects_above_arrow:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectIdArray(io, self, self._root)
elif _on == self._root.Proptype.caption_justification:
self.content = self._io.read_s1()
elif _on == self._root.Proptype.object_tag_persistent:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBoolean(io, self, self._root)
elif _on == self._root.Proptype.obj_spectrum:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.mac_print_info:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxUnknown(io, self, self._root)
elif _on == self._root.Proptype.obj_named_alternative_group:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObject(io, self, self._root)
elif _on == self._root.Proptype.interpret_chemically:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBooleanImplied(io, self, self._root)
elif _on == self._root.Proptype.bond_end:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectId(io, self, self._root)
elif _on == self._root.Proptype.orbital_type:
self.content = self._io.read_s2le()
elif _on == self._root.Proptype.fractional_widths:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBooleanImplied(io, self, self._root)
elif _on == self._root.Proptype.bond_show_rxn:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxBoolean(io, self, self._root)
elif _on == self._root.Proptype.bond_begin:
self._raw_content = self._io.read_bytes(self.len)
io = KaitaiStream(BytesIO(self._raw_content))
self.content = self._root.CdxObjectId(io, self, self._root)