Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
cppgc::GarbageCollectedMixin Class Reference

#include <garbage-collected.h>

Public Types

using IsGarbageCollectedMixinTypeMarker = void
 

Public Member Functions

virtual void Trace (cppgc::Visitor *) const
 

Detailed Description

Base class for managed mixin objects. Such objects cannot be constructed directly but must be mixed into the inheritance hierarchy of a GarbageCollected object.

Types inheriting from GarbageCollectedMixin must override a virtual method of signature void Trace(cppgc::Visitor*) const that dispatchs all managed pointers to the visitor and delegates to base classes.

class Mixin : public GarbageCollectedMixin {
public:
void Trace(cppgc::Visitor* visitor) const override {
// Dispatch using visitor->Trace(...);
}
};
Definition: garbage-collected.h:93
Definition: visitor.h:56

Member Typedef Documentation

◆ IsGarbageCollectedMixinTypeMarker

Member Function Documentation

◆ Trace()

virtual void cppgc::GarbageCollectedMixin::Trace ( cppgc::Visitor ) const
inlinevirtual

This Trace method must be overriden by objects inheriting from GarbageCollectedMixin.


The documentation for this class was generated from the following file: