core/com.nokia.carbide.cpp.doc.user/html/tasks/AddingClasses.html
author fturovic <frank.turovich@nokia.com>
Wed, 10 Feb 2010 11:47:22 -0600
branchRCL_2_4
changeset 917 e698bb75bbab
parent 400 9b005a8e6778
child 987 77469bd2d10b
child 1207 e265bbe56eb0
permissions -rw-r--r--
updated creating new projects example
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     2
<title>Adding Classes in Tasks</title>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     3
<link rel="StyleSheet" href="../../book.css" type="text/css"/>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     4
</head>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     5
   <body>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     6
   <h2>Adding Classes</h2>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     7
   
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     8
   <p>Use the <b>New Class</b> wizard to add a new C++ class to a project.   </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     9
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    10
   <div class="step">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    11
     <h4>To add a new C++ class</h4>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    12
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    13
   <ol><li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    14
     <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    15
	   Click <b>File &gt; New &gt; Class</b> from the menu bar, 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    16
		  or select <b>New &gt; Class</b> from the project&prime;s pop-up
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    17
	    menu where you want the new class to reside. </p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    18
     <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    19
	    The New C++ Class wizard then appears. 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    20
     </p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    21
	  </li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    22
	  <li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    23
	    <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    24
		   Specify the folder when the class should be created by typing the		    <b>Source Folder</b> name or by clicking <b>Browse</b> and
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    25
	    selecting the source folder. </p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    26
		  
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    27
	     <p align="center" class="Image"><img src="../images/newclasswiz.gif" alt="" width="500" height="568"  border="0" /></p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    28
	  </li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    29
	  <li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    30
	    <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    31
		   Select the <b>Namespace</b> checkbox, if you want to add
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    32
			 the class to a namespace. Click <b>Browse</b> to select an existing
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    33
	    namespace, or type the name of the new namespace. </p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    34
	  </li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    35
	  <li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    36
	    <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    37
	    In the <b>Class Name</b> field, type the name of the class. </p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    38
	  </li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    39
	  <li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    40
	    <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    41
		   Click <b>Add</b> to choose the <b>Base Classes</b> from which the class has to be derived</p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    42
		  
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    43
	     <p align="center" class="Image"><img src="../images/choosebaseclass.gif" alt="" width="306" height="565"  border="0" /></p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    44
       <p>To select a base type you are looking for, do the following: </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    45
      <ol type="a">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    46
      <li>Type the search string to locate the class, struct and other low-level types you are looking for</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    47
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    48
         <li>Select a Visible Type to narrow your search. <br />
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    49
		 <p>For example, if you are for looking for only classes then select the Class checkbox, etc. The Matching Types lists all the types matching the visible type and search string. The Qualifier lists the header file which contain the type
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    50
            declaration of all the type listed.</p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    51
         </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    52
         <li>Click Add to add the selected type to the Base Classes list. <br />
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    53
		 <p>By default, the types are added with Public access and without Virtual inheritance, although these settings can be changed. </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    54
         </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    55
         <li>Click OK when you have completed adding base classes, or click Cancel to cancel the action.</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    56
      </ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    57
	  </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    58
     <li>Once the Base Classes are added, you can click Remove to remove a selected class from the list. You can also click Up and Down after selecting a class  from the list to change the order in which the base classes are inherited. <p></p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    59
        <p>Select the Method Stubs you want the wizard to generate by selecting the appropriate checkbox. By default, both Constructor and Destructor are selected. By
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    60
			   default, the constructor is added with public access, and as non-virtual and non-inline, and the destructor is added as public, virtual, and not inline. </p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    61
        <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    62
	       Select the Use Default checkbox to create the C++
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    63
			   class in new header and source files with default names. Otherwise, deselect
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    64
			   the Use Default checkbox, and enter the Header and Source file names. Click Browse to select the Header and Source files, if you want to
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    65
        add the class declaration and definition to existing files. </p> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    66
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    67
     <li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    68
	       Click Finish to create a C++ class according to the
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    69
        specification, or click Cancel to cancel the task.</li> 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    70
</ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    71
   </div>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    72
   <h5>Related tasks</h5>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    73
	   <ul>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    74
         <li><a href="../reference/NewClassWizard.html">New C++ Classs Wizard</a></li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    75
   </ul>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    76
<div id="footer">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    77
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    78
   </body>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    79
   </html>
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    80