Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class __{{struct_name}}:
class {{struct_name}}:
{%- filter indent(width=4) %}
{% if struct_fields|length -%}
{{struct_fields-}}
Expand All @@ -8,13 +8,13 @@ class __{{struct_name}}:
{% endif -%}
{% endfilter -%}
{% if struct_instance|length -%}
{{struct_instance}} = __{{struct_name}}()
{{struct_instance}} = {{struct_name}}()
{% endif -%}
{% if not struct_instance|length -%}
__map_type = __{{struct_name}}
_map_type = {{struct_name}}
def add_entry(self, name):
if not hasattr(self, name):
setattr(self, name, self.__map_type())
setattr(self, name, self._map_type())
return getattr(self, name)
def get_entry(self, name):
return getattr(self, name)
Expand Down
Loading