Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

added generated function enum_to_string #452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ctin
Copy link
Contributor

@ctin ctin commented Oct 7, 2019

I extended c++ generator by adding string representation of enum values.
Rules:

  • now generated enum will have cpp file with a function body;
  • serialize function named $self_to_string, where $self is generated enum name;
  • function name depends on user style;
  • function returns std::string or std::wstring depending on djinni option cpp-use-wide-strings

tests passed
test makefile changed to support Xcode 11

Added flag cpp-enum-serializers to enable serializing enums in c++;
When this flag is turned on - serialize function declaration will be generated in enum's header and
c++ function definition will be generated to similar cpp file.
@ctin ctin force-pushed the add-toString-cpp-enums branch from 465e66b to 24ac1fc Compare October 23, 2019 12:39
@artwyman
Copy link
Contributor

artwyman commented Nov 4, 2019

Seems reasonable, but this repo isn't taking any new feature enhancements, per the note in the README:

Maintenance note: This repo is stable but no longer actively maintained. No further development is planned, and no new feature PRs will be merged. Bug fixes may be merged on a volunteer basis. If you have questions or want to talk to other users of Djinni, you can join the Slack community via the link at the end of this document.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants