Skip to content

Attribute: classname

Peter Reijnders edited this page Jan 26, 2017 · 3 revisions

Attribute classname

  • Name: 'classname'
  • Since: draft
  • Usage on: 'Interface'
  • Allowed value: string with the exposed classname
  • Rationale: the javascript classname can deviatie from the interface name.
  • Default value: if this is not set, it is equivalent to the name of the interface name
  • Reference: 'Socket'

Example:

IDL

[ ImplementedAs=JSSocket,
  classname = Socket ] interface Socket {
};

Template

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

Generated code

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

javascript usage

// not needed