Click to See Complete Forum and Search --> : What do you use to write code in?


stroll
06-09-2003, 04:14 AM
That's my question. I'm starting my adventure with c++, and my programs are getting bigger and bigger (not: better and better, unfortunately... :P), so I find it dificult to navigate through them. I tried having every major class in separate header, but that doesn't satisfy me. Currently I'm using emacs, and it' s really cool with code colorizing, and parenthesis completion, and formating stuff, but... I came across thing called hnb - Hierarchical Notebook. It stores data as xml tree, so you can shrink and expand branches. I've been wondering if there is any tool, that lets you use such feature (it'd help me a lot, to write a huge class, and then just shrink it, and so on with every function), but which would give me advantages of emacs, AND which would allow me to export and import .cpp and .h files? I'd write it myself if I were lots better ;).

Imagine not having:

#include <iostream.h>
#include <fstream.h>
#include <...>

class A{
...
};

class B{
...
};
class C:public A{
...
};

int main(){
...
};

but for example:
[+] //includes
[- ] //classes
[- ]class A
{
...
};
[+]class B
[+]class C: public A
[+] //functions

As for me - it would really do the trick...
And if there isn't such tool, which one would you recommend? (Except for e -vi-l one, unless you can direct me to comprehensive manual...)

Thanks in advance!
Stroll/Egy

siqe
06-09-2003, 05:58 AM
I've only seen the collapsable block thing in C# .NET's editor. You might already know this but one thing you can do with that example you gave is put your class declaration into .h files and your definitions into seperate .cpp files. then you can do a g++ -c classA.cpp. That will produce a file called classA.o which you can use like a library. When you go to compile main.cpp or whatever files need to call code from classA.cpp you just do g++ main.cpp classA.o and it will link the code in classA.o to the places in main.cpp where it is needed.

goon12
06-09-2003, 08:00 AM
Anjuta let's you collapse some of the code, and it has alot of other nice features. www.anjuta.org .


- goon12

DragonHead
06-09-2003, 11:45 AM
99% of the code I write/maintain is not on the box i'm sitting at. So those spiffy GUI things don't work for me.

I use good ol'e vi with a makefile :)

tecknophreak
06-09-2003, 12:58 PM
Kate collapses as well.

Goemon99
06-09-2003, 01:23 PM
FED (http://www.talula.demon.co.uk/fed/index.html) works pretty well :)