Skip to content

why is docopt_value kind private? #115

Closed
@drtconway

Description

@drtconway

Hi docopt.cpp,

Great work, thank you!

Is there a particular rationale for making the kind of a docopt_value private?

I use a command/factory paradigm internally, and want to convert the command line into a jsonish blob to pass to the create method, and allow it to be saved/composed/etc. With the interface as it is, I either have to write the translation explicitly in each sub-command, or I could write a converter which uses try/catch to catch the runtime_error exceptions.

If you think exposing a "Kind kind() const" sort of thing is acceptable, I'm happy to do the implementation and submit a pull request, but if there's a specific reason not to, then I won't bother.

Cheers,
Tom.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions