Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource factory refactor #427

Closed
briaguya-ai opened this issue Feb 8, 2024 · 1 comment
Closed

resource factory refactor #427

briaguya-ai opened this issue Feb 8, 2024 · 1 comment
Assignees

Comments

@briaguya-ai
Copy link
Collaborator

Basically the ResourceLoader will have a matrix of resource type, resource version, and reader version instead of just a map of resource type ... Also change ResourceInitData.IsXml to be ResourceInitData.ReaderType

pretty much we want to support doing this in ResourceLoader.LoadResource

    auto factory = mFactories[fileToLoad->InitData->Type][fileToLoad->InitData->Version][fileToLoad->InitData->ReaderType];
    if (factory == nullptr) {
        SPDLOG_ERROR("Failed to load resource: Factory does not exist ({} - {})", fileToLoad->InitData->Type,
                     fileToLoad->InitData->Path);
    }

    return factory->ReadResource(fileToLoad);
@briaguya-ai briaguya-ai self-assigned this Feb 8, 2024
@briaguya-ai
Copy link
Collaborator Author

this part has been completed by #437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant