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

Commit 07331f7

Browse files
committed
orchestration: assemble physical meta-model from generated meta-elements
1 parent d3eede7 commit 07331f7

1 file changed

Lines changed: 30 additions & 4 deletions

File tree

projects/dogen.orchestration/src/types/transforms/physical_meta_model_production_chain.cpp

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
#include "dogen.utility/types/io/shared_ptr_io.hpp"
2424
#include "dogen.tracing/types/scoped_tracer.hpp"
2525
#include "dogen.physical/io/entities/meta_model_io.hpp"
26+
#include "dogen.physical/types/helpers/meta_name_builder.hpp"
2627
#include "dogen.physical/types/helpers/meta_name_repository_builder.hpp"
2728
#include "dogen.physical/types/helpers/template_instantiation_domains_factory.hpp"
29+
#include "dogen.text.cpp/types/transforms/transforms.hpp"
30+
#include "dogen.text.csharp/types/transforms/transforms.hpp"
2831
#include "dogen.orchestration/types/transforms/physical_meta_model_production_chain.hpp"
2932

3033
namespace {
@@ -46,18 +49,41 @@ apply(const physical::transforms::minimal_context& ctx, const
4649
tracing::scoped_chain_tracer stp(lg, "physical meta-model production chain",
4750
transform_id, "physical_meta_model", *ctx.tracer());
4851

52+
using physical::entities::meta_model;
53+
auto r(boost::make_shared<meta_model>());
54+
55+
/*
56+
* Create the MASD kernel. This is done here until we support
57+
* kernels in the logical representation of the physical
58+
* meta-model through text transforms.
59+
*/
60+
physical::helpers::meta_name_builder mnb;
61+
mnb.kernel("masd");
62+
63+
physical::entities::kernel k;
64+
k.meta_name(mnb.build());
65+
k.backends().push_back(
66+
text::cpp::transforms::transforms_backend_chain::static_backend());
67+
k.backends().push_back(
68+
text::csharp::transforms::transforms_backend_chain::static_backend());
69+
70+
/*
71+
* Legacy repository building.
72+
*/
4973
physical::helpers::meta_name_repository_builder b;
5074
for (const auto& pair : rg.transforms_by_technical_space()) {
5175
const auto& t(*pair.second);
5276
b.add(t.physical_meta_names_by_logical_meta_name());
5377
b.add(t.physical_meta_name_repository_parts());
5478
}
5579

56-
using physical::entities::meta_model;
57-
auto r(boost::make_shared<meta_model>());
58-
5980
const auto nrp(b.build());
60-
r->kernels()["masd"].indexed_names(nrp);
81+
k.indexed_names(nrp);
82+
83+
/*
84+
* Add the new kernel to model.
85+
*/
86+
r->kernels()[k.meta_name().simple()] = k;
6187

6288
/*
6389
* Obtain the template instantiation domains.

0 commit comments

Comments
 (0)