octave namespace in C++ code?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

octave namespace in C++ code?

John W. Eaton-6
Should we start putting all external symbols that are declared in
libcruft/liboctave/liboctinterp inside a namespace?

If we do this, should we use one namespace or more?  If we use more
than one, how should they be organized?

Currently we a real mess of external symbol names in the Octave
sources.  We have things like xpow, which could easily conflict with
other libraries, as well as symbols that begin with oct_, octave_, and
Octave_, and some symbols declared as static members of structs so
they can be in a separate (fake) namespace (liboctave/file_ops, for
example).

I'd like to be able to rename most external symbols in a rational
way.  Then some code in the Octave sources could be cleaned up a
little by having a

  using namespace octave;

declaration in Octave's config.h (which should probably also be
renamed to something like octave-config.h, but that's a separate
issue).

Comments?

jwe