Next: , Up: Code integration -- extra materials   [Contents]


3.7.1 Using the Dezyne locator to distribute (runtime) objects

In one of the first sections of this section, you created instances of dzn::locator and dzn::runtime to be able to construct the generated System and its components. It was mentioned that dzn::locator can be used for more than distributing the runtime; otherwise it wouldn’t make sense to have a separate wrapper, of course.

In this section we will explore some of the default objects stored in the dzn::locator that are used by all Dezyne components as well as discuss how to use the dzn::locator to distribute your own objects throughout a System.

The way the dzn::locator works is it stores all sorts of objects by type. You can use the set() function on a locator object to store an object of a certain type T in the locator, which has two possible outcomes: