feat(object): add CGObject::IsExactlyA

This commit is contained in:
fallenoak 2026-02-05 14:53:58 -06:00
parent f567a3a7c8
commit c9f26b6666
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,10 @@ int32_t CGObject::IsA(OBJECT_TYPE type) const {
return (this->GetType() & type) != 0; return (this->GetType() & type) != 0;
} }
int32_t CGObject::IsExactlyA(OBJECT_TYPE_ID typeID) const {
return this->m_typeID == typeID;
}
CGObjectData* CGObject::Obj() const { CGObjectData* CGObject::Obj() const {
return this->m_obj; return this->m_obj;
} }

View File

@ -32,6 +32,7 @@ class CGObject {
OBJECT_TYPE GetType() const; OBJECT_TYPE GetType() const;
OBJECT_TYPE_ID GetTypeID() const; OBJECT_TYPE_ID GetTypeID() const;
int32_t IsA(OBJECT_TYPE type) const; int32_t IsA(OBJECT_TYPE type) const;
int32_t IsExactlyA(OBJECT_TYPE_ID typeID) const;
protected: protected:
// Protected member variables // Protected member variables