Total Complexity | 3 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 100% |
1 | # -*- coding: utf-8 -*- |
||
22 | 1 | class FrontMarkerParser(CollectingParser): |
|
23 | """ |
||
24 | Parses ``FrontMarker`` section. |
||
25 | View :ref:`detailed description <front-marker-section>`. |
||
26 | """ |
||
27 | |||
28 | 1 | def check_section_name(self, section_name): |
|
29 | 1 | return section_name == "FrontMarker" |
|
30 | |||
31 | 1 | def parse_line(self, line): |
|
32 | 1 | oid, pos_x, pos_y, belligerent = line.split() |
|
33 | 1 | self.data.append(FrontMarker( |
|
34 | id=oid, |
||
35 | belligerent=to_belligerent(belligerent), |
||
36 | pos=Point2D(pos_x, pos_y), |
||
37 | )) |
||
38 | |||
39 | 1 | def clean(self): |
|
40 | return {'markers': self.data, } |
||
41 |