Closed Bug 1604987 Opened 5 years ago Closed 5 years ago

Add new macro to support override pure virtual refcounting methods

Categories

(Core :: XPCOM, task)

task
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: alwu, Assigned: alwu)

References

Details

Attachments

(1 obsolete file)

In order to support following usage, when we extend a refcounting abstract class, but want the inherited class still being an abstract class. Therefore, we would like to have a marco to declare pure virtual override refcounting methods.

class foo {
 public:
  NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING 
  virtual doSomething() = 0;
};

class bar : public foo {
 public:
  // We want to override AddRef() and Release() but still make this class as an abstract class
  virtual doSomething() override = 0;
  virtual doAnotherThing() = 0;
};

In order to support a usage where we want to extend a refcounting abstract class, but want the inherited class still being an abstract class. Therefore, we would like to have a marco to declare pure virtual override refcounting methods.

Attachment #9116884 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: