Forum: GNU Radio GR 3.7 Namespace Question

28a4af15b4d496d7900593255ea9c8a3?d=identicon&s=25 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
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.