Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: eranon on May 23, 2012, 03:14:31 pm

Title: Does C::B provides a facility to quickly add any function ?
Post by: eranon on May 23, 2012, 03:14:31 pm
Hello. Is there a tool (maybe a built-in one, but I don't find where) or plugin to quickly add a function/method of any type (public/protected/private, static, virtual) ? I mean avoiding to add it manually, by hand writing in the h/cpp pair file ? Well, taking a concrete example, how to easily add a static protected function, in C::B, to the app class ?
Title: Re: Does C::B provides a facility to quickly add any function ?
Post by: MortenMacFly on May 23, 2012, 07:45:48 pm
how to easily add a static protected function, in C::B, to the app class ?
The quickest way:
- Add the method declaration to the header file
- Select "switch header/source"
- Goto the place where you'd like to add the implementation,
- Select "insert all class methods w/o implementation"
- Done.
Title: Re: Does C::B provides a facility to quickly add any function ?
Post by: eranon on May 26, 2012, 08:27:02 pm
OK, I didn't thought about this "insert all class methods w/o implementation" command in context menu : nice :) Thanks Morten