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

Scenario does not support String values #354

Closed
markaren opened this issue Sep 4, 2019 · 0 comments · Fixed by #442
Closed

Scenario does not support String values #354

markaren opened this issue Sep 4, 2019 · 0 comments · Fixed by #442
Labels
bug Something isn't working

Comments

@markaren
Copy link
Contributor

markaren commented Sep 4, 2019

Marking this as a bug as it is expected behavior that setting string values would work.
I remember I tried to fix this back when boolean was not supported either, but was unable to.

switch (type) {
        case cse::variable_type::real: {
            auto f = generate_modifier<double>(mode, event);
            return cse::scenario::variable_action{
                sim, var, cse::scenario::real_modifier{f}, isInput};
        }
        case cse::variable_type::integer: {
            auto f = generate_modifier<int>(mode, event);
            return cse::scenario::variable_action{
                sim, var, cse::scenario::integer_modifier{f}, isInput};
        }
        case cse::variable_type::boolean: {
            auto f = generate_modifier<bool>(mode, event);
            return cse::scenario::variable_action{
                sim, var, cse::scenario::boolean_modifier{f}, isInput};
        }
        default:
            std::ostringstream oss;
            oss << "No scenario action support for variable type: " << to_text(type);
            throw std::invalid_argument(oss.str());
    }
@markaren markaren added the bug Something isn't working label Sep 4, 2019
markaren pushed a commit that referenced this issue Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant