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

Public enum ToString/FromString and ToType/FromType #308

Merged
merged 7 commits into from
Jun 17, 2019

Conversation

emgre
Copy link
Member

@emgre emgre commented Jun 12, 2019

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.

@emgre
Copy link
Member Author

emgre commented Jun 17, 2019

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
Copy link

codecov bot commented Jun 17, 2019

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