BigBahss / vscode-cmantic

C/C++ code generation for VS Code: Generate Definitions, Getters, Setters, and much more.
https://bigbahss.github.io/vscode-cmantic/
MIT License
82 stars 9 forks source link

Generate Stream Output Operator #23

Closed BigBahss closed 3 years ago

BigBahss commented 3 years ago

Adds a command/code-action Generate Stream Output Operator, accessible through the Refactor... menu within a class or struct. Generates a friend operator<< that outputs to an ostream. Prompts the user to select base classes and member variables to output to the ostream. Works very similar to Generate Equality Operators.

Additionally, if ostream or iostream is not directly included in the file, then #include <ostream> will be added to the file.