Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: include files  (Read 8391 times)

0 Members and 1 Guest are viewing this topic.

DrEvil

  • Newbie
  • *
  • Posts: 21
    • View Profile
include files
« on: November 27, 2007, 06:52:58 am »
Is it just me or are there some old dangling headers in the include folder? For example, Window.hpp under include differs from the one under src, and by including the one from include it results in compiler errors. Same applies to RenderWindow. It's confusing and prone to errors being set up like this. If the directory structure is going to imply the seperation of source and headers it needs to stick to it, and only have header versions of user usable classes in the header folder, unless you mean to keep 2 copies of these files in sync, which is too prone to errors to be practical.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
include files
« Reply #1 on: November 27, 2007, 07:36:08 am »
I already answered your PM, and I'm too lazy to answer again here for other people.

If you have a "public" question then please only ask in the forum.
If you have a private question then please only ask in PM.

There's no point asking everywhere.

Thanks ;)
Laurent Gomila - SFML developer

DrEvil

  • Newbie
  • *
  • Posts: 21
    • View Profile
include files
« Reply #2 on: November 27, 2007, 03:37:20 pm »
Yea sorry about that. I thought it was isolated to 1 file but when I noticed it in another I elevated it to a forum post. It doesn't make much sense that you'd maintain 2 copies of headers, but whatever, now that I know the intent I can work around it and sync them myself.

dnperfors

  • Newbie
  • *
  • Posts: 7
    • View Profile
include files
« Reply #3 on: November 29, 2007, 12:36:42 pm »
Could you please tell the public what the reason is for having two different header files? I would like to know the answer too... :)

Another thing I like to know is why are you using the extension .hpp instead of .h. .hpp seams like Pre Processor Header...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
include files
« Reply #4 on: November 29, 2007, 02:21:49 pm »
Quote
Could you please tell the public what the reason is for having two different header files? I would like to know the answer too...

The src folder contains every header, whereas the include one contains only the public header files. And I don't want to have public ones in one place and private ones in another place, so I just keep everything in the src forlder and update the include one when I want to make a new release. If you want to use the sources from SVN just forget about the include folder and use the src one.

Quote
Another thing I like to know is why are you using the extension .hpp instead of .h. .hpp seams like Pre Processor Header...

To me it's quite obvious : cpp/hpp for C++ and h/c for C. A lot of people still use h in C++ because the extension doesn't really matter, but I find hpp more natural. It's like it's saying "yep, this library is true C++" ;)
Laurent Gomila - SFML developer

dnperfors

  • Newbie
  • *
  • Posts: 7
    • View Profile
include files
« Reply #5 on: November 29, 2007, 02:50:48 pm »
That makes sense... Although when you are using a nice IDE it shouldn't be a problem to have the headers in a different place. But everybody is doing it the way they like it. (I put all my headers in the include dir instead of the source).

The .hpp is an extension I don't like at all, but that is my personal taste :) But when I want to use this lib (not sure if I am able to use it for something :)) I have to live with it (or write a little script which changes all the names :P)

BTW. it is very nice to see a library like SDL which is completely OOP :)

 

anything