https://github.com/gabin221/classinitiator
ClassInitiator is a script designed to simplify the process of creating C++ class files with basic content. It takes one or more filenames as arguments and generates corresponding .cpp and .h files with predefined content suitable for class initialization.
https://github.com/gabin221/classinitiator
class-declaration class-initialization classinitiator constructor content-generation convenience cpp destructor generate-files private protected public script shell-script terminal
Last synced: 7 months ago
JSON representation
ClassInitiator is a script designed to simplify the process of creating C++ class files with basic content. It takes one or more filenames as arguments and generates corresponding .cpp and .h files with predefined content suitable for class initialization.
- Host: GitHub
- URL: https://github.com/gabin221/classinitiator
- Owner: Gabin221
- Created: 2024-03-09T10:16:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T23:41:06.000Z (11 months ago)
- Last Synced: 2025-04-13T18:55:29.032Z (10 months ago)
- Topics: class-declaration, class-initialization, classinitiator, constructor, content-generation, convenience, cpp, destructor, generate-files, private, protected, public, script, shell-script, terminal
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ClassInitiator
This script takes one or more filenames as arguments, generates a **.cpp** and **.h** file with that name, and writes some basic content into them. The content written into the **.cpp** file includes an include directive for the corresponding **.h** file, along with a basic class constructor and destructor. The **.h** file contains a class declaration with private, protected, and public sections, along with declarations for the constructor and destructor.
To use this script, run it with the desired filename as an argument, like so:
```shell
./classinitiator.sh myclassname
```
This will generate **myclassname.cpp** and **myclassname.h** files with the appropriate content.
Additionally, to use this script from anywhere, you can create a **bin** directory in your home directory (**~**), move the script there, and reload your session. This way, the script will be executable from any location within your user environment.