Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new interface for abstracting the string literal encoding format #23

Closed
end2endzone opened this issue Jan 17, 2018 · 4 comments
Milestone

Comments

@end2endzone
Copy link
Owner

Create the ICppEncoder interface which has 2 implementations:

  • HexCppEncoder
  • OctalCppEncoder (with and without warning C4125)
@end2endzone
Copy link
Owner Author

A factory class (ie CppEncoderFactory) may have to be created to centralize the parsing of aguments into an implementation of ICppEncoder.

@end2endzone
Copy link
Owner Author

The IGenerator class may have to be modified with a new parameter for getting an instance of ICppEncoder.

@end2endzone
Copy link
Owner Author

Command line parameter should be --encoding=hex or --encoding=oct with oct as default value.

@end2endzone end2endzone added this to the 2.0 milestone Jan 17, 2018
@end2endzone
Copy link
Owner Author

Do not create a ICppEncoder interface or a factory.

Simply create the following:

enum CppEncoderEnum
{
   CPP_ENCODER_HEX,
   CPP_ENCODER_OCT,
};

and add create the following methods in the IGenerator interface:

virtual void setCppEncoder(const CppEncoderEnum & iCppEncoder) = 0;
virtual CppEncoderEnum getCppEncoder() const = 0;

end2endzone added a commit that referenced this issue Jan 20, 2018
…literal encoding format

* Created new unit tests: TestCLI.testEncoding(), TestExtraction.testEncodingOct() and TestExtraction.testEncodingHex()
* Created new API functions: capitalizeFirstCharacter(), uppercase() and lowercase().
* Created new command line argument: --encoding=<value> to support the desired encoding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant