Adding A New Code File To Project

From rootshell wiki

(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
-
* The project directory structure is as follows:[[File:Code_file.png|thumb]] <br/>
+
* The project directory structure is as follows:[[File:Code_file.png|400px|right]] <br/>
Code files must be in the "Classes" directory.<br/>
Code files must be in the "Classes" directory.<br/>
If the code belongs in a specific group, then it should be placed in a folder.<br/>
If the code belongs in a specific group, then it should be placed in a folder.<br/>

Revision as of 13:08, 3 May 2010

  • The name of the file should reflect the name of the main class of the file.


  • The project directory structure is as follows:
    Code file.png

Code files must be in the "Classes" directory.
If the code belongs in a specific group, then it should be placed in a folder.
If the code belongs to a specific version of the application then it should be placed in a folder with the name of the version.


  • The project group structure (the groups in Xcode) must be the same as the project's directory structure.


  • New files and folders must be added to SVN


  • New code files should contain a general description of the classes in it at the top of the .h file. The description should contain:

One or two sentences describing the tasks that the classes perform,
The name of the project that the file belongs to,
The date it was created and by whom,
The name and email of the authors and maintainers,
A list of the resources that the classes will use (such as image files and nib files),
Date of any update or changes to the classes and one sentence describing what was changed.

Here is a sample:

////////////////////////////////////////////////////////////////////////
//
//  File Name : MainMenuViewController.h
//  Description : The Main Menu for the quiz game application.
//
//  Author(s) & Maintainer : 
//			Soroush Khodaii <elrusho@yahoo.co.uk>
//	              
//  This file is a part of "Movie Buff" Project and could
//  be used / released / distributed under SuperMonko Studios license.
//
//  Created on 16/09/2009.
//
//	Related Resources:
//				MainMenuView.xib	(all other resources are used through the nib file.)
//				
//
//  Copyright 2009 & 2010 SuperMonko Studios. All rights reserved.
//
//	v1.1	3/2/2010	Re-did the whole interface, reduced buttons and changed navigation.
//
////////////////////////////////////////////////////////////////////////
Personal tools