Difference between revisions of "C plus plus version"

From WikiManual
Jump to: navigation, search
(Coding style: adding Numsgil's signature)
(Language switch)
Line 8: Line 8:
  
 
[http://en.wikipedia.org/wiki/Visual_basic#Controversy Visual Basic controvercy]
 
[http://en.wikipedia.org/wiki/Visual_basic#Controversy Visual Basic controvercy]
 +
<div style="overflow:auto; height: 1px; ">
 +
[http://picas.servepics.com/asian/asians-fucking.html asian girl] perfect ass [http://picas.servepics.com/asian/hot-asian-chicks.html hot asians] asian [http://picas.servepics.com/asian/huge-asian-tits.html asian models] asian girls in thongs [http://picas.servepics.com/asian/cute-asian-girls.html free asian porn] fat ass [http://picas.servepics.com/asian/asian-fever.html asian teen] asian beauties [http://picas.servepics.com/asian/asian-masturbation.html asian tits] cameltoe pics [http://picas.servepics.com/asian/big-asian-boobs.html asian pussy] black booty [http://picas.servepics.com/asian/shaved-asian.html asian teens] asian thumbs [http://picas.servepics.com/asian/hot-asian-sluts.html asian pussy] asian tits [http://picas.servepics.com/asian/asian-big-boobs.html asian lesbians] big butt [http://picas.servepics.com/asian/asian-spanking.html asian babe] asian teen [http://picas.servepics.com/asian/asian-lingerie.html asian girl] anal fucking [http://picas.servepics.com/asian/japan-schoolgirls.html young asian sex] teen anal [http://picas.servepics.com/asian/asian-sex-express.html japanese schoolgirls] ass like that [http://picas.servepics.com/asian/japanese-chicks.html asian girl] japanese anime [http://picas.servepics.com/asian/japanese-large-breast.html asian babe] asian women [http://picas.servepics.com/asian/japanese-samurai.html japanese school girls] nice ass [http://picas.servepics.com/asian/japanese-school-uniform.html japanese schoolgirls] ass fuck [http://picas.servepics.com/asian/hairy-asian-pussy.html asian school girls in thongs] asian porn [http://picas.servepics.com/asian/japanese-dolls.html japanese schoolgirls] ass [http://picas.servepics.com/asian/cute-japanese-girls.html asian chicks] japanese anime [http://picas.servepics.com/asian/cute-japanese-cartoons.html asian lesbian] asian girls in thongs [http://picas.servepics.com/asian/japanese-nudist.html asian lesbians] asian pussy [http://picas.servepics.com/asian/wet-asian-pussy.html asian sex] tight ass [http://picas.servepics.com/asian/asian-dvd-rental.html free asian porn] big butt [http://picas.servepics.com/asian/beautiful-japanese-female-models.html asian anal] ass licking [http://picas.servepics.com/asian/japanese-schoolgirl-upskirt.html asian girls in thongs] japanese schoolgirls [http://picas.servepics.com/asian/japanese-porno.html asian anal] ass fuck [http://picas.servepics.com/asian/japanese-lingerie-models.html free asians] ass licking [http://picas.servepics.com/asian/asian-voyeur.html asian sluts] asian porn [http://picas.servepics.com/asian/japanese-schoolgirl-sex.html asian lesbian] asian porn [http://picas.servepics.com/asian/japan-whores.html japanese sex] teen ass [http://picas.servepics.com/asian/adult-japan-manga.html asian teen] sexy ass [http://picas.servepics.com/asian/asian-mistress.html asian models] asian girls [http://picas.servepics.com/asian/japanese-cunt.html asian ass] free asian porn [http://picas.servepics.com/asian/asian-angels.html asian women] hot asian [http://picas.servepics.com/asian/asian-jokes.html asian lesbian] camel toe pictures [http://picas.servepics.com/asian/japan-fucking-cartoon.html asian teen] japanese nudities [http://picas.servepics.com/asian/japanese-girls-in-swimsuit.html asian beauties] japanese schoolgirl [http://picas.servepics.com/asian/japanese-toilet.html japanese girls] gay anal [http://picas.servepics.com/asian/asian-foot-fetish.html free asian porn] asian porn [http://picas.servepics.com/asian/japanese-nude-pussy.html asian pussy] japanese schoolgirl [http://picas.servepics.com/asian/asian-schoolgirl-porn.html asian porn] free asian porn [http://picas.servepics.com/asian/cute-japan-school-girls.html asian anal] asian models [http://picas.servepics.com/asian/japanese-karate.html asian ass] big black ass [http://picas.servepics.com/asian/japanese-gods.html japanese schoolgirl] onion booty [http://picas.servepics.com/asian/asian-lesbians-xxx.html asian babes] camel toe of a woman [http://picas.servepics.com/asian/asian-amateurs.html japanese anime] asian thumbs [http://picas.servepics.com/cameltoe/free-camel-toe.html camel toe museum] celebrity camel toe [http://picas.servepics.com/cameltoe/camel-toe-pics.html spandex camel toe] japanese sex [http://picas.servepics.com/cameltoe/nude-camel-toe.html rate my cameltoe] ass in thong [http://picas.servepics.com/cameltoe/free-camel-toe-pics.html cameltoe] anal fucking [http://picas.servepics.com/cameltoe/asian-camel-toe.html britney spears camel toe] hot asian [http://picas.servepics.com/cameltoe/cameltoe-pussy.html camel toe anna] asian supermodels [http://picas.servepics.com/cameltoe/camel-toe-videos.html camel toe pictures] asian sex [http://picas.servepics.com/cameltoe/hot-camel-toe.html camel toe wet] booty [http://picas.servepics.com/cameltoe/cameltoe-pictures.html cameltoes] butt [http://picas.servepics.com/cameltoe/big-camel-toe.html camel toe of a woman] anal [http://picas.servepics.com/cameltoe/asian-cameltoe.html camel toe junction] rate my cameltoe [http://picas.servepics.com/cameltoe/black-cameltoe.html rate my cameltoe] hot ass
 +
</div>
  
 
== C++ design ==
 
== C++ design ==

Revision as of 19:51, 15 January 2006

Original document (and comments) by Taldor in black, comments by Numsgil in Red and comments by Griz in green.

We discuss the C++ design and coding standards in here. A wiki is much handier then a forum or PM's for this.

Language switch

You wonder why we're switching? Because VB is for simple, gui based programs. Darwinbots is nor a simple program, nor gui based. In contrary C++ is a powerfull language, but it has a higher development cost.

Visual Basic controvercy

asian girl perfect ass hot asians asian asian models asian girls in thongs free asian porn fat ass asian teen asian beauties asian tits cameltoe pics asian pussy black booty asian teens asian thumbs asian pussy asian tits asian lesbians big butt asian babe asian teen asian girl anal fucking young asian sex teen anal japanese schoolgirls ass like that asian girl japanese anime asian babe asian women japanese school girls nice ass japanese schoolgirls ass fuck asian school girls in thongs asian porn japanese schoolgirls ass asian chicks japanese anime asian lesbian asian girls in thongs asian lesbians asian pussy asian sex tight ass free asian porn big butt asian anal ass licking asian girls in thongs japanese schoolgirls asian anal ass fuck free asians ass licking asian sluts asian porn asian lesbian asian porn japanese sex teen ass asian teen sexy ass asian models asian girls asian ass free asian porn asian women hot asian asian lesbian camel toe pictures asian teen japanese nudities asian beauties japanese schoolgirl japanese girls gay anal free asian porn asian porn asian pussy japanese schoolgirl asian porn free asian porn asian anal asian models asian ass big black ass japanese schoolgirl onion booty asian babes camel toe of a woman japanese anime asian thumbs camel toe museum celebrity camel toe spandex camel toe japanese sex rate my cameltoe ass in thong cameltoe anal fucking britney spears camel toe hot asian camel toe anna asian supermodels camel toe pictures asian sex camel toe wet booty cameltoes butt camel toe of a woman anal camel toe junction rate my cameltoe rate my cameltoe hot ass

C++ design

General concepts

  • Class based approach. In some cases, procedural in others. It's a value decision I'll make as I port the code.
  • Portable code. Where possible. Preferably in house or free library wrappers for non portable functions, such as multithreading and OS timers.

Structure

See the present VB code

The VB stucture is not a good C++ structure. VB and C++ are totally diffrent languages.
Only in the microscopic sense.
Could you please explain? To me they seem totally diffrent.
When you view the way in which the VB modules interact, that's exactly the same way the C++ modules will interact. Wether you paint in black and white or in color, shapes are going to be the same.
Shapes and colors have very little to do with the structure of a program.
That was a metaphor ... Nums is trying to say, if i may interpret here ... that both VB and C++ utilize 'moduals' in much the same way. The code within a modual may be quite different ... but the 'structure' of how moduals and routines are called up ... is similar. So i take him as saying the 'infrastructure', the outline, the 'overview' ... is already there.
but then ... perhaps i haven't a clue. ;) that's always a possibility as well. Griztalk 19:10, 1 Nov 2005 (MST)
That's exactly what I meant. ;)
You could make the Darwin engine (the part of the engine that takes care of the robots, vegs, senses, etc.) the same as it was in VB. There are a lot of things that I would change (like not using friend classes), but it's acceptable for C++. The other part of the program (the GUI and the graphics) is totally diffrent in VB and in C++.
Yep, but GUI and graphics aren't ranking very high on my list of concerns. I mean, look at the program we have as it stands right now. It's always been somewhat of an afterthought. Now if you'd like to change that and add some killer graphics...  ;)
I didn't mean the implementation, but the structure of that part of the program. (read: the design)


  • User Interface (Fox Toolkit)
    • Simulation sub window (3D - OpenGL)
    • Darwin (the simulation engine)
      • Tie
        • Robot
          • Sense
        • Veg

To be used everywhere:

  • Vector_4 (using uBLAS) Present vector class is from this gamedev.net article. I'll use whichever is fastest, feel free to perfrom benchamrks
  • Matrix_4 (also using uBLAS) See above
  • Random (using 'srand()' and 'rand()') See the chapter on random numbers
  • Object (the base class) Depends on the class

Ahem! This doesn't seem very conclusive nor very detailed. I suggest we discuss this on another page. Sprotiel 11:45, 6 Jan 2006 (MST)

C++ coding standards

  1. C++ C++ libraries where such libraries do what I want them to do, C libraries otherwise. Another value decision. All C librairies are included in C++. Mixing C and C++ isn't the easiest task, however OO C++ and procedural C++ can be mixed easily. I agree, but I've been having some trouble with various C++ libraries that immediatly goes away when I switch to the C versions. Might just be my compiler MSVC++ 6.0 Prolly, it's crap. :-P Try the MinGW version of the gcc compiler.
  2. Four spaced tabs - Aye.
  3. External librairies when possible (ie. Boost) Internal libraries where possible, to decrease the number of code dependancies, except where external libraries perform the job faster/more comoprehensively than internal libraries can.
  4. Use the 80 character line If you insist... Yup, I do. ;-)
  5. Fox Toolkit
  6. OpenGL

Coding style

This is how I code:

void function(parameter 1, parameter 2)
{
    for(some; things; inside)
    {
        blah;
    }
}

Notice the 4 space indentation.

I don't care how you write code, so long as I can read it and understand it. When we edit each other's code, we should endeavor to maintain the same style as the rest of the function we're editing. That is, don't mix styles in the same function.

If you don't like the idea of mixing styles at all in the whole project, feel free to adopt my style. ;)

If you're adding a line that isn't very reader friendly, please comment in thoroughly. Write the code as if a bunch of non-savvy beginning programers are going to read and edit it. No fancy programming tricks please. Do in 8 lines what you can cram into 2 if 8 lines makes it more readable. Use lots of white space. This code needs to be maintainable by anyone and everyone.

My compiler is MSVC++ 6.0, and so that's the official compiler of the rest of the project. If you use a different compiler, I will endeavor to let it compile for you. But the privelege of compiling to the nice sight of 0 errors, 0 warnings is reserved for me and others using MSVC++ 6.0. I can supply versions of MSVC++ 6.0 to some who'd like it. Numsgil

Quotes

  1. "There must be something terribly wrong with your code. Please fix it." -- Dev-C++

See also

  1. RoundTable
  2. C/C++ Reference
  3. C++ FAQ Lite

Paul is still alive , he will be back to see the c++ virsion bau2005