Skip to content

MASD-Project/cpp_ref_impl

Repository files navigation

Licence FOSSA Status Status Gitter Issues Continuous Linux Continuous Windows Continuous MacOS Nightly Build Build Dashboard Language Language C++ gcc-11 clang-14 msvc2022 TODOs

MASD C++ Reference Implementation

This project contains the MASD C++ Reference Implementation, generated using the latest version of Dogen. The objective of a MASD reference implementation is to exercise all of the available functionality within Dogen and to unit test it to ensure it works as specified. The models used to generate the reference implementation are available under projects/models. As the objective of the reference implementation is to exercise Dogen as much as possible, the models are available in both Dia and JSON formats.

Building From Source

By design, the steps to build the MASD C++ product reference implementation from source are exactly the same as those of Dogen.

Running Tests

If you'd like to run the project tests, execute the target run_all_tests or its abbreviation rat.

Regenerating Models

If you'd like to run Dogen to regenerate all models, you can do so by using the target generate_all_org or its abbreviation gao. This is useful, for example, to update the Reference Implementation to the latest version of Dogen, or just to see how Dogen works. However, note that Dogen must be on the path for the target to become available. If you installed Dogen via a package, it's probably already in the right location. If not, you need to tell CMake of its location by setting CMAKE_PROGRAM_PATH:

CMAKE_PROGRAM_PATH=/path/to/dogen/binary cmake ../..

After regeneration, you can then use git diff to inspect the differences produced by regeneration, if any. The build directory contains all of the logs, under the directory log.

Test Models

The Reference Implementation is composed of a number of test models. These can be summarised as follows:

Name Description
boost_model Tests for all of the supported Boost types.
compressed Uses a compressed Dia diagram as input.
cpp_98 Model in C++ 98. All other models are in C++ 17.
cpp_model Model testing core C++ language features.
std_model Model exercising types from Standard Library.
directory_settings Exercises all file and directory settings in MASD.
disable_cmakelists Model without CMake support.
disable_facet_folders Model without folders for facets (flat directory)
enable_facet_* Models exercising single facets.
lam_model Language Agnostic Model targeting C++.
northwind ODB test model based on Microsoft's Northwind
split_project Project with multiple roots.
two_layers_with_objects Model with multiple layers in Dia.

The objective of this project is to ensure these models compile. In addition, a set of model specific tests is present in test_model_sanitizer, which exercises functionality such as serialisation, IO etc.

Reporting Problems

If you have found any issues with the generated C++ code, we ask you to please report it in order to make the code generator better. Examples of issues with the generated code:

  • it may be using non-idiomatic C++, or following old idioms;
  • it may work, but you know of a better way of doing it;
  • it is just wrong, and we've missed it.

Issues can be submitted using github Issues.

Releases

No releases published

Packages

No packages published