Skip to content

Attribute: implementedas

Peter Reijnders edited this page Jan 26, 2017 · 1 revision

Attribute ImplementedAs

  • Name: 'ImplementedAs'
  • Since: under-evaluation
  • Usage on: 'Interface'
  • Allowed value: string with the cppclassname
  • Default value: if this is not set, it is equivalent to the name of the class 'name'
  • Rationale: Sometimes it is wanted to have a different javascript class name then the cpp classname.
  • Reference: 'Socket'

Example

IDL

[ ImplementedAs=JSSocket ] interface Socket {
};

Jinja

class {{ cppclassname }} : public ClassMapper<{{ cppclassname }}>, public {{ classname }}_Base
{
...

c++

class JSSocket : public ClassMapper<JSSocket>, public JSSocket_Base
{
...

Javascript

//not needed