Skip to content

Add RTTI support (dynamic casts) #142

@fsahmad

Description

@fsahmad

Currently ACT does not make it possible to perform dynamic downcasts on binding objects, it is left up to the API implementer to provide the necessary runtime type information, and maintain it.

As ACT already has all the necessary information about the type hierarchy, it would be very useful to have ACT generate everything that's needed to enable the following:

using namespace MyComponent;
void MyFunction(PBase anyObj) {

    if (auto wire = mycomponent_cast<PWire>(anyObj)) {
      DoSomethingWithWire(wire);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions