Sign in to follow this  
GanonPhantom

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

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this