GR 3.7 Namespace Question

With the new use of C++ namespaces in the 3.7 API, is
it possible for an Out-of-tree (OOT) module to create blocks
that are part of an existing GR namespace?

For instance, if I have a new block that processes digital
data streams, can I create an OOT module called “digital”
and add my block to it? Or will this cause a confusion
at link time, by creating two libraries with the same name?

@(^.^)@ Ed

Hi Ed - Are you asking whether you can reuse the same namespace and
block name with an OOT module? If so, then so long as you don’t load
the library containing the GR-provided block(s), you can make it work –
it’s a C++ issue rather than anything else. That said, it would
generally be better if you named your block something else to help
distinguish it from what GR provides – unless what you want is
intentionally a drop-in replacement for what GR provides. In C++ you
can add to a namespace if you want to, so long as what you’re adding
augments, does not conflict with nor try to replace, what’s already
there. Not sure if this is what you were looking for, but maybe this
helps? - MLD

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs