Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -13,6 +13,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim
#include "BaseClassDefiner.hpp"
#include "CGMESProfile.hpp"
#include "CimClassDetails.hpp"

{{#attribute_class_includes}}
#include "{{.}}.hpp"
{{/attribute_class_includes}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static const std::map<std::string, AttrDetails>& getClassAttrDetailsMap()
{ "{{domain}}.{{label}}", { "{{attribute_namespace}}", { {{#attr_origin}}CGMESProfile::{{.}}, {{/attr_origin}}} } },
{{/attributes}}
};
return ClassAttrDetailsMap;
return ClassAttrDetailsMap;
}

{{class_name}}::{{class_name}}(){{nullptr_assigns}} {}
Expand Down
4 changes: 2 additions & 2 deletions cimgen/languages/java/templates/java_class.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public class {{class_name}} extends {{subclass_of}} {
private {{attribute_class}} {{variable_name}}; // ManyToOne
{{/is_attribute_with_inverse_list}}
{{^is_attribute_with_inverse_list}}
private {{attribute_class}} {{variable_name}}; // OneToOne
private {{attribute_class}} {{variable_name}};{{#inverse_setter}} // OneToOne{{/inverse_setter}}
{{/is_attribute_with_inverse_list}}

private String {{variable_name}}Id;
Expand Down Expand Up @@ -180,7 +180,7 @@ public class {{class_name}} extends {{subclass_of}} {
private Set<{{attribute_class}}> {{variable_name}} = new HashSet<>(); // ManyToMany
{{/is_attribute_with_inverse_list}}
{{^is_attribute_with_inverse_list}}
private Set<{{attribute_class}}> {{variable_name}} = new HashSet<>(); // OneToMany
private Set<{{attribute_class}}> {{variable_name}} = new HashSet<>();{{#inverse_setter}} // OneToMany{{/inverse_setter}}
{{/is_attribute_with_inverse_list}}

private Set<String> {{variable_name}}IdSet = new HashSet<>();
Expand Down
2 changes: 1 addition & 1 deletion cimgen/languages/python/lang_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _default_value(attribute: dict) -> str:
if attribute["is_class_attribute"]:
return "None"
if attribute["is_list_attribute"]:
return '"list"'
return "None"
# primitive attribute
if attribute["attribute_class"] == "Integer":
return "0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class {{class_name}}({{subclass_of}}):
{{/super_init}}

{{#attributes}}
self.{{label}} = {{label}}
self.{{label}} = {{label}}{{#is_list_attribute}} or []{{/is_list_attribute}}
{{/attributes}}
{{^attributes}}
pass
Expand Down
Loading