News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to change getters and setters format

Started by rixxy, September 13, 2014, 10:09:59 PM

Previous topic - Next topic

rixxy

Hello all! I am new to this forum and am new to Code::Blocks, but am experienced using C++.
I am just trying to get C::B configured the way I want it and am having a small issue. When I create a new class using the wizard, it works well; I can add member variables right from the wizard which is sweet. And I can even get auto-generated getters and setters. My only issue is that I want to change the format of the generated getters and setters. As it stands, the getters and setters appear like: Getname() and Setname(). I, however, would like them to be camelCase eg: getName() and setName(). I could just manually edit every one, but then that defeats the purpose of having generated method names.
Is there an option to change this? I am using Code::Blocks version 13.12 on Ubuntu 14.04.

Thanks!
-Rixxy

BlueHazzard

sorry but there is no such options.

patches welcome ;)

greetings

stahta01

Quote from: rixxy on September 13, 2014, 10:09:59 PM
.... As it stands, the getters and setters appear like: Getname() and Setname(). I, however, would like them to be camelCase eg: getName() and setName(). I could just manually edit every one, but then that defeats the purpose of having generated method names.
Is there an option to change this? ....

Thanks!
-Rixxy

I am guessing the this is done by a CB Script.
Did you try just right clicking on the wizard icon and try editing the script?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Alpha

Quote from: stahta01 on September 15, 2014, 02:27:14 AM
I am guessing the this is done by a CB Script.
Compiled plugin actually.
If you are building your C::B from source, it is a trivial change around lines 193-202 of plugins/classwizard/classwizarddlg.cpp .  (If you devise a more general purpose change, patches welcome.)