Skip to content

Make possible parameters and commands into enumerations, use templates to map parameters to types. #42

Description

@jwlodek

Currently, with the way the API works, you need to know the string name of the endpoint in xspd. I.e. to get something like beam energy, you do:

float beamEnergy = pDetector->GetVar<float>("beam_energy");

It would be nicer/more user-friendly if this looked more like:

float beamEnergy = pDetector->GetVar<XSPD::BeamEnergy>();

The type deduction could be done via template structs, and that way you'd get a compile error if your type is incorrect, instead of a runtime error like you do now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions