Forum: GNU Radio GR 3.7 Namespace Question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ed Criscuolo (Guest)
on 2014-05-02 16:33
(Received via mailing list)
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
Michael Dickens (Guest)
on 2014-05-02 16:43
(Received via mailing list)
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 topic is locked and can not be replied to.