wavelength 1.0.0
Loading...
Searching...
No Matches
Attachment Class Reference

Reference-counted root of the engine's polymorphic object graph. More...

#include <attachment.h>

Inheritance diagram for Attachment:

Public Member Functions

 Attachment ()
 Construct an object with no reference.
virtual ~Attachment ()
 Release the object.
void AddRef ()
 Take one reference.
void Release ()
 Give back one reference and delete the object once the last one is gone.

Static Public Member Functions

static void ReleaseIfSet (Attachment *pAttachment)
 Give back one reference to an object that may be null.

Detailed Description

Reference-counted root of the engine's polymorphic object graph.

The RTTI includes the class name and records no base. The one data word is declared first. The vptr therefore sits after it at +0x04, and the class is eight bytes. The vtable at 0x003d6dd8 runs the type function and the destructor.

A fresh object starts with no reference. Each owner takes one through AddRef(), Ptr does so for the object it holds, and the last Release() deletes the object through the virtual destructor.

Some callers increment mRefs directly rather than through AddRef(). Access from an unrelated class is why the field is public rather than protected.

Constructor & Destructor Documentation

◆ Attachment()

Attachment::Attachment ( )
inline

Construct an object with no reference.

Inline. Every derived constructor expands it.

◆ ~Attachment()

virtual Attachment::~Attachment ( )
virtual

Release the object.

Ghidra address:
NTSC-U/C: 0x00293e80
Ghidra address:
PAL: 0x0029d838

Member Function Documentation

◆ AddRef()

void Attachment::AddRef ( )

Take one reference.

Ghidra address:
NTSC-U/C: 0x00293eb0
Ghidra address:
PAL: 0x0029d868

◆ Release()

void Attachment::Release ( )

Give back one reference and delete the object once the last one is gone.

Ghidra address:
NTSC-U/C: 0x00293ec0
Ghidra address:
PAL: 0x0029d878

◆ ReleaseIfSet()

void Attachment::ReleaseIfSet ( Attachment * pAttachment)
inlinestatic

Give back one reference to an object that may be null.

Passed as a function to std::for_each by the command scheduler, the phrase database, and the playback reader. The body is inline. The title is inferred.

Parameters
pAttachmentThe object, or null.

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