Welcome to xMule: A P2P Client derived from eMule BerliOS Developer LogoSourceForge.net Logo


Links
- Visit the Forums!
- SF.net Project Page
- xMule Screenshots

Modules
· Home
· Content
· Downloads
· Recommend Us
· Search
· Statistics
· Top
· Topics
· Your Account

Who's Online
There are currently, 2 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

 
Volunteer Volunteer: Help us document C++ headers!
Posted by HopeSeekr on Tuesday, June 22 @ 22:53:13 CDT
Contributed by HopeSeekr

One of the main necessities in order to have a maintainable application the size of xMule is minimal module interdependency. And xMule (like its parent, eMule, and child, aMule) is *severely* coupled. Help solve this problem in a critical way by helping us document header inclusions.... The Process has already begun...

The only way we can even begin tackling the monster called Decoupling, we *must* figure out at a minimum why each header is needed wherever it is included in the application. Thus we turn relatively unfriendly header statements like #include "xmule.h" into the much more hospitable form of #include "xmule.h" // Needed for theApp This needs to be done for *every* #included file *every*where*. Fortunately it is easy and fun to do :-) Here is a real-world example using AddFileThread.cpp from CVS. Step 1: Comment out a #include statement. //#include "xmule.h" Step 2: Compile xMule. xmule/] $ make Step 3: Find out why the header is needed, if it is. Compiling AddFileThread.cpp... AddFileThread.cpp: In member function `virtual void* CAddFileThread::Entry()': AddFileThread.cpp:93: error: `theApp' undeclared (first use this function) Step 4: Log the first dependency. #include "xmule.h" // Needed for theApp Step 5: Make a patch and send to Ted. xmule/] $ cvs diff -u > AddFileThread.patch There only a few coding guidelines for this task:
  • Use // not /* */ for commenting headers.
  • Use *spaces* NOT tabs
  • Start the // at column 41, as this allows us to see the comment on a screen with resolution 1024 or better, and we can align the header comments.
  • A really nice editor, and one that all the developers of xMule use, is Vim and its GUI front-end GVim. If you choose to use this wonderful editor, my personal .vimrc is all you will need to be sure that you use spaces instead of tabs, and that vim behaves 'properly'. Simply put the vimrc as ~/.vimrc. Finally, look here to Learn vim in 15 minutes, a wonderful Quick Start Vim guide. As usual, I am available for your support in these and other endeavors either via IRC at #xmule on Undernet or via email at hopeseekr at xmule dot ws. Cheers,
    - hope

    Note: This task was completed by HopeSeekr


     
    Login
    Nickname

    Password

    Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

    Related Links
    · More about Volunteer
    · News by HopeSeekr


    Most read story about Volunteer:
    Help us reformat license statements!


    Article Rating
    Average Score: 1
    Votes: 1


    Please take a second and vote for this article:

    Excellent
    Very Good
    Good
    Regular
    Bad


    Options

     Printer Friendly Printer Friendly


    Associated Topics

    The Great Refactor

    "Help us document C++ headers!" | Login/Create an Account | 6 comments | Search Discussion
    The comments are owned by the poster. We aren't responsible for their content.

    No Comments Allowed for Anonymous, please register

    Re: Help us document C++ headers! (Score: 1, Informative)
    by Anonymous on Wednesday, June 23 @ 07:42:44 CDT
    Just to clarify, aMule is not xMule's child, it's more a brother. A child is smaller, and forks start with same size, sometimes grow larger.

    And aMule is much more decoupled than eMule, probably even more than xMule.


    Just to clarify :)





    PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL.
    PHP-Nuke comes with absolutely no warranty, for details, see the license.
    Page Generation: 0.07 Seconds