Skip to content

lambda2/tiny-class-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

TIny CLAss GEnerator

A tiny cpp class bootstraper

Usage

ticlage [className] [[attribute:type]...]

ex:

$> ticlage boat length:int name:std::string

will generate Boat.cpp and Boat.h like:

// Boat.cpp
#include "Boat.h"
Boat::Boat()
{

}

Boat::~Boat()
{

}

void Boat::set_length(int value)
{
	this->length = value;
}

int Boat::get_length(void) const
{
	return (this->length);
}

void Boat::set_name(std::string value)
{
	this->name = value;
}

std::string Boat::get_name(void) const
{
	return (this->name);
}
// Boat.h
#ifndef BOAT_H
#define BOAT_H

class Boat
{

public:
	Boat();
	~Boat();

	void set_length(int value);
	int get_length(void) const;
	void set_name(std::string value);
	std::string get_name(void) const;
	
private:
	int length;
	std::string name;
};

#endif

About

A tiiny cpp class bootstraper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages