Commit graph

14 commits

Author SHA1 Message Date
pbattu
00efb88ac7 fc changes to support ubuntu-18.04 upgrade 2019-05-21 18:42:14 -03:00
theoreticalbts
ea78d2e75d reflect.hpp: Improve reflection of enum types
- Fix implementation of FC_REFLECT_VISIT_ENUM()
- Re-enable visit() for enum
- Add typename information for enum
2016-09-23 12:21:28 -04:00
theoreticalbts
360d86da80 Fix uninitialized variable warning 2016-08-29 13:11:37 -04:00
theoreticalbts
21d62f0a96 Throw when deserializing an integer into a value not in enum 2016-08-26 16:28:36 -04:00
theoreticalbts
80b2341e77 Throw when parsing a string as enum if the string parses as integer but does not exist in enum 2016-08-26 15:29:43 -04:00
theoreticalbts
8d99ea94e6 Avoid undefined behavior in enum deserialization
atoi() has undefined behavior when given a string that can't be parsed as an integer.
This patch replaces atoi() with boost_lexical_cast() and throws an exception when we get
something that's not a number.
2016-08-26 15:01:26 -04:00
Nathan Hourt
72088c548b Tweak FC enum reflection
Previously when enum values not defined in the original enum type were
used in serialized objects, FC threw exceptions when it encountered
these values. Now it just serializes unknown values to and from numbers
instead of names.

As an added benefit, the compiler now warns you if a value is defined in
the enum, but not reflected!
2014-10-31 16:30:18 -04:00
Daniel Larimer
0a11b29984 update error reporting 2014-05-13 16:41:27 -04:00
Vikram Rajkumar
1bdc40368f Make fc::reflector<ENUM>::to_string work with C++11 strongly typed enumerations 2014-04-22 15:57:11 -04:00
Eric Frias
d27be6851b Fix serializing enums 2014-04-02 08:54:12 -04:00
Daniel Larimer
9410980885 various updates 2013-08-23 20:14:46 -04:00
Daniel Larimer
9173154160 enable reflecting empty structs 2013-07-23 13:00:18 -04:00
Daniel Larimer
cd28770deb Updating crypto functions. 2013-06-27 14:18:02 -04:00
Daniel Larimer
59a121d64b Updating FC with changes from phoenix-int 2013-06-05 15:19:00 -04:00
Renamed from include/fc/reflect.hpp (Browse further)