Jump to content
  • Advertisement
Sign in to follow this  
GanonPhantom

Naming Conventions (files, namespaces, classes, ect...)

This topic is 3591 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My Engine is nearing the 10,000 line mark, and ive got a problem, i havnt really setup any naming conventions officially... Although its just been me working on the engine so far, I plan to release it as Open Source soon to get other developers in an on it. Ive setup naming conventions in my head, but i always seem to change them frequently. So have about 1/3 of the engine, with my starting naming conventions, another 1/3 with the naming conventions i used last month, and 1/3 that is the naming conventions i use now. I think im growing closer to having a final set of conventions that i like, but im stuck on: - file naming and directory structuring (virtual directories in MSVC++) - relating the directory structure with my namespaces (should i do this), such as if my threading is in a directory called parellel (which has my mutexes, semaphores, ect..), should i put the threading in a namespace called Parellel? (oh course, it is nested in my Engine namespace also :) ) - Class naming, (no "C" infront, i dont see the point in that) should i do all caps for the class? As of right now, i use the, g_ (global member), m_ (class member), and s_ (static member) for naming member variables. Any suggestions? Please share. GanonPhantom

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by GanonPhantom
- file naming and directory structuring (virtual directories in MSVC++)
A directory for all the public headers (required to work with your engine), and a directory per module.

Quote:
- relating the directory structure with my namespaces (should i do this), such as if my threading is in a directory called parellel (which has my mutexes, semaphores, ect..), should i put the threading in a namespace called Parellel? (oh course, it is nested in my Engine namespace also :) )

- Class naming, (no "C" infront, i dont see the point in that) should i do all caps for the class?
The standard library naming conventions (also used by boost) are fairly "standard". You may wish to use them.

Quote:
As of right now, i use the, g_ (global member), m_ (class member), and s_ (static member) for naming member variables.
Not much of a point either.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!