C++ Class Canonical Form Builder - VSCode Extension (Beta)
This Visual Studio Code extension helps you quickly generate C++ classes in their canonical form by automatically creating the header and cpp files. Depending on the complexity level you choose, it also generates accessor methods (getters and setters) for the attributes in your class.
Features
Automatic Class Generation: Create both the header (.h) and implementation (.cpp) files with a single command.
Flexible Complexity Levels: Choose different levels of complexity to include or exclude accessor methods.
Customizable Attributes: Define class attributes using a simple syntax, and the extension will generate them in the appropriate form.
Command
To invoke the extension, use the following command in the VSCode command palette:
ctr+shift+p canon
This command triggers the generation process.
Attribute Syntax (Beta)
In this beta release, attribute declarations must follow a specific syntax to ensure proper class generation. The supported syntax for declaring attributes is:
Examples:
Simple string attribute
Input: s myString
Output: std::string myString
You must follow the exact ${type} ${name} syntax for attribute declarations.
The current release supports only predefined type shortcuts like s for std::string and cs for const std::string. any unrecognized char will result in an arror for now
current supported types : int > ifloat > fstd::string > s
many errors are not handled for the moment, as said before, it only is the beta version for now version: 0.0.2
to stop sending new attributes to your function
Future Enhancements
In future releases, we plan to support:
More complex type handling.
Extended attribute customization.
Additional class features (e.g., inheritance, operator overloading, exceptions...).