Skip to content

A VScode extension to automate the generation of C++ classes in orthodox canonical form for 42's projects

License

Notifications You must be signed in to change notification settings

onora-hbl/CPP_Class_Generator

Repository files navigation

Table of content

RoadMap

  • Automaticaly add 42 header
  • Give the choice to create constructors with only certain fields
  • Inheritance managing
  • All the features that I find useful ;)

Documentation

Generator pannel

  • The extension is available on:
  • Open the generator pannel with the command open C++ orthodox canonical class generator
  • Choose a class name (like MySuperClass)
  • You can add all the fields you want
    • For the type, precise std if needed. Examples: std::string or int
    • Choose a name without the _ (like mySuperInt)
    • It's not mandatory to add a default value to the field
  • You can add classe's exceptions
    • Precise the name (like MySuperException)
    • Precise whatever you want in the what function
  • If you fill it, you cann add the overload of the << operator (use the precised format to print some field in the message)
  • You can generate debug message in constructor/destructor if the subject ask it

Examples

  • Default generator (Errors are false positive detected by VScode but that's compile) Default
  • Complete all generator fields Default

Settings

  • "cppclassgenerator.defaultGetter" used to choose if the box "generate getter" is default checked
  • "cppclassgenerator.defaultSetter" used to choose if the box "generate setter" is default checked
  • "cppclassgenerator.defaultDebug" used to choose if the box "generate debug messages" is default checked

Contributing

PR are welcome on Github to propose an improvement

About

A VScode extension to automate the generation of C++ classes in orthodox canonical form for 42's projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published