SFML community forums

Bindings - other languages => C => Topic started by: Flash on May 10, 2014, 10:28:38 am

Title: CSFML Documentation vs. SFML Documentation
Post by: Flash on May 10, 2014, 10:28:38 am
Hi,
I am trying to write a Common Lisp binding. As the CSFML function definitions are very regular, I intend to automate as much as possible. I'd like to also automatically generate the documentation string, by parsing it together with the function definition.
However, I have noticed, that the CSFML documentation is very abbreviated compared to the SFML documentation. As an example, here is the sfRenderWindow_create documentation:
////////////////////////////////////////////////////////////
/// \brief Construct a new render window
///
/// \param mode     Video mode to use
/// \param title    Title of the window
/// \param style    Window style
/// \param settings Creation settings (pass NULL to use default values)
///
////////////////////////////////////////////////////////////

The documentation for the appropriate constructor in SFML is
////////////////////////////////////////////////////////////
/// \brief Construct a new window
///
/// This constructor creates the window with the size and pixel
/// depth defined in \a mode. An optional style can be passed to
/// customize the look and behaviour of the window (borders,
/// title bar, resizable, closable, ...).
///
/// The fourth parameter is an optional structure specifying
/// advanced OpenGL context settings such as antialiasing,
/// depth-buffer bits, etc. You shouldn't care about these
/// parameters for a regular usage of the graphics module.
///
/// \param mode     Video mode to use (defines the width, height and depth of the rendering area of the window)
/// \param title    Title of the window
/// \param style    Window style
/// \param settings Additional settings for the underlying OpenGL context
///
////////////////////////////////////////////////////////////
 

It is similar for other functions, often you have to consult the original documentation to fully understand the function.
I would assume that it'd be easier to just copy&paste the original documentation for the CSFML binding, instead of writing an abbreviated documentation. So is there a reason for this?
Title: Re: CSFML Documentation vs. SFML Documentation
Post by: Laurent on May 10, 2014, 12:02:55 pm
There's no reason. Before releasing SFML 2 I improved the API documentation a lot, but never had the time to update CSFML (SFML.Net is a little more up-to-date in this regard).
Title: Re: CSFML Documentation vs. SFML Documentation
Post by: Flash on May 10, 2014, 12:21:45 pm
I see.
When I get to it, I can have a look at updating it. I don't want to promise anything, though, I should be working on other stuff anyway.  :P