I'm working on adding support for Cosa on embedXcode
How possible to use the .h
extension for headers and remove the leading Cosa/
Hi! I would have appreciated this as an issue on github as that allows better support but let us take it here this time. The usage of .hh suffix for C++ header files is in no way my invention. Using the "correct" file suffix allows better integration with standard open-source tools. What does the GCC manual say about C++ extensions?
C++ source files conventionally use one of the suffixes .C, .cc, .cpp, .CPP, .c++, .cp, or .cxx; C++ header files often use .hh or .H; and preprocessed C++ files use the suffix .ii. GCC recognizes files with these names and compiles them as C++ programs even if you call the compiler the same way as for compiling C programs (usually with the name gcc). http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Invoking-G_002b_002b.html
The C++ mode in GNU Emacs is automatically invoked for files with the suffix .cpp and .hh. Emacs is what I use and it is still the fastest IDE in the world ;-)http://books.google.se/books?id=-RtYk55cqfgC&pg=PA322&dq=emacs+invokes+c%2B%2B+mode&hl=sv&sa=X&ei=KQo_U5izI-uX4wScqYDwAw&ved=0CDQQ6AEwAA#v=onepage&q=emacs%20invokes%20c%2B%2B%20mode&f=false
Removing the Cosa prefix will not help as the header/source is highly organized in several levels of sub-directories. A flat organization is a very poor design. The structuring is there for a very specific purpose. Java, Cocoa, AVR, X11, Boost, etc, etc, all use a very similar structure.
Both these issues should be possible to configure in Xcode. This is not a problem in other IDEs (UEIDE, Eclipse, etc). I will see what I can find in the Xcode manual.
Code sense for Cosa/Pins.hh can actual be due to the fact that this file contains several classes. This is "legacy" and should instead be several files for each of the Cosa Pin classes. I have this on the "todo"-list.