I am working on setting up a pipeline to do some testing between WebIDL and 
Embind with Emscripten.  I am having an issue getting direct access to 
attributes defined in c++ classes when compiled to javascript.

For example, given this C++ class:

class Bar {
public:
  Bar(float val);
  void doSomething();
  float myVal;
};

When compiled using the following WebIDL interface:
interface Bar {
        void Bar(float val);
        void doSomething();
        attribute float myVal;
};

The attribute myVal can not be directly accessed from the JS Module 
returned.
For example:

var b = new Module.Bar(33);

b.myVal <-- does not work

It instead auto generates a getter and setter with this format:

b.get_myVal();
b.set_myVal(num);


Is there a way to manually define the getter/setter so that b.myVal would 
work?  Or just prevent the getter/setter from being created and have direct 
access to the attribute.


-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to