C++ Base Class Not Recognized
William Tribley <[email protected]> Tue, 12 May 2026 15:25:54 -0500
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <[email protected]> |
Greetings,
I have this c++ code:
namespace ModelAPI
{
class ModelSignalBase
{
public:
ModelSignalBase()
{
....
class ModelSignal : public ModelSignalBase
{
public:
/// <summary>
/// Copy constructor.
/// </summary>
/// <param name="ms">ModelSignal to copy.</param>
ModelSignal(const ModelSignal& ms)
....
In the generated cxx file the namespace is not included:
...
SWIGEXPORT void JNICALL Java_TiwsModelApiJNI_modelSignals_1set(JNIEnv *jenv, jclass jcls, jlong jarg1) {
std::vector< ModelSignalBase * > arg1 ;
std::vector< ModelSignalBase * > *argp1 ;
(void)jenv;
(void)jcls;
argp1 = *(std::vector< ModelSignalBase * > **)&jarg1;
if (!argp1) {
...
The entire class structure that I'm wrapping in SWIG is in namespace ModelAPI. The code compiles and runs in C++.
Any hints or ideas appreciated.
Best regards,
Bill