Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit a8d5a49

Browse files
committed
m2t.{cpp, csharp}: populate artefact simple name
1 parent aef027e commit a8d5a49

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

projects/dogen.m2t.cpp/src/types/transforms/assistant.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,11 +676,13 @@ std::ostream& assistant::stream() {
676676
}
677677

678678
void assistant::update_artefact() const {
679-
artefact_.content(stream_.str());
679+
const auto fp(artefact_properties_.file_path());
680+
artefact_.name().simple(fp.filename().generic_string());
680681
artefact_.name().qualified(artefact_properties_.file_path());
681682
artefact_.logical_name().simple(element_.name().simple());
682683
artefact_.logical_name().qualified(element_.name().qualified().dot());
683684
artefact_.origin_sha1_hash(element_.origin_sha1_hash());
685+
artefact_.content(stream_.str());
684686

685687
const auto& ap(element_.artefact_properties());
686688
const auto arch(physical_meta_name_.qualified());

projects/dogen.m2t.csharp/src/types/transforms/assistant.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,12 @@ std::ostream& assistant::stream() {
286286
}
287287

288288
void assistant::update_artefact() {
289-
artefact_.content(stream_.str());
289+
const auto fp(artefact_properties_.file_path());
290+
artefact_.name().simple(fp.filename().generic_string());
290291
artefact_.name().qualified(artefact_properties_.file_path());
292+
artefact_.logical_name().simple(element_.name().simple());
293+
artefact_.logical_name().qualified(element_.name().qualified().dot());
294+
artefact_.content(stream_.str());
291295

292296
const auto& ap(element_.artefact_properties());
293297
const auto arch(physical_meta_name_.qualified());

0 commit comments

Comments
 (0)