8000 Public enum ToString/FromString and ToType/FromType by emgre · Pull Request #308 · dnp3/opendnp3 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Public enum ToString/FromString and ToType/FromType - #308

Merged
jadamcrain merged 7 commits into
developfrom
feature/public-enum-transformation
Jun 17, 2019
Merged

jadamcrain merged 7 commits into
developfrom
feature/public-enum-transformation

Conversation

@emgre
@emgre emgre commented Jun 12, 2019
Copy link
Copy Markdown
Member

Closes #239.

All the public enums now expose a ToString and FromString, as well as a ToType and FromType for easy conversion from client side.

Comment thread cpp/lib/src/gen/QualifierCode.cpp Resolved
@emgre
emgre commented Jun 17, 2019
Copy link
Copy Markdown
Member Author

The enum utilities are now in [EnumName]Spec static class, with an enum_type_t typedef. So it is more easy to use in templates.

I also added a to_human_string for log values, and to_string for config-style strings.

@codecov
codecov Bot commented Jun 17, 2019
Copy link
Copy Markdown

Codecov Report

Merging #308 into develop will decrease coverage by 7.5%.
The diff coverage is 1.78%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #308      +/-   ##
===========================================
- Coverage    52.14%   44.63%   -7.51%     
===========================================
  Files          447      486      +39     
  Lines        18148    21202    +3054     
===========================================
+ Hits          9463     9464       +1     
- Misses        8685    11738    +3053
Impacted Files Coverage Δ
cpp/lib/src/app/parsing/CountIndexParser.cpp 59.72% <ø> (ø) ⬆️
cpp/lib/src/app/APDULogging.cpp 100% <ø> (ø) ⬆️
cpp/lib/src/link/LinkFrame.cpp 94.93% <ø> (ø) ⬆️
cpp/lib/src/master/MasterContext.cpp 83.26% <ø> (ø) ⬆️
cpp/lib/src/app/parsing/RangeParser.cpp 80.48% <ø> (ø) ⬆️
cpp/lib/src/app/parsing/CountParser.cpp 82.92% <ø> (ø) ⬆️
cpp/lib/src/outstation/OutstationContext.cpp 92.17% <ø> (ø) ⬆️
cpp/lib/src/app/parsing/FreeFormatParser.cpp 35.29% <ø> (ø) ⬆️
cpp/lib/src/gen/UserOperationSerialization.h 0% <0%> (ø) ⬆️
cpp/lib/src/gen/TimeSyncMode.cpp 0% <0%> (ø)
... and 134 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37b62ab...1697740. Read the comment docs.

@jadamcrain
jadamcrain merged commit 4d16387 into develop Jun 17, 2019
@jadamcrain
jadamcrain deleted the feature/public-enum-transformation branch June 17, 2019 19:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide to/from string and to/from integer for public enums...

2 participants

0