Author Topic: Does C::B provides a facility to quickly add any function ?  (Read 5013 times)

Offline eranon

  • Almost regular
  • **
  • Posts: 180
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 ?
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Does C::B provides a facility to quickly add any function ?
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: Does C::B provides a facility to quickly add any function ?
« Reply #2 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
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]