core/com.nokia.carbide.cpp.doc.user/html/tasks/AddingClasses.html
author fturovic <frank.turovich@nokia.com>
Tue, 20 Jul 2010 16:45:01 -0500
changeset 1648 0d551b392c77
parent 1207 e265bbe56eb0
permissions -rw-r--r--
updated Menu section of manual
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>
1207
e265bbe56eb0 merge 2.6 changes to 3.0 docs
fturovic <frank.turovich@nokia.com>
parents: 400
diff changeset
    19
	    The <b>New C++ Class</b> wizard appears.</p> 
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    20
	  </li> 
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
	    <p>
1207
e265bbe56eb0 merge 2.6 changes to 3.0 docs
fturovic <frank.turovich@nokia.com>
parents: 400
diff changeset
    23
		   Specify the folder where the class should be created by typing the		    <b>Source Folder</b> name or by clicking <b>Browse</b> and
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    24
	    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
    25
		  
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    26
	     <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
    27
	  </li> 
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
	    <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    30
		   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
    31
			 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
    32
	    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
    33
	  </li> 
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
	    <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    36
	    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
    37
	  </li> 
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
	    <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    40
		   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
    41
		  
1207
e265bbe56eb0 merge 2.6 changes to 3.0 docs
fturovic <frank.turovich@nokia.com>
parents: 400
diff changeset
    42
	     <p align="center" class="Image"><img src="images/wnd_chooseBaseClass.png" width="309" height="565"></p>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    43
       <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
    44
      <ol type="a">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    45
      <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
    46
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    47
         <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
    48
		 <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
    49
            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
    50
         </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    51
         <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
    52
		 <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
    53
         </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    54
         <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
    55
      </ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    56
	  </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    57
     <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
    58
        <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
    59
			   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
    60
        <p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    61
	       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
    62
			   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
    63
			   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
    64
        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
    65
     <li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    66
	       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
    67
        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
    68
</ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    69
   </div>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    70
   <h5>Related tasks</h5>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    71
	   <ul>
1648
0d551b392c77 updated Menu section of manual
fturovic <frank.turovich@nokia.com>
parents: 1207
diff changeset
    72
         <li><a href="../reference/NewClassWizard.html">New C++ Class Wizard</a></li>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    73
   </ul>
1207
e265bbe56eb0 merge 2.6 changes to 3.0 docs
fturovic <frank.turovich@nokia.com>
parents: 400
diff changeset
    74
<div id="footer">Copyright &copy; 2010 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>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    75
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    76
   </body>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    77
   </html>
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    78