# HG changeset patch # User stechong # Date 1279732308 18000 # Node ID 03f5f8bf29b48a531abfc5f73559bf83da2dfa58 # Parent d1edeecb12af5f78697ec19c6b798d03aa5bf8c4# Parent e17ab99b8f30318f1ecc7137469ef3b9ee907d89 Merge from default. diff -r d1edeecb12af -r 03f5f8bf29b4 .branch.txt --- a/.branch.txt Wed Jul 21 11:37:56 2010 -0500 +++ b/.branch.txt Wed Jul 21 12:11:48 2010 -0500 @@ -1,1 +1,1 @@ -Mon May 24 15:37:50 CDT 2010 +Mon May 24 15:38:04 CDT 2010 diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt --- a/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt Wed Jul 21 11:37:56 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt Wed Jul 21 12:11:48 2010 -0500 @@ -8,6 +8,14 @@ Regression for bug 9091. Don't report info lines with SBSv2 error checker Could not write toolcheck cache: [Errno 2] No such file or directory: u'R:\\\\epoc32\\build\\toolcheck_cache__armv5_udeb.tmp' +tool 'SBS_JAVATC' from config 'none' did not return version 'version \"1\.[5-9]' as required. +Command 'D:/sources/trk/tcf/tcftrk/group/[undefined] -version' returned: +(this line excised to avoid false positive) + +Check your environment and configuration. + + + Executing 'make -r -f "J:/epoc32/build/Cone/makefile.default" -j 4 DESCRAMBLE="C:/Symbian/SITK/sbs/bin/sbs_descramble.exe sbs2631027042"' diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.regression.xml --- a/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.regression.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.regression.xml Wed Jul 21 12:11:48 2010 -0500 @@ -1,6 +1,8 @@ + + - + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Wed Jul 21 11:37:56 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Wed Jul 21 12:11:48 2010 -0500 @@ -217,14 +217,28 @@ BldInfViewPathHelper helper = new BldInfViewPathHelper(data, context); for (IExtension extension : data.getExtensions()) { IPath extensionMakefileBase = helper.convertExtensionTemplateToFilesystem(extension.getTemplatePath()); - normalFiles.add(extensionMakefileBase.addFileExtension("mk")); //$NON-NLS-1$ + IPath makefile = getControllingFile(extensionMakefileBase); + normalFiles.add(makefile); } for (IExtension extension : data.getTestExtensions()) { IPath extensionMakefileBase = helper.convertExtensionTemplateToFilesystem(extension.getTemplatePath()); - testFiles.add(extensionMakefileBase.addFileExtension("mk")); //$NON-NLS-1$ + IPath makefile = getControllingFile(extensionMakefileBase); + testFiles.add(makefile); } return null; } + + private IPath getControllingFile( + IPath extensionMakefileBase) { + IPath candidate = extensionMakefileBase.addFileExtension("mk"); //$NON-NLS-1$ + if (candidate.toFile().exists()) + return candidate; + if ("export".equals(extensionMakefileBase.getFileExtension())) //$NON-NLS-1$ + candidate = extensionMakefileBase.removeFileExtension().addFileExtension("flm"); //$NON-NLS-1$ + else + candidate = extensionMakefileBase.addFileExtension("flm"); //$NON-NLS-1$ + return candidate; + } }); monitor.worked(1); @@ -1128,7 +1142,7 @@ // get the bitmaps List bmps = mmpData.getBitmaps(); for (IMMPBitmap bmp : bmps) { - IPath mbmPath = bmp.getTargetFilePath().makeRelative(); + IPath mbmPath = bmp.getTargetFilePath().makeAbsolute(); // if there's no target path then use the main target path if (mbmPath.segmentCount() == 1) { mbmPath = targetPath.append(mbmPath); diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java Wed Jul 21 11:37:56 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java Wed Jul 21 12:11:48 2010 -0500 @@ -1,10 +1,14 @@ package com.nokia.carbide.cdt.internal.builder; +import java.text.MessageFormat; + import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; +import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; + public class CarbideBuildManagerUtils { /** @@ -34,4 +38,9 @@ } } + public static String getBuildLabel(ICarbideBuildConfiguration buildConfig, String componentName) { + return MessageFormat.format("Building {0}: {1}", + buildConfig.getCarbideProject().getProject().getName(), + componentName != null ? componentName : buildConfig.getDisplayString()); + } } diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Wed Jul 21 11:37:56 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Wed Jul 21 12:11:48 2010 -0500 @@ -179,7 +179,7 @@ if (areWeManagingTheMakeFiles || buildConfig.getCarbideProject().isConcurrentBuildingEnabled()) { SubMonitor progress = SubMonitor.convert(monitor, 7); - progress.setTaskName("Building " + componentName); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName)); // run abld export or test export List args = new ArrayList(); @@ -310,7 +310,7 @@ } else { SubMonitor progress = SubMonitor.convert(monitor, 1); - progress.setTaskName("Building " + componentName); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName)); List argsList = new ArrayList(); if (isTest) { @@ -838,7 +838,7 @@ // because the dependency info is in the makefiles. SubMonitor progress = SubMonitor.convert(monitor, 3); - progress.setTaskName("Building " + buildConfig.getDisplayString()); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null)); if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) { return false; @@ -912,7 +912,7 @@ } SubMonitor progress = SubMonitor.convert(monitor, unitsOfWork); - progress.setTaskName("Building " + buildConfig.getDisplayString()); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null)); if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) { return false; @@ -1154,7 +1154,7 @@ // because the dependency info is in the makefiles. SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size()); - progress.setTaskName("Building " + buildConfig.getDisplayString()); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null)); if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) { return false; @@ -1247,7 +1247,7 @@ } SubMonitor progress = SubMonitor.convert(monitor, 4 + (normalMakMakePaths.size()*4) + (testMakMakePaths.size()*4)); - progress.setTaskName("Building " + buildConfig.getDisplayString()); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null)); if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) { return false; diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Wed Jul 21 11:37:56 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Wed Jul 21 12:11:48 2010 -0500 @@ -47,7 +47,7 @@ public boolean buildAllComponents(ICarbideBuildConfiguration buildConfig, List normalMakMakePaths, List testMakMakePaths, CarbideCommandLauncher launcher, IProgressMonitor monitor) { SubMonitor progress = SubMonitor.convert(monitor, 3); - progress.setTaskName("Building " + buildConfig.getDisplayString()); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null)); if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) { return false; @@ -113,7 +113,7 @@ } SubMonitor progress = SubMonitor.convert(monitor, 1); - progress.setTaskName("Building " + componentName); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName)); List argsList = new ArrayList(); argsList.add(COMPONENT_ARG); @@ -136,7 +136,7 @@ public boolean buildComponentSubset(ICarbideBuildConfiguration buildConfig, List normalMakMakePaths, List testMakMakePaths, CarbideCommandLauncher launcher, IProgressMonitor monitor) { SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size()); - progress.setTaskName("Building " + buildConfig.getDisplayString()); + progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null)); if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) { return false; diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java Wed Jul 21 11:37:56 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java Wed Jul 21 12:11:48 2010 -0500 @@ -21,12 +21,11 @@ import org.eclipse.cdt.core.ErrorParserManager; import org.eclipse.cdt.core.IMarkerGenerator; +import org.eclipse.core.runtime.Path; public class SBSv2ErrorParser extends CarbideBaseErrorParser { - private static final Pattern warningPattern = Pattern.compile("(.*)"); //$NON-NLS-1$ - private static final Pattern errorPattern = Pattern.compile("(.*)"); //$NON-NLS-1$ - private static final Pattern infoPattern = Pattern.compile("(.*)"); //$NON-NLS-1$ + private final Pattern msgPattern = Pattern.compile("(.*):(\\d*):(\\d*):(.*)"); //$NON-NLS-1$ public SBSv2ErrorParser() { } @@ -35,51 +34,50 @@ initialise(); - Matcher matcher = infoPattern.matcher(line); - if (matcher.matches()) { + if (line.startsWith("")) return true; // just ignore info messages - } - matcher = warningPattern.matcher(line); - if (matcher.matches()) { + + // full message detected + if (findMessage(errorParserManager, line, "", "", IMarkerGenerator.SEVERITY_ERROR_BUILD)) + return true; + if (findMessage(errorParserManager, line, "", "", IMarkerGenerator.SEVERITY_WARNING)) + return true; + + // some messages are split across multiple lines, so for now, at least show the first line (where , etc. are) + if (findMessage(errorParserManager, line, "", "", IMarkerGenerator.SEVERITY_ERROR_BUILD)) + return true; + if (findMessage(errorParserManager, line, "", "", IMarkerGenerator.SEVERITY_WARNING)) + return true; + + return false; + } + + protected boolean findMessage(ErrorParserManager errorParserManager, String line, + String startStrip, String endStrip, int severity) { + int idx = line.indexOf(startStrip); + int endIdx = line.indexOf(endStrip); + if (idx >= 0 && endIdx >= 0) { // strip the tags - String text = line.substring("".length(), line.length() - "".length()); //$NON-NLS-1$ //$NON-NLS-2$ + int descStart = idx + startStrip.length(); + int descEnd = line.length() - endStrip.length(); + + String text = line.substring(descStart, descEnd); if (setFirstColon(text)) { - if (setFileNameAndLineNumber(text)) { + if (setFileNameAndLineNumber(text) || setSBSv2FileNameAndLineNumber(text)) { setFile(errorParserManager); setDescription(text); - errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, IMarkerGenerator.SEVERITY_WARNING, null, externalFilePath); + errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, severity, null, externalFilePath); return true; } } msgFileName = ""; //$NON-NLS-1$ - msgDescription = matcher.group(1); + msgDescription = text; setFile(errorParserManager); - errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, IMarkerGenerator.SEVERITY_WARNING, null, externalFilePath); + errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, severity, null, externalFilePath); return true; } - - matcher = errorPattern.matcher(line); - if (matcher.matches()) { - // strip the tags - String text = line.substring("".length(), line.length() - "".length()); //$NON-NLS-1$ //$NON-NLS-2$ - if (setFirstColon(text)) { - if (setFileNameAndLineNumber(text)) { - setFile(errorParserManager); - setDescription(text); - errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, IMarkerGenerator.SEVERITY_ERROR_BUILD, null, externalFilePath); - return true; - } - } - msgFileName = ""; //$NON-NLS-1$ - msgDescription = matcher.group(1); - setFile(errorParserManager); - errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, IMarkerGenerator.SEVERITY_ERROR_BUILD, null, externalFilePath); - return true; - } - return false; } - public void setDescription(String line) { // Get the iDescription msgDescription = line.substring(msgFirstColon + 1).trim(); @@ -88,4 +86,21 @@ } } + protected boolean setSBSv2FileNameAndLineNumber(String line) { + // Get the first Substring, which must be in the form of + // "fileName:line number:postion" + String firstSubstr = line.substring(msgFirstColon + 1).trim(); + if (firstSubstr != null) { + Matcher matcher = msgPattern.matcher(firstSubstr); + if (matcher.matches()) { + msgFileName = matcher.group(1); + if (!Path.EMPTY.isValidPath(msgFileName)) { + return false; + } + msgLineNumber = Integer.parseInt(matcher.group(2)); + return true; + } + } + return false; + } } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java --- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java Wed Jul 21 12:11:48 2010 -0500 @@ -353,4 +353,12 @@ } return loadStatus; } + + public boolean isRunning() { + return pccsConnection != null && pccsConnection.isOpen(); + } + + public String getId() { + return getClass().getName(); + } } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/messages.properties --- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/messages.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/messages.properties Wed Jul 21 12:11:48 2010 -0500 @@ -1,4 +1,4 @@ -Activator_Agent_Name=PC Suite Device Discovery Agent +Activator_Agent_Name=PC Suite Device Discovery Activator_PCCS_Location=http://www2.connecting.nokia.com/nmp/swp/pcsuite.nsf/document/ES336ZAHVY?OpenDocument Activator_PCSuite_Location=https://tools.ext.nokia.com/PCsuite ConnAPILibrary_PCCS_Not_Found_Error=Carbide could not find the PC Connectivity Solution (PCCS) installation. For more information go to: diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java --- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java Wed Jul 21 12:11:48 2010 -0500 @@ -1300,4 +1300,11 @@ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, PCCS_WRONG_VERSION, msg, null)); } } + + /** + * @return whether we have a valid handle + */ + public boolean isOpen() { + return dmHandle != APIHANDLE.INVALID_HANDLE_VALUE; + } } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/plugin.xml --- a/connectivity/com.nokia.carbide.remoteConnections.tests/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.tests/plugin.xml Wed Jul 21 12:11:48 2010 -0500 @@ -26,26 +26,6 @@ - - - - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java --- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java Wed Jul 21 12:11:48 2010 -0500 @@ -101,7 +101,7 @@ } } - private DiscoveryThread thread = new DiscoveryThread(); + private DiscoveryThread thread; public URL getInformation() { return null; @@ -131,20 +131,33 @@ } public void start() throws CoreException { - if (TestFilter.isTest) + if (TestFilter.isTest) { + thread = new DiscoveryThread(); thread.start(); + } } public void stop() throws CoreException { - thread.stopRunning(); + if (TestFilter.isTest) { + thread.stopRunning(); + thread = null; + } } public String getDisplayName() { - return "Random Test Discovery Agent"; + return "Random Test Discovery"; } public IPrerequisiteStatus getPrerequisiteStatus() { return (new RandomPrerequisiteStatus()); } + public boolean isRunning() { + return thread != null; + } + + public String getId() { + return getClass().getName(); + } + } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java --- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java Wed Jul 21 12:11:48 2010 -0500 @@ -35,9 +35,9 @@ import org.osgi.framework.Version; import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnection; import com.nokia.carbide.remoteconnections.interfaces.IService; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.cpp.internal.api.utils.core.ListenerList; public class RandomCycleConnectedService implements IConnectedService { diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java --- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java Wed Jul 21 12:11:48 2010 -0500 @@ -39,9 +39,9 @@ */ public class TestInstallerProvider implements IRemoteAgentInstallerProvider { - private static final Version S60_32 = new Version("3.2"); - private static final Version S60_50 = new Version("5.0"); - private static final Version UIQ_30 = new Version("3.0"); + private static final String S60_32 = "3.2"; + private static final String S60_50 = "5.0"; + private static final String UIQ_30 = "3.0"; private static final String S60 = "S60"; private static final String UIQ = "UIQ"; private static final String INSTALLER_CONTENTS = "This is a mock installer package."; @@ -55,9 +55,9 @@ private static class TestInstaller implements IRemoteAgentInstaller { private final String family; - private final Version version; + private final String version; - public TestInstaller(String family, Version version) { + public TestInstaller(String family, String version) { this.family = family; this.version = version; } @@ -66,7 +66,7 @@ return family; } - public Version getVersion() { + public String getVersion() { return version; } @@ -143,18 +143,18 @@ return new ArrayList(Arrays.asList(familyNames)); } - public List getVersions(String familyName) { + public List getVersions(String familyName) { if (familyName.equals(S60)) { - Version[] versions = { S60_32, S60_50 }; - return new ArrayList(Arrays.asList(versions)); + String[] versions = { S60_32, S60_50 }; + return new ArrayList(Arrays.asList(versions)); } else if (familyName.equals(UIQ)) return Collections.singletonList(UIQ_30); - return Collections.EMPTY_LIST; + return Collections.emptyList(); } - public List getRemoteAgentInstallers(String familyName, Version version) { + public List getRemoteAgentInstallers(String familyName, String version) { if (familyName.equals(S60)) { if (version.equals(S60_32)) return Collections.singletonList(installers[0]); @@ -164,7 +164,7 @@ else if (familyName.equals(UIQ) && version.equals(UIQ_30)) return Collections.singletonList(installers[2]); - return Collections.EMPTY_LIST; + return Collections.emptyList(); } private static void getMockData(IProgressMonitor monitor) throws InterruptedException { diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java --- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java Wed Jul 21 12:11:48 2010 -0500 @@ -18,16 +18,22 @@ package com.nokia.carbide.remoteconnections.tests.extensions; -import com.nokia.carbide.remoteconnections.interfaces.*; -import com.nokia.carbide.trk.support.connection.TCPIPConnectionFactory; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.Collections; +import java.util.List; +import java.util.Map; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.swt.graphics.Image; import org.osgi.framework.Version; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.*; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnection; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IService; +import com.nokia.carbide.remoteconnections.interfaces.IService2; +import com.nokia.carbide.trk.support.connection.TCPIPConnectionFactory; @SuppressWarnings("restriction") public class UnknownStatusService implements IService2 { @@ -111,15 +117,15 @@ return Collections.singletonList(S60); } - public List getVersions(String familyName) { + public List getVersions(String familyName) { if (familyName.equals(S60)) - return Collections.singletonList(new Version(_5_0)); + return Collections.singletonList(_5_0); return null; } - public List getRemoteAgentInstallers(String familyName, Version version) { - if (familyName.equals(S60) && version.equals(new Version(_5_0))) { + public List getRemoteAgentInstallers(String familyName, String version) { + if (familyName.equals(S60) && version.equals(_5_0)) { IRemoteAgentInstaller installer = new IRemoteAgentInstaller() { public boolean fileSupportsInstall() { @@ -183,6 +189,7 @@ return false; } + @SuppressWarnings("rawtypes") public Object getAdapter(Class adapter) { return null; } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/plugin.properties --- a/connectivity/com.nokia.carbide.remoteConnections/plugin.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/plugin.properties Wed Jul 21 12:11:48 2010 -0500 @@ -5,4 +5,4 @@ providerName = www.example.org OnDevice.label=On-Device Connections... Import.desc=Import previously exported remote connections into this workspace -Export.desc=Export remote connections from this workspace to the local file system \ No newline at end of file +Export.desc=Export remote connections from this workspace to the local file system diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/plugin.xml --- a/connectivity/com.nokia.carbide.remoteConnections/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/plugin.xml Wed Jul 21 12:11:48 2010 -0500 @@ -62,20 +62,6 @@ - - - - - - + * + * @return a new object of class 'SDK Family Type'. + * @generated + */ + SDKFamilyType createSDKFamilyType(); + + /** + * Returns a new object of class 'SDK Version Type'. + * + * + * @return a new object of class 'SDK Version Type'. + * @generated + */ + SDKVersionType createSDKVersionType(); + + /** * Returns the package supported by this factory. * * diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java Wed Jul 21 12:11:48 2010 -0500 @@ -125,13 +125,31 @@ int PACKAGES_TYPE = 1; /** + * The feature id for the 'SDK Family' containment reference. + * + * + * @generated + * @ordered + */ + int PACKAGES_TYPE__SDK_FAMILY = 0; + + /** + * The feature id for the 'SDK Version' containment reference. + * + * + * @generated + * @ordered + */ + int PACKAGES_TYPE__SDK_VERSION = 1; + + /** * The feature id for the 'Package' containment reference list. * * * @generated * @ordered */ - int PACKAGES_TYPE__PACKAGE = 0; + int PACKAGES_TYPE__PACKAGE = 2; /** * The number of structural features of the 'Packages Type' class. @@ -140,7 +158,7 @@ * @generated * @ordered */ - int PACKAGES_TYPE_FEATURE_COUNT = 1; + int PACKAGES_TYPE_FEATURE_COUNT = 3; /** * The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackageTypeImpl Package Type}' class. @@ -217,6 +235,63 @@ /** + * The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl SDK Family Type}' class. + * + * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKFamilyType() + * @generated + */ + int SDK_FAMILY_TYPE = 3; + + /** + * The feature id for the 'Order' attribute. + * + * + * @generated + * @ordered + */ + int SDK_FAMILY_TYPE__ORDER = 0; + + /** + * The number of structural features of the 'SDK Family Type' class. + * + * + * @generated + * @ordered + */ + int SDK_FAMILY_TYPE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl SDK Version Type}' class. + * + * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKVersionType() + * @generated + */ + int SDK_VERSION_TYPE = 4; + + /** + * The feature id for the 'Order' attribute. + * + * + * @generated + * @ordered + */ + int SDK_VERSION_TYPE__ORDER = 0; + + /** + * The number of structural features of the 'SDK Version Type' class. + * + * + * @generated + * @ordered + */ + int SDK_VERSION_TYPE_FEATURE_COUNT = 1; + + + /** * Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.DocumentRoot Document Root}'. * * @@ -281,6 +356,28 @@ EClass getPackagesType(); /** + * Returns the meta object for the containment reference '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}'. + * + * + * @return the meta object for the containment reference 'SDK Family'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily() + * @see #getPackagesType() + * @generated + */ + EReference getPackagesType_SDKFamily(); + + /** + * Returns the meta object for the containment reference '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}'. + * + * + * @return the meta object for the containment reference 'SDK Version'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion() + * @see #getPackagesType() + * @generated + */ + EReference getPackagesType_SDKVersion(); + + /** * Returns the meta object for the containment reference list '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getPackage Package}'. * * @@ -368,6 +465,48 @@ EAttribute getPackageType_SdkVersion(); /** + * Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType SDK Family Type}'. + * + * + * @return the meta object for class 'SDK Family Type'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType + * @generated + */ + EClass getSDKFamilyType(); + + /** + * Returns the meta object for the attribute '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}'. + * + * + * @return the meta object for the attribute 'Order'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder() + * @see #getSDKFamilyType() + * @generated + */ + EAttribute getSDKFamilyType_Order(); + + /** + * Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType SDK Version Type}'. + * + * + * @return the meta object for class 'SDK Version Type'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType + * @generated + */ + EClass getSDKVersionType(); + + /** + * Returns the meta object for the attribute '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}'. + * + * + * @return the meta object for the attribute 'Order'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder() + * @see #getSDKVersionType() + * @generated + */ + EAttribute getSDKVersionType_Order(); + + /** * Returns the factory that creates the instances of the model. * * @@ -442,6 +581,22 @@ EClass PACKAGES_TYPE = eINSTANCE.getPackagesType(); /** + * The meta object literal for the 'SDK Family' containment reference feature. + * + * + * @generated + */ + EReference PACKAGES_TYPE__SDK_FAMILY = eINSTANCE.getPackagesType_SDKFamily(); + + /** + * The meta object literal for the 'SDK Version' containment reference feature. + * + * + * @generated + */ + EReference PACKAGES_TYPE__SDK_VERSION = eINSTANCE.getPackagesType_SDKVersion(); + + /** * The meta object literal for the 'Package' containment reference list feature. * * @@ -507,6 +662,42 @@ */ EAttribute PACKAGE_TYPE__SDK_VERSION = eINSTANCE.getPackageType_SdkVersion(); + /** + * The meta object literal for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl SDK Family Type}' class. + * + * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKFamilyType() + * @generated + */ + EClass SDK_FAMILY_TYPE = eINSTANCE.getSDKFamilyType(); + + /** + * The meta object literal for the 'Order' attribute feature. + * + * + * @generated + */ + EAttribute SDK_FAMILY_TYPE__ORDER = eINSTANCE.getSDKFamilyType_Order(); + + /** + * The meta object literal for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl SDK Version Type}' class. + * + * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKVersionType() + * @generated + */ + EClass SDK_VERSION_TYPE = eINSTANCE.getSDKVersionType(); + + /** + * The meta object literal for the 'Order' attribute feature. + * + * + * @generated + */ + EAttribute SDK_VERSION_TYPE__ORDER = eINSTANCE.getSDKVersionType_Order(); + } } //InstallPackagesPackage diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java Wed Jul 21 12:11:48 2010 -0500 @@ -17,6 +17,8 @@ *

* The following features are supported: *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}
  • + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}
  • *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getPackage Package}
  • *
*

@@ -27,6 +29,60 @@ */ public interface PackagesType extends EObject { /** + * Returns the value of the 'SDK Family' containment reference. + * + *

+ * If the meaning of the 'SDK Family' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'SDK Family' containment reference. + * @see #setSDKFamily(SDKFamilyType) + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getPackagesType_SDKFamily() + * @model containment="true" + * extendedMetaData="kind='element' name='SDKFamily' namespace='##targetNamespace'" + * @generated + */ + SDKFamilyType getSDKFamily(); + + /** + * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}' containment reference. + * + * + * @param value the new value of the 'SDK Family' containment reference. + * @see #getSDKFamily() + * @generated + */ + void setSDKFamily(SDKFamilyType value); + + /** + * Returns the value of the 'SDK Version' containment reference. + * + *

+ * If the meaning of the 'SDK Version' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'SDK Version' containment reference. + * @see #setSDKVersion(SDKVersionType) + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getPackagesType_SDKVersion() + * @model containment="true" + * extendedMetaData="kind='element' name='SDKVersion' namespace='##targetNamespace'" + * @generated + */ + SDKVersionType getSDKVersion(); + + /** + * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}' containment reference. + * + * + * @param value the new value of the 'SDK Version' containment reference. + * @see #getSDKVersion() + * @generated + */ + void setSDKVersion(SDKVersionType value); + + /** * Returns the value of the 'Package' containment reference list. * The list contents are of type {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackageType}. * diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKFamilyType.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKFamilyType.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,55 @@ +/** + * + * + * + * $Id$ + */ +package com.nokia.carbide.installpackages.gen.InstallPackages; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'SDK Family Type'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}
  • + *
+ *

+ * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKFamilyType() + * @model extendedMetaData="name='SDKFamily_._type' kind='empty'" + * @generated + */ +public interface SDKFamilyType extends EObject { + /** + * Returns the value of the 'Order' attribute. + * + *

+ * If the meaning of the 'Order' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Order' attribute. + * @see #setOrder(String) + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKFamilyType_Order() + * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true" + * extendedMetaData="kind='attribute' name='order' namespace='##targetNamespace'" + * @generated + */ + String getOrder(); + + /** + * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}' attribute. + * + * + * @param value the new value of the 'Order' attribute. + * @see #getOrder() + * @generated + */ + void setOrder(String value); + +} // SDKFamilyType diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKVersionType.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKVersionType.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,55 @@ +/** + * + * + * + * $Id$ + */ +package com.nokia.carbide.installpackages.gen.InstallPackages; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'SDK Version Type'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}
  • + *
+ *

+ * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKVersionType() + * @model extendedMetaData="name='SDKVersion_._type' kind='empty'" + * @generated + */ +public interface SDKVersionType extends EObject { + /** + * Returns the value of the 'Order' attribute. + * + *

+ * If the meaning of the 'Order' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Order' attribute. + * @see #setOrder(String) + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKVersionType_Order() + * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true" + * extendedMetaData="kind='attribute' name='order' namespace='##targetNamespace'" + * @generated + */ + String getOrder(); + + /** + * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}' attribute. + * + * + * @param value the new value of the 'Order' attribute. + * @see #getOrder() + * @generated + */ + void setOrder(String value); + +} // SDKVersionType diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java Wed Jul 21 12:11:48 2010 -0500 @@ -9,6 +9,8 @@ import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage; import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EMap; diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java Wed Jul 21 12:11:48 2010 -0500 @@ -62,6 +62,8 @@ case InstallPackagesPackage.DOCUMENT_ROOT: return createDocumentRoot(); case InstallPackagesPackage.PACKAGES_TYPE: return createPackagesType(); case InstallPackagesPackage.PACKAGE_TYPE: return createPackageType(); + case InstallPackagesPackage.SDK_FAMILY_TYPE: return createSDKFamilyType(); + case InstallPackagesPackage.SDK_VERSION_TYPE: return createSDKVersionType(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -102,6 +104,26 @@ * * @generated */ + public SDKFamilyType createSDKFamilyType() { + SDKFamilyTypeImpl sdkFamilyType = new SDKFamilyTypeImpl(); + return sdkFamilyType; + } + + /** + * + * + * @generated + */ + public SDKVersionType createSDKVersionType() { + SDKVersionTypeImpl sdkVersionType = new SDKVersionTypeImpl(); + return sdkVersionType; + } + + /** + * + * + * @generated + */ public InstallPackagesPackage getInstallPackagesPackage() { return (InstallPackagesPackage)getEPackage(); } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java Wed Jul 21 12:11:48 2010 -0500 @@ -11,6 +11,8 @@ import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; @@ -49,6 +51,20 @@ private EClass packageTypeEClass = null; /** + * + * + * @generated + */ + private EClass sdkFamilyTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass sdkVersionTypeEClass = null; + + /** * Creates an instance of the model Package, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. @@ -75,20 +91,10 @@ private static boolean isInited = false; /** - * Creates, registers, and initializes the Package for this - * model, and for any others upon which it depends. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - *

Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - *

Invocation of this method will not affect any packages that have - * already been initialized. + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link InstallPackagesPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * * * @see #eNS_URI @@ -100,7 +106,7 @@ if (isInited) return (InstallPackagesPackage)EPackage.Registry.INSTANCE.getEPackage(InstallPackagesPackage.eNS_URI); // Obtain or create and register package - InstallPackagesPackageImpl theInstallPackagesPackage = (InstallPackagesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof InstallPackagesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new InstallPackagesPackageImpl()); + InstallPackagesPackageImpl theInstallPackagesPackage = (InstallPackagesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InstallPackagesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new InstallPackagesPackageImpl()); isInited = true; @@ -116,6 +122,9 @@ // Mark meta-data to indicate it can't be changed theInstallPackagesPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(InstallPackagesPackage.eNS_URI, theInstallPackagesPackage); return theInstallPackagesPackage; } @@ -178,8 +187,26 @@ * * @generated */ + public EReference getPackagesType_SDKFamily() { + return (EReference)packagesTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getPackagesType_SDKVersion() { + return (EReference)packagesTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ public EReference getPackagesType_Package() { - return (EReference)packagesTypeEClass.getEStructuralFeatures().get(0); + return (EReference)packagesTypeEClass.getEStructuralFeatures().get(2); } /** @@ -250,6 +277,42 @@ * * @generated */ + public EClass getSDKFamilyType() { + return sdkFamilyTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSDKFamilyType_Order() { + return (EAttribute)sdkFamilyTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSDKVersionType() { + return sdkVersionTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSDKVersionType_Order() { + return (EAttribute)sdkVersionTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ public InstallPackagesFactory getInstallPackagesFactory() { return (InstallPackagesFactory)getEFactoryInstance(); } @@ -280,6 +343,8 @@ createEReference(documentRootEClass, DOCUMENT_ROOT__PACKAGES); packagesTypeEClass = createEClass(PACKAGES_TYPE); + createEReference(packagesTypeEClass, PACKAGES_TYPE__SDK_FAMILY); + createEReference(packagesTypeEClass, PACKAGES_TYPE__SDK_VERSION); createEReference(packagesTypeEClass, PACKAGES_TYPE__PACKAGE); packageTypeEClass = createEClass(PACKAGE_TYPE); @@ -289,6 +354,12 @@ createEAttribute(packageTypeEClass, PACKAGE_TYPE__PACKAGE_VERSION); createEAttribute(packageTypeEClass, PACKAGE_TYPE__SDK_FAMILY); createEAttribute(packageTypeEClass, PACKAGE_TYPE__SDK_VERSION); + + sdkFamilyTypeEClass = createEClass(SDK_FAMILY_TYPE); + createEAttribute(sdkFamilyTypeEClass, SDK_FAMILY_TYPE__ORDER); + + sdkVersionTypeEClass = createEClass(SDK_VERSION_TYPE); + createEAttribute(sdkVersionTypeEClass, SDK_VERSION_TYPE__ORDER); } /** @@ -331,6 +402,8 @@ initEReference(getDocumentRoot_Packages(), this.getPackagesType(), null, "packages", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEClass(packagesTypeEClass, PackagesType.class, "PackagesType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getPackagesType_SDKFamily(), this.getSDKFamilyType(), null, "sDKFamily", null, 0, 1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPackagesType_SDKVersion(), this.getSDKVersionType(), null, "sDKVersion", null, 0, 1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getPackagesType_Package(), this.getPackageType(), null, "package", null, 0, -1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(packageTypeEClass, PackageType.class, "PackageType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -341,6 +414,12 @@ initEAttribute(getPackageType_SdkFamily(), theXMLTypePackage.getString(), "sdkFamily", null, 1, 1, PackageType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getPackageType_SdkVersion(), theXMLTypePackage.getString(), "sdkVersion", null, 1, 1, PackageType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(sdkFamilyTypeEClass, SDKFamilyType.class, "SDKFamilyType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSDKFamilyType_Order(), theXMLTypePackage.getString(), "order", null, 1, 1, SDKFamilyType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(sdkVersionTypeEClass, SDKVersionType.class, "SDKVersionType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSDKVersionType_Order(), theXMLTypePackage.getString(), "order", null, 1, 1, SDKVersionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Create resource createResource(eNS_URI); @@ -407,6 +486,22 @@ "kind", "elementOnly" }); addAnnotation + (getPackagesType_SDKFamily(), + source, + new String[] { + "kind", "element", + "name", "SDKFamily", + "namespace", "##targetNamespace" + }); + addAnnotation + (getPackagesType_SDKVersion(), + source, + new String[] { + "kind", "element", + "name", "SDKVersion", + "namespace", "##targetNamespace" + }); + addAnnotation (getPackagesType_Package(), source, new String[] { @@ -468,6 +563,36 @@ "kind", "attribute", "name", "sdkVersion", "namespace", "##targetNamespace" + }); + addAnnotation + (sdkFamilyTypeEClass, + source, + new String[] { + "name", "SDKFamily_._type", + "kind", "empty" + }); + addAnnotation + (getSDKFamilyType_Order(), + source, + new String[] { + "kind", "attribute", + "name", "order", + "namespace", "##targetNamespace" + }); + addAnnotation + (sdkVersionTypeEClass, + source, + new String[] { + "name", "SDKVersion_._type", + "kind", "empty" + }); + addAnnotation + (getSDKVersionType_Order(), + source, + new String[] { + "kind", "attribute", + "name", "order", + "namespace", "##targetNamespace" }); } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java Wed Jul 21 12:11:48 2010 -0500 @@ -9,8 +9,11 @@ import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType; import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; @@ -18,6 +21,7 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; @@ -30,6 +34,8 @@ *

* The following features are implemented: *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getSDKFamily SDK Family}
  • + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getSDKVersion SDK Version}
  • *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getPackage Package}
  • *
*

@@ -38,6 +44,24 @@ */ public class PackagesTypeImpl extends EObjectImpl implements PackagesType { /** + * The cached value of the '{@link #getSDKFamily() SDK Family}' containment reference. + * + * + * @see #getSDKFamily() + * @generated + * @ordered + */ + protected SDKFamilyType sDKFamily; + /** + * The cached value of the '{@link #getSDKVersion() SDK Version}' containment reference. + * + * + * @see #getSDKVersion() + * @generated + * @ordered + */ + protected SDKVersionType sDKVersion; + /** * The cached value of the '{@link #getPackage() Package}' containment reference list. * * @@ -71,6 +95,92 @@ * * @generated */ + public SDKFamilyType getSDKFamily() { + return sDKFamily; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSDKFamily(SDKFamilyType newSDKFamily, NotificationChain msgs) { + SDKFamilyType oldSDKFamily = sDKFamily; + sDKFamily = newSDKFamily; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, oldSDKFamily, newSDKFamily); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSDKFamily(SDKFamilyType newSDKFamily) { + if (newSDKFamily != sDKFamily) { + NotificationChain msgs = null; + if (sDKFamily != null) + msgs = ((InternalEObject)sDKFamily).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, null, msgs); + if (newSDKFamily != null) + msgs = ((InternalEObject)newSDKFamily).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, null, msgs); + msgs = basicSetSDKFamily(newSDKFamily, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, newSDKFamily, newSDKFamily)); + } + + /** + * + * + * @generated + */ + public SDKVersionType getSDKVersion() { + return sDKVersion; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSDKVersion(SDKVersionType newSDKVersion, NotificationChain msgs) { + SDKVersionType oldSDKVersion = sDKVersion; + sDKVersion = newSDKVersion; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, oldSDKVersion, newSDKVersion); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSDKVersion(SDKVersionType newSDKVersion) { + if (newSDKVersion != sDKVersion) { + NotificationChain msgs = null; + if (sDKVersion != null) + msgs = ((InternalEObject)sDKVersion).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, null, msgs); + if (newSDKVersion != null) + msgs = ((InternalEObject)newSDKVersion).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, null, msgs); + msgs = basicSetSDKVersion(newSDKVersion, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, newSDKVersion, newSDKVersion)); + } + + /** + * + * + * @generated + */ public EList getPackage() { if (package_ == null) { package_ = new EObjectContainmentEList(PackageType.class, this, InstallPackagesPackage.PACKAGES_TYPE__PACKAGE); @@ -86,6 +196,10 @@ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + return basicSetSDKFamily(null, msgs); + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + return basicSetSDKVersion(null, msgs); case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: return ((InternalEList)getPackage()).basicRemove(otherEnd, msgs); } @@ -100,6 +214,10 @@ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + return getSDKFamily(); + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + return getSDKVersion(); case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: return getPackage(); } @@ -115,6 +233,12 @@ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + setSDKFamily((SDKFamilyType)newValue); + return; + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + setSDKVersion((SDKVersionType)newValue); + return; case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: getPackage().clear(); getPackage().addAll((Collection)newValue); @@ -131,6 +255,12 @@ @Override public void eUnset(int featureID) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + setSDKFamily((SDKFamilyType)null); + return; + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + setSDKVersion((SDKVersionType)null); + return; case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: getPackage().clear(); return; @@ -146,6 +276,10 @@ @Override public boolean eIsSet(int featureID) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + return sDKFamily != null; + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + return sDKVersion != null; case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: return package_ != null && !package_.isEmpty(); } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKFamilyTypeImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKFamilyTypeImpl.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,167 @@ +/** + * + * + * + * $Id$ + */ +package com.nokia.carbide.installpackages.gen.InstallPackages.impl; + +import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * + * An implementation of the model object 'SDK Family Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl#getOrder Order}
  • + *
+ *

+ * + * @generated + */ +public class SDKFamilyTypeImpl extends EObjectImpl implements SDKFamilyType { + /** + * The default value of the '{@link #getOrder() Order}' attribute. + * + * + * @see #getOrder() + * @generated + * @ordered + */ + protected static final String ORDER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOrder() Order}' attribute. + * + * + * @see #getOrder() + * @generated + * @ordered + */ + protected String order = ORDER_EDEFAULT; + + /** + * + * + * @generated + */ + protected SDKFamilyTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InstallPackagesPackage.Literals.SDK_FAMILY_TYPE; + } + + /** + * + * + * @generated + */ + public String getOrder() { + return order; + } + + /** + * + * + * @generated + */ + public void setOrder(String newOrder) { + String oldOrder = order; + order = newOrder; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER, oldOrder, order)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER: + return getOrder(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER: + setOrder((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER: + setOrder(ORDER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER: + return ORDER_EDEFAULT == null ? order != null : !ORDER_EDEFAULT.equals(order); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (order: "); + result.append(order); + result.append(')'); + return result.toString(); + } + +} //SDKFamilyTypeImpl diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKVersionTypeImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKVersionTypeImpl.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,167 @@ +/** + * + * + * + * $Id$ + */ +package com.nokia.carbide.installpackages.gen.InstallPackages.impl; + +import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * + * An implementation of the model object 'SDK Version Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl#getOrder Order}
  • + *
+ *

+ * + * @generated + */ +public class SDKVersionTypeImpl extends EObjectImpl implements SDKVersionType { + /** + * The default value of the '{@link #getOrder() Order}' attribute. + * + * + * @see #getOrder() + * @generated + * @ordered + */ + protected static final String ORDER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOrder() Order}' attribute. + * + * + * @see #getOrder() + * @generated + * @ordered + */ + protected String order = ORDER_EDEFAULT; + + /** + * + * + * @generated + */ + protected SDKVersionTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InstallPackagesPackage.Literals.SDK_VERSION_TYPE; + } + + /** + * + * + * @generated + */ + public String getOrder() { + return order; + } + + /** + * + * + * @generated + */ + public void setOrder(String newOrder) { + String oldOrder = order; + order = newOrder; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.SDK_VERSION_TYPE__ORDER, oldOrder, order)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER: + return getOrder(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER: + setOrder((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER: + setOrder(ORDER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER: + return ORDER_EDEFAULT == null ? order != null : !ORDER_EDEFAULT.equals(order); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (order: "); + result.append(order); + result.append(')'); + return result.toString(); + } + +} //SDKVersionTypeImpl diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java Wed Jul 21 12:11:48 2010 -0500 @@ -83,6 +83,14 @@ return createPackageTypeAdapter(); } @Override + public Adapter caseSDKFamilyType(SDKFamilyType object) { + return createSDKFamilyTypeAdapter(); + } + @Override + public Adapter caseSDKVersionType(SDKVersionType object) { + return createSDKVersionTypeAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -145,6 +153,34 @@ } /** + * Creates a new adapter for an object of class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType SDK Family Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType + * @generated + */ + public Adapter createSDKFamilyTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType SDK Version Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType + * @generated + */ + public Adapter createSDKVersionTypeAdapter() { + return null; + } + + /** * Creates a new adapter for the default case. * * This default implementation returns null. diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java Wed Jul 21 12:11:48 2010 -0500 @@ -104,6 +104,18 @@ if (result == null) result = defaultCase(theEObject); return result; } + case InstallPackagesPackage.SDK_FAMILY_TYPE: { + SDKFamilyType sdkFamilyType = (SDKFamilyType)theEObject; + T result = caseSDKFamilyType(sdkFamilyType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case InstallPackagesPackage.SDK_VERSION_TYPE: { + SDKVersionType sdkVersionType = (SDKVersionType)theEObject; + T result = caseSDKVersionType(sdkVersionType); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -154,6 +166,36 @@ } /** + * Returns the result of interpreting the object as an instance of 'SDK Family Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'SDK Family Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSDKFamilyType(SDKFamilyType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'SDK Version Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'SDK Version Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSDKVersionType(SDKVersionType object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of 'EObject'. * * This implementation returns null; diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/RemoteConnectionsActivator.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/RemoteConnectionsActivator.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/RemoteConnectionsActivator.java Wed Jul 21 12:11:48 2010 -0500 @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; @@ -27,6 +28,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.InstanceScope; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IFilter; import org.eclipse.swt.widgets.Control; @@ -40,11 +42,12 @@ import com.nokia.carbide.remoteconnections.interfaces.IConnectionTypeProvider; import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager; import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent; +import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent.IPrerequisiteStatus; import com.nokia.carbide.remoteconnections.internal.api.IStatusDisplay; -import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent.IPrerequisiteStatus; import com.nokia.carbide.remoteconnections.internal.registry.Registry; import com.nokia.carbide.remoteconnections.internal.ui.DeviceDiscoveryPrequisiteErrorDialog; import com.nokia.carbide.remoteconnections.internal.ui.StatusDisplay; +import com.nokia.cpp.internal.api.utils.core.ListenerList; import com.nokia.cpp.internal.api.utils.core.Logging; import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils; @@ -85,6 +88,10 @@ runnable.run(); } } + + public interface IDiscoveryAgentsLoadedListener { + void agentsAreLoaded(); + } // The plug-in ID public static final String PLUGIN_ID = "com.nokia.carbide.remoteConnections"; //$NON-NLS-1$ @@ -95,13 +102,16 @@ private static RemoteConnectionsActivator plugin; private Collection discoveryAgents; + private ListenerList listeners; private static final String IGNORE_AGENT_LOAD_ERRORS_KEY = "ignoreAgentLoadErrors"; //$NON-NLS-1$ + private static final String AGENT_STATE_KEY_PREFIX = "agentState."; //$NON-NLS-1$ /** * The constructor */ public RemoteConnectionsActivator() { + listeners = new ListenerList(); } public void start(BundleContext context) throws Exception { @@ -176,6 +186,28 @@ logError(e); } } + + private void storeAgentRunningStates() { + IPreferenceStore preferenceStore = getPreferenceStore(); + for (IDeviceDiscoveryAgent agent : discoveryAgents) { + String agentKey = AGENT_STATE_KEY_PREFIX + agent.getId(); + if (!preferenceStore.contains(agentKey)) + preferenceStore.setDefault(agentKey, true); + preferenceStore.setValue(agentKey, agent.isRunning()); + } + try { + new InstanceScope().getNode(PLUGIN_ID).flush(); + } catch (BackingStoreException e) { + logError(e); + } + } + + private boolean getStoredAgentRunningState(IDeviceDiscoveryAgent agent) { + String agentKey = AGENT_STATE_KEY_PREFIX + agent.getId(); + if (!getPreferenceStore().contains(agentKey)) + return true; + return getPreferenceStore().getBoolean(agentKey); + } /** * Returns the shared instance @@ -232,7 +264,9 @@ public boolean select(Object toTest) { if (toTest instanceof IDeviceDiscoveryAgent) { try { - ((IDeviceDiscoveryAgent) toTest).start(); + IDeviceDiscoveryAgent discoveryAgent = (IDeviceDiscoveryAgent) toTest; + if (getStoredAgentRunningState(discoveryAgent)) + discoveryAgent.start(); return true; } catch (Throwable e) { // since we launch arbitrary code, catch any exception to prevent killing the view @@ -242,13 +276,15 @@ return false; } }); - + fireDiscoveryAgentsLoaded(); } private void stopDeviceDiscoveryAgents() { + storeAgentRunningStates(); for (IDeviceDiscoveryAgent agent : discoveryAgents) { try { - agent.stop(); + if (agent.isRunning()) + agent.stop(); } catch (CoreException e) { logError(e); } @@ -287,4 +323,24 @@ public static IStatusDisplay getStatusDisplay() { return new StatusDisplay(); } + + public Collection getDiscoveryAgents() { + if (discoveryAgents != null) + return Collections.unmodifiableCollection(discoveryAgents); + return Collections.emptySet(); + } + + public void addDiscoveryAgentsLoadedListener(IDiscoveryAgentsLoadedListener listener) { + listeners.add(listener); + } + + public void removeDiscoveryAgentsLoadedListener(IDiscoveryAgentsLoadedListener listener) { + listeners.remove(listener); + } + + private void fireDiscoveryAgentsLoaded() { + for (IDiscoveryAgentsLoadedListener listener : listeners) { + listener.agentsAreLoaded(); + } + } } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java Wed Jul 21 12:11:48 2010 -0500 @@ -26,6 +26,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.widgets.Display; +import org.osgi.framework.Version; import com.nokia.carbide.remoteconnections.Messages; import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; @@ -220,4 +221,8 @@ currentStatus = new Status(); currentStatus.setEStatus(status.internalGetEStatus(), status.getShortDescription(), status.getLongDescription()); } + + public void setDeviceOS(String familyName, Version version) { + // @deprecated + } } \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java Wed Jul 21 12:11:48 2010 -0500 @@ -16,27 +16,36 @@ */ package com.nokia.carbide.remoteconnections.interfaces; -import com.nokia.carbide.installpackages.InstallPackages; -import com.nokia.carbide.installpackages.InstallPackages.IServerData; -import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; -import com.nokia.carbide.remoteconnections.Messages; -import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.GetMethod; -import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Path; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.graphics.Image; import org.osgi.framework.Version; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.lang.reflect.InvocationTargetException; -import java.util.*; +import com.nokia.carbide.installpackages.InstallPackages; +import com.nokia.carbide.installpackages.InstallPackages.IServerData; +import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; +import com.nokia.carbide.remoteconnections.Messages; +import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; +@SuppressWarnings("deprecation") public abstract class AbstractPackageInstallerProvider implements IRemoteAgentInstallerProvider { public class PackageTypeInstaller implements IRemoteAgentInstaller { @@ -165,11 +174,14 @@ private List packageList; private Map imageCache; + /** + * @deprecated + */ protected abstract IServerData getServerData(); public List getSDKFamilyNames(IRunnableContext runnableContext) { if (packages == null) - packages = new InstallPackages(getServerData(), runnableContext); + packages = new InstallPackages(getService(), runnableContext); Set sdkFamilyNames = new HashSet(); packageList = packages.getAvailablePackageList(); if (packageList == null) @@ -179,30 +191,28 @@ sdkFamilyNames.add(sdkFamily); } List sdkFamilyNameList = new ArrayList(sdkFamilyNames); - Collections.sort(sdkFamilyNameList); + Collections.sort(sdkFamilyNameList, packages.getSDKFamilyComparator()); return sdkFamilyNameList; } - @SuppressWarnings("unchecked") - public List getVersions(String familyName) { - Set versions = new HashSet(); + public List getVersions(String familyName) { + Set versions = new HashSet(); for (PackageType packageType : packageList) { if (packageType.getSdkFamily().equals(familyName)) { try { - versions.add(new Version(packageType.getSdkVersion())); + versions.add(packageType.getSdkVersion()); } catch (IllegalArgumentException e) { RemoteConnectionsActivator.logError(e); } } } - List versionList = new ArrayList(versions); - Collections.sort(versionList); - Collections.reverse(versionList); + List versionList = new ArrayList(versions); + Collections.sort(versionList, packages.getSDKVersionComparator()); return versionList; } - public List getRemoteAgentInstallers(String familyName, Version version) { + public List getRemoteAgentInstallers(String familyName, String version) { Set installers = new HashSet(); if (packageList == null) { getSDKFamilyNames(null); @@ -210,7 +220,7 @@ for (PackageType packageType : packageList) { if (packageType.getSdkFamily().equals(familyName)) { try { - if (version.equals(new Version(packageType.getSdkVersion()))) { + if (version.equals(packageType.getSdkVersion())) { installers.add(new PackageTypeInstaller(packages, packageType)); } } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java Wed Jul 21 12:11:48 2010 -0500 @@ -20,6 +20,8 @@ import org.osgi.framework.Version; +import com.nokia.carbide.remoteconnections.internal.api.IConnectedService2; + /** * An interface for a service connected to a remote agent via a connection */ @@ -87,6 +89,8 @@ * Set the device OS values, to potentially affect the information for the user. * @param familyName * @param version + * @deprecated + * @see IConnectedService2#setDeviceOS(String, String) */ void setDeviceOS(String familyName, Version version); diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java Wed Jul 21 12:11:48 2010 -0500 @@ -177,11 +177,13 @@ IConnection getCurrentConnection(); /** - * Returns the IClientServiceSiteUI2 for a service. Filters connection types to those that - * are supported by the service. Connection list UI as well as new and edit wizards are filtered. + * Returns the IClientServiceSiteUI2 for selecting a connection. * Allows selecting a "current" connection which maps to #getCurrentConnection() - * when you use #ensureConenction(). - * @param service IService + * when you use #ensureConnection(). + *

+ * Optionally filters connection types to those that are supported by the + * service. Connection list UI as well as new and edit wizards are filtered. + * @param service IService or null * @return IClientServiceSiteUI2 * @since 2.5 */ @@ -189,7 +191,7 @@ /** * Can be called by specific service implementors (e.g., debugger) to ensure some connection - * exists and supports this service. If the connection does not exist or does not support + * exists and optionally supports this service. If the connection does not exist or does not support * the service, a CoreException may be thrown after the framework attempts to allow the user * to correct the situation by showing a connection selection dialog. * If an ISelectedConnectionInfo is returned, {@link ISelectedConnectionInfo#getConnection()} @@ -197,7 +199,7 @@ * and {@link ISelectedConnectionInfo#getStorableId()} is the id that can * be stored by the caller that represents the user's selection. * @param connectionId String - * @param service IService + * @param service IService or null * @return ISelectedConnectionInfo * @throws CoreException * @since 2.5 diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java Wed Jul 21 12:11:48 2010 -0500 @@ -112,7 +112,7 @@ * @param familyName String * @return List */ - List getVersions(String familyName); + List getVersions(String familyName); /** * Return the IRemoteAgentInstaller objects for a given sdk family + version qualifier @@ -120,7 +120,7 @@ * @param version * @return */ - List getRemoteAgentInstallers(String familyName, Version version); + List getRemoteAgentInstallers(String familyName, String version); /** * Dispose this provider diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ToggleDiscoveryAgentAction.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ToggleDiscoveryAgentAction.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,59 @@ +/** +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +package com.nokia.carbide.remoteconnections.internal; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; + +import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; +import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent; + +public class ToggleDiscoveryAgentAction extends Action { + + private final IDeviceDiscoveryAgent agent; + + public ToggleDiscoveryAgentAction(IDeviceDiscoveryAgent agent) { + this.agent = agent; + setChecked(agent.isRunning()); + } + + @Override + public void run() { + try { + if (agent.isRunning()) + agent.stop(); + else + agent.start(); + setChecked(agent.isRunning()); + } catch (CoreException e) { + RemoteConnectionsActivator.logError(e); + } + } + + @Override + public int getStyle() { + return IAction.AS_CHECK_BOX; + } + + @Override + public String getText() { + return agent.getDisplayName(); + } +} + diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java Wed Jul 21 12:11:48 2010 -0500 @@ -28,6 +28,13 @@ public interface IConnectedService2 extends IConnectedService { /** + * Set the device OS values, to potentially affect the information for the user. + * @param familyName + * @param version + */ + void setDeviceOS(String familyName, String version); + + /** * Return the properties for this connected service * @return Map */ diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IDeviceDiscoveryAgent.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IDeviceDiscoveryAgent.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IDeviceDiscoveryAgent.java Wed Jul 21 12:11:48 2010 -0500 @@ -87,6 +87,18 @@ */ IPrerequisiteStatus getPrerequisiteStatus(); + /** + * Return whether this discovery agent is running + * @return boolean + */ + boolean isRunning(); + + /** + * The unique id for this agent + * @return String + */ + String getId(); + // In addition, there may need to be an additional API to do a deeper form of discovery for // connection mechanisms that require pairing (like BT or Wifi). In these cases, normal discovery // will probably be for already paired devices, however, the user will want to discover all diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Jul 21 12:11:48 2010 -0500 @@ -301,7 +301,11 @@ if (listeners == null) return; for (IConnectionsManagerListener listener : listeners) { - listener.connectionStoreChanged(); + try { + listener.connectionStoreChanged(); + } catch (Throwable t) { + RemoteConnectionsActivator.logError(t); + } } } @@ -451,7 +455,11 @@ if (listeners == null) return; for (IConnectionsManagerListener listener : listeners) { - listener.displayChanged(); + try { + listener.displayChanged(); + } catch (Throwable t) { + RemoteConnectionsActivator.logError(t); + } } } @@ -494,7 +502,11 @@ if (connectionListeners == null) return; for (IConnectionListener listener : connectionListeners) { - listener.connectionAdded(connection); + try { + listener.connectionAdded(connection); + } catch (Throwable t) { + RemoteConnectionsActivator.logError(t); + } } } @@ -502,7 +514,11 @@ if (connectionListeners == null) return; for (IConnectionListener listener : connectionListeners) { - listener.connectionRemoved(connection); + try { + listener.connectionRemoved(connection); + } catch (Throwable t) { + RemoteConnectionsActivator.logError(t); + } } } @@ -510,12 +526,15 @@ if (connectionListeners == null) return; for (IConnectionListener listener : connectionListeners) { - listener.currentConnectionSet(connection); + try { + listener.currentConnectionSet(connection); + } catch (Throwable t) { + RemoteConnectionsActivator.logError(t); + } } } public ISelectedConnectionInfo ensureConnection(String id, IService service) throws CoreException { - Check.checkArg(service); final boolean wasCurrentConnection = CURRENT_CONNECTION_ID.equals(id); final IConnection[] connectionHolder = { findConnection(id) }; final String[] storableIdHolder = { id }; @@ -566,7 +585,7 @@ private boolean isCompatibleConnection(IConnection connection, IService service) { if (connection == null) return false; - return getCompatibleServices(connection.getConnectionType()).contains(service); + return service == null || getCompatibleServices(connection.getConnectionType()).contains(service); } public void setCurrentConnection(IConnection connection) { diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java Wed Jul 21 12:11:48 2010 -0500 @@ -66,7 +66,6 @@ private Map connectionNames; public ClientServiceSiteUI2(IService service) { - Check.checkArg(service); this.service = service; } @@ -297,11 +296,15 @@ private void getCompatibleConnectionTypes() { compatibleConnectionTypes = new HashSet(); - Collection compatibleTypeIds = - Registry.instance().getCompatibleConnectionTypeIds(service); - for (String typeId : compatibleTypeIds) { - compatibleConnectionTypes.add( - Registry.instance().getConnectionType(typeId)); + if (service != null) { + Collection compatibleTypeIds = + Registry.instance().getCompatibleConnectionTypeIds(service); + for (String typeId : compatibleTypeIds) { + compatibleConnectionTypes.add( + Registry.instance().getConnectionType(typeId)); + } + } else { + compatibleConnectionTypes.addAll(Registry.instance().getConnectionTypes()); } } @@ -317,12 +320,15 @@ public IStatus getSelectionStatus() { String requiredConnectionTypes = getAllowedConnectionTypesString(); + String serviceName = service != null ? service.getDisplayName() + : Messages.getString("ClientServiceSiteUI2.NoConnectionErrorPlaceholderForNoServiceName"); //$NON-NLS-1$ + // no selection yet...? if (connection == null) { return new Status(IStatus.ERROR, RemoteConnectionsActivator.PLUGIN_ID, MessageFormat.format( Messages.getString("ClientServiceSiteUI2.NoConnectionError"), //$NON-NLS-1$ - service.getDisplayName(), + serviceName, requiredConnectionTypes)); } @@ -333,26 +339,28 @@ return new Status(IStatus.ERROR, RemoteConnectionsActivator.PLUGIN_ID, MessageFormat.format( Messages.getString("ClientServiceSiteUI2.NoCurrentConnection"), //$NON-NLS-1$ - service.getDisplayName(), + serviceName, requiredConnectionTypes)); } - // is the service supported? - boolean found = false; - for (IConnectedService aService : Registry.instance().getConnectedServices(actual)) { - if (service.getIdentifier().equals(aService.getService().getIdentifier())) { - found = true; - break; + if (service != null) { + // is the service supported? + boolean found = false; + for (IConnectedService aService : Registry.instance().getConnectedServices(actual)) { + if (service.getIdentifier().equals(aService.getService().getIdentifier())) { + found = true; + break; + } } - } - if (!found) { - return new Status(IStatus.WARNING, RemoteConnectionsActivator.PLUGIN_ID, - MessageFormat.format( - Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionService") //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ - + Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionFixupAdvice"), //$NON-NLS-1$ - actual.getDisplayName(), - service.getDisplayName())); + if (!found) { + return new Status(IStatus.WARNING, RemoteConnectionsActivator.PLUGIN_ID, + MessageFormat.format( + Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionService") //$NON-NLS-1$ + + "\n" //$NON-NLS-1$ + + Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionFixupAdvice"), //$NON-NLS-1$ + actual.getDisplayName(), + serviceName)); + } } // is the hardware type supported by the service? diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java Wed Jul 21 12:11:48 2010 -0500 @@ -23,6 +23,7 @@ import java.util.Comparator; import java.util.List; +import org.eclipse.jface.action.IContributionManager; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.swt.SWT; @@ -518,7 +519,9 @@ */ @Override public void update() { - getParent().update(true); + IContributionManager parent = getParent(); + if (parent != null) + parent.update(true); } /** diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Wed Jul 21 12:11:48 2010 -0500 @@ -16,6 +16,7 @@ ClientServiceSiteUI2.NewButtonLabel=New... ClientServiceSiteUI2.UseConnectionGroupLabel=Use connection ClientServiceSiteUI2.NoConnectionError=A valid remote connection must be selected. If none exist, connect a device or create a connection one supporting {0} via {1}. +ClientServiceSiteUI2.NoConnectionErrorPlaceholderForNoServiceName=connecting ClientServiceSiteUI2.NoCurrentConnection=No current connection is available. Connect a device or create a connection supporting {0} via {1}. ClientServiceSiteUI2.IncompatibleCurrentConnectionType=The current connection ''{0}'' does not support connection type: ''{1}''. ClientServiceSiteUI2.IncompatibleCurrentConnectionService=The current connection ''{0}'' does not support the service: ''{1}''. diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Wed Jul 21 12:11:48 2010 -0500 @@ -83,30 +83,31 @@ import org.eclipse.ui.PlatformUI; import org.osgi.framework.Version; -import com.nokia.carbide.installpackages.InstallPackages; import com.nokia.carbide.remoteconnections.Messages; import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; import com.nokia.carbide.remoteconnections.interfaces.AbstractConnectedService2; import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener; import com.nokia.carbide.remoteconnections.interfaces.IConnection; import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory; +import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory.IValidationErrorReporter; import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2; +import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2.ISettingsChangedListener; import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; import com.nokia.carbide.remoteconnections.interfaces.IConnectionTypeProvider; import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller.IPackageContents; import com.nokia.carbide.remoteconnections.interfaces.IService; import com.nokia.carbide.remoteconnections.interfaces.IService2; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; -import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory.IValidationErrorReporter; -import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2.ISettingsChangedListener; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller.IPackageContents; +import com.nokia.carbide.remoteconnections.internal.api.IConnectedService2; import com.nokia.carbide.remoteconnections.internal.registry.Registry; import com.nokia.cpp.internal.api.utils.core.Check; import com.nokia.cpp.internal.api.utils.core.FileUtils; import com.nokia.cpp.internal.api.utils.core.HostOS; +import com.nokia.cpp.internal.api.utils.core.ObjectUtils; import com.nokia.cpp.internal.api.utils.core.Pair; import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils; @@ -307,20 +308,20 @@ @SuppressWarnings("unchecked") public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) deviceOSComboViewer.getSelection(); - Pair pair = (Pair) selection.getFirstElement(); + Pair pair = (Pair) selection.getFirstElement(); setSelectionToInstallComposite(pair); - if (connectedService != null) - connectedService.setDeviceOS(pair.first, pair.second); + if (connectedService instanceof IConnectedService2) + ((IConnectedService2) connectedService).setDeviceOS(pair.first, pair.second); } }); deviceOSComboViewer.setContentProvider(new ArrayContentProvider()); deviceOSComboViewer.setLabelProvider(new LabelProvider() { - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public String getText(Object element) { Check.checkState(element instanceof Pair); Pair pair = (Pair) element; - return MessageFormat.format("{0} {1}", pair.first, InstallPackages.formatSDKVersion(pair.second)); //$NON-NLS-1$ + return MessageFormat.format("{0} {1}", pair.first, pair.second); //$NON-NLS-1$ } }); deviceOSComboViewer.getControl().setToolTipText(Messages.getString("ConnectionSettingsPage.DeviceOSComboToolTip")); //$NON-NLS-1$ @@ -446,9 +447,6 @@ String label = ((IRemoteAgentInstaller) value).getLabel(); return label == null ? Messages.getString("ConnectionSettingsPage.UnlabeledPackageLabel") : label; //$NON-NLS-1$ } - if (value instanceof Version) - return InstallPackages.formatSDKVersion((Version) value); - return value.toString(); } @@ -715,7 +713,7 @@ } // update sdk combo - List> deviceOSPairs = createDeviceOSPairs(); + List> deviceOSPairs = createDeviceOSPairs(); deviceOSComboViewer.setInput(deviceOSPairs); if (!deviceOSPairs.isEmpty()) { deviceOSComboViewer.getCombo().select(0); @@ -737,7 +735,7 @@ } - protected void setSelectionToInstallComposite(Pair pair) { + protected void setSelectionToInstallComposite(Pair pair) { Object input = installerTreeViewer.getInput(); if (input instanceof TreeNode[]) { TreeNode node = findTreeNodeForPair((TreeNode[]) input, pair); @@ -748,14 +746,14 @@ } } - @SuppressWarnings("unchecked") - private TreeNode findTreeNodeForPair(TreeNode[] treeNodes, Pair pair) { + private TreeNode findTreeNodeForPair(TreeNode[] treeNodes, Pair pair) { for (TreeNode treeNode : treeNodes) { Object value = treeNode.getValue(); if (value instanceof IRemoteAgentInstaller) { TreeNode versionNode = treeNode.getParent(); TreeNode familyNode = versionNode.getParent(); - if (pair.equals(new Pair(familyNode.getValue(), versionNode.getValue()))) + if (ObjectUtils.equals(pair.first, familyNode.getValue()) && + ObjectUtils.equals(pair.second, versionNode.getValue())) return treeNode; } TreeNode[] children = treeNode.getChildren(); @@ -786,9 +784,10 @@ connectedService = Registry.instance().createConnectedService(service, connection); IStructuredSelection selection = (IStructuredSelection) deviceOSComboViewer.getSelection(); - Pair pair = (Pair) selection.getFirstElement(); - if (pair != null) - connectedService.setDeviceOS(pair.first, pair.second); + Pair pair = (Pair) selection.getFirstElement(); + if (pair != null && connectedService instanceof IConnectedService2) { + ((IConnectedService2) connectedService).setDeviceOS(pair.first, pair.second); + } connectedService.addStatusChangedListener(statusListener = new IStatusChangedListener() { public void statusChanged(final IStatus status) { Display.getDefault().asyncExec(new Runnable() { @@ -899,12 +898,12 @@ private void createFamilySubNodes(TreeNode familyNode, IRemoteAgentInstallerProvider installerProvider) { String familyName = familyNode.getValue().toString(); - List versions = installerProvider.getVersions(familyName); + List versions = installerProvider.getVersions(familyName); List childList = new ArrayList(); TreeNode[] children = familyNode.getChildren(); if (children != null) childList.addAll(Arrays.asList(children)); - for (Version version : versions) { + for (String version : versions) { TreeNode versionNode = getVersionNode(familyNode, version); if (versionNode == null) { versionNode = new TreeNode(version); @@ -916,7 +915,7 @@ familyNode.setChildren((TreeNode[]) childList.toArray(new TreeNode[childList.size()])); } - private TreeNode getVersionNode(TreeNode familyNode, Version version) { + private TreeNode getVersionNode(TreeNode familyNode, String version) { TreeNode[] children = familyNode.getChildren(); if (children != null) { for (TreeNode node : children) { @@ -929,7 +928,7 @@ private void createInstallerNodes(TreeNode versionNode, IRemoteAgentInstallerProvider installerProvider) { String familyName = versionNode.getParent().getValue().toString(); - Version version = (Version) versionNode.getValue(); + String version = versionNode.getValue().toString(); List installers = installerProvider.getRemoteAgentInstallers(familyName, version); List childList = new ArrayList(); @@ -944,14 +943,14 @@ versionNode.setChildren((TreeNode[]) childList.toArray(new TreeNode[childList.size()])); } - private synchronized List> createDeviceOSPairs() { - List> deviceOSPairs = new ArrayList>(); + private synchronized List> createDeviceOSPairs() { + List> deviceOSPairs = new ArrayList>(); for (IRemoteAgentInstallerProvider installerProvider : installerProviders) { List familyNames = installerProvider.getSDKFamilyNames(null); for (String familyName : familyNames) { - List versions = installerProvider.getVersions(familyName); - for (Version version : versions) { - Pair pair = new Pair(familyName, version); + List versions = installerProvider.getVersions(familyName); + for (String version : versions) { + Pair pair = new Pair(familyName, version); if (!deviceOSPairs.contains(pair)) deviceOSPairs.add(pair); } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java Wed Jul 21 12:11:48 2010 -0500 @@ -161,7 +161,7 @@ return getConnectionType().getDescription(); } - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unchecked", "rawtypes" }) private int getCurrentTypeIndex() { IConnection connectionToEdit = settingsWizard.getConnectionToEdit(); if (connectionToEdit != null) { diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Wed Jul 21 12:11:48 2010 -0500 @@ -43,6 +43,7 @@ import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.EditingSupport; +import org.eclipse.jface.viewers.ICellEditorListener; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; @@ -76,19 +77,22 @@ import com.nokia.carbide.remoteconnections.Messages; import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; +import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.IDiscoveryAgentsLoadedListener; import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener; import com.nokia.carbide.remoteconnections.interfaces.IConnection; import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionListener; import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionsManagerListener; +import com.nokia.carbide.remoteconnections.internal.ToggleDiscoveryAgentAction; import com.nokia.carbide.remoteconnections.internal.api.IConnection2; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus; +import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatusChangedListener; -import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus; +import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent; import com.nokia.carbide.remoteconnections.internal.registry.Registry; import com.nokia.carbide.remoteconnections.internal.ui.ConnectionUIUtils; import com.nokia.carbide.remoteconnections.settings.ui.SettingsWizard; @@ -111,6 +115,7 @@ private List actions; private List connectionSelectedActions; private List serviceSelectedActions; + private List discoveryAgentActions; private static final String UID = ".uid"; //$NON-NLS-1$ private static final ImageDescriptor CONNECTION_NEW_IMGDESC = RemoteConnectionsActivator.getImageDescriptor("icons/connectionNew.png"); //$NON-NLS-1$ @@ -131,7 +136,9 @@ // handle, do not dispose private Font boldViewerFont; - + private TextCellEditor nameEditor; + private boolean refreshPending; + private TreeNode[] loadConnections() { if (serviceToListenerMap == null) serviceToListenerMap = new HashMap(); @@ -146,7 +153,7 @@ IConnectionStatusChangedListener statusChangedListener = new IConnectionStatusChangedListener() { public void statusChanged(IConnectionStatus status) { - handleStatusChanged(); + refreshViewer(); } }; IConnection2 connection2 = (IConnection2) connection; @@ -163,7 +170,7 @@ final TreeNode treeNode = new TreeNode(connectedService); IStatusChangedListener statusChangedListener = new IStatusChangedListener() { public void statusChanged(final IStatus status) { - handleStatusChanged(); + refreshViewer(); } }; connectedService.addStatusChangedListener(statusChangedListener); @@ -181,23 +188,42 @@ return (TreeNode[]) connectionNodes.toArray(new TreeNode[connectionNodes.size()]); } - private void handleStatusChanged() { + private void refreshViewer() { Display.getDefault().asyncExec(new Runnable() { public void run() { + if (nameEditor != null && nameEditor.isActivated()) { + refreshPending = true; + return; + } + if (!isDisposed && !viewer.getControl().isDisposed()) { viewer.refresh(true); packColumns(); } + refreshPending = false; } }); } private class NameEditingSupport extends EditingSupport { - private TextCellEditor editor; private NameEditingSupport(ColumnViewer viewer) { super(viewer); - editor = new TextCellEditor((Composite) viewer.getControl(), SWT.BORDER); + nameEditor = new TextCellEditor((Composite) viewer.getControl(), SWT.BORDER); + nameEditor.addListener(new ICellEditorListener() { + public void editorValueChanged(boolean oldValidState, boolean newValidState) { + } + + public void cancelEditor() { + if (refreshPending) + refreshViewer(); + } + + public void applyEditorValue() { + if (refreshPending) + refreshViewer(); + } + }); } @Override @@ -210,7 +236,7 @@ @Override protected CellEditor getCellEditor(Object element) { - return editor; + return nameEditor; } @Override @@ -223,8 +249,6 @@ protected void setValue(Object element, Object value) { IConnection connection = (IConnection) ((TreeNode) element).getValue(); connection.setDisplayName(value.toString()); - //viewer.refresh(true); - //packColumns(); Registry.instance().updateDisplays(); Registry.instance().storeConnections(); } @@ -544,12 +568,7 @@ } public void displayChanged() { - Display.getDefault().asyncExec(new Runnable() { - public void run() { - viewer.refresh(true); - packColumns(); - } - }); + refreshViewer(); } }; Registry.instance().addConnectionStoreChangedListener(connectionStoreChangedListener); @@ -557,12 +576,7 @@ connectionListener = new IConnectionListener() { public void currentConnectionSet(IConnection connection) { - Display.getDefault().asyncExec(new Runnable() { - public void run() { - viewer.refresh(true); - packColumns(); - } - }); + refreshViewer(); } public void connectionRemoved(IConnection connection) { @@ -624,8 +638,30 @@ fillLocalToolBar(bars.getToolBarManager()); } - private void fillLocalPullDown(IMenuManager manager) { - // nothing for now + private void fillLocalPullDown(final IMenuManager manager) { + if (discoveryAgentActions.isEmpty()) { + IDiscoveryAgentsLoadedListener listener = new IDiscoveryAgentsLoadedListener() { + public void agentsAreLoaded() { + makeToggleDiscoveryAgentActions(); + addDiscoveryAgentActions(manager); + Display.getDefault().asyncExec(new Runnable() { + public void run() { + manager.update(true); + } + }); + } + }; + RemoteConnectionsActivator.getDefault().addDiscoveryAgentsLoadedListener(listener); + } + else { + addDiscoveryAgentActions(manager); + } + } + + private void addDiscoveryAgentActions(IMenuManager manager) { + for (Action action : discoveryAgentActions) { + manager.add(action); + } } private void fillContextMenu(IMenuManager manager) { @@ -827,8 +863,19 @@ enableConnectionSelectedActions(false); enableServiceSelectedActions(false); + + makeToggleDiscoveryAgentActions(); } + private void makeToggleDiscoveryAgentActions() { + discoveryAgentActions = new ArrayList(); + Collection discoveryAgents = RemoteConnectionsActivator.getDefault().getDiscoveryAgents(); + for (IDeviceDiscoveryAgent agent : discoveryAgents) { + discoveryAgentActions.add(new ToggleDiscoveryAgentAction(agent)); + } + + } + private void enableConnectionSelectedActions(boolean enable) { for (Action action : connectionSelectedActions) { action.setEnabled(enable); diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/InputStream.h --- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/InputStream.h Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/InputStream.h Wed Jul 21 12:11:48 2010 -0500 @@ -103,7 +103,7 @@ void SetClientId(long id); BOOL Open(DWORD dwSize, CHAR *filePath); BOOL Init(); - Close(); + void Close(); long m_ClientID; HANDLE m_hFile; // handle from CreateFile diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCConstants.h --- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCConstants.h Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCConstants.h Wed Jul 21 12:11:48 2010 -0500 @@ -19,23 +19,29 @@ #include +#ifdef _MSC_VER +#define LL(x) x##i64 +#else +#define LL(x) x##LL +#endif + // com.nokia.tcf.api.ITCConnection.java -#define DEFAULT_COMM_ERROR_RETRY_INTERVAL 1i64 -#define DEFAULT_COMM_ERROR_RETRY_TIMEOUT 300i64 +#define DEFAULT_COMM_ERROR_RETRY_INTERVAL LL(1) +#define DEFAULT_COMM_ERROR_RETRY_TIMEOUT LL(300) // com.nokia.tcf.api.ITCMessageOptions.java -#define DESTINATION_INPUTSTREAM 0i64 -#define DESTINATION_CLIENTFILE 1i64 -#define DEFAULT_DESTINATION 0i64 -#define DEFAULT_INPUTSTREAM_OVERFLOW 1i64 -#define UNWRAP_LEAVE_HEADERS 0i64 -#define UNWRAP_DELETE_HEADERS 1i64 -#define DEFAULT_UNWRAP_OPTION 0i64 -#define ENCODE_NO_FORMAT 0i64 -#define ENCODE_FORMAT 1i64 -#define ENCODE_TRK_FORMAT 2i64 -#define DEFAULT_ENCODE_FORMAT 0i64 +#define DESTINATION_INPUTSTREAM LL(0) +#define DESTINATION_CLIENTFILE LL(1) +#define DEFAULT_DESTINATION LL(0) +#define DEFAULT_INPUTSTREAM_OVERFLOW LL(1) +#define UNWRAP_LEAVE_HEADERS LL(0) +#define UNWRAP_DELETE_HEADERS LL(1) +#define DEFAULT_UNWRAP_OPTION LL(0) +#define ENCODE_NO_FORMAT LL(0) +#define ENCODE_FORMAT LL(1) +#define ENCODE_TRK_FORMAT LL(2) +#define DEFAULT_ENCODE_FORMAT LL(0) #define DEFAULT_OST_VERSION 1L #endif //__TCCONSTANTS_H__ diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCErrorConstants.h --- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCErrorConstants.h Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCErrorConstants.h Wed Jul 21 12:11:48 2010 -0500 @@ -44,7 +44,7 @@ #define TCAPI_ERR_MEDIA_IS_BUSY 20 // used for Trace bpx when someone else is connected #define TCAPI_ERR_PROTOCOL_NOT_SUPPORTED_BY_MEDIA 21 // TraceBox does not support protocol #define TCAPI_ERR_FEATURE_NOT_IMPLEMENTED 22 // API feature not implemented yet - #define TCAPI_ERR_COMM_ERROR 23 // error while polling/reading COMM port + #define TCAPI_ERR_COMM_ERROR 23 // error while writing/polling/reading COMM port (h/w) #define TCAPI_ERR_COMM_TIMEOUT 24 // comm error retry timeout #define TCAPI_ERR_COMM_MULTIPLE_OPEN 25 // there are multiple connections open - cannot attach #define TCAPI_ERR_NO_COMM_OPEN 26 // there are no connections open - cannot attach @@ -82,5 +82,6 @@ #define TCAPI_INFO_TRACEBOX_MEMORY_IS_NORMAL 58 // TRACEBOX buffer overflowed and is now closed #define TCAPI_ERR_TRACEBOX_DATA_CORRUPTED 59 // TRACEBOX received corrupted trace data from phone #define TCAPI_ERR_TRACEBOX_PROTOCOL_MEMORY_OVERFLOW 60 // TRACEBOX protocol processing buffer overflowed - fatal + #define TCAPI_ERR_COMM_ERROR_DEVICE_NOT_READING 61 // target device not reading output from TCF (USB) #endif //__TCERRORCONSTANTS_H__ diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/mutex.h --- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/mutex.h Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/mutex.h Wed Jul 21 12:11:48 2010 -0500 @@ -38,4 +38,4 @@ DWORD m_waitTimeout; BOOL m_mutexOpen; }; -#endif __MUTEX_H__ +#endif //__MUTEX_H__ diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/shareddata.h --- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/shareddata.h Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/shareddata.h Wed Jul 21 12:11:48 2010 -0500 @@ -25,7 +25,7 @@ BOOL Open(DWORD dwSize, CHAR *sharedName); BOOL Open(HANDLE hFile, DWORD dwSize, CHAR *sharedName); - Close(); + void Close(); virtual BOOL Init(); LPVOID GetDataPtr(); BOOL IsCreator(); diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Source/InputStream.cpp --- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Source/InputStream.cpp Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Source/InputStream.cpp Wed Jul 21 12:11:48 2010 -0500 @@ -982,7 +982,7 @@ return fOk; } -CInputStreamFile::Close() +void CInputStreamFile::Close() { // close all mapping handles CSharedData::Close(); diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Source/shareddata.cpp --- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Source/shareddata.cpp Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Source/shareddata.cpp Wed Jul 21 12:11:48 2010 -0500 @@ -107,7 +107,7 @@ } return fOK; } -CSharedData::Close() +void CSharedData::Close() { BOOL fIgnore = FALSE; diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.cpp --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.cpp Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.cpp Wed Jul 21 12:11:48 2010 -0500 @@ -23,6 +23,9 @@ #include "TCErrorConstants.h" #include "resource.h" #include +#ifdef _PSAPI_PRESENT + #include +#endif #ifdef _DEBUG extern BOOL gDoLogging; @@ -201,6 +204,99 @@ m_DebugLog = NULL; } } + +#ifdef _PSAPI_PRESENT +void +CClientManager::FindOrCreateRunningServer() +{ + TCDEBUGOPEN(); + TCDEBUGLOGS("CClientManager::FindOrCreateRunningServer: searching for existing TCFServer.exe\n"); + + // Directory where TCFServer.exe lives + char exeDirectory[MAX_DLLPATHNAME] = {0}; + + BOOL foundRunningServer = FALSE; + + // Get the list of process identifiers. + + DWORD aProcesses[1024], cbNeeded, cProcesses; + unsigned int i; + + if ( EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) ) + { + // Calculate how many process identifiers were returned. + + cProcesses = cbNeeded / sizeof(DWORD); + + // Find existing TCFServer + for ( i = 0; i < cProcesses; i++ ) + { + if( aProcesses[i] != 0 ) + { + TCHAR szProcessName[MAX_PATH] = TEXT(""); + + // Get a handle to the process. + HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | + PROCESS_VM_READ, + FALSE, aProcesses[i] ); + + // Get the process name. + if (NULL != hProcess ) + { + HMODULE hMod; + DWORD cbNeeded; + + if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod), + &cbNeeded) ) + { + if (GetModuleBaseNameA( hProcess, hMod, szProcessName, + sizeof(szProcessName)/sizeof(char) )) + { + if (strcmp(SERVER_PROCESS_NAME, szProcessName) == 0) + { + // get the full path + GetModuleFileNameExA(hProcess, hMod, exeDirectory, + sizeof(exeDirectory)/sizeof(char) ); + + TCDEBUGLOGA1("Found TCFServer at %s\n", exeDirectory); + CloseHandle( hProcess ); + foundRunningServer = TRUE; + break; + } + } + } + } + + CloseHandle( hProcess ); + } + } + } + + if (!foundRunningServer) + { + // start the one next to the DLL + strncpy(exeDirectory, m_DllLocation, strlen(m_DllLocation) + 1); + size_t len = strlen(exeDirectory); + // remove file + for (int i = len-1; i > 0; i--) + { + if (exeDirectory[i] == PATH_DELIMITER) + break; + } + exeDirectory[i] = NULL; + } + + m_ServerExeFile = new char[MAX_DLLPATHNAME]; + sprintf(m_ServerExeFile, "\"%s%c%s\"", exeDirectory, PATH_DELIMITER, SERVER_PROCESS_NAME); + + m_ServerLockFile = new char[MAX_DLLPATHNAME]; + sprintf(m_ServerLockFile, "%s%c%s", exeDirectory, PATH_DELIMITER, SERVER_LOCKFILE_NAME); + + TCDEBUGCLOSE(); + +} +#endif + CErrorMonitor* CClientManager::FindErrorMonitor(long inClientId) { diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.h --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.h Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.h Wed Jul 21 12:11:48 2010 -0500 @@ -59,6 +59,9 @@ virtual ~CClientManager(); // starting/stopping server +#ifdef _PSAPI_PRESENT + void FindOrCreateRunningServer(); +#endif BOOL StartServer(pServerProcessData pData); BOOL StopServer(pServerProcessData pData); long StartServer(); diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCAPIConnectionJni.cpp --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCAPIConnectionJni.cpp Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCAPIConnectionJni.cpp Wed Jul 21 12:11:48 2010 -0500 @@ -1326,11 +1326,11 @@ TCDEBUGLOGA3("nativeSendMessage return ret=%d, osError=%d : %s\n", ret, osError, GetErrorText(osError)); TCDEBUGCLOSE(); - if (ret == TCAPI_ERR_COMM_ERROR && osError > 0) - { - jclass clazz = env->FindClass("Ljava/lang/Exception;"); - env->ThrowNew(clazz, GetErrorText(osError)); - } +// if (ret == TCAPI_ERR_COMM_ERROR && osError > 0) +// { +// jclass clazz = env->FindClass("Ljava/lang/Exception;"); +// env->ThrowNew(clazz, GetErrorText(osError)); +// } return ret; } diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCFClient.plg --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCFClient.plg Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCFClient.plg Wed Jul 21 12:11:48 2010 -0500 @@ -3,36 +3,134 @@

 

Build Log

---------------------Configuration: TCFCommSerial - Win32 Release-------------------- +--------------------Configuration: TCFClient - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60C.tmp" with contents +Creating command line "rc.exe /l 0x409 /fo"Debug/resource.res" /d "_DEBUG" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\resource.rc"" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7C.tmp" with contents +[ +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I ".\jdk1.5.0_10\include" /I ".\jdk1.5.0_10\include\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCLIENT_EXPORTS" /FR"Debug/" /Fp"Debug/TCFClient.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\ClientManager.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\ErrorMonitorData.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\InputStream.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\ServerClient.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\shareddata.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\TCAPIConnectionJni.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\TCFClient.cpp" +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\TCFCppApi.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7C.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7D.tmp" with contents +[ +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I ".\jdk1.5.0_10\include" /I ".\jdk1.5.0_10\include\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCLIENT_EXPORTS" /FR"Debug/" /Fp"Debug/TCFClient.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\StdAfx.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7D.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7E.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMSERIAL_EXPORTS" /Fp"Release/TCFCommSerial.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib shlwapi.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFClient.pdb" /map:"Debug/TCFClient.map" /debug /machine:I386 /out:"Debug/TCFClient.dll" /implib:"Debug/TCFClient.lib" /pdbtype:sept +.\Debug\ClientManager.obj +.\Debug\ErrorMonitorData.obj +.\Debug\InputStream.obj +.\Debug\mutex.obj +.\Debug\ServerClient.obj +.\Debug\shareddata.obj +.\Debug\StdAfx.obj +.\Debug\TCAPIConnectionJni.obj +.\Debug\TCDebugLog.obj +.\Debug\TCFClient.obj +.\Debug\TCFCppApi.obj +.\Debug\resource.res +] +Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7E.tmp" +

Output Window

+Compiling resources... +Compiling... +StdAfx.cpp +Compiling... +ClientManager.cpp +ErrorMonitorData.cpp +InputStream.cpp +mutex.cpp +ServerClient.cpp +shareddata.cpp +TCAPIConnectionJni.cpp +TCDebugLog.cpp +TCFClient.cpp +TCFCppApi.cpp +Generating Code... +Linking... + Creating library Debug/TCFClient.lib and object Debug/TCFClient.exp +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC82.tmp" with contents +[ +/nologo /o"Debug/TCFClient.bsc" +.\Debug\StdAfx.sbr +.\Debug\ClientManager.sbr +.\Debug\ErrorMonitorData.sbr +.\Debug\InputStream.sbr +.\Debug\mutex.sbr +.\Debug\ServerClient.sbr +.\Debug\shareddata.sbr +.\Debug\TCAPIConnectionJni.sbr +.\Debug\TCDebugLog.sbr +.\Debug\TCFClient.sbr +.\Debug\TCFCppApi.sbr] +Creating command line "bscmake.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC82.tmp" +Creating browse info file... +

Output Window

+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC83.bat" with contents +[ +@echo off +copybinaries Debug +] +Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC83.bat" +copy libs +Copy binaries to ..\..\..\os\win32\x86 +The system cannot find the path specified. + 0 file(s) copied. +The system cannot find the path specified. + 0 file(s) copied. +The system cannot find the path specified. + 0 file(s) copied. +Error executing c:\winnt\system32\cmd.exe. + + + +

Results

+TCFClient.dll - 1 error(s), 0 warning(s) +

+--------------------Configuration: TCFCommSerial - Win32 Debug-------------------- +

+

Command Lines

+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC84.tmp" with contents +[ +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMSERIAL_EXPORTS" /Fp"Debug/TCFCommSerial.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseCom.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\RealSerialComm.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\TCFCommSerial.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60C.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60D.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC84.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC85.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMSERIAL_EXPORTS" /Fp"Release/TCFCommSerial.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMSERIAL_EXPORTS" /Fp"Debug/TCFCommSerial.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\StdAfx.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60D.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60E.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC85.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC86.tmp" with contents [ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/TCFCommSerial.pdb" /map:"Release/TCFCommSerial.map" /machine:I386 /out:"Release/TCFCommSerial.dll" /implib:"Release/TCFCommSerial.lib" -.\Release\BaseCom.obj -.\Release\mutex.obj -.\Release\RealSerialComm.obj -.\Release\StdAfx.obj -.\Release\TCDebugLog.obj -.\Release\TCFCommSerial.obj +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFCommSerial.pdb" /map:"Debug/TCFCommSerial.map" /debug /machine:I386 /out:"Debug/TCFCommSerial.dll" /implib:"Debug/TCFCommSerial.lib" /pdbtype:sept +.\Debug\BaseCom.obj +.\Debug\mutex.obj +.\Debug\RealSerialComm.obj +.\Debug\StdAfx.obj +.\Debug\TCDebugLog.obj +.\Debug\TCFCommSerial.obj ] -Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60E.tmp" +Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC86.tmp"

Output Window

Compiling... StdAfx.cpp @@ -44,13 +142,13 @@ TCFCommSerial.cpp Generating Code... Linking... - Creating library Release/TCFCommSerial.lib and object Release/TCFCommSerial.exp -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP612.bat" with contents + Creating library Debug/TCFCommSerial.lib and object Debug/TCFCommSerial.exp +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8A.bat" with contents [ @echo off -copyBinaries Release +copyBinaries Debug ] -Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP612.bat" +Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8A.bat" copy libs Copy binaries to ..\..\..\os\win32\x86 The system cannot find the path specified. @@ -66,36 +164,36 @@

Results

TCFCommSerial.dll - 1 error(s), 0 warning(s)

---------------------Configuration: TCFCommTCP - Win32 Release-------------------- +--------------------Configuration: TCFCommTCP - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP613.tmp" with contents +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8B.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMTCP_EXPORTS" /Fp"Release/TCFCommTCP.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMTCP_EXPORTS" /FR"Debug/" /Fp"Debug/TCFCommTCP.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseCom.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommTCP\TCFCommTCP.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommTCP\TcpComm.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP613.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP614.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8B.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8C.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMTCP_EXPORTS" /Fp"Release/TCFCommTCP.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMTCP_EXPORTS" /FR"Debug/" /Fp"Debug/TCFCommTCP.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommTCP\StdAfx.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP614.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP615.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8C.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8D.tmp" with contents [ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /dll /incremental:no /pdb:"Release/TCFCommTCP.pdb" /map:"Release/TCFCommTCP.map" /machine:I386 /out:"Release/TCFCommTCP.dll" /implib:"Release/TCFCommTCP.lib" -.\Release\BaseCom.obj -.\Release\mutex.obj -.\Release\StdAfx.obj -.\Release\TCDebugLog.obj -.\Release\TCFCommTCP.obj -.\Release\TcpComm.obj +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFCommTCP.pdb" /map:"Debug/TCFCommTCP.map" /debug /machine:I386 /out:"Debug/TCFCommTCP.dll" /implib:"Debug/TCFCommTCP.lib" /pdbtype:sept +.\Debug\BaseCom.obj +.\Debug\mutex.obj +.\Debug\StdAfx.obj +.\Debug\TCDebugLog.obj +.\Debug\TCFCommTCP.obj +.\Debug\TcpComm.obj ] -Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP615.tmp" +Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8D.tmp"

Output Window

Compiling... StdAfx.cpp @@ -107,13 +205,13 @@ TcpComm.cpp Generating Code... Linking... - Creating library Release/TCFCommTCP.lib and object Release/TCFCommTCP.exp -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP619.bat" with contents + Creating library Debug/TCFCommTCP.lib and object Debug/TCFCommTCP.exp +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC91.bat" with contents [ @echo off -copybinaries Release +copybinaries Debug ] -Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP619.bat" +Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC91.bat" copy libs Copy binaries to ..\..\..\os\win32\x86 The system cannot find the path specified. @@ -129,12 +227,12 @@

Results

TCFCommTCP.dll - 1 error(s), 0 warning(s)

---------------------Configuration: TCFCommVirtualSerial - Win32 Release-------------------- +--------------------Configuration: TCFCommVirtualSerial - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61A.tmp" with contents +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC92.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Release/TCFCommVirtualSerial.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Debug/TCFCommVirtualSerial.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseCom.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\RealSerialComm.cpp" @@ -142,25 +240,25 @@ "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\TCFCommVirtualSerial.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\VirtualSerialComm.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61A.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61B.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC92.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC93.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Release/TCFCommVirtualSerial.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Debug/TCFCommVirtualSerial.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\StdAfx.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61B.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61C.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC93.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC94.tmp" with contents [ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/TCFCommVirtualSerial.pdb" /map:"Release/TCFCommVirtualSerial.map" /machine:I386 /out:"Release/TCFCommVirtualSerial.dll" /implib:"Release/TCFCommVirtualSerial.lib" -.\Release\BaseCom.obj -.\Release\mutex.obj -.\Release\RealSerialComm.obj -.\Release\StdAfx.obj -.\Release\TCDebugLog.obj -.\Release\TCFCommVirtualSerial.obj -.\Release\VirtualSerialComm.obj +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFCommVirtualSerial.pdb" /map:"Debug/TCFCommVirtualSerial.map" /debug /machine:I386 /out:"Debug/TCFCommVirtualSerial.dll" /implib:"Debug/TCFCommVirtualSerial.lib" /pdbtype:sept +.\Debug\BaseCom.obj +.\Debug\mutex.obj +.\Debug\RealSerialComm.obj +.\Debug\StdAfx.obj +.\Debug\TCDebugLog.obj +.\Debug\TCFCommVirtualSerial.obj +.\Debug\VirtualSerialComm.obj ] -Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61C.tmp" +Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC94.tmp"

Output Window

Compiling... StdAfx.cpp @@ -173,13 +271,13 @@ VirtualSerialComm.cpp Generating Code... Linking... - Creating library Release/TCFCommVirtualSerial.lib and object Release/TCFCommVirtualSerial.exp -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP620.bat" with contents + Creating library Debug/TCFCommVirtualSerial.lib and object Debug/TCFCommVirtualSerial.exp +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC98.bat" with contents [ @echo off -copyBinaries Release +copyBinaries Debug ] -Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP620.bat" +Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC98.bat" copy libs Copy binaries to ..\..\..\os\win32\x86 The system cannot find the path specified. @@ -195,32 +293,32 @@

Results

TCFCommVirtualSerial.dll - 1 error(s), 0 warning(s)

---------------------Configuration: TCFProtOST - Win32 Release-------------------- +--------------------Configuration: TCFProtOST - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP621.tmp" with contents +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC99.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFPROTOST_EXPORTS" /Fp"Release/TCFProtOST.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFPROTOST_EXPORTS" /Fp"Debug/TCFProtOST.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseProtocol.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFProtOST\OSTProtocol.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFProtOST\TCFProtOST.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP621.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP622.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC99.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9A.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFPROTOST_EXPORTS" /Fp"Release/TCFProtOST.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFPROTOST_EXPORTS" /Fp"Debug/TCFProtOST.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFProtOST\StdAfx.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP622.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP623.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9A.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9B.tmp" with contents [ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/TCFProtOST.pdb" /map:"Release/TCFProtOST.map" /machine:I386 /out:"Release/TCFProtOST.dll" /implib:"Release/TCFProtOST.lib" -.\Release\BaseProtocol.obj -.\Release\OSTProtocol.obj -.\Release\StdAfx.obj -.\Release\TCFProtOST.obj +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFProtOST.pdb" /map:"Debug/TCFProtOST.map" /debug /machine:I386 /out:"Debug/TCFProtOST.dll" /implib:"Debug/TCFProtOST.lib" /pdbtype:sept +.\Debug\BaseProtocol.obj +.\Debug\OSTProtocol.obj +.\Debug\StdAfx.obj +.\Debug\TCFProtOST.obj ] -Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP623.tmp" +Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9B.tmp"

Output Window

Compiling... StdAfx.cpp @@ -230,13 +328,13 @@ TCFProtOST.cpp Generating Code... Linking... - Creating library Release/TCFProtOST.lib and object Release/TCFProtOST.exp -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP627.bat" with contents + Creating library Debug/TCFProtOST.lib and object Debug/TCFProtOST.exp +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9F.bat" with contents [ @echo off -copyBinaries Release +copyBinaries Debug ] -Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP627.bat" +Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9F.bat" copy libs Copy binaries to ..\..\..\os\win32\x86 The system cannot find the path specified. @@ -252,13 +350,13 @@

Results

TCFProtOST.dll - 1 error(s), 0 warning(s)

---------------------Configuration: TCFServer - Win32 Release-------------------- +--------------------Configuration: TCFServer - Win32 Debug--------------------

Command Lines

-Creating command line "rc.exe /l 0x409 /fo"Release/resource.res" /d "NDEBUG" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\resource.rc"" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP628.tmp" with contents +Creating command line "rc.exe /l 0x409 /fo"Debug/resource.res" /d "_DEBUG" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\resource.rc"" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA0.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Release/TCFServer.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/TCFServer.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\Client.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\CommRegistryItem.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\Connection.cpp" @@ -276,36 +374,36 @@ "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\TCFServer.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP628.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP629.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA0.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA1.tmp" with contents [ -/nologo /Zp2 /MT /W3 /GX /O2 /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Release/TCFServer.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/TCFServer.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\StdAfx.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP629.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP62A.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA1.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA2.tmp" with contents [ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /subsystem:console /incremental:no /pdb:"Release/TCFServer.pdb" /machine:I386 /out:"Release/TCFServer.exe" -.\Release\Client.obj -.\Release\CommRegistryItem.obj -.\Release\Connection.obj -.\Release\ConnectionImpl.obj -.\Release\ErrorMonitorData.obj -.\Release\InputStream.obj -.\Release\MessageFile.obj -.\Release\mutex.obj -.\Release\ProtocolRegistryItem.obj -.\Release\Registry.obj -.\Release\RegistryImpl.obj -.\Release\ServerClient.obj -.\Release\ServerManager.obj -.\Release\shareddata.obj -.\Release\StdAfx.obj -.\Release\TCDebugLog.obj -.\Release\TCFServer.obj -.\Release\resource.res +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/TCFServer.pdb" /debug /machine:I386 /out:"Debug/TCFServer.exe" /pdbtype:sept +.\Debug\Client.obj +.\Debug\CommRegistryItem.obj +.\Debug\Connection.obj +.\Debug\ConnectionImpl.obj +.\Debug\ErrorMonitorData.obj +.\Debug\InputStream.obj +.\Debug\MessageFile.obj +.\Debug\mutex.obj +.\Debug\ProtocolRegistryItem.obj +.\Debug\Registry.obj +.\Debug\RegistryImpl.obj +.\Debug\ServerClient.obj +.\Debug\ServerManager.obj +.\Debug\shareddata.obj +.\Debug\StdAfx.obj +.\Debug\TCDebugLog.obj +.\Debug\TCFServer.obj +.\Debug\resource.res ] -Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP62A.tmp" +Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA2.tmp"

Output Window

Compiling resources... Compiling... @@ -329,12 +427,35 @@ TCFServer.cpp Generating Code... Linking... -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP62C.bat" with contents +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA4.tmp" with contents +[ +/nologo /o"Debug/TCFServer.bsc" +.\Debug\StdAfx.sbr +.\Debug\Client.sbr +.\Debug\CommRegistryItem.sbr +.\Debug\Connection.sbr +.\Debug\ConnectionImpl.sbr +.\Debug\ErrorMonitorData.sbr +.\Debug\InputStream.sbr +.\Debug\MessageFile.sbr +.\Debug\mutex.sbr +.\Debug\ProtocolRegistryItem.sbr +.\Debug\Registry.sbr +.\Debug\RegistryImpl.sbr +.\Debug\ServerClient.sbr +.\Debug\ServerManager.sbr +.\Debug\shareddata.sbr +.\Debug\TCDebugLog.sbr +.\Debug\TCFServer.sbr] +Creating command line "bscmake.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA4.tmp" +Creating browse info file... +

Output Window

+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA5.bat" with contents [ @echo off -copybinaries Release +copybinaries Debug ] -Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP62C.bat" +Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA5.bat" copy binary Copy binaries to ..\..\..\os\win32\x86 The system cannot find the path specified. diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp Wed Jul 21 12:11:48 2010 -0500 @@ -366,7 +366,7 @@ long CRealSerialComm::ClosePort() { COMMLOGOPEN(); - COMMLOGS("CRealSerialComm::ClosePort\n"); + COMMLOGA1("CRealSerialComm::ClosePort connected=%d\n", IsConnected()); long err = TCAPI_ERR_NONE; @@ -443,8 +443,9 @@ // and there was some kind of error if (lclNumBytes != inSize) { + m_lastCommError = 0; COMMLOGOPEN(); - COMMLOGA3("CRealSerialComm::SendDataToPort WriteFile not all bytes sent: lclNumBytes=%d inSize=%d err=%d\n", lclNumBytes, inSize, GetLastError()); + COMMLOGA3("CRealSerialComm::SendDataToPort WriteFile not all bytes sent: lclNumBytes=%d inSize=%d err=%d\n", lclNumBytes, inSize, m_lastCommError); COMMLOGCLOSE(); COMSTAT lclComStat; @@ -465,19 +466,27 @@ if (lclErrorFlags) { // there really was an error - m_lastCommError = lclErrorFlags; err = TCAPI_ERR_COMM_ERROR; COMMLOGOPEN(); - COMMLOGA1("CRealSerialComm::SendDataToPort ClearCommError succeeded lclErrorFlags=%d\n", m_lastCommError); + COMMLOGA1("CRealSerialComm::SendDataToPort ClearCommError succeeded lclErrorFlags=%d\n", lclErrorFlags); COMMLOGCLOSE(); } else { // No OS error returned, but WriteFile failed to write out all bytes // therefore, since we are not doing overlapped I/O, this is an error. - err = TCAPI_ERR_COMM_ERROR; +// DUMPCOMSTAT(&lclComStat); + BOOL flush = FlushFileBuffers(m_hSerial); // flush transmit buffer +// ClearCommError(m_hSerial, &lclErrorFlags, &lclComStat); +// if (WriteFile(m_hSerial, inData, inSize, &lclNumBytes, NULL)) +// { +// COMMLOGOPEN(); +// COMMLOGA1("CRealSerialComm::SendDataToPort WriteFile#2 succeeded lclNumBytes=%d\n", lclNumBytes); +// COMMLOGCLOSE(); +// } + err = TCAPI_ERR_COMM_ERROR_DEVICE_NOT_READING; COMMLOGOPEN(); - COMMLOGS("CRealSerialComm::SendDataToPort ClearCommError succeeded lclErrorFlags=0\n"); + COMMLOGA2("CRealSerialComm::SendDataToPort ClearCommError succeeded lclErrorFlags=0 err=%d flush=%d\n", m_lastCommError, flush); COMMLOGCLOSE(); // DUMPCOMSTAT(&lclComStat); } @@ -492,7 +501,7 @@ COMMLOGS("CRealSerialComm::SendDataToPort WriteFile successful\n"); BYTE* ptr = (BYTE*)inData; long numBytes = (inSize > 80) ? 80 : inSize; - char msg[200]; + char msg[300]; sprintf(msg, "CRealSerialComm::SendDataToPort = "); for (int i = 0; i < numBytes; i++) { @@ -524,12 +533,16 @@ COMSTAT lclComStat; DWORD lclErrorFlags=0; - if (!IsConnected()) + if (!IsConnected() || m_hSerial == INVALID_HANDLE_VALUE) return TCAPI_ERR_MEDIA_NOT_OPEN; + // Sleep(1); if (!ClearCommError( m_hSerial, &lclErrorFlags, &lclComStat )) { + if (!IsConnected() || m_hSerial == INVALID_HANDLE_VALUE) + return TCAPI_ERR_MEDIA_NOT_OPEN; + m_lastCommError = GetLastError(); err = TCAPI_ERR_COMM_ERROR; diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFCommVirtualSerial/TCFCommVirtualSerial.plg --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFCommVirtualSerial/TCFCommVirtualSerial.plg Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFCommVirtualSerial/TCFCommVirtualSerial.plg Wed Jul 21 12:11:48 2010 -0500 @@ -3,57 +3,38 @@
 

Build Log

---------------------Configuration: TCFCommVirtualSerial - Win32 Debug-------------------- +--------------------Configuration: TCFCommVirtualSerial - Win32 Release--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFA.tmp" with contents +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE38.tmp" with contents [ -/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Debug/TCFCommVirtualSerial.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseCom.cpp" -"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp" -"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\RealSerialComm.cpp" -"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp" -"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\TCFCommVirtualSerial.cpp" -"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\VirtualSerialComm.cpp" +/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Release/TCFCommVirtualSerial.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\RealSerialComm.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFA.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFB.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE38.tmp" +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE39.tmp" with contents [ -/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Debug/TCFCommVirtualSerial.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\StdAfx.cpp" +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/TCFCommVirtualSerial.pdb" /map:"Release/TCFCommVirtualSerial.map" /machine:I386 /out:"Release/TCFCommVirtualSerial.dll" /implib:"Release/TCFCommVirtualSerial.lib" +.\Release\BaseCom.obj +.\Release\mutex.obj +.\Release\RealSerialComm.obj +.\Release\StdAfx.obj +.\Release\TCDebugLog.obj +.\Release\TCFCommVirtualSerial.obj +.\Release\VirtualSerialComm.obj ] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFB.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFC.tmp" with contents -[ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFCommVirtualSerial.pdb" /map:"Debug/TCFCommVirtualSerial.map" /debug /machine:I386 /out:"Debug/TCFCommVirtualSerial.dll" /implib:"Debug/TCFCommVirtualSerial.lib" /pdbtype:sept -.\Debug\BaseCom.obj -.\Debug\mutex.obj -.\Debug\RealSerialComm.obj -.\Debug\StdAfx.obj -.\Debug\TCDebugLog.obj -.\Debug\TCFCommVirtualSerial.obj -.\Debug\VirtualSerialComm.obj -] -Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFC.tmp" +Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE39.tmp"

Output Window

Compiling... -StdAfx.cpp -Compiling... -BaseCom.cpp -mutex.cpp RealSerialComm.cpp -TCDebugLog.cpp -TCFCommVirtualSerial.cpp -VirtualSerialComm.cpp -Generating Code... Linking... - Creating library Debug/TCFCommVirtualSerial.lib and object Debug/TCFCommVirtualSerial.exp -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPB00.bat" with contents + Creating library Release/TCFCommVirtualSerial.lib and object Release/TCFCommVirtualSerial.exp +Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE3D.bat" with contents [ @echo off -copyBinaries Debug +copyBinaries Release ] -Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPB00.bat" +Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE3D.bat" copy libs Copy binaries to ..\..\..\os\win32\x86 The system cannot find the path specified. diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFNative.ncb Binary file connectivity/com.nokia.tcf/native/TCFNative/TCFNative.ncb has changed diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFNative.opt Binary file connectivity/com.nokia.tcf/native/TCFNative/TCFNative.opt has changed diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFServer/BaseCom.h --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/BaseCom.h Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/BaseCom.h Wed Jul 21 12:11:48 2010 -0500 @@ -124,4 +124,4 @@ #define COMMDLL_BASENAME "TCFComm" -#endif __BASECOM_H__ +#endif //__BASECOM_H__ diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.cpp --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.cpp Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.cpp Wed Jul 21 12:11:48 2010 -0500 @@ -27,7 +27,7 @@ extern BOOL gDoLogging; #endif -//#define LOG_CONNECTION +#define LOG_CONNECTION #if defined(LOG_CONNECTION) && defined(_DEBUG) #define TCDEBUGOPEN() if (gDoLogging) { this->m_DebugLog->WaitForAccess(); } #define TCDEBUGLOGS(s) if (gDoLogging) { sprintf(this->m_DebugLogMsg,"%s", s); this->m_DebugLog->log(this->m_DebugLogMsg); } @@ -407,9 +407,10 @@ delete[] encodedMessage; TCDEBUGLOGS("CConnectionImpl::DoSendMessage done\n"); - if (err == TCAPI_ERR_COMM_ERROR) + if (err != TCAPI_ERR_NONE) { // EnterRetryPeriod(err, true, m_BaseComm->m_lastCommError); + HandleFatalPortError(err, true, m_BaseComm->m_lastCommError); m_OsError = m_BaseComm->m_lastCommError; } } @@ -662,6 +663,19 @@ return m_Registry->AddClient(client, numberIds, ids); } +long CConnectionImpl::HandleFatalPortError(long err, bool passOsErr, DWORD osErr) +{ + TCDEBUGOPEN(); + TCDEBUGLOGA3("CConnectionImpl::HandleFatalPortError err=%d passOsErr=%d osErr=%d\n", err, passOsErr, osErr); + TCDEBUGCLOSE(); + + m_BaseComm->ClosePort(); + m_Status = eDisconnected; + + NotifyClientsCommError(err); + + return TCAPI_ERR_NONE; +} void CConnectionImpl::NotifyClientsCommError(long tcfError, bool passOsError, DWORD osError) { // TCDEBUGOPEN(); @@ -769,6 +783,8 @@ { MPLOGA2("MessageProcessor err = %d osError = %d\n", err, pThis->m_BaseComm->m_lastCommError); // pThis->EnterRetryPeriod(err, true, pThis->m_BaseComm->m_lastCommError); + if (err == TCAPI_ERR_COMM_ERROR) + pThis->HandleFatalPortError(err, true, pThis->m_BaseComm->m_lastCommError); } else { @@ -786,8 +802,11 @@ if (err == TCAPI_ERR_COMM_ERROR) { + MPLOGA2("MessageProcessor err = %d osError = %d\n", err, pThis->m_BaseComm->m_lastCommError); // for this error we have os error, but we probably caught this in PollPort already // pThis->EnterRetryPeriod(err, true, pThis->m_BaseComm->m_lastCommError); + if (err == TCAPI_ERR_COMM_ERROR) + pThis->HandleFatalPortError(err, true, pThis->m_BaseComm->m_lastCommError); } else if (err != TCAPI_ERR_NONE) { diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.h --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.h Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.h Wed Jul 21 12:11:48 2010 -0500 @@ -48,6 +48,7 @@ long DoSendMessage(long encodeOption, BYTE protocolVersion, BOOL useMsgId, BYTE msgId, DWORD msgLength, BYTE* msg); long DoRetryProcessing(); long EnterRetryPeriod(long err, bool passOsErr, DWORD osErr); + long HandleFatalPortError(long err, bool passOsErr, DWORD osErr); BOOL PauseProcessing(); // pause processing thread (not exit) BOOL RestartProcessing(); // restart processing after a pause diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFServer/TCFServer.plg --- a/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/TCFServer.plg Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/TCFServer.plg Wed Jul 21 12:11:48 2010 -0500 @@ -3,81 +3,14 @@
 

Build Log

---------------------Configuration: TCFServer - Win32 Debug-------------------- +--------------------Configuration: TCFServer - Win32 Release--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAC9.tmp" with contents -[ -/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/TCFServer.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\ServerManager.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAC9.tmp" -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACA.tmp" with contents -[ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/TCFServer.pdb" /debug /machine:I386 /out:"Debug/TCFServer.exe" /pdbtype:sept -.\Debug\Client.obj -.\Debug\CommRegistryItem.obj -.\Debug\Connection.obj -.\Debug\ConnectionImpl.obj -.\Debug\ErrorMonitorData.obj -.\Debug\InputStream.obj -.\Debug\MessageFile.obj -.\Debug\mutex.obj -.\Debug\ProtocolRegistryItem.obj -.\Debug\Registry.obj -.\Debug\RegistryImpl.obj -.\Debug\ServerClient.obj -.\Debug\ServerManager.obj -.\Debug\shareddata.obj -.\Debug\StdAfx.obj -.\Debug\TCDebugLog.obj -.\Debug\TCFServer.obj -.\Debug\resource.res -] -Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACA.tmp" -

Output Window

-Compiling... -ServerManager.cpp -Linking... -Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACC.tmp" with contents -[ -/nologo /o"Debug/TCFServer.bsc" -.\Debug\StdAfx.sbr -.\Debug\Client.sbr -.\Debug\CommRegistryItem.sbr -.\Debug\Connection.sbr -.\Debug\ConnectionImpl.sbr -.\Debug\ErrorMonitorData.sbr -.\Debug\InputStream.sbr -.\Debug\MessageFile.sbr -.\Debug\mutex.sbr -.\Debug\ProtocolRegistryItem.sbr -.\Debug\Registry.sbr -.\Debug\RegistryImpl.sbr -.\Debug\ServerClient.sbr -.\Debug\ServerManager.sbr -.\Debug\shareddata.sbr -.\Debug\TCDebugLog.sbr -.\Debug\TCFServer.sbr] -Creating command line "bscmake.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACC.tmp" -Creating browse info file... -

Output Window

-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACD.bat" with contents -[ -@echo off -copybinaries Debug -] -Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACD.bat" -copy binary -Copy binaries to ..\..\..\os\win32\x86 -The system cannot find the path specified. - 0 file(s) copied. -Error executing c:\winnt\system32\cmd.exe.

Results

-TCFServer.exe - 1 error(s), 0 warning(s) +TCFServer.exe - 0 error(s), 0 warning(s)
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/src/com/nokia/tcf/api/TCErrorConstants.java --- a/connectivity/com.nokia.tcf/src/com/nokia/tcf/api/TCErrorConstants.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/src/com/nokia/tcf/api/TCErrorConstants.java Wed Jul 21 12:11:48 2010 -0500 @@ -48,7 +48,7 @@ public static final long TCAPI_ERR_MEDIA_IS_BUSY = 20; // used for Trace bpx when someone else is connected public static final long TCAPI_ERR_PROTOCOL_NOT_SUPPORTED_BY_MEDIA = 21; // TraceBox does not support protocol public static final long TCAPI_ERR_FEATURE_NOT_IMPLEMENTED = 22; // API feature not implemented yet - public static final long TCAPI_ERR_COMM_ERROR = 23; // error while polling/reading COMM port + public static final long TCAPI_ERR_COMM_ERROR = 23; // error while writing/polling/reading COMM port (h/w error) public static final long TCAPI_ERR_COMM_TIMEOUT = 24; // comm error retry timeout public static final long TCAPI_ERR_COMM_MULTIPLE_OPEN = 25; // there are multiple connections open - cannot attach public static final long TCAPI_ERR_NO_COMM_OPEN = 26; // there are no connections open - cannot attach @@ -86,6 +86,7 @@ public static final long TCAPI_INFO_TRACEBOX_MEMORY_IS_NORMAL = 58; // TRACEBOX buffer overflowed and is now closed public static final long TCAPI_ERR_TRACEBOX_DATA_CORRUPTED = 59; // TRACEBOX received corrupted trace data from phone public static final long TCAPI_ERR_TRACEBOX_PROTOCOL_MEMORY_OVERFLOW = 60; // TRACEBOX protocol processing buffer overflowed - fatal + public static final long TCAPI_ERR_COMM_ERROR_DEVICE_NOT_READING = 61; // target device not reading output from TCF (USB) /** diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/src/com/nokia/tcf/api/messages.properties --- a/connectivity/com.nokia.tcf/src/com/nokia/tcf/api/messages.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/src/com/nokia/tcf/api/messages.properties Wed Jul 21 12:11:48 2010 -0500 @@ -1,61 +1,62 @@ -TCErrorConstants.1=TCFError: Error opening communication port. OS Error: %d -TCErrorConstants.2=TCFError: This connection is already open. -TCErrorConstants.3=TCFError: Invalid client. -TCErrorConstants.4=TCFError: Timeout occurred on attempting to open connection. -TCErrorConstants.5=TCFError: Message file is open. This operation is not allowed. -TCErrorConstants.8=TCFError: Message processing is stopped. This operation is not allowed. -TCErrorConstants.9=TCFError: Message processing is in progress. This operation is not allowed. -TCErrorConstants.10=TCFError: Error writing to message file. -TCErrorConstants.11=TCFError: No message IDs have been specified in ITCMessageOptions. -TCErrorConstants.12=TCFError: Connection is not open. -TCErrorConstants.13=TCFError: This connection is not supported. -TCErrorConstants.14=TCFError: This is an unknown connection type. -TCErrorConstants.15=TCFError: Connection type is supported, but is missing some settings. -TCErrorConstants.16=TCFError: Connection type is supported, but has some invalid settings. -TCErrorConstants.17=TCFError: Connection type is supported, but there was an error in connecting. -TCErrorConstants.18=TCFError: Could not locate the TCF Server. -TCErrorConstants.19=TCFError: Could not create the TCF Server process. -TCErrorConstants.20=TCFError: Connection is in use by another process. -TCErrorConstants.21=TCFError: Protocol not supported by connection type. -TCErrorConstants.22=TCFError: Feature not yet supported. -TCErrorConstants.23=TCFError: Error occurred while accessing communication port. -TCErrorConstants.24=TCFError: Timeout occurred in attempting to reconnect to communication port. -TCErrorConstants.25=TCFError: Multiple connections are open. Attaching cannot proceed. -TCErrorConstants.26=TCFError: No connections are open. Attaching cannot proceed. -TCErrorConstants.27=TCFError: Client already connected. -TCErrorConstants.28=TCFError: Invalid protocol decode format specified. Refer to ITCConnection. -TCErrorConstants.29=TCFError: Invalid retry interval or retry timeout specified. -TCErrorConstants.30=TCFError: Invalid input stream overflow option specified. Refer to ITCMessageOptions. -TCErrorConstants.31=TCFError: Invalid output message encode format specified. Refer to ITCMessageOptions. -TCErrorConstants.32=TCFError: Invalid protocol unwrapping option specified. Refer to ITCMessageOptions. -TCErrorConstants.33=TCFError: Input stream size must be > 0. -TCErrorConstants.34=TCFError: ITCMessageOptions missing. -TCErrorConstants.35=TCFError: ITCConnection missing. -TCErrorConstants.36=TCFError: ITCMessage missing. -TCErrorConstants.37=TCFError: ITCMessage options conflict with ITCMessageOptions encoding options. -TCErrorConstants.38=TCFError: Message IDs specified exceeded maximum (> 256) -TCErrorConstants.39=TCFError: Error creating input stream overflow file -TCErrorConstants.40=TCFError: Operation not allowed. Input stream is closed. -TCErrorConstants.41=TCFError: Platform configuration location not found. -TCErrorConstants.42=TCFError: Invalid Error Listener. -TCErrorConstants.43=TCFError: Error occurred while accessing communication port. Retry in progress. -TCErrorConstants.44=TCFInfo: Connection to communication port has been re-established. -TCErrorConstants.45=TCFError: Invalid baud rate specified. Refer to ITCRealSerialConnection. -TCErrorConstants.46=TCFError: Invalid data bits specified. Refer to ITCRealSerialConnection. -TCErrorConstants.47=TCFError: Invalid parity checking specified. Refer to ITCRealSerialConnection. -TCErrorConstants.48=TCFError: Invalid stop bits specified. Refer to ITCRealSerialConnection. -TCErrorConstants.49=TCFError: Invalid flow control specified. Refer to ITCRealSerialConnection. -TCErrorConstants.50=TCFError: TCFServer did not respond. -TCErrorConstants.51=TCFError: Input stream buffer overflowed. Messages have been lost. -TCErrorConstants.52=TCFInfo: Input stream buffer overflowed to file. -TCErrorConstants.53=TCFError: Input stream file overflowed. Messages have been lost. -TCErrorConstants.54=TCFError: Message file not specified. -TCErrorConstants.55=TCFError: Message file could not be created. -TCErrorConstants.56=TCFInfo: Trace box memory is close to overflowing. -TCErrorConstants.57=TCFError: Trace box memory has overflowed and is now closed. -TCErrorConstants.58=TCFInfo: Trace box memory was overflowed and is now available. -TCErrorConstants.59=TCFError: Trace box received corrupted trace data from the device. -TCErrorConstants.60=TCFError: Trace box protocol memory has overflowed. You must disconnect and reset the Trace box. +TCErrorConstants.1=Error opening communication port. OS Error: %d +TCErrorConstants.2=This connection is already open. +TCErrorConstants.3=Invalid client. +TCErrorConstants.4=Timeout occurred on attempting to open connection. +TCErrorConstants.5=Message file is open. This operation is not allowed. +TCErrorConstants.8=Message processing is stopped. This operation is not allowed. +TCErrorConstants.9=Message processing is in progress. This operation is not allowed. +TCErrorConstants.10=Error writing to message file. +TCErrorConstants.11=No message IDs have been specified in ITCMessageOptions. +TCErrorConstants.12=Connection is not open. +TCErrorConstants.13=This connection is not supported. +TCErrorConstants.14=This is an unknown connection type. +TCErrorConstants.15=Connection type is supported, but is missing some settings. +TCErrorConstants.16=Connection type is supported, but has some invalid settings. +TCErrorConstants.17=The communication port could not be opened. Either it is in use by another application or it does not exist on the system. +TCErrorConstants.18=Could not locate the TCF Server. +TCErrorConstants.19=Could not create the TCF Server process. +TCErrorConstants.20=Connection is in use by another process. +TCErrorConstants.21=Protocol not supported by connection type. +TCErrorConstants.22=Feature not yet supported. +TCErrorConstants.23=An error occurred while reading from or writing to the opened communication port. It is possible the connected device is not listening to this port. +TCErrorConstants.24=Timeout occurred in attempting to reconnect to communication port. +TCErrorConstants.25=Multiple connections are open. Attaching cannot proceed. +TCErrorConstants.26=No connections are open. Attaching cannot proceed. +TCErrorConstants.27=Client already connected. +TCErrorConstants.28=Invalid protocol decode format specified. Refer to ITCConnection. +TCErrorConstants.29=Invalid retry interval or retry timeout specified. +TCErrorConstants.30=Invalid input stream overflow option specified. Refer to ITCMessageOptions. +TCErrorConstants.31=Invalid output message encode format specified. Refer to ITCMessageOptions. +TCErrorConstants.32=Invalid protocol unwrapping option specified. Refer to ITCMessageOptions. +TCErrorConstants.33=Input stream size must be > 0. +TCErrorConstants.34=ITCMessageOptions missing. +TCErrorConstants.35=ITCConnection missing. +TCErrorConstants.36=ITCMessage missing. +TCErrorConstants.37=ITCMessage options conflict with ITCMessageOptions encoding options. +TCErrorConstants.38=Message IDs specified exceeded maximum (> 256) +TCErrorConstants.39=Error creating input stream overflow file +TCErrorConstants.40=Operation not allowed. Input stream is closed. +TCErrorConstants.41=Platform configuration location not found. +TCErrorConstants.42=Invalid Error Listener. +TCErrorConstants.43=Error occurred while accessing communication port. Retry in progress. +TCErrorConstants.44=Connection to communication port has been re-established. +TCErrorConstants.45=Invalid baud rate specified. Refer to ITCRealSerialConnection. +TCErrorConstants.46=Invalid data bits specified. Refer to ITCRealSerialConnection. +TCErrorConstants.47=Invalid parity checking specified. Refer to ITCRealSerialConnection. +TCErrorConstants.48=Invalid stop bits specified. Refer to ITCRealSerialConnection. +TCErrorConstants.49=Invalid flow control specified. Refer to ITCRealSerialConnection. +TCErrorConstants.50=TCFServer did not respond. +TCErrorConstants.51=Input stream buffer overflowed. Messages have been lost. +TCErrorConstants.52=Input stream buffer overflowed to file. +TCErrorConstants.53=Input stream file overflowed. Messages have been lost. +TCErrorConstants.54=Message file not specified. +TCErrorConstants.55=Message file could not be created. +TCErrorConstants.56=Trace box memory is close to overflowing. +TCErrorConstants.57=Trace box memory has overflowed and is now closed. +TCErrorConstants.58=Trace box memory was overflowed and is now available. +TCErrorConstants.59=Trace box received corrupted trace data from the device. +TCErrorConstants.60=Trace box protocol memory has overflowed. You must disconnect and reset the Trace box. +TCErrorConstants.61=Data was sent to the open communication port, but the device is not listening to this port. ITCRealSerialConnection.15=none ITCRealSerialConnection.16=even ITCRealSerialConnection.17=odd diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java --- a/connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java Wed Jul 21 11:37:56 2010 -0500 +++ b/connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java Wed Jul 21 12:11:48 2010 -0500 @@ -501,9 +501,13 @@ settings = new String[1]; } else { // Add other connections here + return new Status(Status.ERROR, Activator.PLUGIN_ID, (int)TCErrorConstants.TCAPI_ERR_MEDIA_NOT_SUPPORTED, + "Unknown connection type: " + type, null); } + return finishConnect(type, settings, inConnection, inMessageOptions, inMessageIds); + } else { + return status; } - return finishConnect(type, settings, inConnection, inMessageOptions, inMessageIds); } protected void ensureWritableFile(String filePath) throws IOException { // ensure file path points to a writable regular file diff -r d1edeecb12af -r 03f5f8bf29b4 core/carbide_releases/configuration/server.properties --- a/core/carbide_releases/configuration/server.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/core/carbide_releases/configuration/server.properties Wed Jul 21 12:11:48 2010 -0500 @@ -8,6 +8,7 @@ # ############################################################################### com.nokia.carbide.cpp.news.reader.feed.listing.file=http://tools.ext.nokia.com/carbide_news_reader/feedListing.xml -com.nokia.carbide.trk.support.service.TRKService=http://tools.ext.nokia.com/trk -com.nokia.carbide.trk.support.service.TracingService=http://tools.ext.nokia.com/trk +com.nokia.carbide.trk.support.service.TRKService=http://tools.ext.nokia.com/trk/TRKPackages.xml com.nokia.carbide.discovery.directory=http://tools.ext.nokia.com/carbide/updates/3.0/discovery/directory.xml +com.nokia.carbide.internal.discovery.ui.view.SupportPage=https://xdabug001.ext.nokia.com/bugzilla +com.nokia.carbide.internal.discovery.ui.view.HomePage=http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Carbide.c++/ diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.XULRunnerInitializer/.classpath --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.XULRunnerInitializer/.classpath Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,7 @@ + + + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.XULRunnerInitializer/.project --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.XULRunnerInitializer/.project Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,28 @@ + + + com.nokia.carbide.XULRunnerInitializer + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.XULRunnerInitializer/.settings/org.eclipse.jdt.core.prefs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.XULRunnerInitializer/.settings/org.eclipse.jdt.core.prefs Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,8 @@ +#Mon Jul 19 10:13:13 CDT 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.XULRunnerInitializer/META-INF/MANIFEST.MF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.XULRunnerInitializer/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: XULRunnerInitializer +Bundle-SymbolicName: com.nokia.carbide.XULRunnerInitializer +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: NOKIA +Fragment-Host: org.eclipse.swt;bundle-version="3.6.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0", + org.eclipse.osgi.services;bundle-version="3.2.100" diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.XULRunnerInitializer/build.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.XULRunnerInitializer/build.properties Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.XULRunnerInitializer/src/org/eclipse/swt/browser/XULRunnerInitializer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.XULRunnerInitializer/src/org/eclipse/swt/browser/XULRunnerInitializer.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,32 @@ +package org.eclipse.swt.browser; + +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.Platform; +import org.osgi.framework.Bundle; + +public class XULRunnerInitializer { + static { + Bundle bundle = Platform.getBundle("org.mozilla.xulrunner.win32.win32.x86"); //$NON-NLS-1$ + if (bundle != null) { + URL resourceUrl = bundle.getResource("xulrunner"); //$NON-NLS-1$ + if (resourceUrl != null) { + try { + URL fileUrl = FileLocator.toFileURL(resourceUrl); + File file = new File(fileUrl.toURI()); + System.setProperty("org.eclipse.swt.browser.XULRunnerPath", file.getAbsolutePath()); //$NON-NLS-1$ + + } catch (IOException e) { + // log the exception + } catch (URISyntaxException e) { + // log the exception + } + } + } + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/book.css --- a/core/com.nokia.carbide.cpp.compiler.doc.user/book.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/book.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,34 +1,33 @@ /* - Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: http://www.eclipse.org/legal/epl-v10.html */ /* Add whitespace around entire display to avoid crowding edges of view */ -/* 20070523-Removed top margin size to close gap between location breadcrumbs and page title */ html { margin: 2px 10px 10px 10px; } -/* Set default font to serif style, 12-pt and plain */ -body, p, table { - font-family: Verdana, Helvetica, sans-serif; - font-size: 13px; +/* 20091007 added verdana and ariel to list to match SFO website fonts choices */ +body, p, table, li { + font-family: Verdana, Ariel, Helvetica, sans-serif; + font-size: 1.0em; font-weight: normal; } -/* Use sans-serif fonts for all title styles */ h1, h2, h3, h4, h5, h6, strong, em { - font-family: Verdana, Helvetica, sans-serif; + font-family: Verdana, Ariel, Helvetica, sans-serif; color: #000000; } -h1 { font-size:20px } -h2 { font-size:18px } -h3 { font-size:16px } -h4 { font-size:14px } -h5 { font-size:13px } -h6 { font-size:12px } +/* 20091007 - changed sizes to use em versus px */ +h1 { font-size: 1.3em } +h2 { font-size: 1.2em } +h3 { font-size: 1.1em } +h4 { font-size: 1.0em } +h5 { font-size: 0.9em } +h6 { font-size: 0.8em } /* For headlines at the top of a view, add space */ /* 20090224-changed green fade to gold header image */ @@ -38,6 +37,10 @@ padding:10px 0px 10px 12px; } +/* 20091007 SFO styling added */ +h1.NavTitle { font-size: 1.2em } +h3 .NavListTitle { font-size: 1.1em } + li { margin-bottom:8px; margin-top:8px; @@ -48,27 +51,28 @@ padding-top:10px; margin-top:20px; border-top:1px solid #999; - font-family: Verdana, Helvetica, sans-serif; - font-size: 11px; - color:#333; + font-family: Verdana, Ariel, Helvetica, sans-serif; + font-size: 0.8em; + color: #333333; } .listing { + background-color: #FFFFCC; font-family: "Courier New", Courier, mono; + font-size: 1.1em; color: #000000; - background-color: #FFFFCC; margin: 5px 0px; } .code, pre { font-family: "Courier New", Courier, mono; - font-size: 13px; + font-size: 1.1em; color: #000000; } .step { /* background-color: #EEE; */ - /* margin: 10px 0px; */ + /* margin: 10px 0px; */ /* color: #111; */ /* border-bottom:2px solid #EEE; */ } @@ -88,7 +92,6 @@ table { border: solid #999 1px; table-layout: auto; - font-size: 13px; } td, th { @@ -97,11 +100,8 @@ vertical-align:top; } -/* 20070522-replaced gray with green background to match gradiant color for title */ th { - background-color:#FFC550; /* background-color:#acd79b; - background-color:#999; - color:#FFF; */ + background-color: #CCDC00; } div.ol.p { @@ -118,11 +118,9 @@ font-weight:normal; } -/* Make all H4 and H5 items appear in bold gray against a light green background */ div h5, div h4 { padding:5px 0px 5px 12px; - background-color:#FDCB2F; - /* background-color: #EEE; */ + background-color: #D3DAD4; font-weight:bold; color: #000000; } @@ -130,8 +128,6 @@ /* Notes stand out using a light top & bottom borders with dark gray text */ p.note { - /* color: #03C; */ - /* background-color: #FFFF99; */ color: #333; padding: 5px; margin-left: 1em; @@ -143,11 +139,12 @@ /* Figure/Listing/Table titles are centered and gray */ p.figure { - color: #333; + color: #026690; text-align: center; font-weight: bold; } + /* highly visible red background and white text for things that need fixing before release */ /* SHOULD NOT BE PRESENT IN RELEASED PRODUCTS */ .fix { @@ -163,14 +160,14 @@ } .titleSmall { - font-family: Helvetica, sans-serif; - font-size: 11px; + font-family: Verdana, Ariel, Helvetica, sans-serif; + font-size: 0.8em; } .plain { - font-family: Helvetica, sans-serif; - font-size: 12px; + font-family: Verdana, Ariel, Helvetica, sans-serif; + font-size: 0.9em; font-style: normal; line-height: normal; font-weight: normal; @@ -179,6 +176,6 @@ text-decoration: none; } -a:link { color: #0033CC } +a:link { color: #026690 } a:visited { color: #555555 } -a:hover { color: #0033CC } +a:hover { color: #FFD62C } diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_arguments.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_arguments.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_arguments.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,16 +1,16 @@ - - - - - -Arguments to main() - - - -

Arguments to main()

-

The main() function can accept two or more arguments (ISO C, §5.1.2.2.1) of the form:

-

int main(int argc, char *argv[]) { /*...*/ }

-

The values stored in the argc and argv arguments depend on Carbide C’s target platform.

- - - + + + + + +Arguments to main() + + + +

Arguments to main()

+

The main() function can accept two or more arguments (ISO C, §5.1.2.2.1) of the form:

+

int main(int argc, char *argv[]) { /*...*/ }

+

The values stored in the argc and argv arguments depend on Carbide C’s target platform.

+ + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_char_sets.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_char_sets.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_char_sets.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,16 +1,16 @@ - - - - - -Character Sets - - - -

Character Sets

-

Carbide generally supports the 8-bit character set of the host OS.

- - - - - + + + + + +Character Sets + + + +

Character Sets

+

Carbide generally supports the 8-bit character set of the host OS.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_devices.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_devices.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_devices.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,17 +1,17 @@ - - - - - -Arguments to main() - - - -

Interactive Device

-

An interactive device is that part of a computer that accepts input from and provides output to a human operator (ISO C, §5.1.2.3). Traditionally, the conventional interactive devices are consoles, keyboards, and character display terminals.

-

For embedded systems that do not have a keyboard or display, Carbide provides console interaction through a serial or Ethernet connection between the target and host computers.

- - - - - + + + + + +Arguments to main() + + + +

Interactive Device

+

An interactive device is that part of a computer that accepts input from and provides output to a human operator (ISO C, §5.1.2.3). Traditionally, the conventional interactive devices are consoles, keyboards, and character display terminals.

+

For embedded systems that do not have a keyboard or display, Carbide provides console interaction through a serial or Ethernet connection between the target and host computers.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_diag_msgs.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_diag_msgs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_diag_msgs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - -How to Identify Diagnostic Messages - - - -

How to Identify Diagnostic Messages

-

Diagnostics are error and warning messages the C compiler issues when it encounters improper program syntax (ISO C, §5.1.1.3).

-

Within the Carbide IDE, the Carbide C compiler issues diagnostic messages in the Console view.

-

From the command line, Carbide C issues diagnostic messages to the standard error file.

- - - - - + + + + + +How to Identify Diagnostic Messages + + + +

How to Identify Diagnostic Messages

+

Diagnostics are error and warning messages the C compiler issues when it encounters improper program syntax (ISO C, §5.1.1.3).

+

Within the Carbide IDE, the Carbide C compiler issues diagnostic messages in the Console view.

+

From the command line, Carbide C issues diagnostic messages to the standard error file.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_enums.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_enums.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_enums.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,16 +1,16 @@ - - - - - -Enumerations - - - -

Enumerations

-

See Enumerated Types.

- - - - - + + + + + +Enumerations + + + +

Enumerations

+

See Enumerated Types.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_identifiers.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_identifiers.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_identifiers.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,16 +1,16 @@ - - - - - -Character Sets - - - -

Identifiers

-

(ISO C, §6.2.4.1) Carbide C recognizes the first 255 characters of identifiers, whether or not the identifiers have external linkage. In identifiers with external linkage, uppercase and lowercase characters are distinct.

- - - - - + + + + + +Character Sets + + + +

Identifiers

+

(ISO C, §6.2.4.1) Carbide C recognizes the first 255 characters of identifiers, whether or not the identifiers have external linkage. In identifiers with external linkage, uppercase and lowercase characters are distinct.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_implementation.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_implementation.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_implementation.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,174 +1,174 @@ - - - - - -Implementation Quantities - - - -

Implementation Quantities

-

The C/C++ compiler has the implementation quantities listed in Table 1, based on the ISO C++ Standard. Although the values in the right-side column are the recommended minimums for each quantity, they do not determine the compliance of the quantity.

-

NOTE The right-side column value “unlimited” means unlimited only up to and including memory and time limitations.

-
Table 1. Implementation Quantities for the C/C++ Compiler
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QuantityMinimum
Nesting levels of compound statements, iteration control structures, and selection control structures [256]Unlimited
Nesting levels of conditional inclusion [256]32
Pointer, array, and function declarators (in any combination) modifying an arithmetic, structure, union, or incomplete type in a declaration [256]Unlimited
Nesting levels of parenthesized expressions within a full expression [256]Unlimited
Number of initial characters in an internal identifier or macro name [1024]Unlimited
- (255 significant in identifiers)
Number of initial characters in an external identifier [1024]Unlimited
- (255 significant in identifiers)
External identifiers in one translation unit [65536]Unlimited
Identifiers with block scope declared in one block [1024]Unlimited
Macro identifiers simultaneously defined in one translation unit [65536]Unlimited
Parameters in one function definition [256]Unlimited
Arguments in one function call [256]Unlimited
Parameters in one macro definition [256]128
Arguments in one macro invocation [256]128
Characters in one logical source line [65536] Unlimited
Characters in a character string literal or wide string literal (after concatenation) [65536]Unlimited
Size of an object [262144]2 GB
Nesting levels for #include files [256]32
Case labels for a switch statement (excluding those for any nested switch statements) [16384]Unlimited
Data members in a single class, structure, or union [16384]Unlimited
Enumeration constants in a single enumeration [4096]Unlimited
Levels of nested class, structure, or union definitions in a single struct-declaration-list [256]Unlimited
Functions registered by atexit()[32]64
Direct and indirect base classes [16384]Unlimited
Direct base classes for a single class [1024]Unlimited
Members declared in a single class [4096]Unlimited
Final overriding virtual functions in a class, accessible or not [16384]Unlimited
Direct and indirect virtual bases of a class [1024]Unlimited
Static members of a class [1024]Unlimited
Friend declarations in a class [4096]Unlimited
Access control declarations in a class [4096]Unlimited
Member initializers in a constructor definition [6144] Unlimited
Scope qualifications of one identifier [256]Unlimited
Nested external specifications [1024]Unlimited
Template arguments in a template declaration [1024] Unlimited
Recursively nested template instantiations [17]Unlimited
Handlers per try block [256]Unlimited
Throw specifications on a single function declaration [256]Unlimited
- - - - - + + + + + +Implementation Quantities + + + +

Implementation Quantities

+

The C/C++ compiler has the implementation quantities listed in Table 1, based on the ISO C++ Standard. Although the values in the right-side column are the recommended minimums for each quantity, they do not determine the compliance of the quantity.

+

NOTE The right-side column value “unlimited” means unlimited only up to and including memory and time limitations.

+
Table 1. Implementation Quantities for the C/C++ Compiler
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
QuantityMinimum
Nesting levels of compound statements, iteration control structures, and selection control structures [256]Unlimited
Nesting levels of conditional inclusion [256]32
Pointer, array, and function declarators (in any combination) modifying an arithmetic, structure, union, or incomplete type in a declaration [256]Unlimited
Nesting levels of parenthesized expressions within a full expression [256]Unlimited
Number of initial characters in an internal identifier or macro name [1024]Unlimited
+ (255 significant in identifiers)
Number of initial characters in an external identifier [1024]Unlimited
+ (255 significant in identifiers)
External identifiers in one translation unit [65536]Unlimited
Identifiers with block scope declared in one block [1024]Unlimited
Macro identifiers simultaneously defined in one translation unit [65536]Unlimited
Parameters in one function definition [256]Unlimited
Arguments in one function call [256]Unlimited
Parameters in one macro definition [256]128
Arguments in one macro invocation [256]128
Characters in one logical source line [65536] Unlimited
Characters in a character string literal or wide string literal (after concatenation) [65536]Unlimited
Size of an object [262144]2 GB
Nesting levels for #include files [256]32
Case labels for a switch statement (excluding those for any nested switch statements) [16384]Unlimited
Data members in a single class, structure, or union [16384]Unlimited
Enumeration constants in a single enumeration [4096]Unlimited
Levels of nested class, structure, or union definitions in a single struct-declaration-list [256]Unlimited
Functions registered by atexit()[32]64
Direct and indirect base classes [16384]Unlimited
Direct base classes for a single class [1024]Unlimited
Members declared in a single class [4096]Unlimited
Final overriding virtual functions in a class, accessible or not [16384]Unlimited
Direct and indirect virtual bases of a class [1024]Unlimited
Static members of a class [1024]Unlimited
Friend declarations in a class [4096]Unlimited
Access control declarations in a class [4096]Unlimited
Member initializers in a constructor definition [6144] Unlimited
Scope qualifications of one identifier [256]Unlimited
Nested external specifications [1024]Unlimited
Template arguments in a template declaration [1024] Unlimited
Recursively nested template instantiations [17]Unlimited
Handlers per try block [256]Unlimited
Throw specifications on a single function declaration [256]Unlimited
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_libraries.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_libraries.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_be_libraries.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,16 +1,16 @@ - - - - - -Library Behaviors - - - -

Library Behaviors

-

This reference does not cover implementation-defined behaviors in the Metrowerks Standard Library for C (MSL C).

- - - - - + + + + + +Library Behaviors + + + +

Library Behaviors

+

This reference does not cover implementation-defined behaviors in the Metrowerks Standard Library for C (MSL C).

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_behavior.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_behavior.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_behavior/c_behavior.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - -C Implementation-Defined Behavior - - - -

C Implementation-Defined Behavior

-

The ISO standard for C leaves many details about the form and translation of C programs up to the implementation of the C compiler. Section J.3 of the ISO C Standard lists the unique implementation-defined behaviors. Numbers in parentheses that begin with “§” indicate the ISO C standard section to which an implementation-defined behavior refers.

-

This section refers to implementation-defined behaviors of the compiler itself. Topics include:

- -

For information on implementation-defined behaviors of the Standard C Library, consult the MSL C Library Reference.

- - - - - + + + + + +C Implementation-Defined Behavior + + + +

C Implementation-Defined Behavior

+

The ISO standard for C leaves many details about the form and translation of C programs up to the implementation of the C compiler. Section J.3 of the ISO C Standard lists the unique implementation-defined behaviors. Numbers in parentheses that begin with “§” indicate the ISO C standard section to which an implementation-defined behavior refers.

+

This section refers to implementation-defined behaviors of the compiler itself. Topics include:

+ +

For information on implementation-defined behaviors of the Standard C Library, consult the MSL C Library Reference.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_ansi_keywords.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_ansi_keywords.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_ansi_keywords.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -ANSI Keywords Only - - - -

ANSI Keywords Only

-

(ISO C, §6.4.1) The Carbide compiler can recognize several additional reserved keywords. If you enable this setting, the compiler generates an error if it encounters any of the additional keywords that it recognizes. If you must write source code that strictly adheres to the ISO standard, enable the ANSI Strict setting.

-

If you disable this setting, the compiler recognizes the following non-standard keywords:

-
    -
  • far—Specifies how the compiler generates addressing modes and operations. It is not available for every target platform.
  • -
  • inline—Lets you declare a C function to be inline. For more information, see Inlining.
  • -
  • pascal—No longer used.
  • -
-

The ANSI Keywords Only setting corresponds to the pragma only_std_keywords. To check this setting, use __option (only_std_keywords). By default, this setting is disabled.

-

See also “only_std_keywords” and Checking Settings.
-

- - - - - + + + + + +ANSI Keywords Only + + + +

ANSI Keywords Only

+

(ISO C, §6.4.1) The Carbide compiler can recognize several additional reserved keywords. If you enable this setting, the compiler generates an error if it encounters any of the additional keywords that it recognizes. If you must write source code that strictly adheres to the ISO standard, enable the ANSI Strict setting.

+

If you disable this setting, the compiler recognizes the following non-standard keywords:

+
    +
  • far—Specifies how the compiler generates addressing modes and operations. It is not available for every target platform.
  • +
  • inline—Lets you declare a C function to be inline. For more information, see Inlining.
  • +
  • pascal—No longer used.
  • +
+

The ANSI Keywords Only setting corresponds to the pragma only_std_keywords. To check this setting, use __option (only_std_keywords). By default, this setting is disabled.

+

See also “only_std_keywords” and Checking Settings.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_bit_rotation.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_bit_rotation.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_bit_rotation.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -Intrinsic Functions for Bit Rotation - - - -

Intrinsic Functions for Bit Rotation

-

The Carbide C language has functions

-

__rol(op, n)
- __ror(op, n)

-

that do left- or right-bit rotation, respectively.

-

The op argument represents the item with the rotated bits. The n argument represents the number of times to rotate the op bits.

-

The op argument is not promoted to a larger data type and can be of type char, short, int, long, or long long.

-

These functions are intrinsic (“built-in”). That is, you do not have to provide function prototypes or link with special libraries to use these functions.

-

NOTE Currently, these functions are limited to the Motorola 68K and Intel x86 versions of the Carbide C/C++ compiler. -

- - - - - + + + + + +Intrinsic Functions for Bit Rotation + + + +

Intrinsic Functions for Bit Rotation

+

The Carbide C language has functions

+

__rol(op, n)
+ __ror(op, n)

+

that do left- or right-bit rotation, respectively.

+

The op argument represents the item with the rotated bits. The n argument represents the number of times to rotate the op bits.

+

The op argument is not promoted to a larger data type and can be of type char, short, int, long, or long long.

+

These functions are intrinsic (“built-in”). That is, you do not have to provide function prototypes or link with special libraries to use these functions.

+

NOTE Currently, these functions are limited to the Motorola 68K and Intel x86 versions of the Carbide C/C++ compiler. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_char_const_as_int.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_char_const_as_int.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_char_const_as_int.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,46 +1,46 @@ - - - - - -Character Constants as Integer Values - - - -

Character Constants as Integer Values

-

(ISO C, §6.4.4.4) The C compiler lets you use string literals containing 2 to 8 characters to denote 32-bit or 64-bit integer values. Table 2.2 shows examples.

-

Table 2.2 Integer Values as Character String Constants

- - - - - - - - - - - - - - - - - - - - - - - - - -
Character constantEquivalent hexadecimal integer value
'ABCDEFGH'0x4142434445464748 (64-bit value)
'ABCDE'0x0000000041424344 (64-bit value)
'ABCD'0x41424344 (32-bit value)
'ABC'0x00414243 (32-bit value)
'AB'0x00004142 (32-bit value)
-

You cannot disable this extension, and it has no corresponding pragma or setting in any panel.

-

NOTE This feature differs from using multibyte character sets, where a single character requires a data type larger than 1 byte. See Multibyte and Unicode Support for information on using character sets with more than 256 characters (such as Kanji).
-

- - - - - + + + + + +Character Constants as Integer Values + + + +

Character Constants as Integer Values

+

(ISO C, §6.4.4.4) The C compiler lets you use string literals containing 2 to 8 characters to denote 32-bit or 64-bit integer values. Table 2.2 shows examples.

+

Table 2.2 Integer Values as Character String Constants

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Character constantEquivalent hexadecimal integer value
'ABCDEFGH'0x4142434445464748 (64-bit value)
'ABCDE'0x0000000041424344 (64-bit value)
'ABCD'0x41424344 (32-bit value)
'ABC'0x00414243 (32-bit value)
'AB'0x00004142 (32-bit value)
+

You cannot disable this extension, and it has no corresponding pragma or setting in any panel.

+

NOTE This feature differs from using multibyte character sets, where a single character requires a data type larger than 1 byte. See Multibyte and Unicode Support for information on using character sets with more than 256 characters (such as Kanji).
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_compiler.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_compiler.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_compiler.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - - - - -C Compiler - - - -

C Compiler

-

This section covers the following topics:

- -

The information in this section applies to all target platforms for which the Carbide C compiler generates object code.

-

This section does not cover C++ features. For more information on the Carbide.c++ language, see C++ Compiler.
-

- - - - - + + + + + +C Compiler + + + +

C Compiler

+

This section covers the following topics:

+ +

The information in this section applies to all target platforms for which the Carbide C compiler generates object code.

+

This section does not cover C++ features. For more information on the Carbide.c++ language, see C++ Compiler.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_convert_ptrs.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_convert_ptrs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_convert_ptrs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Converting Pointers to Types of the Same Size - - - -

Converting Pointers to Types of the Same Size

-

The C compiler allows the conversion of pointer types to integral data types of the same size in global initializations. Since this type of conversion does not conform to the ANSI C standard, it is only available if the ANSI Strict setting is disabled.

-
-
Converting a Pointer to a Same-sized Integral Type
-

char c;
- long arr = (long)&c; // accepted (not ISO C)

-
-

See Checking for Standard C and Standard C++ Conformity for more information on this setting.

- - - - - + + + + + +Converting Pointers to Types of the Same Size + + + +

Converting Pointers to Types of the Same Size

+

The C compiler allows the conversion of pointer types to integral data types of the same size in global initializations. Since this type of conversion does not conform to the ANSI C standard, it is only available if the ANSI Strict setting is disabled.

+
+
Converting a Pointer to a Same-sized Integral Type
+

char c;
+ long arr = (long)&c; // accepted (not ISO C)

+
+

See Checking for Standard C and Standard C++ Conformity for more information on this setting.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_cpp_comments.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_cpp_comments.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_cpp_comments.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,20 +1,20 @@ - - - - - -C++ Comments - - - -

C++ Comments

-

(ISO C, §6.4.9) The C compiler can accept C++ comments (//) in source code. C++ comments consist of anything that follows // on a line.

-

a = b; // This is a C++ comment

-

To use this feature, disable the ANSI Strict setting.

-

See also Checking for Standard C and Standard C++ Conformity. -

- - - - - + + + + + +C++ Comments + + + +

C++ Comments

+

(ISO C, §6.4.9) The C compiler can accept C++ comments (//) in source code. C++ comments consist of anything that follows // on a line.

+

a = b; // This is a C++ comment

+

To use this feature, disable the ANSI Strict setting.

+

See also Checking for Standard C and Standard C++ Conformity. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_d_constant_suffix.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_d_constant_suffix.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_d_constant_suffix.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,19 +1,19 @@ - - - - - -The “D” Constant Suffix - - - -

The “D” Constant Suffix

-

When the compiler finds a “D” immediately after a floating point constant value, it treats that value as data of type double.

-

When the pragma float_constants is enabled, floating point constants should end with a “D” so that the compiler does not treat them as values of type float.

-

For related information, see “float_constants”. -

- - - - - + + + + + +The “D” Constant Suffix + + + +

The “D” Constant Suffix

+

When the compiler finds a “D” immediately after a floating point constant value, it treats that value as data of type double.

+

When the pragma float_constants is enabled, floating point constants should end with a “D” so that the compiler does not treat them as values of type float.

+

For related information, see “float_constants”. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_declare_var_addr.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_declare_var_addr.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_declare_var_addr.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,19 +1,19 @@ - - - - - -Declaring Variables by Address - - - -

Declaring Variables by Address

-

(ISO C, §6.7.8) The C compiler lets you explicitly specify the address that contains the value of a variable. For example, this definition states that the variable MemErr contains the contents of the address 0x220:

-

short MemErr:0x220;

-

You cannot disable this extension, and it has no corresponding pragma or setting in a panel.
-

- - - - - + + + + + +Declaring Variables by Address + + + +

Declaring Variables by Address

+

(ISO C, §6.7.8) The C compiler lets you explicitly specify the address that contains the value of a variable. For example, this definition states that the variable MemErr contains the contents of the address 0x220:

+

short MemErr:0x220;

+

You cannot disable this extension, and it has no corresponding pragma or setting in a panel.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_decspec_decl.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_decspec_decl.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_decspec_decl.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -The __declspec Declarator - - - -

The __declspec Declarator

-

The __declspec(arg) declarator is a convention adopted from Win32 compilers to extend the type system. All Carbide compilers recognize this declarator.

-

The __declspec declarator must appear before the name of the object as shown below:

-

__declspec(arg) int foo();
- class __declspec(arg) bar { ... };

-

The list of valid arguments are grouped by targets:

-
    -
  • All Targets
  • -
  • Non-Win32 Targets Only
  • -
  • Win32 Targets Only
  • -
- - - - - + + + + + +The __declspec Declarator + + + +

The __declspec Declarator

+

The __declspec(arg) declarator is a convention adopted from Win32 compilers to extend the type system. All Carbide compilers recognize this declarator.

+

The __declspec declarator must appear before the name of the object as shown below:

+

__declspec(arg) int foo();
+ class __declspec(arg) bar { ... };

+

The list of valid arguments are grouped by targets:

+
    +
  • All Targets
  • +
  • Non-Win32 Targets Only
  • +
  • Win32 Targets Only
  • +
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_endif_identifier.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_endif_identifier.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_endif_identifier.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,34 +1,34 @@ - - - - - -Using an Identifier After #endif - - - -

Using an Identifier After #endif

-

(ISO C, §6.10.1) The C compiler can accept identifier tokens after #endif and #else. This extension helps you match an #endif statement with its corresponding #if, #ifdef, or #ifndef statement, as shown here:

-

#ifdef __MWERKS__
- # ifndef __cplusplus
- /*
- * . . .
- */
- # endif __cplusplus
-#endif __MWERKS__

-

To use this feature, disable the ANSI Strict setting.

-

TIP If you enable the ANSI Strict setting (thereby disabling this extension), you can still match your #ifdef and #endif directives. Simply put the identifiers into comments, as sown in following example:
-
- #ifdef __MWERKS__
- # ifndef __cplusplus
- /*
- * . . .
- */
- # endif /* __cplusplus */
-#endif /* __MWERKS__ */

-

See also Checking for Standard C and Standard C++ Conformity.

- - - - - + + + + + +Using an Identifier After #endif + + + +

Using an Identifier After #endif

+

(ISO C, §6.10.1) The C compiler can accept identifier tokens after #endif and #else. This extension helps you match an #endif statement with its corresponding #if, #ifdef, or #ifndef statement, as shown here:

+

#ifdef __MWERKS__
+ # ifndef __cplusplus
+ /*
+ * . . .
+ */
+ # endif __cplusplus
+#endif __MWERKS__

+

To use this feature, disable the ANSI Strict setting.

+

TIP If you enable the ANSI Strict setting (thereby disabling this extension), you can still match your #ifdef and #endif directives. Simply put the identifiers into comments, as sown in following example:
+
+ #ifdef __MWERKS__
+ # ifndef __cplusplus
+ /*
+ * . . .
+ */
+ # endif /* __cplusplus */
+#endif /* __MWERKS__ */

+

See also Checking for Standard C and Standard C++ Conformity.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_enum_types.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_enum_types.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_enum_types.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,63 +1,63 @@ - - - - - -Enumerated Types - - - -

Enumerated Types

-

(ISO C, §6.2.5) The Carbide C compiler uses the Enums Always Int and ANSI Strict settings to choose which underlying integer type to use for an enumerated type.

-

If you enable the Enums Always Int setting, the underlying type for enumerated data types is set to signed int. Enumerators cannot be larger than a signed int. If an enumerated constant is larger than an int, the compiler generates an error.

-

If you disable the ANSI Strict setting, enumerators that can be represented as an unsigned int are implicitly converted to signed int.

-
-
Listing 2.2 Example of Enumerations as Signed Integers
-

#pragma enumsalwaysint on
- #pragma ANSI_strict on
- enum foo { a=0xFFFFFFFF }; // ERROR. a is 4,294,967,295:
- // too big for a signed int
- #pragma ANSI_strict off
- enum bar { b=0xFFFFFFFF }; // OK: b can be represented as an
- // unsigned int, but is implicitly
- // converted to a signed int (-1).

-
-

If you disable the Enums Always Int setting, the compiler chooses the integral data type that supports the largest enumerated constant. The type can be as small as a char or as large as a long int. It can even be a 64-bit long long value.

-

If all enumerators are positive, the compiler chooses the smallest unsigned integral base type that is large enough to represent all enumerators. If at least one enumerator is negative, the compiler chooses the smallest signed integral base type large enough to represent all enumerators.

-
-
Listing 2.3 Example of Enumeration Base Types
-

#pragma enumsalwaysint off
- enum { a=0,b=1 }; // base type: unsigned char
- enum { c=0,d=-1 }; // base type: signed char
- enum { e=0,f=128,g=-1 }; // base type: signed short

-
-

The compiler uses long long data types only if you disable Enums Always Int and enable the longlong_enums pragma. (None of the settings corresponds to the longlong_enums pragma.)

-
-
Listing 2.4 Example of Enumerations with Type long long
-

#pragma enumsalwaysint off
- #pragma longlong_enums off
- enum { a=0x7FFFFFFFFFFFFFFF }; // ERROR: a is too large
- #pragma longlong_enums on
- enum { b=0x7FFFFFFFFFFFFFFF }; // OK: base type: signed long long
- enum { c=0x8000000000000000 }; // OK: base type: unsigned long long
- enum {þd=-1,e=0x80000000 }; // OK: base type: signed long long

-
-

When you disable the longlong_enums pragma and enable ANSI Strict, you cannot mix unsigned 32-bit enumerators greater than 0x7FFFFFFF and negative enumerators. If you disable both the longlong_enums pragma and the ANSI Strict setting, large unsigned 32-bit enumerators are implicitly converted to signed 32-bit types.

-
-
Listing 2.5 Example of Enumerations with Type long
-

#pragma enumsalwaysint off
- #pragma longlong_enums off
- #pragma ANSI_strict on
- enum { a=-1,b=0xFFFFFFFF }; // error
- #pragma ANSI_strict off
- enum { c=-1,d=0xFFFFFFFF }; // base type: signed int (b==-1)

-
-

The Enums Always Int setting corresponds to the pragma enumsalwaysint. To check this setting, use __option (enumsalwaysint).

-

By default, this setting is disabled.

-

See also “enumsalwaysint”, “longlong_enums”, and Checking Settings.
-

- - - - - + + + + + +Enumerated Types + + + +

Enumerated Types

+

(ISO C, §6.2.5) The Carbide C compiler uses the Enums Always Int and ANSI Strict settings to choose which underlying integer type to use for an enumerated type.

+

If you enable the Enums Always Int setting, the underlying type for enumerated data types is set to signed int. Enumerators cannot be larger than a signed int. If an enumerated constant is larger than an int, the compiler generates an error.

+

If you disable the ANSI Strict setting, enumerators that can be represented as an unsigned int are implicitly converted to signed int.

+
+
Listing 2.2 Example of Enumerations as Signed Integers
+

#pragma enumsalwaysint on
+ #pragma ANSI_strict on
+ enum foo { a=0xFFFFFFFF }; // ERROR. a is 4,294,967,295:
+ // too big for a signed int
+ #pragma ANSI_strict off
+ enum bar { b=0xFFFFFFFF }; // OK: b can be represented as an
+ // unsigned int, but is implicitly
+ // converted to a signed int (-1).

+
+

If you disable the Enums Always Int setting, the compiler chooses the integral data type that supports the largest enumerated constant. The type can be as small as a char or as large as a long int. It can even be a 64-bit long long value.

+

If all enumerators are positive, the compiler chooses the smallest unsigned integral base type that is large enough to represent all enumerators. If at least one enumerator is negative, the compiler chooses the smallest signed integral base type large enough to represent all enumerators.

+
+
Listing 2.3 Example of Enumeration Base Types
+

#pragma enumsalwaysint off
+ enum { a=0,b=1 }; // base type: unsigned char
+ enum { c=0,d=-1 }; // base type: signed char
+ enum { e=0,f=128,g=-1 }; // base type: signed short

+
+

The compiler uses long long data types only if you disable Enums Always Int and enable the longlong_enums pragma. (None of the settings corresponds to the longlong_enums pragma.)

+
+
Listing 2.4 Example of Enumerations with Type long long
+

#pragma enumsalwaysint off
+ #pragma longlong_enums off
+ enum { a=0x7FFFFFFFFFFFFFFF }; // ERROR: a is too large
+ #pragma longlong_enums on
+ enum { b=0x7FFFFFFFFFFFFFFF }; // OK: base type: signed long long
+ enum { c=0x8000000000000000 }; // OK: base type: unsigned long long
+ enum {þd=-1,e=0x80000000 }; // OK: base type: signed long long

+
+

When you disable the longlong_enums pragma and enable ANSI Strict, you cannot mix unsigned 32-bit enumerators greater than 0x7FFFFFFF and negative enumerators. If you disable both the longlong_enums pragma and the ANSI Strict setting, large unsigned 32-bit enumerators are implicitly converted to signed 32-bit types.

+
+
Listing 2.5 Example of Enumerations with Type long
+

#pragma enumsalwaysint off
+ #pragma longlong_enums off
+ #pragma ANSI_strict on
+ enum { a=-1,b=0xFFFFFFFF }; // error
+ #pragma ANSI_strict off
+ enum { c=-1,d=0xFFFFFFFF }; // base type: signed int (b==-1)

+
+

The Enums Always Int setting corresponds to the pragma enumsalwaysint. To check this setting, use __option (enumsalwaysint).

+

By default, this setting is disabled.

+

See also “enumsalwaysint”, “longlong_enums”, and Checking Settings.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_expand_trigraphs.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_expand_trigraphs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_expand_trigraphs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Expand Trigraphs - - - -

Expand Trigraphs

-

(ISO C, §5.2.1.1) The C compiler normally ignores trigraph characters. Many common character constants look like trigraph sequences, and this extension lets you use them without including escape characters.

-

If you must write source code that strictly adheres to the ISO standard, enable the Expand Trigraphs setting. When you enable this setting, be careful when initializing strings or multi-character constants that contain question marks.

-

char c = '????'; // ERROR: Trigraph sequence expands to '??^
- char d = '\?\?\?\?'; // OK

-

The Expand Trigraphs setting corresponds to the pragma trigraphs, To check this setting, use __option (trigraphs). By default, this setting is disabled.

-

See also “trigraphs” and Checking Settings. -

- - - - - + + + + + +Expand Trigraphs + + + +

Expand Trigraphs

+

(ISO C, §5.2.1.1) The C compiler normally ignores trigraph characters. Many common character constants look like trigraph sequences, and this extension lets you use them without including escape characters.

+

If you must write source code that strictly adheres to the ISO standard, enable the Expand Trigraphs setting. When you enable this setting, be careful when initializing strings or multi-character constants that contain question marks.

+

char c = '????'; // ERROR: Trigraph sequence expands to '??^
+ char d = '\?\?\?\?'; // OK

+

The Expand Trigraphs setting corresponds to the pragma trigraphs, To check this setting, use __option (trigraphs). By default, this setting is disabled.

+

See also “trigraphs” and Checking Settings. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_function_identifier.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_function_identifier.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_function_identifier.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,17 +1,17 @@ - - - - - -The __FUNCTION__ Predefined Identifier - - - -

The __FUNCTION__ Predefined Identifier

-

The __FUNCTION__ predefined identifier contains the name of the function currently being compiled. For related information, see “Predefined Symbols”. -

- - - - - + + + + + +The __FUNCTION__ Predefined Identifier + + + +

The __FUNCTION__ Predefined Identifier

+

The __FUNCTION__ predefined identifier contains the name of the function currently being compiled. For related information, see “Predefined Symbols”. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_gcc_ext_support.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_gcc_ext_support.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_gcc_ext_support.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,137 +1,137 @@ - - - - - -GCC Extension Support - - - -

GCC Extension Support

-

Use the GCC Extensions setting to enable the compiler to accept some GCC syntax and conventions. This option is the same as the previously-supported #pragma gcc_extensions.

-

The following GCC compatibility enhancements have been added:

-
    -
  • Statements in expressions are allowed
  • -
-
-

({int a; a=myfunc(); a; })

-
-
    -
  • GCC-style inline assembly supported on some targets only
  • -
-
-

int count_leading_zero(int value)
- {
- asm ( "cntlzw %0, %1" : "=r" (bits) : "r" (value) );
- return bits;
- }

-
-
    -
  • GCC-style macro varargs supported
  • -
-
-

#define DEBUG(fmt,args...) printf(fmt, ## args)
- DEBUG("test");
- DEBUG("saw %d copies\n", n_copies);
-• The abbreviated “?:” operator is allowed
- x = y ?: z; // --> x = y ? y : z;

-
-
    -
  • Allow incomplete structs in array declarations
  • -
-
-

struct Incomplete arr[10];

-
-
    -
  • Allow Class::Member in a class declaration
  • -
-
-

class MyClass {
- ...
- int MyClass::getval();
- ...
- };

-
-
    -
  • Allow empty structs
  • -
-
-

struct empty { } x;

-
-
    -
  • Allow empty struct initialization
  • -
-
-

struct empty { } x = {};

-
-
    -
  • Struct initializer typecast support
  • -
-
-

typedef struct { int x, y, z; float q; } mystruct;
- void foo(mystruct s);
- foo( (mystruct) { 1,2,3,6e3 } );

-
-
    -
  • Limited support for “void *” and function pointer arithmetic
  • -
-
-

void *p;
- p = &data + 10; // point 10 bytes into "p"
- void foo();
- p = foo + 10; // point 10 bytes into "foo"
- At this time, the increment and decrement operators “++” don’t work with void/function pointers.

-
-
    -
  • sizeof(function) and sizeof(void) is 1
  • -
  • Function pointers may be compared to “void *
  • -
  • Allow null statement (no trailing semicolon) in “switch”
  • -
-
-

switch(x) {
- label:
- }

-
-
    -
  • Macro redefinitions with different values allowed
  • -
-
-

#define MAC 3
- #define MAC (3)

-
-
    -
  • <?”, “>?MIN/MAX operators supported for some targets
  • -
  • Arrays may be assigned
  • -
-
-

int a[10], b[10];
- a = b;

-
-
    -
  • Allow trailing comma in enumerations without warning
  • -
-
-

enum { A, B, C, };

-
-
    -
  • Allow empty array as final member of struct
  • -
-
-

typedef struct {
- int type;
- char data[];
- } Node;

-
-
    -
  • Designated initializer support
  • -
-
-

struct { int x, y, z; float q; } x = { q: 3.0,
- y:1, z:-4, x:-6 };

-
-

For related information, see the #pragma gcc_extensions.

- - - - - + + + + + +GCC Extension Support + + + +

GCC Extension Support

+

Use the GCC Extensions setting to enable the compiler to accept some GCC syntax and conventions. This option is the same as the previously-supported #pragma gcc_extensions.

+

The following GCC compatibility enhancements have been added:

+
    +
  • Statements in expressions are allowed
  • +
+
+

({int a; a=myfunc(); a; })

+
+
    +
  • GCC-style inline assembly supported on some targets only
  • +
+
+

int count_leading_zero(int value)
+ {
+ asm ( "cntlzw %0, %1" : "=r" (bits) : "r" (value) );
+ return bits;
+ }

+
+
    +
  • GCC-style macro varargs supported
  • +
+
+

#define DEBUG(fmt,args...) printf(fmt, ## args)
+ DEBUG("test");
+ DEBUG("saw %d copies\n", n_copies);
+• The abbreviated “?:” operator is allowed
+ x = y ?: z; // --> x = y ? y : z;

+
+
    +
  • Allow incomplete structs in array declarations
  • +
+
+

struct Incomplete arr[10];

+
+
    +
  • Allow Class::Member in a class declaration
  • +
+
+

class MyClass {
+ ...
+ int MyClass::getval();
+ ...
+ };

+
+
    +
  • Allow empty structs
  • +
+
+

struct empty { } x;

+
+
    +
  • Allow empty struct initialization
  • +
+
+

struct empty { } x = {};

+
+
    +
  • Struct initializer typecast support
  • +
+
+

typedef struct { int x, y, z; float q; } mystruct;
+ void foo(mystruct s);
+ foo( (mystruct) { 1,2,3,6e3 } );

+
+
    +
  • Limited support for “void *” and function pointer arithmetic
  • +
+
+

void *p;
+ p = &data + 10; // point 10 bytes into "p"
+ void foo();
+ p = foo + 10; // point 10 bytes into "foo"
+ At this time, the increment and decrement operators “++” don’t work with void/function pointers.

+
+
    +
  • sizeof(function) and sizeof(void) is 1
  • +
  • Function pointers may be compared to “void *
  • +
  • Allow null statement (no trailing semicolon) in “switch”
  • +
+
+

switch(x) {
+ label:
+ }

+
+
    +
  • Macro redefinitions with different values allowed
  • +
+
+

#define MAC 3
+ #define MAC (3)

+
+
    +
  • <?”, “>?MIN/MAX operators supported for some targets
  • +
  • Arrays may be assigned
  • +
+
+

int a[10], b[10];
+ a = b;

+
+
    +
  • Allow trailing comma in enumerations without warning
  • +
+
+

enum { A, B, C, };

+
+
    +
  • Allow empty array as final member of struct
  • +
+
+

typedef struct {
+ int type;
+ char data[];
+ } Node;

+
+
    +
  • Designated initializer support
  • +
+
+

struct { int x, y, z; float q; } x = { q: 3.0,
+ y:1, z:-4, x:-6 };

+
+

For related information, see the #pragma gcc_extensions.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_get_alignment_info.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_get_alignment_info.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_get_alignment_info.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,21 +1,21 @@ - - - - - -Getting Alignment and Type Information at Compile Time - - - -

Getting Alignment and Type Information at Compile Time

-

The C compiler has two built-in functions that return information about a data type’s byte alignment and its data type.

-
    -
  • The function call __builtin_align(typeID) returns the byte alignment used for the data type typeID. This value depends on the target platform for which the compiler is generating object code.
  • -
  • The function call __builtin_type(typeID) returns an integral value that describes the data type typeID. This value depends on the target platform for which the compiler is generating object code.
    -
  • -
- - - - - + + + + + +Getting Alignment and Type Information at Compile Time + + + +

Getting Alignment and Type Information at Compile Time

+

The C compiler has two built-in functions that return information about a data type’s byte alignment and its data type.

+
    +
  • The function call __builtin_align(typeID) returns the byte alignment used for the data type typeID. This value depends on the target platform for which the compiler is generating object code.
  • +
  • The function call __builtin_type(typeID) returns an integral value that describes the data type typeID. This value depends on the target platform for which the compiler is generating object code.
    +
  • +
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_header_files.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_header_files.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_header_files.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,36 +1,36 @@ - - - - - -Precompiled Header Files - - - -

Header Files

-

(ISO C, §6.10.2) The Carbide C preprocessor lets you nest up to 256 levels of #include directives.

-

You can use full path names in #include directives:

- - - - - - - - - - - - - - -
SystemDirective
Windows#include "c:\HD\Tools\my headers\macros.h"
UNIX#include "/HD/Tools/my headers/macros.h"
-

The Carbide IDE lets you specify where the compiler looks for #include files through the Access Paths and Source Tree settings panels.

-

See also Prefix Files.

-

TIP If you are running the Carbide C compiler from the command line, you can specify where to find #include files with a command-line setting. For more information, see “Command-Line Tools”.
-

- - - - - + + + + + +Precompiled Header Files + + + +

Header Files

+

(ISO C, §6.10.2) The Carbide C preprocessor lets you nest up to 256 levels of #include directives.

+

You can use full path names in #include directives:

+ + + + + + + + + + + + + + +
SystemDirective
Windows#include "c:\HD\Tools\my headers\macros.h"
UNIX#include "/HD/Tools/my headers/macros.h"
+

The Carbide IDE lets you specify where the compiler looks for #include files through the Access Paths and Source Tree settings panels.

+

See also Prefix Files.

+

TIP If you are running the Carbide C compiler from the command line, you can specify where to find #include files with a command-line setting. For more information, see “Command-Line Tools”.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_implementation.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_implementation.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_implementation.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -C Compiler - - - -

The Carbide Implementation of C

-

This section describes how the Carbide C compiler implements the C programming language:

- - - - - - + + + + + +C Compiler + + + +

The Carbide Implementation of C

+

This section describes how the Carbide C compiler implements the C programming language:

+ + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_indentifiers.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_indentifiers.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_indentifiers.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,16 +1,16 @@ - - - - - -Identifiers - - - -

Identifiers

-

(ISO C, §6.4.2) The Carbide C language allows identifiers to have unlimited length. However, only the first 255 characters are significant for internal and external linkage.

- - - - - + + + + + +Identifiers + + + +

Identifiers

+

(ISO C, §6.4.2) The Carbide C language allows identifiers to have unlimited length. However, only the first 255 characters are significant for internal and external linkage.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_init_local_arrays.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_init_local_arrays.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_init_local_arrays.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -Initialization of Local Arrays and Structures - - - -

Initialization of Local Arrays and Structures

-

If you enable the pragma gcc_extensions, the compiler allows the initialization of local arrays and structs with non-constant values.
-

-
-
GNU C Extension for Initializing Arrays and Structures
-

void myFunc( int i, double x )
- {
- int arr[2] = { i, i + 1 };
- struct myStruct = { i, x };
- }

-
- - - - - + + + + + +Initialization of Local Arrays and Structures + + + +

Initialization of Local Arrays and Structures

+

If you enable the pragma gcc_extensions, the compiler allows the initialization of local arrays and structs with non-constant values.
+

+
+
GNU C Extension for Initializing Arrays and Structures
+

void myFunc( int i, double x )
+ {
+ int arr[2] = { i, i + 1 };
+ struct myStruct = { i, x };
+ }

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_inlining.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_inlining.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_inlining.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,62 +1,62 @@ - - - - - -Inlining - - - -

Inlining

-

Carbide supports inlining C/C++ functions that you define with the inline, __inline__, or __inline specifier keywords.

-

The following functions are never inlined:

-
    -
  • Functions that return class objects that need destruction.
  • -
  • Functions with class arguments that need destruction.
  • -
  • Functions with variable argument lists.
  • -
-

The compiler determines whether to inline a function based on the ANSI Strict, Inline Depth, Auto-inline, and Deferred Inlining settings.

-

TIP When you call an inlined function, the compiler inserts the actual instructions of that function rather than a call to that function. Inlining functions makes your programs faster because you execute the function code immediately without the overhead of a function call and return. However, it can also make your program larger because the compiler may have to repeat the function code multiple times throughout your program.

-

If you disable the ANSI Keywords Only setting, you can declare C functions to be inline.

-
Table 1: Settings for the Inline Depth
- - - - - - - - - - - - - - - - - -
This settingDoes this…
Don’t InlineInlines no functions, not even C or C++ functions declared inline.
SmartInlines small functions to a depth of 2 to 4 inline functions deep.
1 to 8Inlines to the depth specified by the numerical selection.
-

The Smart and 1 to 8 items in the Inline Depth dropdown menu correspond to the pragma inline_depth (inline_depth). To check this setting, use __option(inline_depth), described at Checking Settings.

-

The Don’t Inline item corresponds to the pragma dont_inline. To check this setting, use __option (dont_inline). By default, this setting is disabled.

-

The Auto-Inline setting lets the compiler choose which functions to inline. Also inlines C++ functions declared inline and member functions defined within a class declaration. This setting corresponds to the pragma auto_inline. To check this setting, use __option (auto_inline). By default, this setting is disabled.

-

The Deferred Inlining setting tells the compiler to inline functions that are not yet defined. This setting corresponds to the pragma defer_codegen. To check this setting, use __option (defer_codegen).

-

The Bottom-up Inlining settings tells the compiler to inline functions starting at the last function to the first function in a chain of function calls. This setting corresponds to the pragma inline_bottom_up. To check this setting, use __option (inline_bottom_up).

-

You can also disable automatic inlining of specific functions within a source file using the __attribute__((never_inline)).

-
-
Example __attribute__(never_inline)
-

inline int f() __attribute__((never_inline))
- {
- return 10;
- }

-

int main()
- {
- return f(); // f() is never inlined
- }

-
-

NOTE For Intel x86 targets, the __decspec(noinline) is a compatible synonym.

- - - - - + + + + + +Inlining + + + +

Inlining

+

Carbide supports inlining C/C++ functions that you define with the inline, __inline__, or __inline specifier keywords.

+

The following functions are never inlined:

+
    +
  • Functions that return class objects that need destruction.
  • +
  • Functions with class arguments that need destruction.
  • +
  • Functions with variable argument lists.
  • +
+

The compiler determines whether to inline a function based on the ANSI Strict, Inline Depth, Auto-inline, and Deferred Inlining settings.

+

TIP When you call an inlined function, the compiler inserts the actual instructions of that function rather than a call to that function. Inlining functions makes your programs faster because you execute the function code immediately without the overhead of a function call and return. However, it can also make your program larger because the compiler may have to repeat the function code multiple times throughout your program.

+

If you disable the ANSI Keywords Only setting, you can declare C functions to be inline.

+
Table 1: Settings for the Inline Depth
+ + + + + + + + + + + + + + + + + +
This settingDoes this…
Don’t InlineInlines no functions, not even C or C++ functions declared inline.
SmartInlines small functions to a depth of 2 to 4 inline functions deep.
1 to 8Inlines to the depth specified by the numerical selection.
+

The Smart and 1 to 8 items in the Inline Depth dropdown menu correspond to the pragma inline_depth (inline_depth). To check this setting, use __option(inline_depth), described at Checking Settings.

+

The Don’t Inline item corresponds to the pragma dont_inline. To check this setting, use __option (dont_inline). By default, this setting is disabled.

+

The Auto-Inline setting lets the compiler choose which functions to inline. Also inlines C++ functions declared inline and member functions defined within a class declaration. This setting corresponds to the pragma auto_inline. To check this setting, use __option (auto_inline). By default, this setting is disabled.

+

The Deferred Inlining setting tells the compiler to inline functions that are not yet defined. This setting corresponds to the pragma defer_codegen. To check this setting, use __option (defer_codegen).

+

The Bottom-up Inlining settings tells the compiler to inline functions starting at the last function to the first function in a chain of function calls. This setting corresponds to the pragma inline_bottom_up. To check this setting, use __option (inline_bottom_up).

+

You can also disable automatic inlining of specific functions within a source file using the __attribute__((never_inline)).

+
+
Example __attribute__(never_inline)
+

inline int f() __attribute__((never_inline))
+ {
+ return 10;
+ }

+

int main()
+ {
+ return f(); // f() is never inlined
+ }

+
+

NOTE For Intel x86 targets, the __decspec(noinline) is a compatible synonym.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_iso_extensions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_iso_extensions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_iso_extensions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,49 +1,49 @@ - - - - - -Extensions to ISO C - - - -

Extensions to ISO C

-

The Carbide C language optionally extends ISO C. In most cases, you can control these extensions using specific pragmas.

- -

For information on target-specific extensions, refer to the Targeting manual for your particular target.

- - - - - + + + + + +Extensions to ISO C + + + +

Extensions to ISO C

+

The Carbide C language optionally extends ISO C. In most cases, you can control these extensions using specific pragmas.

+ +

For information on target-specific extensions, refer to the Targeting manual for your particular target.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_macro_args.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_macro_args.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_macro_args.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -A # Not Followed by a Macro Argument - - - -

A # Not Followed by a Macro Argument

-

(ISO C, §6.10.3) The C compiler can accept # tokens that do not appear before arguments in macro definitions.

-
-
Listing 1. Preprocessor Macros Using # Without an Argument
-

#define add1(x) #x #1 // OK, but probably not what you wanted:
- // add1(abc) creates "abc"#1
- #define add2(x) #x "2" // OK: add2(abc) creates "abc2"

-
-

To use this feature, disable the ANSI Strict setting.

-

See also “Checking for Standard C and Standard C++ Conformity”.
-

- - - - - + + + + + +A # Not Followed by a Macro Argument + + + +

A # Not Followed by a Macro Argument

+

(ISO C, §6.10.3) The C compiler can accept # tokens that do not appear before arguments in macro definitions.

+
+
Listing 1. Preprocessor Macros Using # Without an Argument
+

#define add1(x) #x #1 // OK, but probably not what you wanted:
+ // add1(abc) creates "abc"#1
+ #define add2(x) #x "2" // OK: add2(abc) creates "abc2"

+
+

To use this feature, disable the ANSI Strict setting.

+

See also “Checking for Standard C and Standard C++ Conformity”.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_map_newlines.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_map_newlines.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_map_newlines.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - - - - -Map Newlines to CR - - - -

Map Newlines to CR

-

Use the #pragma mpwc_newline to set how the C compiler interprets the newline ('\n') and return ('\r') characters.

-

Most compilers, including the Carbide C/C++ compilers, translate '\r' to 0x0D, the standard value for carriage return, and '\n' to 0x0A, the standard value for linefeed.

-

However, a few C compilers translate '\r' to 0x0A and '\n' to 0x0D—the opposite of the typical behavior.

-

If you enable this setting, the compiler uses these non-standard conventions for the '\n' and '\r' characters. Otherwise, the compiler uses the Carbide C/C++ language’s conventions for these characters.

-

Also if you enable this setting, use ISO C/C++ libraries that were compiled when this setting was enabled. Otherwise, you cannot read and write '\n' and '\r' properly. For example, printing '\n' takes you to the beginning of the current line instead of inserting a new line.

-

This setting corresponds to the pragma mpwc_newline. To check this setting, use __option (mpwc_newline). By default, this setting is disabled.

-

See also “mpwc_newline”, and Checking Settings.
-

- - - - - + + + + + +Map Newlines to CR + + + +

Map Newlines to CR

+

Use the #pragma mpwc_newline to set how the C compiler interprets the newline ('\n') and return ('\r') characters.

+

Most compilers, including the Carbide C/C++ compilers, translate '\r' to 0x0D, the standard value for carriage return, and '\n' to 0x0A, the standard value for linefeed.

+

However, a few C compilers translate '\r' to 0x0A and '\n' to 0x0D—the opposite of the typical behavior.

+

If you enable this setting, the compiler uses these non-standard conventions for the '\n' and '\r' characters. Otherwise, the compiler uses the Carbide C/C++ language’s conventions for these characters.

+

Also if you enable this setting, use ISO C/C++ libraries that were compiled when this setting was enabled. Otherwise, you cannot read and write '\n' and '\r' properly. For example, printing '\n' takes you to the beginning of the current line instead of inserting a new line.

+

This setting corresponds to the pragma mpwc_newline. To check this setting, use __option (mpwc_newline). By default, this setting is disabled.

+

See also “mpwc_newline”, and Checking Settings.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_multibyte_support.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_multibyte_support.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_multibyte_support.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,73 +1,73 @@ - - - - - -Multibyte and Unicode Support - - - -

Multibyte and Unicode Support

-

The Carbide preprocessor fully supports the use of multibyte and Unicode-formatted source files.

-

Source and header files may be encoded in any text encoding the operating system recognizes. (Unicode text decoding support is implemented using native OS services in Win32 and conv() on UNIX systems.)

-

As per ISO C++98 and C99, universal characters may be used in any string or character literal, identifiers (macros, variables, functions, methods, etc.), and comments. These characters are derived either from multibyte sequences in the source text, by virtue of the source file being encoded in UCS-2 or UCS-4, or by use of the \uXXXX or \UXXXXXXXX escape sequences.

-

Wide String Literals

-

Wide string literals in the form L"xxx" and wide characters in the form L’xxx’ are interpreted in the context of the source text encoding.

-

const wchar_t *str = L"Meine Katze ißt Mäuse nachts.";

-

Multibyte character sequences that appear in strings are internally converted to their Unicode equivalents until the C/C++ token for the string is generated. At that time, if the string literal is a narrow string (i.e. using char), the original multibyte character sequence are emitted. If the string is a wide string (using wchar_t), the Unicode characters translated from the multibyte sequence are emitted. If wchar_t is 16 bits and a character is truncated to 16 bits, a warning is reported. (See ISO C99, §6.4.5.5 for the specification of this behavior.)

-

In the event that you want translated – and usually truncated – Unicode characters in narrow string literals, enable #pragma multibyteaware_preserve_ literals off.

-

Source Encoding

-

The compiler uses the Source encoding option in to control how it detects the source file encoding. The compiler recognizes the following source encoding options:

-
    -
  • ASCII–no detection is done, the high-ASCII characters are not interpreted, and wide character strings are merely zero-extensions of the individual bytes in the string.
  • -
  • Autodetect–the compiler attempts to tell whether byte-encoded source is encoded in UTF-8, Shift-JIS, EUC-JP, ISO-2022-JP, or whichever encoding format the operating system considers the default. This option degrades compile speeds slightly due to the extra scanning.
  • -
  • System–the compiler uses the system locale without scanning the source.
  • -
  • UTF-8, Shift-JIS, EUC-JP, ISO-2022-JP– self-explanatory.
  • -
-

NOTE Currently, the compiler ignores the mapping in some Japanese character sets of 0x5c (ASCII ‘\’) to Yen (\u00A5) because the C++98 and C99 standards say that the ASCII character set must be mapped one-to-one with any multibyte encoding. 0x5C is always interpreted as ‘\’ (except inside multibyte character sequences).

-

NOTE The ISO-2022-JP and EUC-JP encoding currently only recognize characters defined by JIS X 0208-1990 (i.e., the escapes ESC $ @, ESC $ B for ISO-2022-JP and two-byte sequences in EUC-JP). The additional characters in JIS X 0212-1990 are not yet recognized.

-

No matter what the Source encoding setting, the compiler always detects UTF-16{BE,LE} or UCS-4{BE,LE} source through a statistical character scan for NULs.

-

NOTE Currently, only the command-line tools, not the IDE, can properly handle sources in Unicode format (UTF-16, UCS-2, UCS-4).

-

Alternately, individual source files can identify which source text encoding is present using #pragma text_encoding. The format is:
- #pragma text_encoding("name" | unknown | reset [, global])

-

Where name is an IANA or MIME encoding name or an OS-specific string.

-

The compiler recognizes these names and maps them to its internal decoders:

-

system US-ASCII ASCII ANSI_X3.4-1968 ANSI_X3.4-1968
- ANSI_X3.4 UTF-8 UTF8 ISO-2022-JP CSISO2022JP ISO2022JP
- CSSHIFTJIS SHIFT-JIS SJIS EUC-JP EUCJP
- UCS-2 UCS-2BE UCS-2LE UCS2 UCS2BE UCS2LE UTF-16 U
- TF-16BE UTF-16LE UTF16 UTF16BE UTF16LE UCS-4 UCS-4BE
- UCS-4LE UCS4 UCS4BE UCS4LE 10646-1:1993 ISO-10646-1
- ISO-10646 unicode

-

NOTE UCS-2 is always interpreted as UTF-16; i.e. surrogate character pairs are used to select characters through plane 16.

-

This #pragma may be used several times in one file (probably unlikely usage). The compiler expects the pragma to be encoded in the “current” text encoding, through the end of line.

-

By default, #pragma text_encoding is only effective through the end of file. To affect the default text encoding assumed for the current and all subsequent files, supply the “global” modifier.
-

-

Other Support

-

In addition, note the following:

-
    -
  • Specify Universal character names (i.e. Unicode code points) with the \uXXXX or \UXXXXXXXX escape sequences:
  • -
-
-

wchar_t florette = L’\u273f’;
- int \u30AD\u30B3\u30DE\u30A6 = soy_sauce();

-
-
    -
  • You can use \uXXXX or \UXXXXXXXX regardless of the actual size of wchar_t (use of the escape does not impose a character width on the literal).
  • -
  • Preprocessed text is always emitted in ASCII. Wide characters are emitted in the \uXXXX or \UXXXXXXXX format.
  • -
-
-

extern string *Wörter[];
- -->
- extern string *W\u00F6rter[];

-
-
    -
  • Identifiers using characters not representable in ASCII are emitted in object code with the \uXXXX or \UXXXXXXXX escape sequences. If an object format does not support the ‘\\’ character, the encoding may be modified on a target-specific basis.
  • -
-

Also see “Character Constants as Integer Values” for information on creating a character constant consisting of more than one character (not to be confused with this topic).

-

For more information on Unicode, see www.unicode.org.

- - - - - + + + + + +Multibyte and Unicode Support + + + +

Multibyte and Unicode Support

+

The Carbide preprocessor fully supports the use of multibyte and Unicode-formatted source files.

+

Source and header files may be encoded in any text encoding the operating system recognizes. (Unicode text decoding support is implemented using native OS services in Win32 and conv() on UNIX systems.)

+

As per ISO C++98 and C99, universal characters may be used in any string or character literal, identifiers (macros, variables, functions, methods, etc.), and comments. These characters are derived either from multibyte sequences in the source text, by virtue of the source file being encoded in UCS-2 or UCS-4, or by use of the \uXXXX or \UXXXXXXXX escape sequences.

+

Wide String Literals

+

Wide string literals in the form L"xxx" and wide characters in the form L’xxx’ are interpreted in the context of the source text encoding.

+

const wchar_t *str = L"Meine Katze ißt Mäuse nachts.";

+

Multibyte character sequences that appear in strings are internally converted to their Unicode equivalents until the C/C++ token for the string is generated. At that time, if the string literal is a narrow string (i.e. using char), the original multibyte character sequence are emitted. If the string is a wide string (using wchar_t), the Unicode characters translated from the multibyte sequence are emitted. If wchar_t is 16 bits and a character is truncated to 16 bits, a warning is reported. (See ISO C99, §6.4.5.5 for the specification of this behavior.)

+

In the event that you want translated – and usually truncated – Unicode characters in narrow string literals, enable #pragma multibyteaware_preserve_ literals off.

+

Source Encoding

+

The compiler uses the Source encoding option in to control how it detects the source file encoding. The compiler recognizes the following source encoding options:

+
    +
  • ASCII–no detection is done, the high-ASCII characters are not interpreted, and wide character strings are merely zero-extensions of the individual bytes in the string.
  • +
  • Autodetect–the compiler attempts to tell whether byte-encoded source is encoded in UTF-8, Shift-JIS, EUC-JP, ISO-2022-JP, or whichever encoding format the operating system considers the default. This option degrades compile speeds slightly due to the extra scanning.
  • +
  • System–the compiler uses the system locale without scanning the source.
  • +
  • UTF-8, Shift-JIS, EUC-JP, ISO-2022-JP– self-explanatory.
  • +
+

NOTE Currently, the compiler ignores the mapping in some Japanese character sets of 0x5c (ASCII ‘\’) to Yen (\u00A5) because the C++98 and C99 standards say that the ASCII character set must be mapped one-to-one with any multibyte encoding. 0x5C is always interpreted as ‘\’ (except inside multibyte character sequences).

+

NOTE The ISO-2022-JP and EUC-JP encoding currently only recognize characters defined by JIS X 0208-1990 (i.e., the escapes ESC $ @, ESC $ B for ISO-2022-JP and two-byte sequences in EUC-JP). The additional characters in JIS X 0212-1990 are not yet recognized.

+

No matter what the Source encoding setting, the compiler always detects UTF-16{BE,LE} or UCS-4{BE,LE} source through a statistical character scan for NULs.

+

NOTE Currently, only the command-line tools, not the IDE, can properly handle sources in Unicode format (UTF-16, UCS-2, UCS-4).

+

Alternately, individual source files can identify which source text encoding is present using #pragma text_encoding. The format is:
+ #pragma text_encoding("name" | unknown | reset [, global])

+

Where name is an IANA or MIME encoding name or an OS-specific string.

+

The compiler recognizes these names and maps them to its internal decoders:

+

system US-ASCII ASCII ANSI_X3.4-1968 ANSI_X3.4-1968
+ ANSI_X3.4 UTF-8 UTF8 ISO-2022-JP CSISO2022JP ISO2022JP
+ CSSHIFTJIS SHIFT-JIS SJIS EUC-JP EUCJP
+ UCS-2 UCS-2BE UCS-2LE UCS2 UCS2BE UCS2LE UTF-16 U
+ TF-16BE UTF-16LE UTF16 UTF16BE UTF16LE UCS-4 UCS-4BE
+ UCS-4LE UCS4 UCS4BE UCS4LE 10646-1:1993 ISO-10646-1
+ ISO-10646 unicode

+

NOTE UCS-2 is always interpreted as UTF-16; i.e. surrogate character pairs are used to select characters through plane 16.

+

This #pragma may be used several times in one file (probably unlikely usage). The compiler expects the pragma to be encoded in the “current” text encoding, through the end of line.

+

By default, #pragma text_encoding is only effective through the end of file. To affect the default text encoding assumed for the current and all subsequent files, supply the “global” modifier.
+

+

Other Support

+

In addition, note the following:

+
    +
  • Specify Universal character names (i.e. Unicode code points) with the \uXXXX or \UXXXXXXXX escape sequences:
  • +
+
+

wchar_t florette = L’\u273f’;
+ int \u30AD\u30B3\u30DE\u30A6 = soy_sauce();

+
+
    +
  • You can use \uXXXX or \UXXXXXXXX regardless of the actual size of wchar_t (use of the escape does not impose a character width on the literal).
  • +
  • Preprocessed text is always emitted in ASCII. Wide characters are emitted in the \uXXXX or \UXXXXXXXX format.
  • +
+
+

extern string *Wörter[];
+ -->
+ extern string *W\u00F6rter[];

+
+
    +
  • Identifiers using characters not representable in ASCII are emitted in object code with the \uXXXX or \UXXXXXXXX escape sequences. If an object format does not support the ‘\\’ character, the encoding may be modified on a target-specific basis.
  • +
+

Also see “Character Constants as Integer Values” for information on creating a character constant consisting of more than one character (not to be confused with this topic).

+

For more information on Unicode, see www.unicode.org.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_pool_strings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_pool_strings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_pool_strings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Pool Strings - - - -

Pool Strings

-

The Pool Strings setting controls how the compiler stores string constants.

-

NOTE In principle, this setting works for all targets. However, it is useful only for a Table of Contents based linking mechanism such as that used for MacOS Classic on the PowerPC processor.

-

If you enable this setting, the compiler collects all string constants into a single data object so that your program needs only one TOC entry for all of them. While this decreases the number of TOC entries in your program, it also increases your program size because it uses a less efficient method to store the address of the string.

-

If you disable this setting, the compiler creates a unique data object and TOC entry for each string constant.

-

TIP You can change the size of the TOC with the Store Static Data in TOC setting in the PPC Processor panel.

-

NOTE This option can be overridden in PPC targets by using the Linker Pool Strings or Linker Merges String Constants options.

-

Enable this setting if your program is large and has many string constants.

-

NOTE If you enable the Pool Strings setting, the compiler ignores the PC-Relative Strings setting. This is a 68K-only feature.

-

The Pool Strings setting corresponds to the pragma pool_strings. To check this setting, use __option (pool_strings). By default, this setting is disabled.

-

See also “pool_strings” and Checking Settings.
-

- - - - - + + + + + +Pool Strings + + + +

Pool Strings

+

The Pool Strings setting controls how the compiler stores string constants.

+

NOTE In principle, this setting works for all targets. However, it is useful only for a Table of Contents based linking mechanism such as that used for MacOS Classic on the PowerPC processor.

+

If you enable this setting, the compiler collects all string constants into a single data object so that your program needs only one TOC entry for all of them. While this decreases the number of TOC entries in your program, it also increases your program size because it uses a less efficient method to store the address of the string.

+

If you disable this setting, the compiler creates a unique data object and TOC entry for each string constant.

+

TIP You can change the size of the TOC with the Store Static Data in TOC setting in the PPC Processor panel.

+

NOTE This option can be overridden in PPC targets by using the Linker Pool Strings or Linker Merges String Constants options.

+

Enable this setting if your program is large and has many string constants.

+

NOTE If you enable the Pool Strings setting, the compiler ignores the PC-Relative Strings setting. This is a 68K-only feature.

+

The Pool Strings setting corresponds to the pragma pool_strings. To check this setting, use __option (pool_strings). By default, this setting is disabled.

+

See also “pool_strings” and Checking Settings.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_pre_header_files.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_pre_header_files.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_pre_header_files.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -Precompiled Header Files - - - -

Precompiled Header Files

-

A precompiled header is an image of the compiler’s symbol table. Create a precompiled header file for commonly included files. You can also use a precompiled header file to temporarily change header files that do not normally change otherwise (for example, OS ABI headers or standard ANSI library header files). Then replace the original header files with the precompiled header file to significantly improve compile time.

-

A precompiled header cannot do any of the following:

-
    -
  • Define non-inline functions
  • -
  • Define global data
  • -
  • Instantiate template data
  • -
  • Instantiate non-inline functions
  • -
-

You must include precompiled headers before defining or declaring other objects. You can only use one precompiled header file in a translation unit.

-

See also “precompile_target”.

- - - - - + + + + + +Precompiled Header Files + + + +

Precompiled Header Files

+

A precompiled header is an image of the compiler’s symbol table. Create a precompiled header file for commonly included files. You can also use a precompiled header file to temporarily change header files that do not normally change otherwise (for example, OS ABI headers or standard ANSI library header files). Then replace the original header files with the precompiled header file to significantly improve compile time.

+

A precompiled header cannot do any of the following:

+
    +
  • Define non-inline functions
  • +
  • Define global data
  • +
  • Instantiate template data
  • +
  • Instantiate non-inline functions
  • +
+

You must include precompiled headers before defining or declaring other objects. You can only use one precompiled header file in a translation unit.

+

See also “precompile_target”.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_prefix_files.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_prefix_files.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_prefix_files.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - -Prefix Files - - - -

Prefix Files

-

In previous Carbide compilers, the prefix file was a distinct setting that told the compiler to include a source code file at the beginning of each source code file in a project’s build target, or include a precompiled header file into the project.

-

With this compiler release, the concept of prefixing files, #defines, and #pragmas has been extended.

-

To specify a prefix file, add an #include directive to this field, for example:

-

#include "Win32Headers.h"

-

To specify #defines or #pragmas, enter them here as you would in source code:

-

#define DEBUG_BUILD 1
- #pragma warn_illtokenpasting off

-

When building precompiled headers, note the Include prefix text in precompiled headers setting. When enabled, the contents of the Prefix Text are used to generate the precompiled header. If your project generates a precompiled header in the same target that uses it, follow the form:

-

#if !__option(precompile)
- #include "MyHeaders.mch"
- #endif

-

to exclude the *.mch file when generating it.

-

NOTE #pragmas may affect aspects of parsing and type declaration while building a precompiled header, but these settings are not retained in the body of the precompiled header. Thus the prefix text is used for every file in the target.

- - - - - + + + + + +Prefix Files + + + +

Prefix Files

+

In previous Carbide compilers, the prefix file was a distinct setting that told the compiler to include a source code file at the beginning of each source code file in a project’s build target, or include a precompiled header file into the project.

+

With this compiler release, the concept of prefixing files, #defines, and #pragmas has been extended.

+

To specify a prefix file, add an #include directive to this field, for example:

+

#include "Win32Headers.h"

+

To specify #defines or #pragmas, enter them here as you would in source code:

+

#define DEBUG_BUILD 1
+ #pragma warn_illtokenpasting off

+

When building precompiled headers, note the Include prefix text in precompiled headers setting. When enabled, the contents of the Prefix Text are used to generate the precompiled header. If your project generates a precompiled header in the same target that uses it, follow the form:

+

#if !__option(precompile)
+ #include "MyHeaders.mch"
+ #endif

+

to exclude the *.mch file when generating it.

+

NOTE #pragmas may affect aspects of parsing and type declaration while building a precompiled header, but these settings are not retained in the body of the precompiled header. Thus the prefix text is used for every file in the target.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_ranged_cases.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_ranged_cases.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_ranged_cases.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,35 +1,35 @@ - - - - - -Ranges in case statements - - - -

Ranges in case statements

-

If you disable the ANSI Strict setting, the compiler allows ranges of values in a switch statement by using a special form of case statement. A case statement that uses a range is a shorter way of specifying consecutive case statements that span a range of values.

-

The range form of a case statement is

-

case low ... high : // note spaces around ellipsis character

-

where low is a valid case expression that is less than high, which is also a valid case expression. A case statement that uses a range is applied when the expression of a switch statement is both greater than or equal to the low expression and less than or equal to the high expression.

-

NOTE Make sure to separate the ellipsis (...) from the low and high expressions with spaces.

-
-
Listing 1. Ranges in case Statements
-

switch (i)
- {
- case 0 ... 2: /* Equivalent to case 0: case 1: case 2: */
- j = i * 2;
- break;
- case 3:
- j = i;
- break;
- default:
- j = 0;
- break;
- }

-
- - - - - + + + + + +Ranges in case statements + + + +

Ranges in case statements

+

If you disable the ANSI Strict setting, the compiler allows ranges of values in a switch statement by using a special form of case statement. A case statement that uses a range is a shorter way of specifying consecutive case statements that span a range of values.

+

The range form of a case statement is

+

case low ... high : // note spaces around ellipsis character

+

where low is a valid case expression that is less than high, which is also a valid case expression. A case statement that uses a range is applied when the expression of a switch statement is both greater than or equal to the low expression and less than or equal to the high expression.

+

NOTE Make sure to separate the ellipsis (...) from the low and high expressions with spaces.

+
+
Listing 1. Ranges in case Statements
+

switch (i)
+ {
+ case 0 ... 2: /* Equivalent to case 0: case 1: case 2: */
+ j = i * 2;
+ break;
+ case 3:
+ j = i;
+ break;
+ default:
+ j = 0;
+ break;
+ }

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_relaxed_ptrs.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_relaxed_ptrs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_relaxed_ptrs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,20 +1,20 @@ - - - - - -Relaxed Pointer Type Rules - - - -

Relaxed Pointer Type Rules

-

Use the #pragma mpwc_relax to tell the compiler to treat all pointer types as the same type. While the compiler verifies the parameters of function prototypes for compatible pointer types, it allows direct pointer assignments.

-

Use this setting if you are using code written before the ISO C standard. Old source code frequently uses these types interchangeably.

-

This setting has no effect on C++. When compiling C++ source code, the compiler differentiates char* and unsigned char* data types even if the relaxed pointer setting is enabled.

-

See also “mpwc_relax”, and Checking Settings.
-

- - - - - + + + + + +Relaxed Pointer Type Rules + + + +

Relaxed Pointer Type Rules

+

Use the #pragma mpwc_relax to tell the compiler to treat all pointer types as the same type. While the compiler verifies the parameters of function prototypes for compatible pointer types, it allows direct pointer assignments.

+

Use this setting if you are using code written before the ISO C standard. Old source code frequently uses these types interchangeably.

+

This setting has no effect on C++. When compiling C++ source code, the compiler differentiates char* and unsigned char* data types even if the relaxed pointer setting is enabled.

+

See also “mpwc_relax”, and Checking Settings.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_require_prototypes.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_require_prototypes.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_require_prototypes.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,54 +1,54 @@ - - - - - -Require Function Prototypes - - - -

Require Function Prototypes

-

(ISO C, §6.7.5.3, §6.9.1) The C compiler lets you choose how to enforce function prototypes. The Require Function Prototypes setting controls this behavior.

-

If you enable the Require Function Prototypes setting, the compiler generates an error if you define a previously referenced function that does not have a prototype. If you define the function before it is referenced but do not give it a prototype, then enabling the Require Function Prototypes setting causes the compiler to issue a warning.

-

This setting helps you prevent errors that happen when you call a function before you declare or define it. For example, without a function prototype, you might pass data of the wrong type. As a result, your code might not work as you expect even though it compiles without error.

-

In Listing 1, PrintNum() is called with an integer argument but later defined to take a floating-point argument.

-
-
Listing 1. Unnoticed Type-mismatch
-

#include <stdio.h>
- void main(void)
- {
- PrintNum(1); // PrintNum() tries to interpret the
- integer as a float. Prints 0.000000.
- }

-

void PrintNum(float x)
- {
- printf("%f\n", x);
- }

-
-

When you run this program, you could get this result:

-

0.000000

-

Although the compiler does not complain about the type mismatch, the function does not work as you want. Since PrintNum() does not have a prototype, the compiler does not know to convert the integer to a floating-point number before calling the function. Instead, the function interprets the bits it received as a floating-point number and prints nonsense.

-

If you prototype PrintNum() first, as in Listing 2, the compiler converts its argument to a floating-point number, and the function prints what you wanted.

-
-
Listing 2. Using a Prototype to Avoid Type-mismatch
-

#include <stdio.h>
- void PrintNum(float x); // Function prototype.

-

void main(void)
- {
- PrintNum(1); // Compiler converts int to float.
- } // Prints 1.000000.

-

void PrintNum(float x)
- {
- printf("%f\n", x);
- }

-
-

In the above example, the compiler automatically typecasts the passed value. In other situations where automatic typecasting is not available, the compiler generates an error if an argument does not match the data type required by a function prototype. Such a mismatched data type error is easy to locate at compile time. If you do not use prototypes, you do not get a compiler error.

-

However, at runtime the code might produce an unexpected result whose cause can be extremely difficult to find.

-

The Require Function Prototypes setting corresponds to the pragma require_prototypes. To check this setting, use __option (require_prototypes). By default, this setting is enabled.

-

See also “require_prototypes”, and Checking Settings.
-

- - - - - + + + + + +Require Function Prototypes + + + +

Require Function Prototypes

+

(ISO C, §6.7.5.3, §6.9.1) The C compiler lets you choose how to enforce function prototypes. The Require Function Prototypes setting controls this behavior.

+

If you enable the Require Function Prototypes setting, the compiler generates an error if you define a previously referenced function that does not have a prototype. If you define the function before it is referenced but do not give it a prototype, then enabling the Require Function Prototypes setting causes the compiler to issue a warning.

+

This setting helps you prevent errors that happen when you call a function before you declare or define it. For example, without a function prototype, you might pass data of the wrong type. As a result, your code might not work as you expect even though it compiles without error.

+

In Listing 1, PrintNum() is called with an integer argument but later defined to take a floating-point argument.

+
+
Listing 1. Unnoticed Type-mismatch
+

#include <stdio.h>
+ void main(void)
+ {
+ PrintNum(1); // PrintNum() tries to interpret the
+ integer as a float. Prints 0.000000.
+ }

+

void PrintNum(float x)
+ {
+ printf("%f\n", x);
+ }

+
+

When you run this program, you could get this result:

+

0.000000

+

Although the compiler does not complain about the type mismatch, the function does not work as you want. Since PrintNum() does not have a prototype, the compiler does not know to convert the integer to a floating-point number before calling the function. Instead, the function interprets the bits it received as a floating-point number and prints nonsense.

+

If you prototype PrintNum() first, as in Listing 2, the compiler converts its argument to a floating-point number, and the function prints what you wanted.

+
+
Listing 2. Using a Prototype to Avoid Type-mismatch
+

#include <stdio.h>
+ void PrintNum(float x); // Function prototype.

+

void main(void)
+ {
+ PrintNum(1); // Compiler converts int to float.
+ } // Prints 1.000000.

+

void PrintNum(float x)
+ {
+ printf("%f\n", x);
+ }

+
+

In the above example, the compiler automatically typecasts the passed value. In other situations where automatic typecasting is not available, the compiler generates an error if an argument does not match the data type required by a function prototype. Such a mismatched data type error is easy to locate at compile time. If you do not use prototypes, you do not get a compiler error.

+

However, at runtime the code might produce an unexpected result whose cause can be extremely difficult to find.

+

The Require Function Prototypes setting corresponds to the pragma require_prototypes. To check this setting, use __option (require_prototypes). By default, this setting is enabled.

+

See also “require_prototypes”, and Checking Settings.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_reuse_strings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_reuse_strings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_reuse_strings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Reusing Strings - - - -

Reusing Strings

-

The Reuse Strings setting controls how the compiler stores string literals.

-

If you enable this setting, the compiler stores each string literal separately. Otherwise, the compiler stores only one copy of identical string literals. This means if you change one of the strings, you change them all. For example, take this code snippet:

-

char *str1="Hello";
- char *str2="Hello"; // two identical strings
- *str2 = 'Y';

-

This setting helps you save memory if your program contains identical string literals which you do not modify.

-

If you enable the Reuse Strings setting, the strings are stored separately. After changing the first character, str1 is still "Hello", but str2 is "Yello".

-

If you disable the Reuse Strings setting, the two strings are stored in one memory location because they are identical. After changing the first character, both str1 and str2 are "Yello", which is counterintuitive and can create bugs that are difficult to locate.

-

The Reuse Strings setting corresponds to the pragma dont_reuse_strings. To check this setting, use __option (dont_reuse_strings). By default, this setting is enabled, so strings are not reused.

-

See also dont_reuse_strings. and Checking Settings.
-

- - - - - + + + + + +Reusing Strings + + + +

Reusing Strings

+

The Reuse Strings setting controls how the compiler stores string literals.

+

If you enable this setting, the compiler stores each string literal separately. Otherwise, the compiler stores only one copy of identical string literals. This means if you change one of the strings, you change them all. For example, take this code snippet:

+

char *str1="Hello";
+ char *str2="Hello"; // two identical strings
+ *str2 = 'Y';

+

This setting helps you save memory if your program contains identical string literals which you do not modify.

+

If you enable the Reuse Strings setting, the strings are stored separately. After changing the first character, str1 is still "Hello", but str2 is "Yello".

+

If you disable the Reuse Strings setting, the two strings are stored in one memory location because they are identical. After changing the first character, both str1 and str2 are "Yello", which is counterintuitive and can create bugs that are difficult to locate.

+

The Reuse Strings setting corresponds to the pragma dont_reuse_strings. To check this setting, use __option (dont_reuse_strings). By default, this setting is enabled, so strings are not reused.

+

See also dont_reuse_strings. and Checking Settings.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_short_dbl_type.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_short_dbl_type.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_short_dbl_type.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,17 +1,17 @@ - - - - - -The short double Data Type - - - -

The short double Data Type

-

The short double data type is no longer supported for most targets. -

- - - - - + + + + + +The short double Data Type + + + +

The short double Data Type

+

The short double data type is no longer supported for most targets. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_sizeof_type.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_sizeof_type.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_sizeof_type.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,19 +1,19 @@ - - - - - -Sizeof() Operator Data Type - - - -

Sizeof() Operator Data Type

-

The sizeof() operator returns the size of a variable or type in bytes. The data type of this size is size_t, which the compiler declares in the file stddef.h. If your source code assumes that sizeof() returns a number of type int, it might not work correctly.

-

NOTE The compiler evaluates the value returned by sizeof() only at compile time, not runtime.

-

NOTE The sizeof() operator is not intended to work in preprocessor #if/#elif directives.
-

- - - - - + + + + + +Sizeof() Operator Data Type + + + +

Sizeof() Operator Data Type

+

The sizeof() operator returns the size of a variable or type in bytes. The data type of this size is size_t, which the compiler declares in the file stddef.h. If your source code assumes that sizeof() returns a number of type int, it might not work correctly.

+

NOTE The compiler evaluates the value returned by sizeof() only at compile time, not runtime.

+

NOTE The sizeof() operator is not intended to work in preprocessor #if/#elif directives.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_std_conformity.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_std_conformity.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_std_conformity.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - -Checking for Standard C and Standard C++ Conformity - - - -

Checking for Standard C and Standard C++ Conformity

-

The ANSI Strict setting affects several C language extensions made by the Carbide C compiler:

- -

If you enable the ANSI Strict setting, the compiler disables all of the above ANSI C language extensions. You cannot enable individual extensions that are controlled by the ANSI Strict setting.

-

This setting might affect how the compiler handles enumerated constants. See Enumerated Types for more information. It might also affect the declaration of the main() function for C++ programs. See “Implicit Return Statement for main()”.

-

The ANSI Strict setting corresponds to the pragma ANSI_strict. To check this setting, use __option (ANSI_strict). See also “ANSI_strict” and Checking Settings. -

- - - - - + + + + + +Checking for Standard C and Standard C++ Conformity + + + +

Checking for Standard C and Standard C++ Conformity

+

The ANSI Strict setting affects several C language extensions made by the Carbide C compiler:

+ +

If you enable the ANSI Strict setting, the compiler disables all of the above ANSI C language extensions. You cannot enable individual extensions that are controlled by the ANSI Strict setting.

+

This setting might affect how the compiler handles enumerated constants. See Enumerated Types for more information. It might also affect the declaration of the main() function for C++ programs. See “Implicit Return Statement for main()”.

+

The ANSI Strict setting corresponds to the pragma ANSI_strict. To check this setting, use __option (ANSI_strict). See also “ANSI_strict” and Checking Settings. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_typecast_ptrs.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_typecast_ptrs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_typecast_ptrs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - - - - -Using Typecasted Pointers as lvalues - - - -

Using Typecasted Pointers as lvalues

-

The C compiler can accept pointers that are typecasted to other pointer types as lvalues.

-
-

Listing 1. Example of a Typecasted Pointer as an lvalue

-

char *cp;
- ((long *) cp)++; /* OK if ANSI Strict is disabled. */

-
-

See also “Checking for Standard C and Standard C++ Conformity”.
-

- - - - - + + + + + +Using Typecasted Pointers as lvalues + + + +

Using Typecasted Pointers as lvalues

+

The C compiler can accept pointers that are typecasted to other pointer types as lvalues.

+
+

Listing 1. Example of a Typecasted Pointer as an lvalue

+

char *cp;
+ ((long *) cp)++; /* OK if ANSI Strict is disabled. */

+
+

See also “Checking for Standard C and Standard C++ Conformity”.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_typeof_operator.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_typeof_operator.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_typeof_operator.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,31 +1,31 @@ - - - - - -The __typeof__() and typeof() operators - - - -

The __typeof__() and typeof() operators

-

With the __typeof__() operator, the compiler lets you specify the data type of an expression. Listing 1 shows an example.

-

__typeof__(expression)

-

where expression is any valid C expression or data type. Because the compiler translates a __typeof__() expression into a data type, you can use this expression wherever a normal type would be specified.

-

Like the sizeof() operator, __typeof__() is only evaluated at compile time, not at runtime. For related information, see “Sizeof() Operator Data Type”.

-

If you enable the gcc_extensions pragma, the typeof() operator is equivalent to the __typeof__() operator.

-
-

Listing 1. Example of __typeof__() and typeof() Operators

-

char *cp;
- int *ip;
- long *lp;

-

__typeof__(*ip) i; /* equivalent to "int i;" */
- __typeof__(*lp) l; /* equivalent to "long l;" */

-

#pragma gcc_extensions on
- typeof(*cp) c; /* equivalent to "char c;" */
-

-
- - - - - + + + + + +The __typeof__() and typeof() operators + + + +

The __typeof__() and typeof() operators

+

With the __typeof__() operator, the compiler lets you specify the data type of an expression. Listing 1 shows an example.

+

__typeof__(expression)

+

where expression is any valid C expression or data type. Because the compiler translates a __typeof__() expression into a data type, you can use this expression wherever a normal type would be specified.

+

Like the sizeof() operator, __typeof__() is only evaluated at compile time, not at runtime. For related information, see “Sizeof() Operator Data Type”.

+

If you enable the gcc_extensions pragma, the typeof() operator is equivalent to the __typeof__() operator.

+
+

Listing 1. Example of __typeof__() and typeof() Operators

+

char *cp;
+ int *ip;
+ long *lp;

+

__typeof__(*ip) i; /* equivalent to "int i;" */
+ __typeof__(*lp) l; /* equivalent to "long l;" */

+

#pragma gcc_extensions on
+ typeof(*cp) c; /* equivalent to "char c;" */
+

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_unnamed_args.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_unnamed_args.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_unnamed_args.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - - - - -Unnamed Arguments in Function Definitions - - - -

Unnamed Arguments in Function Definitions

-

(ISO C, §6.9.1) The C compiler can accept unnamed arguments in a function definition.

-
-

Listing 1. Unnamed Function Arguments

-

void f(int ) {} /* OK if ANSI Strict is disabled */
- void f(int i) {} /* ALWAYS OK */

-
-

See also: Checking for Standard C and Standard C++ Conformity.
-

- - - - - + + + + + +Unnamed Arguments in Function Definitions + + + +

Unnamed Arguments in Function Definitions

+

(ISO C, §6.9.1) The C compiler can accept unnamed arguments in a function definition.

+
+

Listing 1. Unnamed Function Arguments

+

void f(int ) {} /* OK if ANSI Strict is disabled */
+ void f(int i) {} /* ALWAYS OK */

+
+

See also: Checking for Standard C and Standard C++ Conformity.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_unsigned_chars.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_unsigned_chars.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_unsigned_chars.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,19 +1,19 @@ - - - - - -Use Unsigned Chars - - - -

Use Unsigned Chars

-

The C compiler treats a char declaration as an unsigned char declaration.

-

The Use Unsigned Chars setting corresponds to the pragma unsigned_char. To check this setting, use __option (unsigned_char). By default, this setting is disabled.

-

See also “unsigned_char” and Checking Settings. -

- - - - - + + + + + +Use Unsigned Chars + + + +

Use Unsigned Chars

+

The C compiler treats a char declaration as an unsigned char declaration.

+

The Use Unsigned Chars setting corresponds to the pragma unsigned_char. To check this setting, use __option (unsigned_char). By default, this setting is disabled.

+

See also “unsigned_char” and Checking Settings. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_use_longlong.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_use_longlong.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_use_longlong.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Using long long Integers - - - -

Using long long Integers

-

The C compiler allows the type specifier long long. The longlong pragma controls this behavior and has no corresponding item .

-

If this setting is off, using long long causes a syntax error.

-

In an enumerated type, you can use an enumerator large enough for a long long. For more information, see Enumerated Types.

-

However, long long bitfields are not supported.

-

You control the long long type with #pragma longlong. To check this setting, use __option (longlong). By default, this pragma is on.

-

See also longlong and Checking Settings.
-

- - - - - + + + + + +Using long long Integers + + + +

Using long long Integers

+

The C compiler allows the type specifier long long. The longlong pragma controls this behavior and has no corresponding item .

+

If this setting is off, using long long causes a syntax error.

+

In an enumerated type, you can use an enumerator large enough for a long long. For more information, see Enumerated Types.

+

However, long long bitfields are not supported.

+

You control the long long type with #pragma longlong. To check this setting, use __option (longlong). By default, this pragma is on.

+

See also longlong and Checking Settings.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_volatile_var.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_volatile_var.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_volatile_var.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,35 +1,35 @@ - - - - - -Volatile Variables - - - -

Volatile Variables

-

(ISO C, §6.7.3) When you declare a volatile variable, the Carbide C compiler takes the following precautions to respect the value of the variable:

-
    -
  • The compiler stores commonly used variables in processor registers to produce faster object code. However, the compiler never stores the value of a volatile variable in a processor register.
  • -
  • The compiler uses its common sub-expression optimization to compute the addresses of commonly used variables and the results of often-used expressions once at the beginning of a function to produce faster object code. However, every time an expression uses a volatile variable, the compiler computes both the address of the volatile variable and the results of the expression that uses it.
  • -
-

Listing 1 shows an example of volatile variables.

-
-
Listing 1. Volatile Variables
-

void main(void)
- {
- int i[100];
- volatile int a, b; /* a and b are not cached in registers. */

-

a = 5;
- b = 20;

-

i[a + b] = 15; /* compiler calculates a + b */
- i[a + b] = 30; /* compiler recalculates a + b */
- }

-
-

The compiler does not place the value of a, b, or a+b in registers. But it does recalculate a+b in both assignment statements.
-

- - - - - + + + + + +Volatile Variables + + + +

Volatile Variables

+

(ISO C, §6.7.3) When you declare a volatile variable, the Carbide C compiler takes the following precautions to respect the value of the variable:

+
    +
  • The compiler stores commonly used variables in processor registers to produce faster object code. However, the compiler never stores the value of a volatile variable in a processor register.
  • +
  • The compiler uses its common sub-expression optimization to compute the addresses of commonly used variables and the results of often-used expressions once at the beginning of a function to produce faster object code. However, every time an expression uses a volatile variable, the compiler computes both the address of the volatile variable and the results of the expression that uses it.
  • +
+

Listing 1 shows an example of volatile variables.

+
+
Listing 1. Volatile Variables
+

void main(void)
+ {
+ int i[100];
+ volatile int a, b; /* a and b are not cached in registers. */

+

a = 5;
+ b = 20;

+

i[a + b] = 15; /* compiler calculates a + b */
+ i[a + b] = 30; /* compiler recalculates a + b */
+ }

+
+

The compiler does not place the value of a, b, or a+b in registers. But it does recalculate a+b in both assignment statements.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_zero_length_arrays.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_zero_length_arrays.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/c_compiler/c_zero_length_arrays.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -Arrays of Zero Length in Structures - - - -

Arrays of Zero Length in Structures

-

If you disable the ANSI Strict setting , the compiler lets you specify an array of no length as the last item in a structure. Listing 1 shows an example. You can define arrays with zero as the index value or with no index value.

-
-
Listing 1. Using Zero-length Arrays
-

struct listOfLongs {
- long listCount;
- long list[0]; // OK if ANSI Strict is disabled, [] is OK, too.
- }
-

-
- - - - - + + + + + +Arrays of Zero Length in Structures + + + +

Arrays of Zero Length in Structures

+

If you disable the ANSI Strict setting , the compiler lets you specify an array of no length as the last item in a structure. Listing 1 shows an example. You can define arrays with zero as the index value or with no index value.

+
+
Listing 1. Using Zero-length Arrays
+

struct listOfLongs {
+ long listCount;
+ long list[0]; // OK if ANSI Strict is disabled, [] is OK, too.
+ }
+

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_admin_options.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_admin_options.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_admin_options.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Help and Administrative Options - - - -

Help and Administrative Options

-

This section provides examples of how to retrieve general and help information from the command-line tools.

-

For example, to obtain help information from a tool that has some compatibility options with Visual C++, type the following command:

-

mwccsym2 -?

-

To get more specific information from the same tool, type the following command:

-

mwccsym2 -help [argument,...]

-

where argument is a valid keyword such as usage, all, or this. For example, with the Windows® x86 C/C++ compiler, typing:

-

mwccsym2 -help usage

-

or

-

mwccsym2 -help opt=help

-

provides information about the help options available with the mwccsym2 x86 tool.
-

- - - - - + + + + + +Help and Administrative Options + + + +

Help and Administrative Options

+

This section provides examples of how to retrieve general and help information from the command-line tools.

+

For example, to obtain help information from a tool that has some compatibility options with Visual C++, type the following command:

+

mwccsym2 -?

+

To get more specific information from the same tool, type the following command:

+

mwccsym2 -help [argument,...]

+

where argument is a valid keyword such as usage, all, or this. For example, with the Windows® x86 C/C++ compiler, typing:

+

mwccsym2 -help usage

+

or

+

mwccsym2 -help opt=help

+

provides information about the help options available with the mwccsym2 x86 tool.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_conventions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_conventions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_conventions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Command-Line Settings Conventions - - - -

Command-Line Settings Conventions

-

In all cases, text in brackets ([]) is optional, although the brackets themselves never appear in the actual command. For example, the command -str[ings] pool can mean either:

-

-strings pool

-

or

-

-str pool

-

Where an option has several possible permutations, the possibilities are separated by the pipe (|) character. For example:

-

-sym on|off|full|fullpath

-

means the -sym command can be followed by one or more of the following options: on, off, full, or fullpath. If you have more than one option, separate each option with a comma. So you might have -sym on, -sym off, -sym full, or -sym on, fullpath.

-

The plus sign (+) means that the parameter to an option must not be separated from the option name by a space. For example,

-

-D+name[=value]

-

means that you can have -DVAR or -DVAR=3, but not -D VAR.

-

In cases where you provide a variable parameter such as a file name, that item is in italic text. For example, -precompile filename means you must provide a file name. The help text that corresponds to the compiler option explains what you must provide.

- - - - - + + + + + +Command-Line Settings Conventions + + + +

Command-Line Settings Conventions

+

In all cases, text in brackets ([]) is optional, although the brackets themselves never appear in the actual command. For example, the command -str[ings] pool can mean either:

+

-strings pool

+

or

+

-str pool

+

Where an option has several possible permutations, the possibilities are separated by the pipe (|) character. For example:

+

-sym on|off|full|fullpath

+

means the -sym command can be followed by one or more of the following options: on, off, full, or fullpath. If you have more than one option, separate each option with a comma. So you might have -sym on, -sym off, -sym full, or -sym on, fullpath.

+

The plus sign (+) means that the parameter to an option must not be separated from the option name by a space. For example,

+

-D+name[=value]

+

means that you can have -DVAR or -DVAR=3, but not -D VAR.

+

In cases where you provide a variable parameter such as a file name, that item is in italic text. For example, -precompile filename means you must provide a file name. The help text that corresponds to the compiler option explains what you must provide.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_env_vars.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_env_vars.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_env_vars.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,38 +1,38 @@ - - - - - -Working with Environment Variables - - - -

Working with Environment Variables

-

To use the command-line tools, you must change several environment variables. If you are using Carbide command-line tools with Microsoft® Windows®, you can assign environment variables through the Environment tab under the System control panel in Windows XP/2000/NT.

-

CWFolder Environment Variable

-

Use the following syntax when defining variables in batch files or on the command line:

-

set CWFolder=C:\Program Files\Carbide

-

In this example, CWFolder refers to the path where you installed Carbide. It is not necessary to include quotation marks when defining environment variables that include spaces. Because Windows does not strip out the quotes, this leads to unknown directory warnings.

-

Setting the PATH Environment Variable

-

The PATH variable should include the paths for the tools, as shown below. For other tools, the paths can vary. An example of setting PATH:

-

%CWFolder%\Carbide
- %CWFolder%\Carbide\Carbide.c++

-

The first path contains the FlexLM license manager DLL, and the second path contains the tools. To run FlexLM, copy the following file into the directory containing the command-line tools:

-

..\Carbide\license.dat

-

Or, you can define the variable LM_LICENSE_FILE as:

-

%CWFolder%\license.dat

-

which points to the license information. It might point to alternate versions of this file, as needed.

-

Getting Environmental Variables

-

Use the predefined macro __env_var() to return host-specific environmental variables. An example of getting an environmental variable:

-

// returns "username" environmental variable
- // (host-specific)
- char* username = __env_var(username);

-

Search Path Environment Variables

-

Several environment variables are used at runtime to search for system include paths and libraries that can shorten command lines for many tasks. All of the variables mentioned here are lists that are separated by semicolons (;) in Windows and colons (:) in Solaris.

-

For the linker, unless you specify -nodefaults or -disassemble, the linker searches the environment for a list of system access paths and library files to be added to the end of the search and link orders. For example, with Embedded PowerPC, the linkers searches for files, libraries, and command files, using the system library paths found within the variables MWEABIPPCLibraries and MWLibraries. Associated with these lists are MWEABIPPCLibraryFiles and MWLibraryFiles, which contain lists of libraries (or object files or command files) to add to the end of the link order. These files can be located in any of the cumulative access paths at runtime.

-

If you are only building for one target, you can use MWCIncludes, MWAsmIncludes, MWLibraries, and MWLibraryFiles. Because the target-specific versions of these variables override the generic variables, they are useful when working with multiple targets. If the target-specific variable exists, then the generic variable is not used because you cannot combine the contents of the two variables.

- - - - - + + + + + +Working with Environment Variables + + + +

Working with Environment Variables

+

To use the command-line tools, you must change several environment variables. If you are using Carbide command-line tools with Microsoft® Windows®, you can assign environment variables through the Environment tab under the System control panel in Windows XP/2000/NT.

+

CWFolder Environment Variable

+

Use the following syntax when defining variables in batch files or on the command line:

+

set CWFolder=C:\Program Files\Carbide

+

In this example, CWFolder refers to the path where you installed Carbide. It is not necessary to include quotation marks when defining environment variables that include spaces. Because Windows does not strip out the quotes, this leads to unknown directory warnings.

+

Setting the PATH Environment Variable

+

The PATH variable should include the paths for the tools, as shown below. For other tools, the paths can vary. An example of setting PATH:

+

%CWFolder%\Carbide
+ %CWFolder%\Carbide\Carbide.c++

+

The first path contains the FlexLM license manager DLL, and the second path contains the tools. To run FlexLM, copy the following file into the directory containing the command-line tools:

+

..\Carbide\license.dat

+

Or, you can define the variable LM_LICENSE_FILE as:

+

%CWFolder%\license.dat

+

which points to the license information. It might point to alternate versions of this file, as needed.

+

Getting Environmental Variables

+

Use the predefined macro __env_var() to return host-specific environmental variables. An example of getting an environmental variable:

+

// returns "username" environmental variable
+ // (host-specific)
+ char* username = __env_var(username);

+

Search Path Environment Variables

+

Several environment variables are used at runtime to search for system include paths and libraries that can shorten command lines for many tasks. All of the variables mentioned here are lists that are separated by semicolons (;) in Windows and colons (:) in Solaris.

+

For the linker, unless you specify -nodefaults or -disassemble, the linker searches the environment for a list of system access paths and library files to be added to the end of the search and link orders. For example, with Embedded PowerPC, the linkers searches for files, libraries, and command files, using the system library paths found within the variables MWEABIPPCLibraries and MWLibraries. Associated with these lists are MWEABIPPCLibraryFiles and MWLibraryFiles, which contain lists of libraries (or object files or command files) to add to the end of the link order. These files can be located in any of the cumulative access paths at runtime.

+

If you are only building for one target, you can use MWCIncludes, MWAsmIncludes, MWLibraries, and MWLibraryFiles. Because the target-specific versions of these variables override the generic variables, they are useful when working with multiple targets. If the target-specific variable exists, then the generic variable is not used because you cannot combine the contents of the two variables.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_extensions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_extensions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_extensions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,17 +1,17 @@ - - - - - -Invoking Command-Line Tools - - - -

File Extensions

-

Files specified on the command line are identified by contents and file extension, as in the Carbide IDE.

-

Although the command-line version of the Carbide C/C++ compiler accepts non-standard file extensions as source, it also emit a warning when this happens. By default, the compiler assumes that a file with any extensions other than .c, .h, or .pch is a C++ source file. The linker must be able to identify all files as object code, libraries, or command files. It ignores all other files.

- - - - - + + + + + +Invoking Command-Line Tools + + + +

File Extensions

+

Files specified on the command line are identified by contents and file extension, as in the Carbide IDE.

+

Although the command-line version of the Carbide C/C++ compiler accepts non-standard file extensions as source, it also emit a warning when this happens. By default, the compiler assumes that a file with any extensions other than .c, .h, or .pch is a C++ source file. The linker must be able to identify all files as object code, libraries, or command files. It ignores all other files.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_invoking.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_invoking.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_invoking.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - -Tool Naming Conventions - - - -

Invoking Command-Line Tools

-

To compile, assemble, link, or perform some other programming task with the Carbide command-line tools, type a command at the command-line prompt. This command specifies what tool to run, what options to use while the tool runs, and on what files the tool should operate.

-

The tool performs the operation on the files you specify. If the tool successfully finishes its operation, a new prompt appears on the command line. Otherwise, it reports any problems as text messages on the command line before a new prompt appears. The tools include:

-
    -
  • mwccsym2 — x86 C/C++ compiler
  • -
  • mwldsym2 — x86 linker
  • -
  • mwc++filt — x86 filter
  • -
-

All of them can be found in \Nokia\Carbide.c++ <version>\x86Build\Symbian_Tools\Command_Line_Tools.

-

You can also write scripts that automate the process to build your software. Scripts contain a list of command-line tools to invoke, one after another. For example, the make tool, a common software development tool, uses scripts to manage dependencies among source code files and invoke command-line compilers, assemblers, and linkers as needed, much like the Carbider IDE’s project manager.

-

Commands follow this convention:

-
-

tool [options] [files]

-
-

where tool is the name of the Carbide command-line tool to invoke, options is a list of zero or more options that tell the tool what operation it should perform and how to perform it, and files is a list of zero or more files on which the tool should operate. Which options and files you use depends on what operation you want the tool to perform.
-

- - - - - + + + + + +Tool Naming Conventions + + + +

Invoking Command-Line Tools

+

To compile, assemble, link, or perform some other programming task with the Carbide command-line tools, type a command at the command-line prompt. This command specifies what tool to run, what options to use while the tool runs, and on what files the tool should operate.

+

The tool performs the operation on the files you specify. If the tool successfully finishes its operation, a new prompt appears on the command line. Otherwise, it reports any problems as text messages on the command line before a new prompt appears. The tools include:

+
    +
  • mwccsym2 — x86 C/C++ compiler
  • +
  • mwldsym2 — x86 linker
  • +
  • mwc++filt — x86 filter
  • +
+

All of them can be found in \Nokia\Carbide.c++ <version>\x86Build\Symbian_Tools\Command_Line_Tools.

+

You can also write scripts that automate the process to build your software. Scripts contain a list of command-line tools to invoke, one after another. For example, the make tool, a common software development tool, uses scripts to manage dependencies among source code files and invoke command-line compilers, assemblers, and linkers as needed, much like the Carbider IDE’s project manager.

+

Commands follow this convention:

+
+

tool [options] [files]

+
+

where tool is the name of the Carbide command-line tool to invoke, options is a list of zero or more options that tell the tool what operation it should perform and how to perform it, and files is a list of zero or more files on which the tool should operate. Which options and files you use depends on what operation you want the tool to perform.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_line.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_line.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_line.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - -Command-Line Tools - - - -

Command-Line Tools

-

The Carbide IDE uses compilers and linkers to generate object code for x86 platforms. The IDE also provides command-line versions of these tools that also generate and combine object code files to produce executable files such as applications, dynamic link libraries (DLLs), code resources, or static libraries.

-

NOTE The Carbide.c++ compiler is stored in \Nokia\Carbide.c++ <version>\x86Build\Symbian_Tools\Command_Line_Tools.

-

You configure each command-line tool by specifying various options when you invoke the tool.

-

This topic contains the following sections:

- -

TIP A command-line user interface interacts with you through a text-based console instead of GUI items such as windows, menus, and buttons.
-

- - - - - + + + + + +Command-Line Tools + + + +

Command-Line Tools

+

The Carbide IDE uses compilers and linkers to generate object code for x86 platforms. The IDE also provides command-line versions of these tools that also generate and combine object code files to produce executable files such as applications, dynamic link libraries (DLLs), code resources, or static libraries.

+

NOTE The Carbide.c++ compiler is stored in \Nokia\Carbide.c++ <version>\x86Build\Symbian_Tools\Command_Line_Tools.

+

You configure each command-line tool by specifying various options when you invoke the tool.

+

This topic contains the following sections:

+ +

TIP A command-line user interface interacts with you through a text-based console instead of GUI items such as windows, menus, and buttons.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_naming.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_naming.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cmd_line/cmd_naming.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - -Tool Naming Conventions - - - -

Tool Naming Conventions

-

The names of the Carbide command-line tools follow this convention:

-

mw<tool><type>

-

where:

-
    -
  • <tool> is cc/c++ for the C/C++ compiler, and ld for the linker
  • -
  • <type> is sym2 for the Symbian EKA2 compiler/linker, and filt for the filter
  • -
-

Tools include:

-
    -
  • mwccsym2 — x86 C/C++ compiler
  • -
  • mwldsym2 — x86 linker
  • -
  • mwc++filt — x86 filter
  • -
-

NOTE The prefix "mw" is an artifact of the pre-Carbide days when Metrowerks owned the x86 compiler technology used by Carbide.c++.

- - - - - + + + + + +Tool Naming Conventions + + + +

Tool Naming Conventions

+

The names of the Carbide command-line tools follow this convention:

+

mw<tool><type>

+

where:

+
    +
  • <tool> is cc/c++ for the C/C++ compiler, and ld for the linker
  • +
  • <type> is sym2 for the Symbian EKA2 compiler/linker, and filt for the filter
  • +
+

Tools include:

+
    +
  • mwccsym2 — x86 C/C++ compiler
  • +
  • mwldsym2 — x86 linker
  • +
  • mwc++filt — x86 filter
  • +
+

NOTE The prefix "mw" is an artifact of the pre-Carbide days when Metrowerks owned the x86 compiler technology used by Carbide.c++.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/compiler.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/compiler.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/compiler.htm Wed Jul 21 12:11:48 2010 -0500 @@ -7,6 +7,9 @@ @@ -18,14 +21,13 @@

 

 

-

 

-

Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+

Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
License: http://www.eclipse.org/legal/epl-v10.html

-

x86 C/C++ Compiler Reference

-

x86 Compiler 3.2.5 (Build 480); July, 2009

+
x86 C/C++ Compiler Reference
+

x86 Compiler 3.2.5 (Build 489); Feb, 2010

 

diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_chars.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_chars.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_chars.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - -Character Literals - - - -

Character Literals

-

(ISO C++, §2.13.2) The standard specifies that a multicharacter literal, two or more characters surrounded by single quotes, has an implementation-defined value. See Character Constants as Integer Values for information on how Carbide.c++ translates such values.

-

A character literal that begins with the letter “L” (without the quotes) is a wide-character literal. Each target translates wide-character literals in its own way; most targets use either two or four-byte wide characters. An escape sequence that uses an octal or hexadecimal value outside the range of char or wchar_t results in an error.

-

See your target documentation for more information on how your target handles wide-character literals.

- - - - - + + + + + +Character Literals + + + +

Character Literals

+

(ISO C++, §2.13.2) The standard specifies that a multicharacter literal, two or more characters surrounded by single quotes, has an implementation-defined value. See Character Constants as Integer Values for information on how Carbide.c++ translates such values.

+

A character literal that begins with the letter “L” (without the quotes) is a wide-character literal. Each target translates wide-character literals in its own way; most targets use either two or four-byte wide characters. An escape sequence that uses an octal or hexadecimal value outside the range of char or wchar_t results in an error.

+

See your target documentation for more information on how your target handles wide-character literals.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_devices.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_devices.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_devices.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,17 +1,17 @@ - - - - - -Interactive Devices - - - -

Interactive Devices

-

(ISO C++, §1.9) The standard specifies that an interactive device, the part of a computer that accepts input from and provides output to a human operator, is implementation-defined. The most common instance of an interactive device is a console; a keyboard and character display terminal.

-

Some versions of Carbide.c++, typically for desktop platforms, provide libraries to emulate a character display device in a graphical window. For example, on Microsoft Windows Carbide.c++ uses the Command Prompt window. For embedded systems that do not have a keyboard or display, Carbide provides console interaction through a serial or Ethernet connection between the target and host computers.

- - - - - + + + + + +Interactive Devices + + + +

Interactive Devices

+

(ISO C++, §1.9) The standard specifies that an interactive device, the part of a computer that accepts input from and provides output to a human operator, is implementation-defined. The most common instance of an interactive device is a console; a keyboard and character display terminal.

+

Some versions of Carbide.c++, typically for desktop platforms, provide libraries to emulate a character display device in a graphical window. For example, on Microsoft Windows Carbide.c++ uses the Command Prompt window. For embedded systems that do not have a keyboard or display, Carbide provides console interaction through a serial or Ethernet connection between the target and host computers.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_hdr_access.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_hdr_access.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_hdr_access.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - -Header File Access - - - -

Header File Access

-

(ISO C++, §2.8) The standard requires implementations to specify how header names are mapped to actual files.

-

The Carbide IDE manages the correspondence of header names to header files.

-

If you use Carbide.c++ on the command line, see Command-Line Tools for information on specifying how Carbide.c++ should search for header files.

- - - - - + + + + + +Header File Access + + + +

Header File Access

+

(ISO C++, §2.8) The standard requires implementations to specify how header names are mapped to actual files.

+

The Carbide IDE manages the correspondence of header names to header files.

+

If you use Carbide.c++ on the command line, see Command-Line Tools for information on specifying how Carbide.c++ should search for header files.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_size_of_bytes.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_size_of_bytes.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_size_of_bytes.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,16 +1,16 @@ - - - - - -Size of BytesBehavior - - - -

Size of Bytes

-

(ISO C++, §1.7) The standard specifies that the size of a byte is implementation-defined.

- - - - - + + + + + +Size of BytesBehavior + + + +

Size of Bytes

+

(ISO C++, §1.7) The standard specifies that the size of a byte is implementation-defined.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_src_handling.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_src_handling.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_be_src_handling.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,19 +1,19 @@ - - - - - -Source File Handling - - - -

Source File Handling

-

(ISO C++, §2.1) The standard specifies how source files are prepared for translation.

-

If trigraph expansion is turned on, Carbide.c++ converts trigraph sequences with their single-character representations. Trigraph expansion is controlled by the #pragma trigraphs.

-

At preprocessing-time, a sequence of two or more white-space characters, except new-line characters, is converted to a single space.
- New-line characters are left untouched, unless preceded by a backslash (“\”), in which case the proceeding line is appended.

- - - - - + + + + + +Source File Handling + + + +

Source File Handling

+

(ISO C++, §2.1) The standard specifies how source files are prepared for translation.

+

If trigraph expansion is turned on, Carbide.c++ converts trigraph sequences with their single-character representations. Trigraph expansion is controlled by the #pragma trigraphs.

+

At preprocessing-time, a sequence of two or more white-space characters, except new-line characters, is converted to a single space.
+ New-line characters are left untouched, unless preceded by a backslash (“\”), in which case the proceeding line is appended.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_behavior.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_behavior.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_behavior/cpp_behavior.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -C++ Implementation-Defined Behavior - - - -

C++ Implementation-Defined Behavior

-

The ISO standard for C++ leaves many details about the form and translation of C++ programs up to the implementation of the C++ compiler. This section lists the parts of the of the C++ standard that are left to the implementation to define and how Carbide.c++ behaves in these situations. Numbers in parentheses that begin with “§” denote the section of the ISO C++ standard that an implementation-defined behavior refers to.

-

This section refers to implementation-defined behaviors of the compiler itself. Topics include:

- -

For information of implementation-defined behaviors of the Standard C++ Library, consult the MSL C++ Library Reference.

- - - - - + + + + + +C++ Implementation-Defined Behavior + + + +

C++ Implementation-Defined Behavior

+

The ISO standard for C++ leaves many details about the form and translation of C++ programs up to the implementation of the C++ compiler. This section lists the parts of the of the C++ standard that are left to the implementation to define and how Carbide.c++ behaves in these situations. Numbers in parentheses that begin with “§” denote the section of the ISO C++ standard that an implementation-defined behavior refers to.

+

This section refers to implementation-defined behaviors of the compiler itself. Topics include:

+ +

For information of implementation-defined behaviors of the Standard C++ Library, consult the MSL C++ Library Reference.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_compiler.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_compiler.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_compiler.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - -C++ Compiler - - - -

C++ Compiler

-

This section discusses the Carbide.c++ compiler as it applies to all Carbide targets. Most information in this chapter applies to any operating system or processor.

-

Other sections in this manual discuss other compiler features that apply to specific operating systems and processors. For a complete picture, you need to consider all the information relating to your particular target.

-

The C compiler is also an integral part of the Carbide.c++ compiler. As a result, everything about the C compiler applies equally to C++. This discussion of the C++ compiler does not repeat information on the C compiler. See C Compiler for information on the C compiler.

-

This section contains the following topics:

- -

For information on using Embedded C++ (EC++) and for strategies on developing smaller C++ programs, see Overview. -

- - - - - + + + + + +C++ Compiler + + + +

C++ Compiler

+

This section discusses the Carbide.c++ compiler as it applies to all Carbide targets. Most information in this chapter applies to any operating system or processor.

+

Other sections in this manual discuss other compiler features that apply to specific operating systems and processors. For a complete picture, you need to consider all the information relating to your particular target.

+

The C compiler is also an integral part of the Carbide.c++ compiler. As a result, everything about the C compiler applies equally to C++. This discussion of the C++ compiler does not repeat information on the C compiler. See C Compiler for information on the C compiler.

+

This section contains the following topics:

+ +

For information on using Embedded C++ (EC++) and for strategies on developing smaller C++ programs, see Overview. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_controlling.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_controlling.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_controlling.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Controlling the C++ Compiler - - - -

Controlling the C++ Compiler

-

This section describes how to control compiler behavior by selecting settings .

-

This section contains the following topics:

- - - - - - + + + + + +Controlling the C++ Compiler + + + +

Controlling the C++ Compiler

+

This section describes how to control compiler behavior by selecting settings .

+

This section contains the following topics:

+ + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_always.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_always.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_always.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - -Using the C++ Compiler Always - - - -

Using the C++ Compiler Always

-

If you enable the Force C++ Compilation setting, the compiler translates all C source files in your project as C++ code. Otherwise, the Carbide IDE uses the suffix of the file name to determine whether to use the C or C++ compiler. The entries in the Carbide IDE’s File Mappings panel describes the suffixes that the compiler seeks.

-

This setting corresponds to the pragma cplusplus. To check this setting, use __option (cplusplus). By default, this setting is disabled.

-

See Checking Option Settings for information on how to use this directive.

- - - - - + + + + + +Using the C++ Compiler Always + + + +

Using the C++ Compiler Always

+

If you enable the Force C++ Compilation setting, the compiler translates all C source files in your project as C++ code. Otherwise, the Carbide IDE uses the suffix of the file name to determine whether to use the C or C++ compiler. The entries in the Carbide IDE’s File Mappings panel describes the suffixes that the compiler seeks.

+

This setting corresponds to the pragma cplusplus. To check this setting, use __option (cplusplus). By default, this setting is disabled.

+

See Checking Option Settings for information on how to use this directive.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_bool_type.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_bool_type.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_bool_type.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,21 +1,21 @@ - - - - - -Using the bool Type - - - -

Using the bool Type

-

Enable the Enable bool Support setting to use the standard C++ bool type to represent true and false. Disable this setting if recognizing bool, true, or false as keywords causes problems in your program.

-

Enabling the bool data type and its true and false values is not equivalent to defining them using typedef and #define. The C++ bool type is a distinct type defined by the ISO C++ Standard. Source code that does not treat it as a distinct type might not compile properly.

-

For example, some compilers equate the bool type with the unsigned char data type. If you disable the Enable bool Support setting, the Carbide.c++ compiler equates the bool type with the unsigned char data type. Otherwise, using the Carbide C/C++ compiler on source code that involves this behavior might result in errors.

-

This setting corresponds to the pragma bool. To check this setting, use __option (bool). By default, this setting is disabled.

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Using the bool Type + + + +

Using the bool Type

+

Enable the Enable bool Support setting to use the standard C++ bool type to represent true and false. Disable this setting if recognizing bool, true, or false as keywords causes problems in your program.

+

Enabling the bool data type and its true and false values is not equivalent to defining them using typedef and #define. The C++ bool type is a distinct type defined by the ISO C++ Standard. Source code that does not treat it as a distinct type might not compile properly.

+

For example, some compilers equate the bool type with the unsigned char data type. If you disable the Enable bool Support setting, the Carbide.c++ compiler equates the bool type with the unsigned char data type. Otherwise, using the Carbide C/C++ compiler on source code that involves this behavior might result in errors.

+

This setting corresponds to the pragma bool. To check this setting, use __option (bool). By default, this setting is disabled.

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_exceptions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_exceptions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_exceptions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,20 +1,20 @@ - - - - - -Controlling Exception Handling - - - -

Controlling Exception Handling

-

Enable the Enable C++ Exceptions setting if you use the ISO-standard try and catch statements. Otherwise, disable this setting to generate smaller and faster code.

-

For more information on how Carbide implements the ISO C++ exception handling mechanism, see Working with C++ Exceptions.

-

This setting corresponds to the pragma exceptions. To check this setting, use __option (exceptions). By default, this setting is disabled.

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Controlling Exception Handling + + + +

Controlling Exception Handling

+

Enable the Enable C++ Exceptions setting if you use the ISO-standard try and catch statements. Otherwise, disable this setting to generate smaller and faster code.

+

For more information on how Carbide implements the ISO C++ exception handling mechanism, see Working with C++ Exceptions.

+

This setting corresponds to the pragma exceptions. To check this setting, use __option (exceptions). By default, this setting is disabled.

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_extensions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_extensions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_extensions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,57 +1,57 @@ - - - - - -Controlling C++ Extensions - - - -

Controlling C++ Extensions

-

The C++ compiler has additional extensions that you can activate using the pragma cpp_extensions.

-

If you enable this pragma, the compiler lets you use the following extensions to the ISO C++ standard:

-
    -
  • Anonymous struct objects (ISO C++, §9)
  • -
-
-

#pragma cpp_extensions on
- void foo()
- {
- union {
- long hilo;
- struct { short hi, lo; };
- // anonymous struct
- };
- hi=0x1234;
- lo=0x5678;
- // hilo==0x12345678
- }

-
-
    -
  • Unqualified pointer to a member function (ISO C++, §8.1)
  • -
-
-

#pragma cpp_extensions on
- struct Foo { void f(); }
- void Foo::f()
- {
- void (Foo::*ptmf1)() = &Foo::f;
- // ALWAYS OK
-
- void (Foo::*ptmf2)() = f;
- // OK if you enabled cpp_extensions.
- }

-
-

To check this setting, use the __option (cpp_extensions). By default, this setting is off.

-

See Checking Option Settings for information on how to use this directive.
-

- - - -


-

- - - - - + + + + + +Controlling C++ Extensions + + + +

Controlling C++ Extensions

+

The C++ compiler has additional extensions that you can activate using the pragma cpp_extensions.

+

If you enable this pragma, the compiler lets you use the following extensions to the ISO C++ standard:

+
    +
  • Anonymous struct objects (ISO C++, §9)
  • +
+
+

#pragma cpp_extensions on
+ void foo()
+ {
+ union {
+ long hilo;
+ struct { short hi, lo; };
+ // anonymous struct
+ };
+ hi=0x1234;
+ lo=0x5678;
+ // hilo==0x12345678
+ }

+
+
    +
  • Unqualified pointer to a member function (ISO C++, §8.1)
  • +
+
+

#pragma cpp_extensions on
+ struct Foo { void f(); }
+ void Foo::f()
+ {
+ void (Foo::*ptmf1)() = &Foo::f;
+ // ALWAYS OK
+
+ void (Foo::*ptmf2)() = f;
+ // OK if you enabled cpp_extensions.
+ }

+
+

To check this setting, use the __option (cpp_extensions). By default, this setting is off.

+

See Checking Option Settings for information on how to use this directive.
+

+ + + +


+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_rtti.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_rtti.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_rtti.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,17 +1,17 @@ - - - - - -Controlling RTTI - - - -

Controlling RTTI

-

The Carbide.c++ language supports runtime type information (RTTI), including the dynamic_cast and typeid operators. To use these operators, enable the Enable RTTI setting .

-

For more information on how to use these two operators, see Working with RTTI.

- - - - - + + + + + +Controlling RTTI + + + +

Controlling RTTI

+

The Carbide.c++ language supports runtime type information (RTTI), including the dynamic_cast and typeid operators. To use these operators, enable the Enable RTTI setting .

+

For more information on how to use these two operators, see Working with RTTI.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_var_scope.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_var_scope.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_ctrl_var_scope.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -Controlling Variable Scope in for Statements - - - -

Controlling Variable Scope in for Statements

-

If you enable the Legacy for-scoping setting , the compiler generates an error when it encounters a variable scope issue that the ISO C++ standard disallows, but is allowed in the C++ language specified in The Annotated C++ Reference Manual.

-

With this option off, the compiler allows variables defined in a for statement to have scope outside the for statement.

-
-

Listing 1. Example of a Local Variable Outside a for Statement

-

for(int i=1; i<1000; i++) { /* ... */ }
- return i; // OK in ARM, Error in Carbide.c++

-
-

This setting corresponds to the pragma ARM_conform. To check this setting, use __option (ARM_conform). By default, this setting is off.

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Controlling Variable Scope in for Statements + + + +

Controlling Variable Scope in for Statements

+

If you enable the Legacy for-scoping setting , the compiler generates an error when it encounters a variable scope issue that the ISO C++ standard disallows, but is allowed in the C++ language specified in The Annotated C++ Reference Manual.

+

With this option off, the compiler allows variables defined in a for statement to have scope outside the for statement.

+
+

Listing 1. Example of a Local Variable Outside a for Statement

+

for(int i=1; i<1000; i++) { /* ... */ }
+ return i; // OK in ARM, Error in Carbide.c++

+
+

This setting corresponds to the pragma ARM_conform. To check this setting, use __option (ARM_conform). By default, this setting is off.

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_exceptions_working.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_exceptions_working.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_exceptions_working.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - - - - -Working with C++ Exceptions - - - -

Working with C++ Exceptions

-

If you enable the Enable C++ Exceptions setting , you can use the try and catch statements to perform exception handling. For more information on activating support for C++ exception handling, see “Controlling Exception Handling”.

-

Enabling exceptions lets you throw them across any code compiled by the Carbide C/C++ compiler. However, you cannot throw exceptions across the following:

-
    -
  • Libraries compiled with exception support disabled
  • -
  • Libraries compiled with versions of the Carbide C/C++ compiler earlier than v3.4
  • -
-

If you throw an exception across one of these, the code calls terminate() and exits.

-

If you throw an exception while allocating a class object or an array of class objects, the code automatically destructs the partially constructed objects and de-allocates the memory for them.

- - - - - + + + + + +Working with C++ Exceptions + + + +

Working with C++ Exceptions

+

If you enable the Enable C++ Exceptions setting , you can use the try and catch statements to perform exception handling. For more information on activating support for C++ exception handling, see “Controlling Exception Handling”.

+

Enabling exceptions lets you throw them across any code compiled by the Carbide C/C++ compiler. However, you cannot throw exceptions across the following:

+
    +
  • Libraries compiled with exception support disabled
  • +
  • Libraries compiled with versions of the Carbide C/C++ compiler earlier than v3.4
  • +
+

If you throw an exception across one of these, the code calls terminate() and exits.

+

If you throw an exception while allocating a class object or an array of class objects, the code automatically destructs the partially constructed objects and de-allocates the memory for them.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_extensions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_extensions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_extensions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,20 +1,20 @@ - - - - - -Carbide Implementation of C++ - - - -

Extensions to ISO Standard C++

-

This section describes Carbide extensions to the C standard that apply to all targets. In most cases, you turn the extension on or off with a setting . See C/C++ Language Panel for information about this panel.

-

The __PRETTY_FUNCTION__ Predefined Identifier

-

The __PRETTY_FUNCTION__ predefined identifier represents the qualified (unmangled) C++ name of the function being compiled.

-

For related information, see Predefined Symbols. -

- - - - - + + + + + +Carbide Implementation of C++ + + + +

Extensions to ISO Standard C++

+

This section describes Carbide extensions to the C standard that apply to all targets. In most cases, you turn the extension on or off with a setting . See C/C++ Language Panel for information about this panel.

+

The __PRETTY_FUNCTION__ Predefined Identifier

+

The __PRETTY_FUNCTION__ predefined identifier represents the qualified (unmangled) C++ name of the function being compiled.

+

For related information, see Predefined Symbols. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_additional_keywords.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_additional_keywords.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_additional_keywords.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,16 +1,16 @@ - - - - - -Additional Keywords - - - -

Additional Keywords

-

(ISO C++, §2.8, §2.11) The Carbide.c++ language reserves symbols from these two sections as keywords.

- - - - - + + + + + +Additional Keywords + + + +

Additional Keywords

+

(ISO C++, §2.8, §2.11) The Carbide.c++ language reserves symbols from these two sections as keywords.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_default_args.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_default_args.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_default_args.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Default Arguments in Member Functions - - - -

Default Arguments in Member Functions

-

(ISO C++, §8.3.6) The compiler does not bind default arguments in a member function at the end of the class declaration. Before the default argument appears, you must declare any value that you use in the default argument expression. An example using default arguments in member functions:

-

class foo {
- enum A { AA };
- int f(A a = AA); // OK
- int f(B b = BB); // ERROR: BB is not declared yet
- enum B { BB };
- };

- - - - - + + + + + +Default Arguments in Member Functions + + + +

Default Arguments in Member Functions

+

(ISO C++, §8.3.6) The compiler does not bind default arguments in a member function at the end of the class declaration. Before the default argument appears, you must declare any value that you use in the default argument expression. An example using default arguments in member functions:

+

class foo {
+ enum A { AA };
+ int f(A a = AA); // OK
+ int f(B b = BB); // ERROR: BB is not declared yet
+ enum B { BB };
+ };

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_forward_decl.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_forward_decl.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_forward_decl.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -Forward Declarations of Arrays of Incomplete Type - - - -

Forward Declarations of Arrays of Incomplete Type

-

The Carbide.c++ compiler allows the forward declaration of arrays of incomplete type. An example of forward declaration of array of incomplete type:

-
-

extern struct incomplete arr[10];

-

struct incomplete {
- int a, b, c;
- };

-

struct incomplete arr[10]; -

-
- - - - - + + + + + +Forward Declarations of Arrays of Incomplete Type + + + +

Forward Declarations of Arrays of Incomplete Type

+

The Carbide.c++ compiler allows the forward declaration of arrays of incomplete type. An example of forward declaration of array of incomplete type:

+
+

extern struct incomplete arr[10];

+

struct incomplete {
+ int a, b, c;
+ };

+

struct incomplete arr[10]; +

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_implicit_return.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_implicit_return.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_implicit_return.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -Implicit Return Statement for main() - - - -

Implicit Return Statement for main()

-

In C++, the compiler adds a

-

return 0;

-

statement to the main() function of a program if the function returns an int result and does not end with a user return statement.

-

Examples:

-

int main() { } // equivalent to:
- // int main() { return 0; }
-
- main() { } // equivalent to:
- // int main() { return 0; }

-

If you enable the ANSI Strict setting , the compiler enforces an external int main() function.

- - - - - + + + + + +Implicit Return Statement for main() + + + +

Implicit Return Statement for main()

+

In C++, the compiler adds a

+

return 0;

+

statement to the main() function of a program if the function returns an int result and does not end with a user return statement.

+

Examples:

+

int main() { } // equivalent to:
+ // int main() { return 0; }
+
+ main() { } // equivalent to:
+ // int main() { return 0; }

+

If you enable the ANSI Strict setting , the compiler enforces an external int main() function.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_inherited_members.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_inherited_members.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_inherited_members.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,47 +1,47 @@ - - - - - -Calling an Inherited Member Function - - - -

Calling an Inherited Member Function

-

(ISO C++, §10.3) You can call an inherited virtual member function rather than its local override in two ways. The first method is recommended for referring to member functions defined in a base class or any other parent class. The second method, while more convenient, is not recommended if you are using your source code with other compilers.

-

The standard method of calling inherited member functions

-

This method adheres to the ISO C++ Standard and simply qualifies the member function with its base class.

-

Assume you have two classes, MyBaseClass and MySubClass, each implementing a function named MyFunc().

-

From within a function of MySubClass, you can call the base class version of MyFunc() this way:

-

MyBaseClass::MyFunc();

-

However, if you change the class hierarchy, this call might break. Assume you introduce an intermediate class, and your hierarchy is now MyBaseClass, MyMiddleClass, and MySubClass. Each has a version of MyFunc(). The code above still calls the original version of MyFunc() in the MyBaseClass, bypassing the additional behavior you implemented in MyMiddleClass. This kind of subtlety in the code can lead to unexpected results or bugs that are difficult to locate.

-

Using inheritance to call inherited member functions

-

The def_inherited pragma defines an implicit inherited member for a base class. Use this directive before using the inherited symbol:

-

#pragma def_inherited on

-

WARNING! The ISO C++ standard does not support the use of inherited.

-

You can call the inherited version of MyFunc() this way:

-

inherited::MyFunc();

-

With the inherited symbol, the compiler identifies the base class at compile time. This line of code calls the immediate base class in both cases: where the base class is MyBaseClass, and where the immediate base class is MyMiddleClass.

-

If your class hierarchy changes at a later date and your subclass inherits from a different base class, the immediate base class is still called, despite the change in hierarchy.

-

The syntax is as follows:

-

inherited::func-name(param-list);

-

The statement calls the func-name in the class’s immediate base class. If the class has more than one immediate base class (because of multiple inheritance) and the compiler cannot decide which func-name to call, the compiler generates an error.

-

This example creates a Q class that draws its objects by adding behavior to the O class.

-
-
Listing 1. Using inherited to Call an Inherited Member Function
-

#pragma def_inherited on
- struct O { virtual void draw(int,int); };
- struct Q : O { void draw(int,int); };

-

void Q::draw (int x,int y)
- {
- inherited::draw(x,y); // Perform behavior of base class
- ... // Perform added behavior
- }

-
-

For related information on this pragma see “def_inherited”. -

- - - - - + + + + + +Calling an Inherited Member Function + + + +

Calling an Inherited Member Function

+

(ISO C++, §10.3) You can call an inherited virtual member function rather than its local override in two ways. The first method is recommended for referring to member functions defined in a base class or any other parent class. The second method, while more convenient, is not recommended if you are using your source code with other compilers.

+

The standard method of calling inherited member functions

+

This method adheres to the ISO C++ Standard and simply qualifies the member function with its base class.

+

Assume you have two classes, MyBaseClass and MySubClass, each implementing a function named MyFunc().

+

From within a function of MySubClass, you can call the base class version of MyFunc() this way:

+

MyBaseClass::MyFunc();

+

However, if you change the class hierarchy, this call might break. Assume you introduce an intermediate class, and your hierarchy is now MyBaseClass, MyMiddleClass, and MySubClass. Each has a version of MyFunc(). The code above still calls the original version of MyFunc() in the MyBaseClass, bypassing the additional behavior you implemented in MyMiddleClass. This kind of subtlety in the code can lead to unexpected results or bugs that are difficult to locate.

+

Using inheritance to call inherited member functions

+

The def_inherited pragma defines an implicit inherited member for a base class. Use this directive before using the inherited symbol:

+

#pragma def_inherited on

+

WARNING! The ISO C++ standard does not support the use of inherited.

+

You can call the inherited version of MyFunc() this way:

+

inherited::MyFunc();

+

With the inherited symbol, the compiler identifies the base class at compile time. This line of code calls the immediate base class in both cases: where the base class is MyBaseClass, and where the immediate base class is MyMiddleClass.

+

If your class hierarchy changes at a later date and your subclass inherits from a different base class, the immediate base class is still called, despite the change in hierarchy.

+

The syntax is as follows:

+

inherited::func-name(param-list);

+

The statement calls the func-name in the class’s immediate base class. If the class has more than one immediate base class (because of multiple inheritance) and the compiler cannot decide which func-name to call, the compiler generates an error.

+

This example creates a Q class that draws its objects by adding behavior to the O class.

+
+
Listing 1. Using inherited to Call an Inherited Member Function
+

#pragma def_inherited on
+ struct O { virtual void draw(int,int); };
+ struct Q : O { void draw(int,int); };

+

void Q::draw (int x,int y)
+ {
+ inherited::draw(x,y); // Perform behavior of base class
+ ... // Perform added behavior
+ }

+
+

For related information on this pragma see “def_inherited”. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_keyword_ordering.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_keyword_ordering.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_keyword_ordering.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Keyword Ordering - - - -

Keyword Ordering

-

(ISO C++, §7.1.2, §11.4) If you use the friend keyword in a declaration, it must be the first word in the declaration. The virtual keyword does not have to be the first word in a declaration. An example using the virtual or friend Keywords:

-

class foo {
- virtual int f0(); // OK
- int virtual f1(); // OK
- friend int f2(); // OK
- int friend f3(); // ERROR
- };

- - - - - + + + + + +Keyword Ordering + + + +

Keyword Ordering

+

(ISO C++, §7.1.2, §11.4) If you use the friend keyword in a declaration, it must be the first word in the declaration. The virtual keyword does not have to be the first word in a declaration. An example using the virtual or friend Keywords:

+

class foo {
+ virtual int f0(); // OK
+ int virtual f1(); // OK
+ friend int f2(); // OK
+ int friend f3(); // ERROR
+ };

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_namespaces.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_namespaces.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_namespaces.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,34 +1,34 @@ - - - - - -Namespaces - - - -

Namespaces

-

Carbide supports namespaces, which provide the scope for identifiers. Listing 3.1 provides an example of how you define items in a namespace.

-

namespace NS
- {
- int foo();
- void bar();
- }

-

The above example defines an int variable named NS::foo and a function named NS::bar.

-

You can nest namespaces. For example, you can define an identifier as A::B::C::D::E where A, B, and C are nested namespaces and D is either another namespace or a class. You cannot use namespaces within class definitions.

-

You can rename namespaces for a module. For example:

-

namespace ENA = ExampleNamespaceAlpha;

-

creates a namespace alias called ENA for the original namespace ExampleNamespaceAlpha.

-

You can import items from a namespace. For example:

-

using namespace NS;

-

makes anything in NS visible in the current namespace without a qualifier. To limit the scope of an import, specify a single identifier. For example:

-

using NS::bar;

-

only exposes NS::bar as bar in the current space. This form of using is considered a declaration. So, the following statements:

-

using NS::foo;
- int foo;

-

are not allowed because foo is being redeclared in the current namespace, thereby masking the foo imported from NS.

- - - - - + + + + + +Namespaces + + + +

Namespaces

+

Carbide supports namespaces, which provide the scope for identifiers. Listing 3.1 provides an example of how you define items in a namespace.

+

namespace NS
+ {
+ int foo();
+ void bar();
+ }

+

The above example defines an int variable named NS::foo and a function named NS::bar.

+

You can nest namespaces. For example, you can define an identifier as A::B::C::D::E where A, B, and C are nested namespaces and D is either another namespace or a class. You cannot use namespaces within class definitions.

+

You can rename namespaces for a module. For example:

+

namespace ENA = ExampleNamespaceAlpha;

+

creates a namespace alias called ENA for the original namespace ExampleNamespaceAlpha.

+

You can import items from a namespace. For example:

+

using namespace NS;

+

makes anything in NS visible in the current namespace without a qualifier. To limit the scope of an import, specify a single identifier. For example:

+

using NS::bar;

+

only exposes NS::bar as bar in the current space. This form of using is considered a declaration. So, the following statements:

+

using NS::foo;
+ int foo;

+

are not allowed because foo is being redeclared in the current namespace, thereby masking the foo imported from NS.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_vendor_abi.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_vendor_abi.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_impl_vendor_abi.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,32 +1,32 @@ - - - - - -Vendor Independent C++ ABI - - - -

Vendor Independent C++ ABI

-

The Carbide.c++ compiler currently supports these parts of the vendor independent C++ application binary interface (ABI):

-
    -
  • name mangling
  • -
  • class and vtable layout
  • -
  • constructor/destructor ABI
  • -
  • virtual and non-virtual member function calls
  • -
  • array construction/deconstruction ABI
  • -
  • one-time construction ABI
  • -
  • RTTI
  • -
  • pointer to members
  • -
-

The following features work but do not conform to the ABI specification:

-
    -
  • exception handling
  • -
-

NOTE This ABI only works with some compiler targets.

-

For more information, see www.codesourcery.com/cxx-abi.

- - - - - + + + + + +Vendor Independent C++ ABI + + + +

Vendor Independent C++ ABI

+

The Carbide.c++ compiler currently supports these parts of the vendor independent C++ application binary interface (ABI):

+
    +
  • name mangling
  • +
  • class and vtable layout
  • +
  • constructor/destructor ABI
  • +
  • virtual and non-virtual member function calls
  • +
  • array construction/deconstruction ABI
  • +
  • one-time construction ABI
  • +
  • RTTI
  • +
  • pointer to members
  • +
+

The following features work but do not conform to the ABI specification:

+
    +
  • exception handling
  • +
+

NOTE This ABI only works with some compiler targets.

+

For more information, see www.codesourcery.com/cxx-abi.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_implementation.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_implementation.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_implementation.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Carbide Implementation of C++ - - - -

Carbide Implementation of C++

-

This section describes how the Carbide.c++ compiler implements certain parts of the C++ standard, as described in The Annotated C++ Reference Manual (Addison-Wesley) by Ellis and Stroustrup. The topics discussed in this section are:

- - - - - - + + + + + +Carbide Implementation of C++ + + + +

Carbide Implementation of C++

+

This section describes how the Carbide.c++ compiler implements certain parts of the C++ standard, as described in The Annotated C++ Reference Manual (Addison-Wesley) by Ellis and Stroustrup. The topics discussed in this section are:

+ + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_dynamic_cast.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_dynamic_cast.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_dynamic_cast.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,47 +1,47 @@ - - - - - -Using the dynamic_cast Operator - - - -

Using the dynamic_cast Operator

-

The dynamic_cast operator lets you safely convert a pointer of one type to a pointer of another type. Unlike an ordinary cast, dynamic_cast returns 0 if the conversion is not possible. An ordinary cast returns an unpredictable value that might crash your program if the conversion is not possible.

-

The syntax for the dynamic_cast operator is as follows:

-

dynamic_cast<Type*>(expr)

-

The Type must be either void or a class with at least one virtual member function. If the object to which expr points (*expr) is of type Type or derived from type Type, this expression converts expr to a pointer of type Type* and returns it. Otherwise, it returns 0, the null pointer.

-

For example, take these classes:

-

class Person { virtual void func(void) { ; } };
- class Athlete : public Person { /* . . . */ };
-class Superman : public Athlete { /* . . . */ };

-

And these pointers:

-

Person *lois = new Person;
- Person *arnold = new Athlete;
- Person *clark = new Superman;
-Athlete *a;

-

This is how dynamic_cast works with each pointer:

-

a = dynamic_cast<Athlete*>(arnold);
- // a is arnold, since arnold is an Athlete.
- a = dynamic_cast<Athlete*>(lois);
- // a is 0, since lois is not an Athelete.
- a = dynamic_cast<Athlete*>(clark);
-// a is clark, since clark is both a Superman and an Athlete.

-

You can also use the dynamic_cast operator with reference types. However, since there is no equivalent to the null pointer for references, dynamic_cast throws an exception of type std::bad_cast if it cannot perform the conversion.

-

This is an example of using dynamic_cast with a reference:

-

#include <exception>
- using namespace std;
- Person &superref = *clark;
- try {
- Person &ref = dynamic_cast<Person&>(superref);
- }
- catch(bad_cast) {
- cout << "oops!" << endl;
- } -

- - - - - + + + + + +Using the dynamic_cast Operator + + + +

Using the dynamic_cast Operator

+

The dynamic_cast operator lets you safely convert a pointer of one type to a pointer of another type. Unlike an ordinary cast, dynamic_cast returns 0 if the conversion is not possible. An ordinary cast returns an unpredictable value that might crash your program if the conversion is not possible.

+

The syntax for the dynamic_cast operator is as follows:

+

dynamic_cast<Type*>(expr)

+

The Type must be either void or a class with at least one virtual member function. If the object to which expr points (*expr) is of type Type or derived from type Type, this expression converts expr to a pointer of type Type* and returns it. Otherwise, it returns 0, the null pointer.

+

For example, take these classes:

+

class Person { virtual void func(void) { ; } };
+ class Athlete : public Person { /* . . . */ };
+class Superman : public Athlete { /* . . . */ };

+

And these pointers:

+

Person *lois = new Person;
+ Person *arnold = new Athlete;
+ Person *clark = new Superman;
+Athlete *a;

+

This is how dynamic_cast works with each pointer:

+

a = dynamic_cast<Athlete*>(arnold);
+ // a is arnold, since arnold is an Athlete.
+ a = dynamic_cast<Athlete*>(lois);
+ // a is 0, since lois is not an Athelete.
+ a = dynamic_cast<Athlete*>(clark);
+// a is clark, since clark is both a Superman and an Athlete.

+

You can also use the dynamic_cast operator with reference types. However, since there is no equivalent to the null pointer for references, dynamic_cast throws an exception of type std::bad_cast if it cannot perform the conversion.

+

This is an example of using dynamic_cast with a reference:

+

#include <exception>
+ using namespace std;
+ Person &superref = *clark;
+ try {
+ Person &ref = dynamic_cast<Person&>(superref);
+ }
+ catch(bad_cast) {
+ cout << "oops!" << endl;
+ } +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_typeid_operator.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_typeid_operator.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_typeid_operator.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,50 +1,50 @@ - - - - - -Using the typeid Operator - - - -

Using the typeid Operator

-

The typeid operator lets you determine the type of an object. Like the sizeof operator, it takes two kinds of arguments:

-
    -
  • the name of a class
  • -
  • an expression that evaluates to an object
  • -
-

NOTE Whenever you use typeid operator, you must #include the typeinfo header file.

-

The typeid operator returns a reference to a std::type_info object that you can compare with the == and != operators. For example, if you have these classes and objects:

-
-

class Person { /* . . . */ };
- class Athlete : public Person { /* . . . */ };

-

using namespace std;

-

Person *lois = new Person;
- Athlete *arnold = new Athlete;
- Athlete *louganis = new Athlete;

-
-

All these expressions are true:

-

#include <typeinfo>
- // . . .
- if (typeid(Athlete) == typeid(*arnold))
- // arnold is an Athlete, result is true
- if (typeid(*arnold) == typeid(*louganis))
- // arnold and louganis are both Athletes, result is true
- if (typeid(*lois) == typeid(*arnold)) // ...
- // lois and arnold are not the same type, result is false

-

You can access the name of a type with the name() member function in the std::type_info class. For example, these statements:

-

#include <typeinfo>
- // . . .
- cout << "Lois is a(n) "
-<< typeid(*lois).name() << endl;
-cout << "Arnold is a(n) "
-<< typeid(*arnold).name() << endl;

-

Print this:

-

Lois is a(n) Person
- Arnold is a(n) Athlete
-

- - - - - + + + + + +Using the typeid Operator + + + +

Using the typeid Operator

+

The typeid operator lets you determine the type of an object. Like the sizeof operator, it takes two kinds of arguments:

+
    +
  • the name of a class
  • +
  • an expression that evaluates to an object
  • +
+

NOTE Whenever you use typeid operator, you must #include the typeinfo header file.

+

The typeid operator returns a reference to a std::type_info object that you can compare with the == and != operators. For example, if you have these classes and objects:

+
+

class Person { /* . . . */ };
+ class Athlete : public Person { /* . . . */ };

+

using namespace std;

+

Person *lois = new Person;
+ Athlete *arnold = new Athlete;
+ Athlete *louganis = new Athlete;

+
+

All these expressions are true:

+

#include <typeinfo>
+ // . . .
+ if (typeid(Athlete) == typeid(*arnold))
+ // arnold is an Athlete, result is true
+ if (typeid(*arnold) == typeid(*louganis))
+ // arnold and louganis are both Athletes, result is true
+ if (typeid(*lois) == typeid(*arnold)) // ...
+ // lois and arnold are not the same type, result is false

+

You can access the name of a type with the name() member function in the std::type_info class. For example, these statements:

+

#include <typeinfo>
+ // . . .
+ cout << "Lois is a(n) "
+<< typeid(*lois).name() << endl;
+cout << "Arnold is a(n) "
+<< typeid(*arnold).name() << endl;

+

Print this:

+

Lois is a(n) Person
+ Arnold is a(n) Athlete
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_working.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_working.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_rtti_working.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,21 +1,21 @@ - - - - - -Working with RTTI - - - -

Working with RTTI

-

This section describes how to work with runtime type information features of C++ supported by the Carbide.c++ compiler. RTTI lets you cast an object of one type as another type, get information about objects, and compare their types at runtime.

-

The topics in this section are:

- - - - - - + + + + + +Working with RTTI + + + +

Working with RTTI

+

This section describes how to work with runtime type information features of C++ supported by the Carbide.c++ compiler. RTTI lets you cast an object of one type as another type, get information about objects, and compare their types at runtime.

+

The topics in this section are:

+ + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_conformance.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_conformance.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_conformance.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,99 +1,99 @@ - - - - - -Better Template Conformance - - - -

Better Template Conformance

-

Versions 2.5 and later of Carbide.c++ enforces the ISO C++ standard more closely when translating templates than previous versions of Carbide.c++. By default this new template translation is off. To ensure that template source code follows the ISO C++ standard more closely, turn on the ISO C++ Template Parser option .

-

The compiler provides pragmas to help update your source code to the more conformant template features. The parse_func_templ pragma controls the new template features. The parse_mfunc_templ pragma controls the new template features for class member functions only. The pragma warn_no_typename warns for the missing use of the typename keyword required by the ISO C++ standard.

-

When using the new template parsing features, the compiler enforces more careful use of the typename and template keywords, and follows different rules for resolving names during declaration and instantiation than before.

-

A qualified name that refers to a type and that depends on a template parameter must begin with typename (ISO C++, §14.6). An example using the typename Keyword:

-

template <typename T> void f()
- {
- T::name *ptr; // ERROR: an attempt to multiply T::name by ptr
- typename T::name *ptr; // OK
- }

-

The compiler requires the template keyword at the end of “.” and “->” operators, and for qualified identifiers that depend on a template parameter. An example using the template Keyword:

-

template <typename T> void f(T* ptr)
- {
- ptr->f<int>(); // ERROR: f is less than int
- ptr->template f<int>(); // OK
- }

-

Names referred to inside a template declaration that are not dependent on the template declaration (that do not rely on template arguments) must be declared before the template’s declaration. These names are bound to the template declaration at the point where the template is defined. Bindings are not affected by definitions that are in scope at the point of instantiation. Listing 1 shows an example.

-
-

Listing 1. Binding Non-dependent Identifiers

-

void f(char);

-

template <typename T> void tmpl_func()
- {
- f(1); // Uses f(char); f(int) is not defined yet.
- g(); // ERROR: g() is not defined yet.
- }
- void g();
- void f(int);

-
-

Names of template arguments that are dependent in base classes must be explicitly qualified (ISO C++, §14.6.2). See Listing 2.

-
-

Listing 2. Qualifying Template Arguments in Base Classes

-

template <typename T> struct Base
- {
- void f();
- }
- template <typename T> struct Derive: Base<T>
- {
- void g()
- {
- f(); // ERROR: Base<T>::f() is not visible.
- Base<T>::f(); // OK
- }
- }

-
-

When a template contains a function call in which at least one of the function’s arguments is type-dependent, the compiler uses the name of the function in the context of the template definition (ISO C++, §14.6.2.2) and the context of its instantiation (ISO C++, §14.6.4.2). Listing 3 shows an example.

-
-

Listing 3. Function Call with Type-dependent Argument

-

void f(char);

-

template <typename T> void type_dep_func()
- {
- f(1); // Uses f(char), above; f(int) is not declared yet.
- f(T()); // f() called with a type-dependent argument.
- }

-

void f(int);
- struct A{};
- void f(A);

-

int main()
- {
- type_dep_func<int>(); // Calls f(char) twice.
- type_dep_func<A>(); // Calls f(char) and f(A);
- return 0;
- }

-
-

The compiler only uses external names to look up type-dependent arguments in function calls.

-

static void f(int); // f() is internal.
- template <typename T> void type_dep_fun_ext()
- {
- f(T()); // f() called with a type-dependent argument.
-}
-
-int main()
- {
- type_dep_fun_ext<int>(); // ERROR: f(int) must be external.
-}

-

The compiler does not allow expressions in inline assembly statements that depend on template parameters.

-

template <typename T> void asm_tmpl()
- {
- asm { move #sizeof(T), D0 ); // ERROR: Not yet supported.
- }

-

The compiler also supports the address of template-id rules.

-

template <typename T> void foo(T) {}
- template <typename T> void bar(T) {}
- ...
- foo{ &bar<int> ); // now accepted
-

- - - - - + + + + + +Better Template Conformance + + + +

Better Template Conformance

+

Versions 2.5 and later of Carbide.c++ enforces the ISO C++ standard more closely when translating templates than previous versions of Carbide.c++. By default this new template translation is off. To ensure that template source code follows the ISO C++ standard more closely, turn on the ISO C++ Template Parser option .

+

The compiler provides pragmas to help update your source code to the more conformant template features. The parse_func_templ pragma controls the new template features. The parse_mfunc_templ pragma controls the new template features for class member functions only. The pragma warn_no_typename warns for the missing use of the typename keyword required by the ISO C++ standard.

+

When using the new template parsing features, the compiler enforces more careful use of the typename and template keywords, and follows different rules for resolving names during declaration and instantiation than before.

+

A qualified name that refers to a type and that depends on a template parameter must begin with typename (ISO C++, §14.6). An example using the typename Keyword:

+

template <typename T> void f()
+ {
+ T::name *ptr; // ERROR: an attempt to multiply T::name by ptr
+ typename T::name *ptr; // OK
+ }

+

The compiler requires the template keyword at the end of “.” and “->” operators, and for qualified identifiers that depend on a template parameter. An example using the template Keyword:

+

template <typename T> void f(T* ptr)
+ {
+ ptr->f<int>(); // ERROR: f is less than int
+ ptr->template f<int>(); // OK
+ }

+

Names referred to inside a template declaration that are not dependent on the template declaration (that do not rely on template arguments) must be declared before the template’s declaration. These names are bound to the template declaration at the point where the template is defined. Bindings are not affected by definitions that are in scope at the point of instantiation. Listing 1 shows an example.

+
+

Listing 1. Binding Non-dependent Identifiers

+

void f(char);

+

template <typename T> void tmpl_func()
+ {
+ f(1); // Uses f(char); f(int) is not defined yet.
+ g(); // ERROR: g() is not defined yet.
+ }
+ void g();
+ void f(int);

+
+

Names of template arguments that are dependent in base classes must be explicitly qualified (ISO C++, §14.6.2). See Listing 2.

+
+

Listing 2. Qualifying Template Arguments in Base Classes

+

template <typename T> struct Base
+ {
+ void f();
+ }
+ template <typename T> struct Derive: Base<T>
+ {
+ void g()
+ {
+ f(); // ERROR: Base<T>::f() is not visible.
+ Base<T>::f(); // OK
+ }
+ }

+
+

When a template contains a function call in which at least one of the function’s arguments is type-dependent, the compiler uses the name of the function in the context of the template definition (ISO C++, §14.6.2.2) and the context of its instantiation (ISO C++, §14.6.4.2). Listing 3 shows an example.

+
+

Listing 3. Function Call with Type-dependent Argument

+

void f(char);

+

template <typename T> void type_dep_func()
+ {
+ f(1); // Uses f(char), above; f(int) is not declared yet.
+ f(T()); // f() called with a type-dependent argument.
+ }

+

void f(int);
+ struct A{};
+ void f(A);

+

int main()
+ {
+ type_dep_func<int>(); // Calls f(char) twice.
+ type_dep_func<A>(); // Calls f(char) and f(A);
+ return 0;
+ }

+
+

The compiler only uses external names to look up type-dependent arguments in function calls.

+

static void f(int); // f() is internal.
+ template <typename T> void type_dep_fun_ext()
+ {
+ f(T()); // f() called with a type-dependent argument.
+}
+
+int main()
+ {
+ type_dep_fun_ext<int>(); // ERROR: f(int) must be external.
+}

+

The compiler does not allow expressions in inline assembly statements that depend on template parameters.

+

template <typename T> void asm_tmpl()
+ {
+ asm { move #sizeof(T), D0 ); // ERROR: Not yet supported.
+ }

+

The compiler also supports the address of template-id rules.

+

template <typename T> void foo(T) {}
+ template <typename T> void bar(T) {}
+ ...
+ foo{ &bar<int> ); // now accepted
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_declaring.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_declaring.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_declaring.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,54 +1,54 @@ - - - - - -Providing declarations when declaring the template - - - -

Providing declarations when declaring the template

-

Carbide.c++ processes any declarations in a template when the template is declared, not when it is instantiated.

-

Although the C++ compiler currently accepts declarations in templates that are not available when the template is declared, future versions of the compiler will not. Listing 1 shows some examples.

-
-
Listing 1. Declarations in Template Declarations
-

// You must define names in a class template declaration

-

struct bar;
- template<typename T> struct foo {
- bar *member; // OK
- };
- struct bar { };
- foo<int> fi;

-

// Names in template argument dependent base classes:

-

template<typename T> struct foo {
- typedef T *tptr;
- };

-

template<typename T> struct foo {
- typedef T *tptr;
- };
- template<typename T> struct bar : foo<T> {
- typename foo<T>::tptr member; // OK
- };

-

// The correct usage of typename in template argument
- // dependent qualified names in some contexts:

-

template<class T> struct X {
- typedef X *xptr;
- xptr f();
- };
- template<class T> X<T>::xptr X<T>::f() // 'typename' missing
- {
- return 0;
- }

-

// Workaround: Use 'typename':

-

template<class T> typename X<T>::xptr X<T>::f() // OK
- {
- return 0;
- }
- -

-
- - - - - + + + + + +Providing declarations when declaring the template + + + +

Providing declarations when declaring the template

+

Carbide.c++ processes any declarations in a template when the template is declared, not when it is instantiated.

+

Although the C++ compiler currently accepts declarations in templates that are not available when the template is declared, future versions of the compiler will not. Listing 1 shows some examples.

+
+
Listing 1. Declarations in Template Declarations
+

// You must define names in a class template declaration

+

struct bar;
+ template<typename T> struct foo {
+ bar *member; // OK
+ };
+ struct bar { };
+ foo<int> fi;

+

// Names in template argument dependent base classes:

+

template<typename T> struct foo {
+ typedef T *tptr;
+ };

+

template<typename T> struct foo {
+ typedef T *tptr;
+ };
+ template<typename T> struct bar : foo<T> {
+ typename foo<T>::tptr member; // OK
+ };

+

// The correct usage of typename in template argument
+ // dependent qualified names in some contexts:

+

template<class T> struct X {
+ typedef X *xptr;
+ xptr f();
+ };
+ template<class T> X<T>::xptr X<T>::f() // 'typename' missing
+ {
+ return 0;
+ }

+

// Workaround: Use 'typename':

+

template<class T> typename X<T>::xptr X<T>::f() // OK
+ {
+ return 0;
+ }
+ +

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_defining.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_defining.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_defining.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,89 +1,89 @@ - - - - - -Declaring and Defining Templates - - - -

Declaring and Defining Templates

-

In a header file, declare your class functions and function templates, as shown in Listing 3.9.

-
-

Listing 1. templ.h: A Template Declaration File

-

template <class T>
- class Templ {
- T member;
- public:
- Templ(T x) { member=x; }
- T Get();
- };
-
- template <class T>
- T Max(T,T);

-
-

In a source file, include the header file, then define the function templates and the member functions of the class templates. Listing 3.10 shows you an example.

-

This source file is a template definition file, which you include in any file that uses your templates. You do not need to add the template definition file to your project. Although this is technically a source file, you work with it as if it were a header file.

-

The template definition file does not generate code. The compiler cannot generate code for a template until you specify what values it should substitute for the template arguments. Specifying these values is called instantiating the template. See Instantiating a Template.

-
-

Listing 2. templ.cp: A Template Definition File

-

#include "templ.h"
-
- template <class T>
- T Templ<T>::Get()
- {
- return member;
- }
-
- template <class T>
- T Max(T x, T y)
- {
- return ((x>y)?x:y);
- }

-
-

WARNING! Do not include the original template declaration file, which ends in .h, in your source file. Otherwise, the compiler generates an error saying that the function or class is undefined.

-

Providing declarations when declaring the template

-

Carbide.c++ processes any declarations in a template when the template is declared, not when it is instantiated.

-

Although the C++ compiler currently accepts declarations in templates that are not available when the template is declared, future versions of the compiler will not. Listing 3.11 shows some examples.

-
-
Listing 3.11 Declarations in Template Declarations
-

// You must define names in a class template declaration

-

struct bar;
- template<typename T> struct foo {
- bar *member; // OK
- };
- struct bar { };
- foo<int> fi;

-

// Names in template argument dependent base classes:

-

template<typename T> struct foo {
- typedef T *tptr;
- };

-

template<typename T> struct foo {
- typedef T *tptr;
- };
- template<typename T> struct bar : foo<T> {
- typename foo<T>::tptr member; // OK
- };

-

// The correct usage of typename in template argument
- // dependent qualified names in some contexts:

-

template<class T> struct X {
- typedef X *xptr;
- xptr f();
- };
- template<class T> X<T>::xptr X<T>::f() // 'typename' missing
- {
- return 0;
- }

-

// Workaround: Use 'typename':

-

template<class T> typename X<T>::xptr X<T>::f() // OK
- {
- return 0;
- }
- -

-
- - - - - + + + + + +Declaring and Defining Templates + + + +

Declaring and Defining Templates

+

In a header file, declare your class functions and function templates, as shown in Listing 3.9.

+
+

Listing 1. templ.h: A Template Declaration File

+

template <class T>
+ class Templ {
+ T member;
+ public:
+ Templ(T x) { member=x; }
+ T Get();
+ };
+
+ template <class T>
+ T Max(T,T);

+
+

In a source file, include the header file, then define the function templates and the member functions of the class templates. Listing 3.10 shows you an example.

+

This source file is a template definition file, which you include in any file that uses your templates. You do not need to add the template definition file to your project. Although this is technically a source file, you work with it as if it were a header file.

+

The template definition file does not generate code. The compiler cannot generate code for a template until you specify what values it should substitute for the template arguments. Specifying these values is called instantiating the template. See Instantiating a Template.

+
+

Listing 2. templ.cp: A Template Definition File

+

#include "templ.h"
+
+ template <class T>
+ T Templ<T>::Get()
+ {
+ return member;
+ }
+
+ template <class T>
+ T Max(T x, T y)
+ {
+ return ((x>y)?x:y);
+ }

+
+

WARNING! Do not include the original template declaration file, which ends in .h, in your source file. Otherwise, the compiler generates an error saying that the function or class is undefined.

+

Providing declarations when declaring the template

+

Carbide.c++ processes any declarations in a template when the template is declared, not when it is instantiated.

+

Although the C++ compiler currently accepts declarations in templates that are not available when the template is declared, future versions of the compiler will not. Listing 3.11 shows some examples.

+
+
Listing 3.11 Declarations in Template Declarations
+

// You must define names in a class template declaration

+

struct bar;
+ template<typename T> struct foo {
+ bar *member; // OK
+ };
+ struct bar { };
+ foo<int> fi;

+

// Names in template argument dependent base classes:

+

template<typename T> struct foo {
+ typedef T *tptr;
+ };

+

template<typename T> struct foo {
+ typedef T *tptr;
+ };
+ template<typename T> struct bar : foo<T> {
+ typename foo<T>::tptr member; // OK
+ };

+

// The correct usage of typename in template argument
+ // dependent qualified names in some contexts:

+

template<class T> struct X {
+ typedef X *xptr;
+ xptr f();
+ };
+ template<class T> X<T>::xptr X<T>::f() // 'typename' missing
+ {
+ return 0;
+ }

+

// Workaround: Use 'typename':

+

template<class T> typename X<T>::xptr X<T>::f() // OK
+ {
+ return 0;
+ }
+ +

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instant_auto.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instant_auto.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instant_auto.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - -Instantiating a Template: Automatic - - - -

Automatic instantiation

-

To instantiate templates automatically, include the template definition file in all source files that use the template, then use the template members like any other type or function. The compiler automatically generates code for a template instantiation whenever it sees a new one. Listing 1 shows how to automatically instantiate the templates for class Templ and class Max.

-
-

Listing 1. myprog.cp: A Source File that Uses Templates

-

#include <iostreams.h>
- #include "templ.cp" // includes templ.h as well

-

void main(void) {
- Templ<long> a = 1, b = 2;
- // The compiler instantiates Templ<long> here.
- cout << Max(a.Get(), b.Get());
- // The compiler instantiates Max<long>() here.
- };

-
-

If you use automatic instantiation, the compiler might take longer to translate your program because the compiler has to determine on its own which instantiations you need. It also scatters the object code for the template instantiations throughout your program.
-

- - - - - + + + + + +Instantiating a Template: Automatic + + + +

Automatic instantiation

+

To instantiate templates automatically, include the template definition file in all source files that use the template, then use the template members like any other type or function. The compiler automatically generates code for a template instantiation whenever it sees a new one. Listing 1 shows how to automatically instantiate the templates for class Templ and class Max.

+
+

Listing 1. myprog.cp: A Source File that Uses Templates

+

#include <iostreams.h>
+ #include "templ.cp" // includes templ.h as well

+

void main(void) {
+ Templ<long> a = 1, b = 2;
+ // The compiler instantiates Templ<long> here.
+ cout << Max(a.Get(), b.Get());
+ // The compiler instantiates Max<long>() here.
+ };

+
+

If you use automatic instantiation, the compiler might take longer to translate your program because the compiler has to determine on its own which instantiations you need. It also scatters the object code for the template instantiations throughout your program.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instant_explicit.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instant_explicit.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instant_explicit.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,42 +1,42 @@ - - - - - -Instantiating a Template: Implicit - - - -

Explicit instantiation

-

To instantiate templates explicitly, include the template definition file in a source file, and write a template instantiation statement for every instantiation. The syntax for a class template instantiation is as follows:

-

template class class-name<templ-specs>;

-

The syntax for a function template instantiation is as follows:

-

template return-type func-name<templ-specs>(arg-specs);

-

Listing 1 shows how to explicitly instantiate the templates in Listing 3.9 and Listing 3.10.

-
-

Listing 1. myinst.cp: Explicitly Instantiating Templates

-

#include "templ.cp"

-

template class Templ<long>; // class instantiation
- template long Max<long>(long,long); // function instantiation

-
-

When you explicitly instantiate a function, you do not need to include in templ-specs any arguments that the compiler can deduce from arg-specs. For example, in Listing 1 you can instantiate Max<long>() like this:

-

template long Max<>(long, long);
- // The compiler can tell from the arguments
-// that you are instantiating Max<long>()

-

Use explicit instantiation to make your program compile faster. Because the instantiations can be in one file with no other code, you can even put them in a separate library.

-

The compiler also supports the explicit instantiation of non-template members. Listing 2 shows an example.

-
-
Listing 2. Explicit Instantiation of Non-Template Members
-

template <class T> struct X {
- static T i;
- };

-

template <class T> T X<T>::i = 1;
- template char X<char>::i;

-
-

NOTE Explicit instantiation is not in the ARM but is part of the ISO C++ standard.
-

- - - - - + + + + + +Instantiating a Template: Implicit + + + +

Explicit instantiation

+

To instantiate templates explicitly, include the template definition file in a source file, and write a template instantiation statement for every instantiation. The syntax for a class template instantiation is as follows:

+

template class class-name<templ-specs>;

+

The syntax for a function template instantiation is as follows:

+

template return-type func-name<templ-specs>(arg-specs);

+

Listing 1 shows how to explicitly instantiate the templates in Listing 3.9 and Listing 3.10.

+
+

Listing 1. myinst.cp: Explicitly Instantiating Templates

+

#include "templ.cp"

+

template class Templ<long>; // class instantiation
+ template long Max<long>(long,long); // function instantiation

+
+

When you explicitly instantiate a function, you do not need to include in templ-specs any arguments that the compiler can deduce from arg-specs. For example, in Listing 1 you can instantiate Max<long>() like this:

+

template long Max<>(long, long);
+ // The compiler can tell from the arguments
+// that you are instantiating Max<long>()

+

Use explicit instantiation to make your program compile faster. Because the instantiations can be in one file with no other code, you can even put them in a separate library.

+

The compiler also supports the explicit instantiation of non-template members. Listing 2 shows an example.

+
+
Listing 2. Explicit Instantiation of Non-Template Members
+

template <class T> struct X {
+ static T i;
+ };

+

template <class T> T X<T>::i = 1;
+ template char X<char>::i;

+
+

NOTE Explicit instantiation is not in the ARM but is part of the ISO C++ standard.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instantiating.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instantiating.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_instantiating.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -Instantiating a Template - - - -

Instantiating a Template

-

The compiler cannot generate code for a template until you:

-
    -
  • declare the template class
  • -
  • provide a template definition
  • -
  • specify the data type(s) for the template
  • -
-

For information on the first two requirements, see Declaring and Defining Templates.

-

Specifying the data type(s) and other arguments for a template is called instantiating the template. Carbide.c++ gives you two ways to instantiate a template. You can let the compiler instantiate it automatically when you first use it, or you can explicitly create all the instantiations you expect to use.
-

- - - - - + + + + + +Instantiating a Template + + + +

Instantiating a Template

+

The compiler cannot generate code for a template until you:

+
    +
  • declare the template class
  • +
  • provide a template definition
  • +
  • specify the data type(s) for the template
  • +
+

For information on the first two requirements, see Declaring and Defining Templates.

+

Specifying the data type(s) and other arguments for a template is called instantiating the template. Carbide.c++ gives you two ways to instantiate a template. You can let the compiler instantiate it automatically when you first use it, or you can explicitly create all the instantiations you expect to use.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_working.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_working.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/cpp_compiler/cpp_templates_working.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Working with Templates - - - -

Working with Templates

-

(ISO C++, §14) This section describes how to organize your template declarations and definitions in files. It also describes how to explicitly instantiate templates using a syntax that is not in the ARM but is part of the ISO C++ standard.

-

This section includes the following topics:

- - - - - - + + + + + +Working with Templates + + + +

Working with Templates

+

(ISO C++, §14) This section describes how to organize your template declarations and definitions in files. It also describes how to explicitly instantiate templates using a syntax that is not in the ARM but is part of the ISO C++ standard.

+

This section includes the following topics:

+ + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_activating.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_activating.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_activating.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - -C++ and Embedded Systems - - - -

Activating EC++

-

To compile EC++ source code, enable the EC++ Compatibility Mode setting .

-

To test for EC++ compatibility mode at compile time, use the __embedded_cplusplus predefined symbol. For more information, see “Predefined Symbols”. -

- - - - - + + + + + +C++ and Embedded Systems + + + +

Activating EC++

+

To compile EC++ source code, enable the EC++ Compatibility Mode setting .

+

To test for EC++ compatibility mode at compile time, use the __embedded_cplusplus predefined symbol. For more information, see “Predefined Symbols”. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_compiler.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_compiler.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_compiler.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,33 +1,33 @@ - - - - - -Compiler-related strategies - - - -

Compiler-related Strategies

-

Compiler-related strategies rely on compiler features to reduce object code size.

-
    -
  • Size Optimizations—use the compiler size optimization settings
  • -
  • Inlining—control and limit effectiveness of inline directive
  • -
-

Size Optimizations

-

Carbide compilers include optimization settings for size or speed and various levels of optimization. Choose size as your desired outcome and the level of optimization to apply.

-

Optimization settings for your target are controlled by settings in the Processor panel.

-

When debugging, compile your code without any optimizations. Some optimizations disrupt the relationship between the source and object code required by the debugger. Optimize your code after you have finished debugging.

-

See also C/C++ Language Panel.

-

Inlining

-

With Carbide, you can disable inlining, allow normal inlining, auto-inline, or set the maximum depth of inlining.

-

Inlining can reduce or increase code size. There is no definite answer for this question. Inlining small functions can make a program smaller, especially if you have a class library with a lot of getter/setter member functions.

-

However, MSL C++ defines many functions as inline, which is not good if you want minimal code size. For optimal code size when using MSL C++, disable inlining when building the library. If you are not using MSL C++, normal inlining and a common-sense use of the keyword inline might improve your code size.

-

In Carbide, you control inlining as a language setting .

-

When debugging your code, disable inlining to maintain a clear correspondence between source and object code. After debugging, set the inlining level that has the best effect on your object code.

-

See also Inlining. -

- - - - - + + + + + +Compiler-related strategies + + + +

Compiler-related Strategies

+

Compiler-related strategies rely on compiler features to reduce object code size.

+
    +
  • Size Optimizations—use the compiler size optimization settings
  • +
  • Inlining—control and limit effectiveness of inline directive
  • +
+

Size Optimizations

+

Carbide compilers include optimization settings for size or speed and various levels of optimization. Choose size as your desired outcome and the level of optimization to apply.

+

Optimization settings for your target are controlled by settings in the Processor panel.

+

When debugging, compile your code without any optimizations. Some optimizations disrupt the relationship between the source and object code required by the debugger. Optimize your code after you have finished debugging.

+

See also C/C++ Language Panel.

+

Inlining

+

With Carbide, you can disable inlining, allow normal inlining, auto-inline, or set the maximum depth of inlining.

+

Inlining can reduce or increase code size. There is no definite answer for this question. Inlining small functions can make a program smaller, especially if you have a class library with a lot of getter/setter member functions.

+

However, MSL C++ defines many functions as inline, which is not good if you want minimal code size. For optimal code size when using MSL C++, disable inlining when building the library. If you are not using MSL C++, normal inlining and a common-sense use of the keyword inline might improve your code size.

+

In Carbide, you control inlining as a language setting .

+

When debugging your code, disable inlining to maintain a clear correspondence between source and object code. After debugging, set the inlining level that has the best effect on your object code.

+

See also Inlining. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_language.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_language.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_language.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,40 +1,40 @@ - - - - - -Language-related strategies - - - -

Language-related Strategies

-

Language-related strategies limit or avoid the use of ISO C++ features. While these features can make software design and maintenance easier, they can also increase code size.

-
    -
  • Virtual Functions—Not using virtual functions reduces code size.
  • -
  • Runtime Type Identification—Extra data is not generated if program does not use Runtime Type Identification (RTTI).
  • -
  • Exception Handling—While the Carbide.c++ compiler provides zero-overhead exception handling to provide optimum execution speed, it still generates extra object code for exception support.
  • -
  • Operator New—Do not throw an exception within the new operator.
  • -
  • Multiple and Virtual Inheritance
  • -
-

Virtual Functions

-

For optimal code size, do not use virtual functions unless absolutely necessary. A virtual function is never dead-stripped, even if it is never called.

-

Runtime Type Identification

-

If code size is an issue, do not use RTTI because it generates a data table for every class. Disabling RTTI decreases the size of the data section.

-

The EC++ proposal does not allow runtime type identification.

-

See also “Controlling RTTI”.

-

Exception Handling

-

If you must handle exceptions, be careful when using C++ exception handling routines. Carbide has a zero runtime overhead error handling mechanism. However, using exceptions does increase code size, particularly the exception tables data.

-

The EC++ proposal does not allow exception handling.

-

NOTE The proposed ISO standard libraries and the use of the new operator require exception handling.

-

Operator New

-

The C++ new operator might throw an exception, depending on how the runtime library implements the new operator. To make the new operator throw exceptions, set __throws_bad_alloc to 1 in the prefix file for your target and rebuild your library. To prevent the new operator from throwing exceptions, set __throws_bad_alloc to 0 in the prefix file for your target and rebuild your library.

-

See your release notes or Targeting manual for more information.

-

Multiple and Virtual Inheritance

-

Implementing multiple inheritance requires a modest amount of code and data overhead. The EC++ proposal does not allow multiple inheritance.

-

For optimal code size, do not use virtual inheritance. Virtual base classes are often complex and add a lot of code to the constructor and destructor functions.

-

The EC++ proposal does not allow virtual inheritance.

- - - - - + + + + + +Language-related strategies + + + +

Language-related Strategies

+

Language-related strategies limit or avoid the use of ISO C++ features. While these features can make software design and maintenance easier, they can also increase code size.

+
    +
  • Virtual Functions—Not using virtual functions reduces code size.
  • +
  • Runtime Type Identification—Extra data is not generated if program does not use Runtime Type Identification (RTTI).
  • +
  • Exception Handling—While the Carbide.c++ compiler provides zero-overhead exception handling to provide optimum execution speed, it still generates extra object code for exception support.
  • +
  • Operator New—Do not throw an exception within the new operator.
  • +
  • Multiple and Virtual Inheritance
  • +
+

Virtual Functions

+

For optimal code size, do not use virtual functions unless absolutely necessary. A virtual function is never dead-stripped, even if it is never called.

+

Runtime Type Identification

+

If code size is an issue, do not use RTTI because it generates a data table for every class. Disabling RTTI decreases the size of the data section.

+

The EC++ proposal does not allow runtime type identification.

+

See also “Controlling RTTI”.

+

Exception Handling

+

If you must handle exceptions, be careful when using C++ exception handling routines. Carbide has a zero runtime overhead error handling mechanism. However, using exceptions does increase code size, particularly the exception tables data.

+

The EC++ proposal does not allow exception handling.

+

NOTE The proposed ISO standard libraries and the use of the new operator require exception handling.

+

Operator New

+

The C++ new operator might throw an exception, depending on how the runtime library implements the new operator. To make the new operator throw exceptions, set __throws_bad_alloc to 1 in the prefix file for your target and rebuild your library. To prevent the new operator from throwing exceptions, set __throws_bad_alloc to 0 in the prefix file for your target and rebuild your library.

+

See your release notes or Targeting manual for more information.

+

Multiple and Virtual Inheritance

+

Implementing multiple inheritance requires a modest amount of code and data overhead. The EC++ proposal does not allow multiple inheritance.

+

For optimal code size, do not use virtual inheritance. Virtual base classes are often complex and add a lot of code to the constructor and destructor functions.

+

The EC++ proposal does not allow virtual inheritance.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_library.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_library.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_code_library.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - -Library-related strategies - - - -

Library-related strategies

-

Library related strategies include:

-
    -
  • Stream-Based Classes—MSL classes comprise a lot of object code.
  • -
  • Alternative Class Libraries—Non-standard class libraries can provide a subset of the standard library’s functionality with less overhead.
  • -
-

Stream-Based Classes

-

MSL C++ stream-based classes initialize several instances of direct and indirect objects. When code size is critical, do not use stream-based classes, which include standard input (cin), standard output (cout), and standard error (cerr). There are also wide-character equivalents for the normal input and output routines. Use only standard C input and output functions unless stream-based classes are absolutely necessary.

-

In addition to the standard C++ stream classes, avoid using string streams for in-core formatting because they generate heavy overhead. If size is critical, use C’s sprintf or sscanf functions instead.

-

The EC++ proposal does not support templatized classes or functions. MSL adheres to the ISO proposed standards that are template-based.

-

Alternative Class Libraries

-

MSL C++ is based on the ISO proposed C++ standard, which is implemented using templates that have a large initial overhead for specialization.

-

To avoid this overhead, consider devising your own commonly-used vector, string, or utility classes. You can also use other class libraries, such as the NIH's (National Institute of Health) Class Library. If you do use an alternative library, beware of potential problems with virtual inheritance, RTTI, or other causes of larger code size as described above. -

- - - - - + + + + + +Library-related strategies + + + +

Library-related strategies

+

Library related strategies include:

+
    +
  • Stream-Based Classes—MSL classes comprise a lot of object code.
  • +
  • Alternative Class Libraries—Non-standard class libraries can provide a subset of the standard library’s functionality with less overhead.
  • +
+

Stream-Based Classes

+

MSL C++ stream-based classes initialize several instances of direct and indirect objects. When code size is critical, do not use stream-based classes, which include standard input (cin), standard output (cout), and standard error (cerr). There are also wide-character equivalents for the normal input and output routines. Use only standard C input and output functions unless stream-based classes are absolutely necessary.

+

In addition to the standard C++ stream classes, avoid using string streams for in-core formatting because they generate heavy overhead. If size is critical, use C’s sprintf or sscanf functions instead.

+

The EC++ proposal does not support templatized classes or functions. MSL adheres to the ISO proposed standards that are template-based.

+

Alternative Class Libraries

+

MSL C++ is based on the ISO proposed C++ standard, which is implemented using templates that have a large initial overhead for specialization.

+

To avoid this overhead, consider devising your own commonly-used vector, string, or utility classes. You can also use other class libraries, such as the NIH's (National Institute of Health) Class Library. If you do use an alternative library, beware of potential problems with virtual inheritance, RTTI, or other causes of larger code size as described above. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_differences.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_differences.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_differences.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,35 +1,35 @@ - - - - - -Differences Between ISO C++ and EC++ - - - -

Differences Between ISO C++ and EC++

-

The EC++ proposal does not support the following ISO C++ (ANSI C++) features.

-

Templates

-

ANSI C++ supports templates. The EC++ proposal does not include template support for class or functions.

-

Libraries

-

The EC++ proposal supports the <string>, <complex>, <ios>, <streambuf>, <istream>, and <ostream> classes, but only in a non-template form. The EC++ specifications do not support any other ANSI C++ libraries, including the STL-type algorithm libraries.

-

File Operations

-

The EC++ proposal does not support any file operations except simple console input and output file types.

-

Localization

-

The EC++ proposal does not contain localization libraries because of the excessive memory requirements.

-

Exception Handling

-

The EC++ proposal does not support exception handling.

-

Unsupported Language Features

-

The EC++ proposal does not support the following language features:

-
    -
  • mutable specified
  • -
  • RTTI
  • -
  • namespace
  • -
  • multiple inheritance
  • -
  • virtual inheritance
  • -
- - - - - + + + + + +Differences Between ISO C++ and EC++ + + + +

Differences Between ISO C++ and EC++

+

The EC++ proposal does not support the following ISO C++ (ANSI C++) features.

+

Templates

+

ANSI C++ supports templates. The EC++ proposal does not include template support for class or functions.

+

Libraries

+

The EC++ proposal supports the <string>, <complex>, <ios>, <streambuf>, <istream>, and <ostream> classes, but only in a non-template form. The EC++ specifications do not support any other ANSI C++ libraries, including the STL-type algorithm libraries.

+

File Operations

+

The EC++ proposal does not support any file operations except simple console input and output file types.

+

Localization

+

The EC++ proposal does not contain localization libraries because of the excessive memory requirements.

+

Exception Handling

+

The EC++ proposal does not support exception handling.

+

Unsupported Language Features

+

The EC++ proposal does not support the following language features:

+
    +
  • mutable specified
  • +
  • RTTI
  • +
  • namespace
  • +
  • multiple inheritance
  • +
  • virtual inheritance
  • +
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_smaller_code.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_smaller_code.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_smaller_code.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -Obtaining Smaller Code Size in C++ - - - -

Obtaining Smaller Code Size in C++

-

Consider the following C++ programming strategies to ensure optimal code size:

-
    -
  • Compiler-related strategies
  • -
  • Language-related strategies
  • -
  • Library-related strategies
  • -
-

NOTE In all strategies, reducing object code size can affect program performance.

-

The EC++ proposal uses some of these strategies as part of its specification. Other strategies apply to C++ programming in general. Any C++ program can use these strategies, regardless of whether it follows the EC++ proposal or not. -

- - - - - + + + + + +Obtaining Smaller Code Size in C++ + + + +

Obtaining Smaller Code Size in C++

+

Consider the following C++ programming strategies to ensure optimal code size:

+
    +
  • Compiler-related strategies
  • +
  • Language-related strategies
  • +
  • Library-related strategies
  • +
+

NOTE In all strategies, reducing object code size can affect program performance.

+

The EC++ proposal uses some of these strategies as part of its specification. Other strategies apply to C++ programming in general. Any C++ program can use these strategies, regardless of whether it follows the EC++ proposal or not. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_specifications.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_specifications.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_specifications.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - -EC++ Specifications - - - -

EC++ Specifications

-

This section describes how to design software that adhere to the EC++ proposal.

-

Language Related Issues

-

To make sure your source code complies with both ISO C++ and EC++ standards, follow these guidelines:

-
    -
  • Do not use RTTI (Run Time Type Identification).
  • -
  • Do not use exception handling, namespaces, or other unsupported features.
  • -
  • Do not use multiple or virtual inheritance.
  • -
-

You can disable certain C++ features, such as RTTI and exceptions, using the compiler settings in the C++ Language panel, described in C/C++ Language Panel

-

Library-Related Issues

-

Do not refer to routines, data structures, and classes in the Metrowerks Standard Library (MSL) for C++. -

- - - - - + + + + + +EC++ Specifications + + + +

EC++ Specifications

+

This section describes how to design software that adhere to the EC++ proposal.

+

Language Related Issues

+

To make sure your source code complies with both ISO C++ and EC++ standards, follow these guidelines:

+
    +
  • Do not use RTTI (Run Time Type Identification).
  • +
  • Do not use exception handling, namespaces, or other unsupported features.
  • +
  • Do not use multiple or virtual inheritance.
  • +
+

You can disable certain C++ features, such as RTTI and exceptions, using the compiler settings in the C++ Language panel, described in C/C++ Language Panel

+

Library-Related Issues

+

Do not refer to routines, data structures, and classes in the Metrowerks Standard Library (MSL) for C++. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_systems.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_systems.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/emb_systems/emb_systems.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - - - - -C++ and Embedded Systems - - - -

C++ and Embedded Systems

-

This section describes how to develop software for embedded systems using Carbide.c++ compilers. Embedded systems topics include:

- -

NOTE This chapter discusses program design strategies for embedded systems and is not meant to be a definitive solution. Currently, you can use the Carbide.c++ compiler to develop embedded systems that are compatible with Embedded C++ (EC++).

- - - - - + + + + + +C++ and Embedded Systems + + + +

C++ and Embedded Systems

+

This section describes how to develop software for embedded systems using Carbide.c++ compilers. Embedded systems topics include:

+ +

NOTE This chapter discusses program design strategies for embedded systems and is not meant to be a definitive solution. Currently, you can use the Carbide.c++ compiler to develop embedded systems that are compatible with Embedded C++ (EC++).

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_as_warnings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_as_warnings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_as_warnings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,19 +1,19 @@ - - - - - -Warnings as Errors - - - -

Warnings as Errors

-

If you enable the Treat All Warnings as Errors setting, the compiler treats all warnings as though they were errors. It does not compile a file successfully until you resolve all warnings.

-

The Treat All Warnings as Errors setting corresponds to the pragma warning_errors. To check this setting, use __option (warning_errors).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Warnings as Errors + + + +

Warnings as Errors

+

If you enable the Treat All Warnings as Errors setting, the compiler treats all warnings as though they were errors. It does not compile a file successfully until you resolve all warnings.

+

The Treat All Warnings as Errors setting corresponds to the pragma warning_errors. To check this setting, use __option (warning_errors).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_bad_conversions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_bad_conversions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_bad_conversions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,20 +1,20 @@ - - - - - -Bad Conversions of Pointer Values - - - -

Bad Conversions of Pointer Values

-

Use either of the following pragmas to detect bad pointer value conversions:

-
    -
  • Enable the pragma warn_ptr_int_conv to have the compiler issue a warning when an expression converts a pointer value to an integral value that is not large enough to hold a pointer value.
  • -
  • Enable the pragma warn_any_ptr_int_conv to have the compiler issue a warning when an expression converts a pointer value to an integral value that is not large enough to hold a pointer value or vice versa.
  • -
- - - - - + + + + + +Bad Conversions of Pointer Values + + + +

Bad Conversions of Pointer Values

+

Use either of the following pragmas to detect bad pointer value conversions:

+
    +
  • Enable the pragma warn_ptr_int_conv to have the compiler issue a warning when an expression converts a pointer value to an integral value that is not large enough to hold a pointer value.
  • +
  • Enable the pragma warn_any_ptr_int_conv to have the compiler issue a warning when an expression converts a pointer value to an integral value that is not large enough to hold a pointer value or vice versa.
  • +
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_common.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_common.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_common.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,44 +1,44 @@ - - - - - -Common Errors - - - -

Common Errors

-

If you enable the Possible Errors setting, the compiler generates a warning if it encounters common errors such as the following:

-
    -
  • An assignment in either a logical expression or the conditional portion of an if, while, or for expression. This warning is useful if you use = when you mean to use ==. An example of confusing = and == in comparisons:
  • -
-
-

if (a=b) f(); // WARNING: a=b is an assignment
- if ((a=b)!=0) f(); // OK: (a=b)!=0 is a comparison, no warning
- if (a==b) f(); // OK: (a==b) is a comparison, no warning

-
-
    -
  • An equal comparison in a statement that contains a single expression. This check is useful if you use == when you meant to use =. An example of confusing = and == operators in assignments:
  • -
-
-

a == 0; // WARNING: This is a comparison.
- a = 0; // OK: This is an assignment, no warning

-
-
    -
  • A semicolon (;) directly after a while, if, or for statement. For example, the following statement generates a warning and is probably an unintended infinite loop:
  • -
-
-

while (i++); // WARNING: Unintended infinite loop

-

If you intended to create an infinite loop, put white space or a comment between the while statement and the semicolon.

-

These statements suppress the above errors or warnings.

-

while (i++) ; // OK: White space separation, no warning
- while (i++) /*: Comment separation, no warning */ ;

-
-

The Possible Errors setting corresponds to the pragma warn_possunwant. To check this setting, use __option (warn_possunwant).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Common Errors + + + +

Common Errors

+

If you enable the Possible Errors setting, the compiler generates a warning if it encounters common errors such as the following:

+
    +
  • An assignment in either a logical expression or the conditional portion of an if, while, or for expression. This warning is useful if you use = when you mean to use ==. An example of confusing = and == in comparisons:
  • +
+
+

if (a=b) f(); // WARNING: a=b is an assignment
+ if ((a=b)!=0) f(); // OK: (a=b)!=0 is a comparison, no warning
+ if (a==b) f(); // OK: (a==b) is a comparison, no warning

+
+
    +
  • An equal comparison in a statement that contains a single expression. This check is useful if you use == when you meant to use =. An example of confusing = and == operators in assignments:
  • +
+
+

a == 0; // WARNING: This is a comparison.
+ a = 0; // OK: This is an assignment, no warning

+
+
    +
  • A semicolon (;) directly after a while, if, or for statement. For example, the following statement generates a warning and is probably an unintended infinite loop:
  • +
+
+

while (i++); // WARNING: Unintended infinite loop

+

If you intended to create an infinite loop, put white space or a comment between the while statement and the semicolon.

+

These statements suppress the above errors or warnings.

+

while (i++) ; // OK: White space separation, no warning
+ while (i++) /*: Comment separation, no warning */ ;

+
+

The Possible Errors setting corresponds to the pragma warn_possunwant. To check this setting, use __option (warn_possunwant).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_empty_decl.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_empty_decl.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_empty_decl.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Empty Declarations - - - -

Empty Declarations

-

If you enable the Empty Declarations setting, the compiler issues a warning when it encounters a declaration with no variable name.
-For example:

-

int ; // WARNING
- int i; // OK

-

The Empty Declarations setting corresponds to the pragma warn_emptydecl. To check this setting, use __option (warn_emptydecl).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Empty Declarations + + + +

Empty Declarations

+

If you enable the Empty Declarations setting, the compiler issues a warning when it encounters a declaration with no variable name.
+For example:

+

int ; // WARNING
+ int i; // OK

+

The Empty Declarations setting corresponds to the pragma warn_emptydecl. To check this setting, use __option (warn_emptydecl).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_extra_commas.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_extra_commas.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_extra_commas.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,20 +1,20 @@ - - - - - -Extra Commas - - - -

Extra Commas

-

If you enable the Extra Commas setting, the compiler generates a warning when it encounters an extra comma. For example, this statement is legal in C but generates a warning when you enable this setting:

-

int a[] = { 1, 2, 3, 4, }; // ^ WARNING: Extra comma after 4

-

The Extra Commas setting corresponds to the pragma warn_extracomma. To check this setting, use __option (warn_extracomma).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Extra Commas + + + +

Extra Commas

+

If you enable the Extra Commas setting, the compiler generates a warning when it encounters an extra comma. For example, this statement is legal in C but generates a warning when you enable this setting:

+

int a[] = { 1, 2, 3, 4, }; // ^ WARNING: Extra comma after 4

+

The Extra Commas setting corresponds to the pragma warn_extracomma. To check this setting, use __option (warn_extracomma).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_hidden_virtual_fn.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_hidden_virtual_fn.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_hidden_virtual_fn.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,31 +1,31 @@ - - - - - -Hidden Virtual Functions - - - -

Hidden Virtual Functions

-

If you enable the Hidden virtual functions setting, the compiler generates a warning if you declare a non-virtual member function in a subclass that hides an inherited virtual function in a superclass. One function hides another if it has the same name but a different argument type. An example of hidden virtual functions:

-
-

class A {
- public:
- virtual void f(int);
- virtual void g(int);
- };

-

class B: public A {
- public:
- void f(char); // WARNING: Hides A::f(int)
- virtual void g(int); // OK: Overrides A::g(int)
- };

-
-

The Hidden virtual functions setting corresponds to the pragma warn_hidevirtual. To check this setting, use __option (warn_hidevirtual).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Hidden Virtual Functions + + + +

Hidden Virtual Functions

+

If you enable the Hidden virtual functions setting, the compiler generates a warning if you declare a non-virtual member function in a subclass that hides an inherited virtual function in a superclass. One function hides another if it has the same name but a different argument type. An example of hidden virtual functions:

+
+

class A {
+ public:
+ virtual void f(int);
+ virtual void g(int);
+ };

+

class B: public A {
+ public:
+ void f(char); // WARNING: Hides A::f(int)
+ virtual void g(int); // OK: Overrides A::g(int)
+ };

+
+

The Hidden virtual functions setting corresponds to the pragma warn_hidevirtual. To check this setting, use __option (warn_hidevirtual).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_ignore_fn.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_ignore_fn.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_ignore_fn.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Ignored Function Results - - - -

Ignored Function Results

-

If you enable the pragma warn_resultnotused, the compiler issues a warning when it encounters a statement that calls a function without using its result. To prevent this warning, cast the statement with (void). See Listing 6.13 for an example.

-
-
Listing 6.13 Example of Pragma warn_resultnotused
-

#pragma warn_resultnotused on
- void foo(int a,int b)
- {
- bar(); // warning: result of bar() is not used
- (void)bar(); // void cast suppresses warning
- }
-

-
- - - - - + + + + + +Ignored Function Results + + + +

Ignored Function Results

+

If you enable the pragma warn_resultnotused, the compiler issues a warning when it encounters a statement that calls a function without using its result. To prevent this warning, cast the statement with (void). See Listing 6.13 for an example.

+
+
Listing 6.13 Example of Pragma warn_resultnotused
+

#pragma warn_resultnotused on
+ void foo(int a,int b)
+ {
+ bar(); // warning: result of bar() is not used
+ (void)bar(); // void cast suppresses warning
+ }
+

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_ill_pragmas.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_ill_pragmas.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_ill_pragmas.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Illegal Pragmas - - - -

Illegal Pragmas

-

If you enable the Illegal Pragmas setting, the compiler issues a warning when it encounters a pragma it does not recognize. For example, the pragma statements below generate warnings with the Illegal Pragmas setting enabled:

-

#pragma near_data off // WARNING: near_data is not a pragma.
- #pragma far_data select // WARNING: select is not defined
-#pragma far_data on // OK

-

The Illegal Pragmas setting corresponds to the pragma warn_illpragma, described at warn_illpragma”. To check this setting, use __option (warn_illpragma).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Illegal Pragmas + + + +

Illegal Pragmas

+

If you enable the Illegal Pragmas setting, the compiler issues a warning when it encounters a pragma it does not recognize. For example, the pragma statements below generate warnings with the Illegal Pragmas setting enabled:

+

#pragma near_data off // WARNING: near_data is not a pragma.
+ #pragma far_data select // WARNING: select is not defined
+#pragma far_data on // OK

+

The Illegal Pragmas setting corresponds to the pragma warn_illpragma, described at warn_illpragma”. To check this setting, use __option (warn_illpragma).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_implicit_math.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_implicit_math.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_implicit_math.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,48 +1,48 @@ - - - - - -Implicit Arithmetic Conversions - - - -

Implicit Arithmetic Conversions

-

The compiler converts values automatically from one type to another to perform some operations (ISO C, §3.2 and ISO C++, §4). These kinds of conversions are called “implicit conversions” because they are not explicitly stated in the source code.

-

The rules the compiler follows for deciding when to apply implicit conversions sometimes gives results you do not expect. If you enable the Implicit Arithmetic Conversions setting, the compiler issues a warning when it applies implicit conversions:

-
    -
  • the destination of an operation is not large enough to hold all possible results
  • -
  • a signed value is implicitly converted to an unsigned value
  • -
  • an integer value is implicitly converted to a floating-point value
  • -
  • a floating-point value is implicitly converted to an integer value
  • -
-

For example, assigning the value of a variable of type long to a variable of type char results in a warning if you enable this setting.

-

The compiler also has pragmas that control specific of implicit conversions the compiler warns about (Table 6.1).

-
Table 6.1 Implicit Arithmetic Conversion Pragmas
- - - - - - - - - - - - - - - - - - - - - -
This pragma…Warns about this kind of conversion
warn_illunionmembersa floating point value to an integer value
warn_impl_i2f_convan integer value to a floating-point value
warn_impl_s2u_conva signed value to an unsigned value
warn_implicitconvall; this pragma is equivalent to the Implicit Arithmetic Conversions setting
- - - - - + + + + + +Implicit Arithmetic Conversions + + + +

Implicit Arithmetic Conversions

+

The compiler converts values automatically from one type to another to perform some operations (ISO C, §3.2 and ISO C++, §4). These kinds of conversions are called “implicit conversions” because they are not explicitly stated in the source code.

+

The rules the compiler follows for deciding when to apply implicit conversions sometimes gives results you do not expect. If you enable the Implicit Arithmetic Conversions setting, the compiler issues a warning when it applies implicit conversions:

+
    +
  • the destination of an operation is not large enough to hold all possible results
  • +
  • a signed value is implicitly converted to an unsigned value
  • +
  • an integer value is implicitly converted to a floating-point value
  • +
  • a floating-point value is implicitly converted to an integer value
  • +
+

For example, assigning the value of a variable of type long to a variable of type char results in a warning if you enable this setting.

+

The compiler also has pragmas that control specific of implicit conversions the compiler warns about (Table 6.1).

+
Table 6.1 Implicit Arithmetic Conversion Pragmas
+ + + + + + + + + + + + + + + + + + + + + +
This pragma…Warns about this kind of conversion
warn_illunionmembersa floating point value to an integer value
warn_impl_i2f_convan integer value to a floating-point value
warn_impl_s2u_conva signed value to an unsigned value
warn_implicitconvall; this pragma is equivalent to the Implicit Arithmetic Conversions setting
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_inline_fn.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_inline_fn.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_inline_fn.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,19 +1,19 @@ - - - - - -inline Functions That Are Not Inlined - - - -

inline Functions That Are Not Inlined

-

If you enable the Non-Inlined Functions setting, the compiler issues a warning when it cannot inline a function.

-

This setting corresponds to pragma warn_notinlined. To check this setting, use __option (warn_notinlined).

-

See Checking Option Settings for information on how to use this directive. -

- - - - - + + + + + +inline Functions That Are Not Inlined + + + +

inline Functions That Are Not Inlined

+

If you enable the Non-Inlined Functions setting, the compiler issues a warning when it cannot inline a function.

+

This setting corresponds to pragma warn_notinlined. To check this setting, use __option (warn_notinlined).

+

See Checking Option Settings for information on how to use this directive. +

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_mixed_use.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_mixed_use.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_mixed_use.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Mixed Use of ‘class’ and ‘struct’ Keywords - - - -

Mixed Use of ‘class’ and ‘struct’ Keywords

-

If you enable the Inconsistent ‘class’ / ‘struct’ Usage setting, the compiler issues a warning if you use the class and struct keywords in the definition and declaration of the same identifier.

-

class X;
- struct X { int a; }; // warning

-

Use this warning when using static or dynamic libraries to link with object code produced by another C++ compiler that distinguishes between class and structure variables in its name “mangling.”

-

This setting corresponds to pragma warn_structclass. To check this setting, use __option (warn_structclass).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Mixed Use of ‘class’ and ‘struct’ Keywords + + + +

Mixed Use of ‘class’ and ‘struct’ Keywords

+

If you enable the Inconsistent ‘class’ / ‘struct’ Usage setting, the compiler issues a warning if you use the class and struct keywords in the definition and declaration of the same identifier.

+

class X;
+ struct X { int a; }; // warning

+

Use this warning when using static or dynamic libraries to link with object code produced by another C++ compiler that distinguishes between class and structure variables in its name “mangling.”

+

This setting corresponds to pragma warn_structclass. To check this setting, use __option (warn_structclass).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_realigned_data.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_realigned_data.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_realigned_data.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - -Realigned Data Structures - - - -

Realigned Data Structures

-

If you enable the pragma warn_padding, the compiler warns about any bytes it adds to data structures to improve their memory alignment. Refer to the appropriate Targeting manual for more information on how the compiler pads data structures for a particular processor or operating system.

-

This pragma reports warnings for C source code only. It does not report warnings for C++ source code.
-

- - - - - + + + + + +Realigned Data Structures + + + +

Realigned Data Structures

+

If you enable the pragma warn_padding, the compiler warns about any bytes it adds to data structures to improve their memory alignment. Refer to the appropriate Targeting manual for more information on how the compiler pads data structures for a particular processor or operating system.

+

This pragma reports warnings for C source code only. It does not report warnings for C++ source code.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_redundent.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_redundent.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_redundent.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Redundant Statements - - - -

Redundant Statements

-

If you enable the pragma warn_no_side_effect, the compiler issues a warning when it encounters a statement that produces no side effect. To prevent a statement with no side effects from signalling this warning, cast the statement with (void). See Listing 6.12 for an example.

-
-
Listing 6.12 Example of Pragma warn_no_side_effect
-

#pragma warn_no_side_effect on
- void foo(int a,int b)
- {
- a+b; // warning: expression has no side effect
- (void)(a+b); // void cast suppresses warning
- }
-

-
- - - - - + + + + + +Redundant Statements + + + +

Redundant Statements

+

If you enable the pragma warn_no_side_effect, the compiler issues a warning when it encounters a statement that produces no side effect. To prevent a statement with no side effects from signalling this warning, cast the statement with (void). See Listing 6.12 for an example.

+
+
Listing 6.12 Example of Pragma warn_no_side_effect
+

#pragma warn_no_side_effect on
+ void foo(int a,int b)
+ {
+ a+b; // warning: expression has no side effect
+ (void)(a+b); // void cast suppresses warning
+ }
+

+
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_suspicious_assgn.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_suspicious_assgn.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_suspicious_assgn.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,64 +1,64 @@ - - - - - -Suspicious Assignments and Incorrect Function Returns - - - -

Suspicious Assignments and Incorrect Function Returns

-

If you enable the Extended Error Checking setting, the C compiler generates a warning if it encounters one of the following potential problems:

-
    -
  • A non-void function that does not contain a return statement. For example, the source code in Listing 1 generates a warning.
  • -
-
-
-

Listing 1. Non-void Function with no return Statement

-

main() /* assumed to return int */
- {
- printf ("hello world\n");
- } /* WARNING: no return statement */
- Listing 6.8 does not generate a warning.
- Listing 6.8 Explicitly Specifying a Function’s void Return Type
- void main() /* function declared to return void */
- {
- printf ("hello world\n");
- }
-

-
-
-
    -
  • An integer or floating-point value assigned to an enum type. Listing 2 shows an example. -
  • -
-
-
-
Listing 2. Assigning to an Enumerated Type
-

enum Day { Sunday, Monday, Tuesday, Wednesday,
- Thursday, Friday, Saturday } d;

-

d = 5; /* WARNING */
- d = Monday; /* OK */
- d = (Day)3 ; /* OK */
-• An empty return statement in a function that is not declared void. For example, the following code results in a warning:
- int MyInit(void)
- {
- int err = GetMyResources();
- if (err!=0) return; /* ERROR: Empty return statement */

-

/* ... */
- This is OK:
- int MyInit(void)
- {
- int err = GetMyResources();
- if (err!=0) return -1; /* OK */

-

/* ... */

-
-
-

The Extended Error Checking setting corresponds to the pragma extended_errorcheck, described at extended_errorcheck. To check this setting, use __option (extended_errorcheck).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Suspicious Assignments and Incorrect Function Returns + + + +

Suspicious Assignments and Incorrect Function Returns

+

If you enable the Extended Error Checking setting, the C compiler generates a warning if it encounters one of the following potential problems:

+
    +
  • A non-void function that does not contain a return statement. For example, the source code in Listing 1 generates a warning.
  • +
+
+
+

Listing 1. Non-void Function with no return Statement

+

main() /* assumed to return int */
+ {
+ printf ("hello world\n");
+ } /* WARNING: no return statement */
+ Listing 6.8 does not generate a warning.
+ Listing 6.8 Explicitly Specifying a Function’s void Return Type
+ void main() /* function declared to return void */
+ {
+ printf ("hello world\n");
+ }
+

+
+
+
    +
  • An integer or floating-point value assigned to an enum type. Listing 2 shows an example. +
  • +
+
+
+
Listing 2. Assigning to an Enumerated Type
+

enum Day { Sunday, Monday, Tuesday, Wednesday,
+ Thursday, Friday, Saturday } d;

+

d = 5; /* WARNING */
+ d = Monday; /* OK */
+ d = (Day)3 ; /* OK */
+• An empty return statement in a function that is not declared void. For example, the following code results in a warning:
+ int MyInit(void)
+ {
+ int err = GetMyResources();
+ if (err!=0) return; /* ERROR: Empty return statement */

+

/* ... */
+ This is OK:
+ int MyInit(void)
+ {
+ int err = GetMyResources();
+ if (err!=0) return -1; /* OK */

+

/* ... */

+
+
+

The Extended Error Checking setting corresponds to the pragma extended_errorcheck, described at extended_errorcheck. To check this setting, use __option (extended_errorcheck).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_unused_args.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_unused_args.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_unused_args.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,46 +1,46 @@ - - - - - -Unused Arguments - - - -

Unused Arguments

-

If you enable the Unused Arguments setting, the compiler generates a warning when it encounters an argument you declare but do not use. This check helps you find arguments that you either misspelled or did not use in your program.

-

void foo(int temp,int errer); // ERROR: errer is misspelled
- {
- error = do_something(); // WARNING: temp and error are
- // unused.
-}

-

You can declare an argument that you do not use in two ways without receiving this warning:

-
    -
  • Use the pragma unused, as in this example:
  • -
-
-

void foo(int temp, int error)
- {
- #pragma unused (temp)
- /* Compiler does not warn that temp is not used */
- error=do_something();
- }

-
- -
-

void foo(int /* temp */, int error)
- {
- /* Compiler does not warn that "temp" is not used.
- error=do_something(); */
- }

-
-

The Unused Arguments setting corresponds to the pragma warn_unusedarg, described at warn_unusedarg. To check this setting, use __option (warn_unusedarg).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Unused Arguments + + + +

Unused Arguments

+

If you enable the Unused Arguments setting, the compiler generates a warning when it encounters an argument you declare but do not use. This check helps you find arguments that you either misspelled or did not use in your program.

+

void foo(int temp,int errer); // ERROR: errer is misspelled
+ {
+ error = do_something(); // WARNING: temp and error are
+ // unused.
+}

+

You can declare an argument that you do not use in two ways without receiving this warning:

+
    +
  • Use the pragma unused, as in this example:
  • +
+
+

void foo(int temp, int error)
+ {
+ #pragma unused (temp)
+ /* Compiler does not warn that temp is not used */
+ error=do_something();
+ }

+
+ +
+

void foo(int /* temp */, int error)
+ {
+ /* Compiler does not warn that "temp" is not used.
+ error=do_something(); */
+ }

+
+

The Unused Arguments setting corresponds to the pragma warn_unusedarg, described at warn_unusedarg. To check this setting, use __option (warn_unusedarg).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_unused_vars.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_unused_vars.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/errors/err_unused_vars.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,44 +1,44 @@ - - - - - -Unused Variables - - - - -

Unused Variables

-

If you enable the Unused Variables setting, the compiler generates a warning when it encounters a local variable you declare but do not use. This check helps you find variables that you either misspelled or did not use in your program. Listing 1 shows an example.

-
-
Listing 1. Unused Local Variables Example
-

int error;
- void foo(void)
- {
- int temp, errer; // ERROR: errer is misspelled
- error = do_something()
- // WARNING: temp and error are unused.
- }

-
-

If you want to use this warning but need to declare a variable that you do not use, include the pragma unused, as in Listing 2.

-
-
Listing 2. Suppressing Unused Variable Warnings
-

void foo(void)
- {
- int i, temp, error;

-

#pragma unused (i, temp) /* Do not warn that i and temp */
- error=do_something(); /* are not used */
- }

-
-

The Unused Variables setting corresponds to the pragma warn_unusedvar, described at warn_unusedvar. To check this setting, use __option (warn_unusedvar).

-

See Checking Option Settings for information on how to use this directive.
-

- - - - - + + + + + +Unused Variables + + + + +

Unused Variables

+

If you enable the Unused Variables setting, the compiler generates a warning when it encounters a local variable you declare but do not use. This check helps you find variables that you either misspelled or did not use in your program. Listing 1 shows an example.

+
+
Listing 1. Unused Local Variables Example
+

int error;
+ void foo(void)
+ {
+ int temp, errer; // ERROR: errer is misspelled
+ error = do_something()
+ // WARNING: temp and error are unused.
+ }

+
+

If you want to use this warning but need to declare a variable that you do not use, include the pragma unused, as in Listing 2.

+
+
Listing 2. Suppressing Unused Variable Warnings
+

void foo(void)
+ {
+ int i, temp, error;

+

#pragma unused (i, temp) /* Do not warn that i and temp */
+ error=do_something(); /* are not used */
+ }

+
+

The Unused Variables setting corresponds to the pragma warn_unusedvar, described at warn_unusedvar. To check this setting, use __option (warn_unusedvar).

+

See Checking Option Settings for information on how to use this directive.
+

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/images/about.png Binary file core/com.nokia.carbide.cpp.compiler.doc.user/html/images/about.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/images/about_cpp.png Binary file core/com.nokia.carbide.cpp.compiler.doc.user/html/images/about_cpp.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/images/gold_header.png Binary file core/com.nokia.carbide.cpp.compiler.doc.user/html/images/gold_header.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/images/mwccsym2_version.png Binary file core/com.nokia.carbide.cpp.compiler.doc.user/html/images/mwccsym2_version.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/conventions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/conventions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/conventions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,44 +1,44 @@ - - - - - -Conventions Used in This Reference - - - -

Conventions Used in This Reference

-

References to a chapter or section number in The C International Standard (ISO/IEC 9899:1999) appear as (ISO C, §number).

-

References to a chapter or section number in The C++ International Standard (ISO/IEC: 14882) appear as (ISO C++, §number).

-

This manual also uses syntax examples that describe the format of C source code statements:

-

#pragma parameter [return-reg] func-name [param-regs]

-

#pragma optimize_for_size on | off | reset

-

Table 1. describes how to interpret these statements.

-

Table 1. Understanding Syntax Examples

- - - - - - - - - - - - - - - - - - - - - -
If the text looks like…Then…
literalInclude the text in your statement exactly as you see it.
metasymbolReplace the symbol with an appropriate value. The text after the syntax example describes what the appropriate values are.
a | b | cUse one of the symbols in the statement: either a, b, or c.
[a]Include the symbol, a, only if necessary. The text after the syntax example describes when to include it.
- - - - - + + + + + +Conventions Used in This Reference + + + +

Conventions Used in This Reference

+

References to a chapter or section number in The C International Standard (ISO/IEC 9899:1999) appear as (ISO C, §number).

+

References to a chapter or section number in The C++ International Standard (ISO/IEC: 14882) appear as (ISO C++, §number).

+

This manual also uses syntax examples that describe the format of C source code statements:

+

#pragma parameter [return-reg] func-name [param-regs]

+

#pragma optimize_for_size on | off | reset

+

Table 1. describes how to interpret these statements.

+

Table 1. Understanding Syntax Examples

+ + + + + + + + + + + + + + + + + + + + + +
If the text looks like…Then…
literalInclude the text in your statement exactly as you see it.
metasymbolReplace the symbol with an appropriate value. The text after the syntax example describes what the appropriate values are.
a | b | cUse one of the symbols in the statement: either a, b, or c.
[a]Include the symbol, a, only if necessary. The text after the syntax example describes when to include it.
+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/documentation.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/documentation.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/documentation.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - - - - -Where to Look for Related Information - - - -

Where to Look for Related Information

-

Additional information on programming for the Symbian OS using Carbide.c++ and SDKs can be found at:

- -

For general information on using the Carbide IDE and debugger, see the Carbide.c++ User Guide.

- - - - - + + + + + +Where to Look for Related Information + + + +

Where to Look for Related Information

+

Additional information on programming for the Symbian OS using Carbide.c++ and SDKs can be found at:

+ +

For general information on using the Carbide IDE and debugger, see the Carbide.c++ User Guide.

+ + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/intro.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/intro.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/intro.htm Wed Jul 21 12:11:48 2010 -0500 @@ -26,7 +26,7 @@
  • Conventions Used in this Reference
  • - + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/new_features.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/new_features.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/new_features.htm Wed Jul 21 12:11:48 2010 -0500 @@ -5,11 +5,50 @@ New Features & Bug Fixes +

    New Features & Bug Fixes

    -

    A list of bug fixes for the compiler and linker can be found in the Symbian_x86_BuildTools_Notes.txt file located in the <Carbide_Install_Dir>\x86Build\Release_Notes directory.

    +

    A list of bug fixes for the compiler and linker can be found in the Symbian_x86_BuildTools_Notes.txt file located in the <Carbide_Install_Dir>\x86Build\Release_Notes directory. The latest build information is always available on the Symbian Foundation Wiki under WINSCW (build version information).

    This reference has new and updated topics:

    +
    3.2.5 Build 489
    +
      +
    • Corrected an issue that prevented compiling of files with different case handling across different OS systems.
    • +
    +
    3.2.5 Build 488
    +
      +
    • Fixed an issue where a const exception is thrown but it was not getting caught by a non const catch block.
    • +
    • Fixed an internal compiler error in floating point code generation during optimization.
    • +
    +
    3.2.5 Build 487
    +
      +
    • IMPORTANT WINSCW COMPILER change - the WINSCW compiler 3.2.5 build 487 provides new name mangling to support critical exception handling. Without this change an exception can cause a program or system crash. For more information visit the WINSCW wiki page.
      +
    • +
    • Made "-def_for_structclass on" the default.
    • +
    +
    3.2.5 Build 486
    +
      +
    • Fixed a C file compile error when assigning a DLL import function name to a function pointer.
    • +
    +
    3.2.5 Build 485
    +
      +
    • Fixed a codegen bug when a bit field object with post-decrement is used as a while loop counter.
    • +
    +
    3.2.5 Build 482
    +
      +
    • Fixed a bad assert flagging false an internal compiler error.
    • +
    +
    3.2.5 Build 481
    +
      +
    • Default constructor initialized to zero to comply with C++ standard §5.3.4.15.
    • +
    • Fixed an issue for bad relocation type in reference to the destructor of an imported class from a DLL.
    • +
    • Reverted bugfix on the issue around forward declaration in class/struct conflicting with definition, we added a new command line switch -def_for_structclass on, and #pragma def_for_structclass for the picking up the definition instead of forward declaration.
    • +
    +

    Previous releases

    • See pragma gcc_extensions for GCC improvements
    • See pragma c99 for C99 improvements
    • @@ -134,7 +173,7 @@
    • Information in this manual now uses references to the ISO C and C++ standards instead of Ellis and Stroustrup’s The Annotated C++ Reference Manual (ARM) and Kernighan and Richie’s The C Programming Language (K&R).
    - + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/version.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/version.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/introduction/version.htm Wed Jul 21 12:11:48 2010 -0500 @@ -10,7 +10,7 @@

    Verifying the Compiler Version

    To determine what version of the Carbide.c++ compiler you are using, follow the steps below.

    NOTE The Carbide.c++ compiler is stored in <Carbide_Install_Dir>\x86Build\Symbian_Tools\Command_Line_Tools.

    -

    +

    Figure 1. Getting compiler version using Command Prompt.

    From the Carbide IDE

    @@ -48,7 +48,7 @@

    - + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/legal.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/legal.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/legal.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,34 +1,34 @@ - - - - - - Legal - - - - -

    License Information

    -
    COPYRIGHTS
    -

    Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: http://www.eclipse.org/legal/epl-v10.html

    -
    NOTICES
    -

    Portions of this product are covered by the following licenses:

    - -

     

    - + + + + + + Legal + + + + +

    License Information

    +
    COPYRIGHTS
    +

    Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: http://www.eclipse.org/legal/epl-v10.html

    +
    NOTICES
    +

    Portions of this product are covered by the following licenses:

    + +

     

    + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_inst_manager.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_inst_manager.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_inst_manager.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,17 +1,17 @@ - - - - - -Use Instance Manager - - - -

    Use Instance Manager

    -

    The Use Instance Manager option reduces compile time by telling the compiler to generate any instance of a template (or non-inlined inline) function only once. Object code size and associated debug information size is reduced. This does not affect the output file size, though, since the compiler is effectively doing the same task as the linker in this mode.

    -

    You can control where the instance database is stored using the #pragma instmgr_file.

    - - - - - + + + + + +Use Instance Manager + + + +

    Use Instance Manager

    +

    The Use Instance Manager option reduces compile time by telling the compiler to generate any instance of a template (or non-inlined inline) function only once. Object code size and associated debug information size is reduced. This does not affect the output file size, though, since the compiler is effectively doing the same task as the linker in this mode.

    +

    You can control where the instance database is stored using the #pragma instmgr_file.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_pragma_scope.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_pragma_scope.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_pragma_scope.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,35 +1,35 @@ - - - - - -Pragma Scope in Precompiled Files - - - -

    Pragma Scope in Precompiled Files

    -

    Pragma settings inside a precompiled file affect only the source code within that file. The pragma settings for an item declared in a precompiled header file (such as data or a function) are saved then restored when the precompiled header file is included.

    -

    For example, the source code in Listing 5.3 specifies that the variable xxx is a far variable.

    -
    -
    Listing 5.3 Pragma Settings in a Precompiled Header
    -

    // my_pch.pch
    - // Generate a precompiled header named pch.mch.

    -

    #pragma precompile_target "my_pch.mch"

    -

    #pragma far_data on
    - extern int xxx;

    -
    -

    The source code in Listing 5.4 includes the precompiled version of Listing 5.3.

    -
    -
    Listing 5.4 Pragma Settings in an Included Precompiled File
    -

    // test.c
    - #pragma far_data off // far data is disabled
    - #include "my_pch.mch" // this precompiled file sets far_data on
    - // far_data is still off but xxx is still a far variable

    -
    -

    The pragma setting in the precompiled file is active within the precompiled file, even though the source file including the precompiled file has a different setting. -

    - - - - - + + + + + +Pragma Scope in Precompiled Files + + + +

    Pragma Scope in Precompiled Files

    +

    Pragma settings inside a precompiled file affect only the source code within that file. The pragma settings for an item declared in a precompiled header file (such as data or a function) are saved then restored when the precompiled header file is included.

    +

    For example, the source code in Listing 5.3 specifies that the variable xxx is a far variable.

    +
    +
    Listing 5.3 Pragma Settings in a Precompiled Header
    +

    // my_pch.pch
    + // Generate a precompiled header named pch.mch.

    +

    #pragma precompile_target "my_pch.mch"

    +

    #pragma far_data on
    + extern int xxx;

    +
    +

    The source code in Listing 5.4 includes the precompiled version of Listing 5.3.

    +
    +
    Listing 5.4 Pragma Settings in an Included Precompiled File
    +

    // test.c
    + #pragma far_data off // far data is disabled
    + #include "my_pch.mch" // this precompiled file sets far_data on
    + // far_data is still off but xxx is still a far variable

    +
    +

    The pragma setting in the precompiled file is active within the precompiled file, even though the source file including the precompiled file has a different setting. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_auto.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_auto.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_auto.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -Updating a Precompiled File Automatically - - - -

    Updating a Precompiled File Automatically

    -

    Use the Carbide IDE’s project manager to update a precompiled header automatically. The IDE creates a precompiled file from a source code file during a compile, update, or make operation if the source code file meets these criteria:

    -
      -
    • The text file name ends with .pch (for C header files) or .pch++ (for C++ header files)
    • -
    • The file is in a project’s build target
    • -
    • The file uses the pragma precompile_target pragma
    • -
    • The file, or files it depends on, have been modified
    • -
    -

    See the Carbide IDE User Guide for information on how the IDE determines that a file must be updated.

    -

    The IDE uses the build target’s settings to preprocess and precompile files.
    -

    - - - - - + + + + + +Updating a Precompiled File Automatically + + + +

    Updating a Precompiled File Automatically

    +

    Use the Carbide IDE’s project manager to update a precompiled header automatically. The IDE creates a precompiled file from a source code file during a compile, update, or make operation if the source code file meets these criteria:

    +
      +
    • The text file name ends with .pch (for C header files) or .pch++ (for C++ header files)
    • +
    • The file is in a project’s build target
    • +
    • The file uses the pragma precompile_target pragma
    • +
    • The file, or files it depends on, have been modified
    • +
    +

    See the Carbide IDE User Guide for information on how the IDE determines that a file must be updated.

    +

    The IDE uses the build target’s settings to preprocess and precompile files.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_files.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_files.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_files.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,19 +1,19 @@ - - - - - -When to Use Precompiled Files - - - -

    When to Use Precompiled Files

    -

    Source code files in a project typically use many header files. Typically, the same header files are included by each source code file in a project, forcing the compiler to read these same header files repeatedly during compilation. To shorten the time spent compiling and recompiling the same header files, Carbide C/C++ can precompile a header file, allowing it to be subsequently preprocessed much faster than a regular text source code file.

    -

    For example, as a convenience, programmers often create a header file that contains commonly-used preprocessor definitions and includes frequently-used header files. This header file is then included by each source code file in the project, saving the programmer some time and effort while writing source code.

    -

    This convenience comes at a cost, though. While the programmer saves time typing, the compiler does extra work, preprocessing and compiling this header file each time it compiles a source code file that includes it.

    -

    This header file can be precompiled so that, instead of preprocessing multiple duplications, the compiler needs to load just one precompiled header file.

    - - - - - + + + + + +When to Use Precompiled Files + + + +

    When to Use Precompiled Files

    +

    Source code files in a project typically use many header files. Typically, the same header files are included by each source code file in a project, forcing the compiler to read these same header files repeatedly during compilation. To shorten the time spent compiling and recompiling the same header files, Carbide C/C++ can precompile a header file, allowing it to be subsequently preprocessed much faster than a regular text source code file.

    +

    For example, as a convenience, programmers often create a header file that contains commonly-used preprocessor definitions and includes frequently-used header files. This header file is then included by each source code file in the project, saving the programmer some time and effort while writing source code.

    +

    This convenience comes at a cost, though. While the programmer saves time typing, the compiler does extra work, preprocessing and compiling this header file each time it compiles a source code file that includes it.

    +

    This header file can be precompiled so that, instead of preprocessing multiple duplications, the compiler needs to load just one precompiled header file.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_ide.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_ide.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_ide.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,33 +1,33 @@ - - - - - -Precompiling a File in the Carbide IDE - - - -

    Precompiling a File in the Carbide IDE

    -

    To precompile a file in the Carbide IDE, use the Precompile command in the Project menu:

    -
    -
      -
    1. Start the Carbide IDE.
    2. -
    3. Open or create a project.
    4. -
    5. Choose or create a build target in the project.
    6. -

      The settings in the project’s active build target will be used when preprocessing and precompiling the file you want to precompile.

      -
    7. Open the source code file to precompile.
    8. -

      See “What Can be Precompiled” for information on what a precompiled file may contain.

      -
    9. From the Project menu, choose Precompile.
    10. -

      A save dialog box appears.

      -
    11. Choose a location and type a name for the new precompiled file.
    12. -

      The IDE precompiles the file and saves it.

      -
    13. Click Save.
    14. -

      The save dialog box closes, and the IDE precompiles the file you opened, saving it in the folder you specified, giving it the name you specified.

      -
    -
    -

    You may now include the new precompiled file in source code files.

    - - - - - + + + + + +Precompiling a File in the Carbide IDE + + + +

    Precompiling a File in the Carbide IDE

    +

    To precompile a file in the Carbide IDE, use the Precompile command in the Project menu:

    +
    +
      +
    1. Start the Carbide IDE.
    2. +
    3. Open or create a project.
    4. +
    5. Choose or create a build target in the project.
    6. +

      The settings in the project’s active build target will be used when preprocessing and precompiling the file you want to precompile.

      +
    7. Open the source code file to precompile.
    8. +

      See “What Can be Precompiled” for information on what a precompiled file may contain.

      +
    9. From the Project menu, choose Precompile.
    10. +

      A save dialog box appears.

      +
    11. Choose a location and type a name for the new precompiled file.
    12. +

      The IDE precompiles the file and saves it.

      +
    13. Click Save.
    14. +

      The save dialog box closes, and the IDE precompiles the file you opened, saving it in the folder you specified, giving it the name you specified.

      +
    +
    +

    You may now include the new precompiled file in source code files.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_using.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_using.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_using.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,45 +1,45 @@ - - - - - -Using a Precompiled Header File - - - -

    Using a Precompiled Header File

    -

    Although a precompiled file is not a text file, you use it like you would a regular header file. To include a precompiled header file in a source code file, use the #include directive.

    -

    NOTE Unlike regular header files in text format, a source code file may include only one precompiled file.

    -

    TIP Instead of explicitly including a precompiled file in each source code file with the #include directive, put the precompiled file name in the Prefix File field of the C/C++ Language settings panel. If the Prefix File field already specifies a file name, include the precompiled file in the prefix file with the #include directive.

    -

    Listing 5.1 and Listing 5.2 show an example.

    -
    -
    Listing 5.1 Header File that Creates a Precompiled Header File for C
    -

    // sock_header.pch
    - // When compiled or precompiled, this file will generate a
    - // precompiled file named "sock_precomp.mch"

    -

    #pragma precompile_target "sock_precomp.mch"

    -

    #define SOCK_VERSION "SockSorter 2.0"
    - #include "sock_std.h"
    - #include "sock_string.h"
    - #include "sock_sorter.h"

    -
    -
    -
    Listing 5.2 Using a Precompiled File
    -

    // sock_main.c
    - // Instead of including all the files included in
    - // sock_header.pch, we use sock_precomp.h instead.
    - //
    - // A precompiled file must be included before anything else.

    -

    #include "sock_precomp.mch"

    -

    int main(void)
    - {
    - // ...
    - return 0;
    - } -

    -
    - - - - - + + + + + +Using a Precompiled Header File + + + +

    Using a Precompiled Header File

    +

    Although a precompiled file is not a text file, you use it like you would a regular header file. To include a precompiled header file in a source code file, use the #include directive.

    +

    NOTE Unlike regular header files in text format, a source code file may include only one precompiled file.

    +

    TIP Instead of explicitly including a precompiled file in each source code file with the #include directive, put the precompiled file name in the Prefix File field of the C/C++ Language settings panel. If the Prefix File field already specifies a file name, include the precompiled file in the prefix file with the #include directive.

    +

    Listing 5.1 and Listing 5.2 show an example.

    +
    +
    Listing 5.1 Header File that Creates a Precompiled Header File for C
    +

    // sock_header.pch
    + // When compiled or precompiled, this file will generate a
    + // precompiled file named "sock_precomp.mch"

    +

    #pragma precompile_target "sock_precomp.mch"

    +

    #define SOCK_VERSION "SockSorter 2.0"
    + #include "sock_std.h"
    + #include "sock_string.h"
    + #include "sock_sorter.h"

    +
    +
    +
    Listing 5.2 Using a Precompiled File
    +

    // sock_main.c
    + // Instead of including all the files included in
    + // sock_header.pch, we use sock_precomp.h instead.
    + //
    + // A precompiled file must be included before anything else.

    +

    #include "sock_precomp.mch"

    +

    int main(void)
    + {
    + // ...
    + return 0;
    + } +

    +
    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_what.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_what.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_precompiled_what.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,41 +1,41 @@ - - - - - -What Can be Precompiled - - - -

    What Can be Precompiled

    -

    A file to be precompiled does not have to be a header file (.h or .hpp files, for example), but it must meet these requirements:

    -
      -
    • The file must be a C or C++ source code file in text format.
    • -
    -

    You cannot precompile libraries or other binary files.

    -
      -
    • A C source code file that will be automatically precompiled must have .pch file name extension.
    • -
    • A C++ source code file that will be automatically precompiled must have a .pch++ file name extension.
    • -
    • Precompiled files must have a .mch file name extension.
    • -
    • The file to be precompiled does not have to be in a Carbide IDE project, although a project must be open to precompile the file.
    • -
    -

    The Carbide IDE uses the build target settings to precompile a file.

    -
      -
    • The file must not contain any statements that generate data or executable code.
    • -
    -

    However, the file may define static data. C++ source code can contain inline functions and constant variable declarations (const).

    -
      -
    • Precompiled header files for different build targets are not interchangeable.
    • -
    -

    For example, to generate a precompiled header for use with Windows® compilers, you must use a Windows® compiler.

    -
      -
    • C source code may not include precompiled C++ header files and C++ source code may not include precompiled C header files.
    • -
    • A source file may include only one precompiled file.
    • -
    • A file may not define any items before including a precompiled file.
    • -
    -

    Typically, a source code file includes a precompiled header file before anything else (except comments).

    - - - - - + + + + + +What Can be Precompiled + + + +

    What Can be Precompiled

    +

    A file to be precompiled does not have to be a header file (.h or .hpp files, for example), but it must meet these requirements:

    +
      +
    • The file must be a C or C++ source code file in text format.
    • +
    +

    You cannot precompile libraries or other binary files.

    +
      +
    • A C source code file that will be automatically precompiled must have .pch file name extension.
    • +
    • A C++ source code file that will be automatically precompiled must have a .pch++ file name extension.
    • +
    • Precompiled files must have a .mch file name extension.
    • +
    • The file to be precompiled does not have to be in a Carbide IDE project, although a project must be open to precompile the file.
    • +
    +

    The Carbide IDE uses the build target settings to precompile a file.

    +
      +
    • The file must not contain any statements that generate data or executable code.
    • +
    +

    However, the file may define static data. C++ source code can contain inline functions and constant variable declarations (const).

    +
      +
    • Precompiled header files for different build targets are not interchangeable.
    • +
    +

    For example, to generate a precompiled header for use with Windows® compilers, you must use a Windows® compiler.

    +
      +
    • C source code may not include precompiled C++ header files and C++ source code may not include precompiled C header files.
    • +
    • A source file may include only one precompiled file.
    • +
    • A file may not define any items before including a precompiled file.
    • +
    +

    Typically, a source code file includes a precompiled header file before anything else (except comments).

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_preprocessing.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_preprocessing.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/perf_preprocessing.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -Preprocessing and Precompiling - - - -

    Preprocessing and Precompiling

    -

    When precompiling a header file, the compiler preprocesses the file too. In other words, a precompiled file is preprocessed in the context of its precompilation, not in the context of its compilation.

    -

    The preprocessor also tracks macros used to guard #include files to reduce parsing time. Thus, if a file’s contents are surrounded with:

    -

    #ifndef FOO_H
    - #define FOO_H
    - // file contents
    - #endif

    -

    The compiler will not load the file twice, saving some small amount of time in the process.

    - - - - - + + + + + +Preprocessing and Precompiling + + + +

    Preprocessing and Precompiling

    +

    When precompiling a header file, the compiler preprocesses the file too. In other words, a precompiled file is preprocessed in the context of its precompilation, not in the context of its compilation.

    +

    The preprocessor also tracks macros used to guard #include files to reduce parsing time. Thus, if a file’s contents are surrounded with:

    +

    #ifndef FOO_H
    + #define FOO_H
    + // file contents
    + #endif

    +

    The compiler will not load the file twice, saving some small amount of time in the process.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/performance.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/performance.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/performance/performance.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Improving Compiler Performance - - - -

    Improving Compiler Performance

    -

    This section describes compiler features that decrease the amount of time to translate source code.

    - - - - - - + + + + + +Improving Compiler Performance + + + +

    Improving Compiler Performance

    +

    This section describes compiler features that decrease the amount of time to translate source code.

    + + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ANSI_strict.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ANSI_strict.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ANSI_strict.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,73 +1,73 @@ - - - - - - - ANSI_strict - - - - -

    ANSI_strict

    -

    Controls the use of non-standard language features.

    -
    Syntax
    -

    #pragma ANSI_strict on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable the pragma ANSI_strict, the compiler generates an error if it encounters any of the following common ANSI extensions:

    -
      -
    • C++-style comments
    • -
    -
    -
    -

    a = b; // This is a C++-style comment

    -
    -
    -
      -
    • Unnamed arguments in function definitions
    • -
    -
    -
    -

    void f(int ) {} /* OK, if ANSI Strict is disabled */
    - void f(int i) {} /* ALWAYS OK */

    -
    -
    -
      -
    • A # token that does not appear before an argument in a macro definition
    • -
    -
    -
    -

    #define add1(x) #x #1
    - /* OK, if ANSI_strict is disabled,

    -
    -

    but probably not what you wanted:

    -
    -

    add1(abc) creates "abc"#1 */
    - #define add2(x) #x "2"
    - /* ALWAYS OK: add2(abc) creates "abc2" */

    -
    -
    -
      -
    • An identifier after #endif
    • -
    -
    -
    -

    - #ifdef __CARBIDE__
    - /* . . . */
    - #endif __CARBIDE__ /* OK, if ANSI_strict is disabled */

    -

    #ifdef __CARBIDE__
    - /* . . . */
    - #endif /*__CARBIDE__*/ /* ALWAYS OK */

    -
    -
    -

    This pragma corresponds to the ANSI Strict setting . To check this setting, use __option (ANSI_strict), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + ANSI_strict + + + + +

    ANSI_strict

    +

    Controls the use of non-standard language features.

    +
    Syntax
    +

    #pragma ANSI_strict on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable the pragma ANSI_strict, the compiler generates an error if it encounters any of the following common ANSI extensions:

    +
      +
    • C++-style comments
    • +
    +
    +
    +

    a = b; // This is a C++-style comment

    +
    +
    +
      +
    • Unnamed arguments in function definitions
    • +
    +
    +
    +

    void f(int ) {} /* OK, if ANSI Strict is disabled */
    + void f(int i) {} /* ALWAYS OK */

    +
    +
    +
      +
    • A # token that does not appear before an argument in a macro definition
    • +
    +
    +
    +

    #define add1(x) #x #1
    + /* OK, if ANSI_strict is disabled,

    +
    +

    but probably not what you wanted:

    +
    +

    add1(abc) creates "abc"#1 */
    + #define add2(x) #x "2"
    + /* ALWAYS OK: add2(abc) creates "abc2" */

    +
    +
    +
      +
    • An identifier after #endif
    • +
    +
    +
    +

    + #ifdef __CARBIDE__
    + /* . . . */
    + #endif __CARBIDE__ /* OK, if ANSI_strict is disabled */

    +

    #ifdef __CARBIDE__
    + /* . . . */
    + #endif /*__CARBIDE__*/ /* ALWAYS OK */

    +
    +
    +

    This pragma corresponds to the ANSI Strict setting . To check this setting, use __option (ANSI_strict), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_access_errors.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_access_errors.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_access_errors.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -access_errors - - - -

    access_errors

    -

    Controls whether or not to change illegal access errors to warnings.

    -
    Syntax
    -

    #pragma access_errors on | off | reset

    -
    Targets
    -

    All platforms.

    -
    Remarks
    -

    If you enable this pragma, the compiler issues an error instead of a warning when it detects illegal access to protected or private members. This has the effect of including the file once (like #pragma once). This is not a portable usage.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (access_errors), described in Checking Settings.

    -

    The default setting is on.

    - - - - - + + + + + +access_errors + + + +

    access_errors

    +

    Controls whether or not to change illegal access errors to warnings.

    +
    Syntax
    +

    #pragma access_errors on | off | reset

    +
    Targets
    +

    All platforms.

    +
    Remarks
    +

    If you enable this pragma, the compiler issues an error instead of a warning when it detects illegal access to protected or private members. This has the effect of including the file once (like #pragma once). This is not a portable usage.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (access_errors), described in Checking Settings.

    +

    The default setting is on.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_align.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_align.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_align.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - - - access_errors - - - - -

    align

    -

    See pragma options.

    - - - - - + + + + + + + access_errors + + + + +

    align

    +

    See pragma options.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_always_inline.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_always_inline.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_always_inline.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - always_inline - - - - -

    always_inline (deprecated)

    -

    Controls the use of inlined functions.

    -
    Syntax
    -

    #pragma always_inline on | off | reset

    -
    Targets
    -

    All platforms.

    -
    Remarks
    -

    This pragma is strongly deprecated. Use the pragma inline_depth instead.

    -

    If you enable this pragma, the compiler ignores all inlining limits and attempts to inline all functions where it is legal to do so.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (always_inline), described in Checking Settings.

    -

    The default setting is off.

    - - - - - + + + + + + + always_inline + + + + +

    always_inline (deprecated)

    +

    Controls the use of inlined functions.

    +
    Syntax
    +

    #pragma always_inline on | off | reset

    +
    Targets
    +

    All platforms.

    +
    Remarks
    +

    This pragma is strongly deprecated. Use the pragma inline_depth instead.

    +

    If you enable this pragma, the compiler ignores all inlining limits and attempts to inline all functions where it is legal to do so.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (always_inline), described in Checking Settings.

    +

    The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_arm_conform.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_arm_conform.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_arm_conform.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - - - ARM_conform - - - - -

    ARM_conform

    -

    This pragma is no longer available.

    - - - - - + + + + + + + ARM_conform + + + + +

    ARM_conform

    +

    This pragma is no longer available.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_arm_scoping.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_arm_scoping.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_arm_scoping.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,33 +1,33 @@ - - - - - - - ARM_scoping - - - - -

    ARM_scoping

    -

    Controls the scope of variables declared in the expression parts of if, while, and for statements.

    -
    Syntax
    -

    #pragma ARM_scoping on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, any variable you declare in any of the above conditional expressions remains valid until the end of the block that contains the statement. Otherwise, the variables only remains valid until the end of that statement. Listing 10.5 shows an example.

    -
    -

    Listing 10.5 Example of Using Variables Declared in for Statement

    -

    for( int i=1; i<1000; i++) {
    - /* . . . */ }
    - return i; // OK if ARM_conform is enabled.

    -
    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (ARM_scoping. They default setting is off.

    -

    - - - - - + + + + + + + ARM_scoping + + + + +

    ARM_scoping

    +

    Controls the scope of variables declared in the expression parts of if, while, and for statements.

    +
    Syntax
    +

    #pragma ARM_scoping on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, any variable you declare in any of the above conditional expressions remains valid until the end of the block that contains the statement. Otherwise, the variables only remains valid until the end of that statement. Listing 10.5 shows an example.

    +
    +

    Listing 10.5 Example of Using Variables Declared in for Statement

    +

    for( int i=1; i<1000; i++) {
    + /* . . . */ }
    + return i; // OK if ARM_conform is enabled.

    +
    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (ARM_scoping. They default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_array_new_delete.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_array_new_delete.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_array_new_delete.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - array_new_delete - - - - -

    array_new_delete

    -

    Use to enable the operator new[]/delete[] in array allocation/deallocation operations.

    -
    Syntax
    -

    #pragma array_new_delete on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    - To check this setting, use __option (array_new_delete). The default setting is on. -

    - - - - - + + + + + + + array_new_delete + + + + +

    array_new_delete

    +

    Use to enable the operator new[]/delete[] in array allocation/deallocation operations.

    +
    Syntax
    +

    #pragma array_new_delete on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    + To check this setting, use __option (array_new_delete). The default setting is on. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_asmpoundcomment.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_asmpoundcomment.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_asmpoundcomment.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - asmpoundcomment - - - - -

    asmpoundcomment

    -

    Controls whether the “#” symbol is treated as a comment character in inline assembly.

    -
    Syntax
    -

    #pragma asmpoundcomment on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    NOTE Some targets may have additional comment characters, and may treat these characters as comments even when #pragma asmpoundcomment off is used.

    -

    WARNING! Using this pragma may interfere with the assembly language of a specific target.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (asmpoundcomment). The default setting is on.

    -

    - - - - - + + + + + + + asmpoundcomment + + + + +

    asmpoundcomment

    +

    Controls whether the “#” symbol is treated as a comment character in inline assembly.

    +
    Syntax
    +

    #pragma asmpoundcomment on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    NOTE Some targets may have additional comment characters, and may treat these characters as comments even when #pragma asmpoundcomment off is used.

    +

    WARNING! Using this pragma may interfere with the assembly language of a specific target.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (asmpoundcomment). The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_asmsemicolcomment.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_asmsemicolcomment.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_asmsemicolcomment.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - asmsemicolcomment - - - - -

    asmsemicolcomment

    -

    Controls whether the “;” symbol is treated as a comment character in inline assembly.

    -
    Syntax
    -

    #pragma asmsemicolcomment on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    NOTE Some targets may have additional comment characters, and may treat these characters as comments even when #pragma asmsemicolcomment off is used.

    -

    WARNING! Using this pragma may interfere with the assembly language of a specific target.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (asmsemicolcomment). The default setting is on.

    -

    - - - - - + + + + + + + asmsemicolcomment + + + + +

    asmsemicolcomment

    +

    Controls whether the “;” symbol is treated as a comment character in inline assembly.

    +
    Syntax
    +

    #pragma asmsemicolcomment on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    NOTE Some targets may have additional comment characters, and may treat these characters as comments even when #pragma asmsemicolcomment off is used.

    +

    WARNING! Using this pragma may interfere with the assembly language of a specific target.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (asmsemicolcomment). The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_auto_inline.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_auto_inline.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_auto_inline.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - access_errors - - - - -

    auto_inline

    -

    Controls which functions to inline.

    -
    Syntax
    -

    #pragma auto_inline on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler automatically chooses functions to inline for you, in addition to functions declared “inline”.
    - Note that if you enable either the Don’t Inline setting (“Inlining”) or the dont_inline pragma (“dont_inline”), the compiler ignores the setting of the auto_inline pragma and does not inline any functions.

    -

    This pragma corresponds to the Auto-Inline setting. To check this setting, use __option (auto_inline), described in Checking Settings. The default setting is off.

    -

    See also "Iinlining".

    - - - - - + + + + + + + access_errors + + + + +

    auto_inline

    +

    Controls which functions to inline.

    +
    Syntax
    +

    #pragma auto_inline on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler automatically chooses functions to inline for you, in addition to functions declared “inline”.
    + Note that if you enable either the Don’t Inline setting (“Inlining”) or the dont_inline pragma (“dont_inline”), the compiler ignores the setting of the auto_inline pragma and does not inline any functions.

    +

    This pragma corresponds to the Auto-Inline setting. To check this setting, use __option (auto_inline), described in Checking Settings. The default setting is off.

    +

    See also "Iinlining".

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_bool.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_bool.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_bool.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - bool - - - - -

    bool

    -

    Determines whether or not bool, true, and false are treated as keywords.

    -
    Syntax
    -

    #pragma bool on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, you can use the standard C++ bool type to represent true and false. Disable this pragma if recognizing bool, true, or false as keywords causes problems in your program.

    -

    NOTE This only applies when C++ is enabled using either the Force C++ Compilation option or #pragma cplusplus on.

    -

    This pragma corresponds to the Enable bool Support setting , described in “Using the bool Type”. To check this setting, use __option (bool), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + bool + + + + +

    bool

    +

    Determines whether or not bool, true, and false are treated as keywords.

    +
    Syntax
    +

    #pragma bool on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, you can use the standard C++ bool type to represent true and false. Disable this pragma if recognizing bool, true, or false as keywords causes problems in your program.

    +

    NOTE This only applies when C++ is enabled using either the Force C++ Compilation option or #pragma cplusplus on.

    +

    This pragma corresponds to the Enable bool Support setting , described in “Using the bool Type”. To check this setting, use __option (bool), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_c99.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_c99.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_c99.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,180 +1,180 @@ - - - - - - - c99 - - - - -

    c99

    -

    Controls the use of a subset of C99 language features.

    -
    Syntax
    -

    #pragma c99 on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    Set pragma c99 on to tell the Carbide x86 compiler to use the following supported C99 language features:

    -
      -
    • Trailing commas in enumerations
    • -
    • GCC/C9x style compound literals
    • -
    -
    -
    -

    #pragma c99 on
    - struct my_struct {
    - int i;
    - char c[2];} my_var;
    - my_var = ((struct my_struct) {x + y, 'a', 0});

    -
    -
    -
      -
    • Designated initializers
    • -
    -
    -
    -

    #pragma c99 on

    -

    struct X {
    - int a,b,c;
    - } x = { .c = 3, .a = 1, 2 };

    -

    union U {
    - char a;
    - long b;
    - } u = { .b = 1234567 };

    -

    int arr1[6] = { 1,2, [4] = 3,4 };
    - int arr2[6] = { 1, [1 ... 4] = 3,4 }; // GCC only, not part of C99

    -
    -
    -
      -
    • __func__ predefine
    • -
    • Implicit return 0; in main()
    • -
    • Non-const static data initialization
    • -
    • Variable argument macros (__VA_ARGS__)
    • -
    • bool / _Bool support
    • -
    • long long support
    • -
    • restrict support
    • -
    • // comments
    • -
    • inline support
    • -
    • Digraphs
    • -
    • _Complex and _Imaginary (treated as keywords but not supported)
    • -
    • Empty arrays as last struct members
    • -
    -
    -
    -

    struct {
    - int r;
    - char arr[];
    - } s;

    -
    -
    -
      -
    • Designated initializers
    • -
    • Hexadecimal floating-point constants–precise representations of constants specified in hexadecimal notation to ensure an accurate constant is generated across compilers and on different hosts. The syntax is shown in Table 10.1.
    • -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Constant TypeFormat
    hex-fp-constanthex-string [ ‘.’ hex-string ] hex-exp [ size ]
    hex-stringhex-digit { hex-digit }
    hex-exp‘p’ decimal-string
    size‘f’ | ‘F’ | ‘l’ | ‘L’
    decimal-stringdecimal-digit { decimal-digit }
    decimal-digit<any decimal digit>
    hex-digit<any hexadecimal digit>
    -

    The compiler generates a warning when the mantissa is more precise than the host floating point format, and warnings are enabled. It generates an error if the exponent is too wide for the host float format.

    -

    Examples include:

    -

    0x2f.3a2p3
    - 0xEp1f
    - 0x1.8p0L

    -

    The standard library supports printing floats in this format using the “%a” and “%A” specifiers.

    -
    -
      -
    • Variable length arrays are supported within local or function prototype scope (as required by the C99 standard)
    • -
    -
    -
    -

    // good example of C99 Variable Length Array usage

    -

    #pragma c99 on
    - void f(int n) {
    - int arr[n];
    - ...
    - }

    -
    -

    While this example generates an error:

    -
    -

    // bad example of C99 Variable Length Array usage

    -

    #pragma c99 on
    - int n;
    - int arr[n]; // generates an error: variable length array
    - // types can only be used in local or
    - // function prototype scope

    -
    -

    A variable length array cannot be used in a function template’s prototype scope or in a local template typedef, as shown below:

    -
    -

    // bad example of C99 usage in Function Prototype

    -

    #pragma c99 on
    - template<typename T> int f(int n, int A[n][n]);
    - {
    - } // generates an error: variable length arrays
    - // cannot be used in function template prototypes
    - // or local template variables

    -
    -
    -
      -
    • Unsuffixed decimal constant rules supported
    • -
    -
    -
    -

    // examples of C99 Unsuffixed Constants

    -

    #pragma c99 on // and ULONG_MAX == 4294967295
    - sizeof(4294967295) == sizeof(long long)
    - sizeof(4294967295u) == sizeof(unsigned long)

    -

    #pragma c99 off
    - sizeof(4294967295) == sizeof(unsigned long)
    - sizeof(4294967295u) == sizeof(unsigned long)

    -
    -
    -

    The following C99 features are not currently supported:

    -
      -
    • long long bitfields on some targets
    • -
    • ++bool-- expressions
    • -
    • (T) (int-list) are handled/parsed as cast-expressions and as literals
    • -
    • __STDC_HOSTED__ is 0
    • -
    • <bool> op= <expr> does not always work correctly
    • -
    -

    This pragma corresponds to the Enable C99 Extensions setting . To check this setting, use __option(c99), described in Checking Settings. The default setting is off.
    -

    -

    - - - - - + + + + + + + c99 + + + + +

    c99

    +

    Controls the use of a subset of C99 language features.

    +
    Syntax
    +

    #pragma c99 on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    Set pragma c99 on to tell the Carbide x86 compiler to use the following supported C99 language features:

    +
      +
    • Trailing commas in enumerations
    • +
    • GCC/C9x style compound literals
    • +
    +
    +
    +

    #pragma c99 on
    + struct my_struct {
    + int i;
    + char c[2];} my_var;
    + my_var = ((struct my_struct) {x + y, 'a', 0});

    +
    +
    +
      +
    • Designated initializers
    • +
    +
    +
    +

    #pragma c99 on

    +

    struct X {
    + int a,b,c;
    + } x = { .c = 3, .a = 1, 2 };

    +

    union U {
    + char a;
    + long b;
    + } u = { .b = 1234567 };

    +

    int arr1[6] = { 1,2, [4] = 3,4 };
    + int arr2[6] = { 1, [1 ... 4] = 3,4 }; // GCC only, not part of C99

    +
    +
    +
      +
    • __func__ predefine
    • +
    • Implicit return 0; in main()
    • +
    • Non-const static data initialization
    • +
    • Variable argument macros (__VA_ARGS__)
    • +
    • bool / _Bool support
    • +
    • long long support
    • +
    • restrict support
    • +
    • // comments
    • +
    • inline support
    • +
    • Digraphs
    • +
    • _Complex and _Imaginary (treated as keywords but not supported)
    • +
    • Empty arrays as last struct members
    • +
    +
    +
    +

    struct {
    + int r;
    + char arr[];
    + } s;

    +
    +
    +
      +
    • Designated initializers
    • +
    • Hexadecimal floating-point constants–precise representations of constants specified in hexadecimal notation to ensure an accurate constant is generated across compilers and on different hosts. The syntax is shown in Table 10.1.
    • +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Constant TypeFormat
    hex-fp-constanthex-string [ ‘.’ hex-string ] hex-exp [ size ]
    hex-stringhex-digit { hex-digit }
    hex-exp‘p’ decimal-string
    size‘f’ | ‘F’ | ‘l’ | ‘L’
    decimal-stringdecimal-digit { decimal-digit }
    decimal-digit<any decimal digit>
    hex-digit<any hexadecimal digit>
    +

    The compiler generates a warning when the mantissa is more precise than the host floating point format, and warnings are enabled. It generates an error if the exponent is too wide for the host float format.

    +

    Examples include:

    +

    0x2f.3a2p3
    + 0xEp1f
    + 0x1.8p0L

    +

    The standard library supports printing floats in this format using the “%a” and “%A” specifiers.

    +
    +
      +
    • Variable length arrays are supported within local or function prototype scope (as required by the C99 standard)
    • +
    +
    +
    +

    // good example of C99 Variable Length Array usage

    +

    #pragma c99 on
    + void f(int n) {
    + int arr[n];
    + ...
    + }

    +
    +

    While this example generates an error:

    +
    +

    // bad example of C99 Variable Length Array usage

    +

    #pragma c99 on
    + int n;
    + int arr[n]; // generates an error: variable length array
    + // types can only be used in local or
    + // function prototype scope

    +
    +

    A variable length array cannot be used in a function template’s prototype scope or in a local template typedef, as shown below:

    +
    +

    // bad example of C99 usage in Function Prototype

    +

    #pragma c99 on
    + template<typename T> int f(int n, int A[n][n]);
    + {
    + } // generates an error: variable length arrays
    + // cannot be used in function template prototypes
    + // or local template variables

    +
    +
    +
      +
    • Unsuffixed decimal constant rules supported
    • +
    +
    +
    +

    // examples of C99 Unsuffixed Constants

    +

    #pragma c99 on // and ULONG_MAX == 4294967295
    + sizeof(4294967295) == sizeof(long long)
    + sizeof(4294967295u) == sizeof(unsigned long)

    +

    #pragma c99 off
    + sizeof(4294967295) == sizeof(unsigned long)
    + sizeof(4294967295u) == sizeof(unsigned long)

    +
    +
    +

    The following C99 features are not currently supported:

    +
      +
    • long long bitfields on some targets
    • +
    • ++bool-- expressions
    • +
    • (T) (int-list) are handled/parsed as cast-expressions and as literals
    • +
    • __STDC_HOSTED__ is 0
    • +
    • <bool> op= <expr> does not always work correctly
    • +
    +

    This pragma corresponds to the Enable C99 Extensions setting . To check this setting, use __option(c99), described in Checking Settings. The default setting is off.
    +

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_check_header_flags.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_check_header_flags.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_check_header_flags.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - check_header_flags - - - - -

    check_header_flags

    -

    Controls whether or not to ensure that a precompiled header’s data matches a project’s target settings.

    -
    Syntax
    -

    #pragma check_header_flags on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma affects precompiled headers only.

    -

    If you enable this pragma, the compiler ensures that the precompiled header’s preferences for double size (8-byte or 12-byte), int size (2-byte or 4-byte) and floating point math correspond to the build target’s settings. If they do not match, the compiler generates an error.

    -

    If your precompiled header file depends on these settings, enable this pragma. Otherwise, disable it.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (check_header_flags), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + check_header_flags + + + + +

    check_header_flags

    +

    Controls whether or not to ensure that a precompiled header’s data matches a project’s target settings.

    +
    Syntax
    +

    #pragma check_header_flags on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma affects precompiled headers only.

    +

    If you enable this pragma, the compiler ensures that the precompiled header’s preferences for double size (8-byte or 12-byte), int size (2-byte or 4-byte) and floating point math correspond to the build target’s settings. If they do not match, the compiler generates an error.

    +

    If your precompiled header file depends on these settings, enable this pragma. Otherwise, disable it.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (check_header_flags), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_const_strings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_const_strings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_const_strings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - const_strings - - - - -

    const_strings

    -

    Controls the const-ness of string literals.

    -
    Syntax
    -

    #pragma const_strings [ on | off | reset ] -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the type of string literals is an array const char[n], or const wchar_t[n] for wide strings, where n is the length of the string literal plus 1 for a terminating NUL character. Otherwise, the type char[n] or wchar_t[n] is used.

    -

    This pragma does not correspond to any setting . To check this setting, use __option (const_strings), this pragma is on when compiling C++ source code; off when compiling C source code.

    - - - - - - + + + + + + + const_strings + + + + +

    const_strings

    +

    Controls the const-ness of string literals.

    +
    Syntax
    +

    #pragma const_strings [ on | off | reset ] +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the type of string literals is an array const char[n], or const wchar_t[n] for wide strings, where n is the length of the string literal plus 1 for a terminating NUL character. Otherwise, the type char[n] or wchar_t[n] is used.

    +

    This pragma does not correspond to any setting . To check this setting, use __option (const_strings), this pragma is on when compiling C++ source code; off when compiling C source code.

    + + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_cplusplus.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_cplusplus.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_cplusplus.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - cplusplus - - - - -

    cplusplus

    -

    Controls whether or not to translate subsequent source code as C or C++ source code.

    -
    Syntax
    -

    #pragma cplusplus on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler translates the source code that follows as C++ code. Otherwise, the compiler uses the suffix of the filename to determine how to compile it. If a file name ends in .c, .h, or .pch, the compiler automatically compiles it as C code, otherwise as C++. Use this pragma only if a file contains both C and C++ code.

    -

    NOTE The Carbide C/C++ compilers do not distinguish between uppercase and lowercase letters in file names and file name extensions except on UNIX-based systems.

    -

    This pragma corresponds to the Force C++ Compilation setting . To check this setting, use __option (cplusplus), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + cplusplus + + + + +

    cplusplus

    +

    Controls whether or not to translate subsequent source code as C or C++ source code.

    +
    Syntax
    +

    #pragma cplusplus on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler translates the source code that follows as C++ code. Otherwise, the compiler uses the suffix of the filename to determine how to compile it. If a file name ends in .c, .h, or .pch, the compiler automatically compiles it as C code, otherwise as C++. Use this pragma only if a file contains both C and C++ code.

    +

    NOTE The Carbide C/C++ compilers do not distinguish between uppercase and lowercase letters in file names and file name extensions except on UNIX-based systems.

    +

    This pragma corresponds to the Force C++ Compilation setting . To check this setting, use __option (cplusplus), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_cpp_extensions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_cpp_extensions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_cpp_extensions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,59 +1,59 @@ - - - - - - - cpp_extensions - - - - -

    cpp_extensions

    -

    Controls language extensions to ISO C++.

    -
    Syntax
    -

    #pragma cpp_extensions on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, you can use the following extensions to the ANSI C++ standard that would otherwise be illegal:

    -
      -
    • Anonymous struct & union objects
    • -
    -
    -
    #pragma cpp_extensions on
    - void foo()
    - {
    - union {
    - long hilo;
    - struct { short hi, lo; }; // anonymous struct
    - };
    - hi=0x1234;
    - lo=0x5678; // hilo==0x12345678
    - }
    -
    -
      -
    • Unqualified pointer to a member function
    • -
    -
    -
    -

    #pragma cpp_extensions on
    - struct Foo { void f(); }
    - void Foo::f()
    - {
    - void (Foo::*ptmf1)() = &Foo::f; // ALWAYS OK

    -

    void (Foo::*ptmf2)() = f; // OK if you enable cpp_extensions.
    - }

    -
    -
    -
      -
    • Inclusion of const data in precompiled headers.
    • -
    -

    This pragma does not correspond to any setting . To check this setting, use the __option (cpp_extensions). This pragma is on if generating Win32/x86-compatible object code; off if not.

    -

    - - - - - + + + + + + + cpp_extensions + + + + +

    cpp_extensions

    +

    Controls language extensions to ISO C++.

    +
    Syntax
    +

    #pragma cpp_extensions on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, you can use the following extensions to the ANSI C++ standard that would otherwise be illegal:

    +
      +
    • Anonymous struct & union objects
    • +
    +
    +
    #pragma cpp_extensions on
    + void foo()
    + {
    + union {
    + long hilo;
    + struct { short hi, lo; }; // anonymous struct
    + };
    + hi=0x1234;
    + lo=0x5678; // hilo==0x12345678
    + }
    +
    +
      +
    • Unqualified pointer to a member function
    • +
    +
    +
    +

    #pragma cpp_extensions on
    + struct Foo { void f(); }
    + void Foo::f()
    + {
    + void (Foo::*ptmf1)() = &Foo::f; // ALWAYS OK

    +

    void (Foo::*ptmf2)() = f; // OK if you enable cpp_extensions.
    + }

    +
    +
    +
      +
    • Inclusion of const data in precompiled headers.
    • +
    +

    This pragma does not correspond to any setting . To check this setting, use the __option (cpp_extensions). This pragma is on if generating Win32/x86-compatible object code; off if not.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_debug_inline.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_debug_inline.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_debug_inline.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - debuginline - - - - -

    debuginline

    -

    Controls whether the compiler emits debugging information for expanded inline function calls.

    -
    Syntax
    -

    #pragma debuginline on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If the compiler emits debugging information for inline function calls, then the debugger can step into the body of the inlined function. This more closely resembles the debugging experience for un-inlined code.

    -

    NOTE Since the actual “call” and “return” instructions are no longer present when stepping through inline code, the debugger will immediately jump to the body of an inlined function and “return” before reaching the return statement for the function. Thus, the debugging experience of inlined functions may not be as smooth as debugging un-inlined code.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (debuginline), described in Checking Settings. The default setting is on.

    -

    - - - - - + + + + + + + debuginline + + + + +

    debuginline

    +

    Controls whether the compiler emits debugging information for expanded inline function calls.

    +
    Syntax
    +

    #pragma debuginline on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If the compiler emits debugging information for inline function calls, then the debugger can step into the body of the inlined function. This more closely resembles the debugging experience for un-inlined code.

    +

    NOTE Since the actual “call” and “return” instructions are no longer present when stepping through inline code, the debugger will immediately jump to the body of an inlined function and “return” before reaching the return statement for the function. Thus, the debugging experience of inlined functions may not be as smooth as debugging un-inlined code.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (debuginline), described in Checking Settings. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_def_inherited.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_def_inherited.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_def_inherited.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,32 +1,32 @@ - - - - - - - def_inherited - - - - -

    def_inherited

    -

    Controls the use of inherited.

    -
    Syntax
    -

    #pragma def_inherited on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    The use of this pragma is deprecated. It lets you use the non-standard inherited symbol in C++ programming by implicitly adding

    -

    typedef base inherited;

    -

    as the first member in classes with a single base class.

    -

    NOTE The ISO C++ standard does not support the inherited symbol. Only the Carbide.c++ language implements the inherited symbol for single inheritance.

    -

    NOTE Pragmas may no longer correspond to their textual position in the file when this pragma is on.

    -

    This pragma does not correspond to any setting . To check this setting, use the __option (def_inherited), described in Checking Settings. The default setting is off.
    -

    -

    - - - - - + + + + + + + def_inherited + + + + +

    def_inherited

    +

    Controls the use of inherited.

    +
    Syntax
    +

    #pragma def_inherited on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    The use of this pragma is deprecated. It lets you use the non-standard inherited symbol in C++ programming by implicitly adding

    +

    typedef base inherited;

    +

    as the first member in classes with a single base class.

    +

    NOTE The ISO C++ standard does not support the inherited symbol. Only the Carbide.c++ language implements the inherited symbol for single inheritance.

    +

    NOTE Pragmas may no longer correspond to their textual position in the file when this pragma is on.

    +

    This pragma does not correspond to any setting . To check this setting, use the __option (def_inherited), described in Checking Settings. The default setting is off.
    +

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_defer_codegen.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_defer_codegen.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_defer_codegen.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,41 +1,41 @@ - - - - - - - defer_codegen - - - - -

    defer_codegen

    -

    Controls the inlining of functions that are not yet compiled.

    -
    Syntax
    -

    #pragma defer_codegen on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This setting lets you use inline and auto-inline functions that are called before their definition:

    -
    -

    #pragma defer_codegen on
    - #pragma auto_inline on

    -

    extern void f();
    - extern void g();

    -

    main()
    - {
    - f(); // will be inlined
    - g(); // will be inlined
    - }

    -

    inline void f() {}
    - void g() {}

    -
    -

    NOTE The compiler requires more memory at compile time if you enable this pragma.

    -

    This pragma corresponds to the Deferred Inlining setting . To check this setting, use the __option (defer_codegen), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + defer_codegen + + + + +

    defer_codegen

    +

    Controls the inlining of functions that are not yet compiled.

    +
    Syntax
    +

    #pragma defer_codegen on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This setting lets you use inline and auto-inline functions that are called before their definition:

    +
    +

    #pragma defer_codegen on
    + #pragma auto_inline on

    +

    extern void f();
    + extern void g();

    +

    main()
    + {
    + f(); // will be inlined
    + g(); // will be inlined
    + }

    +

    inline void f() {}
    + void g() {}

    +
    +

    NOTE The compiler requires more memory at compile time if you enable this pragma.

    +

    This pragma corresponds to the Deferred Inlining setting . To check this setting, use the __option (defer_codegen), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_defer_defarg_parsing.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_defer_defarg_parsing.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_defer_defarg_parsing.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,44 +1,44 @@ - - - - - - - defer_defarg_parsing - - - - -

    defer_defarg_parsing

    -

    Defers the parsing of default arguments in member functions.

    -
    Syntax
    -

    #pragma defer_defarg_parsing on | off -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    To be accepted as valid, some default expressions with template arguments will require additional parentheses. For example, the following source code generates an error:

    -
    -

    template<typename T,typename U> struct X { T t; U u; };

    -

    struct Y {
    - // the following line is not accepted, and generates
    - // an error with defer_defarg_parsing on
    - void f(X<int,int> = X<int,int>());
    - };

    -
    -

    While this version will not:

    -
    -

    template<typename T,typename U> struct X { T t; U u; };

    -

    struct Y {
    - // following line is OK,
    - // if default argument is parenthesized
    - void f(X<int,int> = (X<int,int>()) );
    - };

    -
    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (defer_defarg_parsing). The default setting is on.
    -

    - - - - - + + + + + + + defer_defarg_parsing + + + + +

    defer_defarg_parsing

    +

    Defers the parsing of default arguments in member functions.

    +
    Syntax
    +

    #pragma defer_defarg_parsing on | off +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    To be accepted as valid, some default expressions with template arguments will require additional parentheses. For example, the following source code generates an error:

    +
    +

    template<typename T,typename U> struct X { T t; U u; };

    +

    struct Y {
    + // the following line is not accepted, and generates
    + // an error with defer_defarg_parsing on
    + void f(X<int,int> = X<int,int>());
    + };

    +
    +

    While this version will not:

    +
    +

    template<typename T,typename U> struct X { T t; U u; };

    +

    struct Y {
    + // following line is OK,
    + // if default argument is parenthesized
    + void f(X<int,int> = (X<int,int>()) );
    + };

    +
    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (defer_defarg_parsing). The default setting is on.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_direct_destruction.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_direct_destruction.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_direct_destruction.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - - - direct_destruction - - - - -

    direct_destruction (not available)

    -

    This pragma is no longer available.

    - - - - - + + + + + + + direct_destruction + + + + +

    direct_destruction (not available)

    +

    This pragma is no longer available.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dollar_identifiers.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dollar_identifiers.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dollar_identifiers.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - dollar_identifiers - - - - -

    dollar_identifiers

    -

    Controls use of dollar signs ($) in identifiers.

    -
    Syntax
    -

    #pragma dollar_identifiers on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler accepts dollar signs ($) in identifiers. Otherwise, the compiler issues an error if it encounters anything but underscores, alphabetic, numeric character, and universal characters (\uxxxx, \Uxxxxxxxx) in an identifier.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (dollar_identifiers), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + dollar_identifiers + + + + +

    dollar_identifiers

    +

    Controls use of dollar signs ($) in identifiers.

    +
    Syntax
    +

    #pragma dollar_identifiers on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler accepts dollar signs ($) in identifiers. Otherwise, the compiler issues an error if it encounters anything but underscores, alphabetic, numeric character, and universal characters (\uxxxx, \Uxxxxxxxx) in an identifier.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (dollar_identifiers), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dont_inline.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dont_inline.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dont_inline.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - dont_inline - - - - -

    dont_inline

    -

    Controls the generation of inline functions.

    -
    Syntax
    -

    #pragma dont_inline on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler does not inline any function calls, even those declared with the inline keyword or within a class declaration. Also, it does not automatically inline functions, regardless of the setting of the pragma auto_inline, described in “auto_inline”. If you disable this pragma, the compiler expands all inline function calls, within the limits you set through other inlining-related pragmas.

    -

    This pragma corresponds to the Don’t Inline setting in Inline Depth dropdown menu . To check this setting, use __option (dont_inline), described in Checking Settings. The default setting is off.
    -

    -

    - - - - - + + + + + + + dont_inline + + + + +

    dont_inline

    +

    Controls the generation of inline functions.

    +
    Syntax
    +

    #pragma dont_inline on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler does not inline any function calls, even those declared with the inline keyword or within a class declaration. Also, it does not automatically inline functions, regardless of the setting of the pragma auto_inline, described in “auto_inline”. If you disable this pragma, the compiler expands all inline function calls, within the limits you set through other inlining-related pragmas.

    +

    This pragma corresponds to the Don’t Inline setting in Inline Depth dropdown menu . To check this setting, use __option (dont_inline), described in Checking Settings. The default setting is off.
    +

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dont_reuse_strings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dont_reuse_strings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_dont_reuse_strings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,32 +1,32 @@ - - - - - - - access_errors - - - - -

    dont_reuse_strings

    -

    Controls whether or not to store each string literal separately in the string pool.

    -
    Syntax
    -

    #pragma dont_reuse_strings on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler stores each string literal separately. Otherwise, the compiler stores only one copy of identical string literals. This pragma helps you save memory if your program contains a lot of identical string literals that you do not modify.

    -

    For example, take this code segment:

    -

    char *str1="Hello";
    - char *str2="Hello"
    - *str2 = 'Y';

    -

    If you enable this pragma, str1 is "Hello", and str2 is "Yello". Otherwise, both str1 and str2 are "Yello".

    -

    This pragma corresponds to the Reuse Strings setting . To check this setting, use __option (dont_reuse_strings), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + access_errors + + + + +

    dont_reuse_strings

    +

    Controls whether or not to store each string literal separately in the string pool.

    +
    Syntax
    +

    #pragma dont_reuse_strings on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler stores each string literal separately. Otherwise, the compiler stores only one copy of identical string literals. This pragma helps you save memory if your program contains a lot of identical string literals that you do not modify.

    +

    For example, take this code segment:

    +

    char *str1="Hello";
    + char *str2="Hello"
    + *str2 = 'Y';

    +

    If you enable this pragma, str1 is "Hello", and str2 is "Yello". Otherwise, both str1 and str2 are "Yello".

    +

    This pragma corresponds to the Reuse Strings setting . To check this setting, use __option (dont_reuse_strings), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ecplusplus.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ecplusplus.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ecplusplus.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - ecplusplus - - - - -

    ecplusplus

    -

    Controls the use of embedded C++ features.

    -
    Syntax
    -

    #pragma ecplusplus on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the C++ compiler disables the non-EC++ features of ANSI C++ such as templates, multiple inheritance, and so on. See “C++ and Embedded Systems” for more information on Embedded C++ support in Carbide C/C++ compilers.

    -

    This pragma corresponds to the EC++ Compatibility Mode setting . To check this setting, use __option (ecplusplus), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + ecplusplus + + + + +

    ecplusplus

    +

    Controls the use of embedded C++ features.

    +
    Syntax
    +

    #pragma ecplusplus on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the C++ compiler disables the non-EC++ features of ANSI C++ such as templates, multiple inheritance, and so on. See “C++ and Embedded Systems” for more information on Embedded C++ support in Carbide C/C++ compilers.

    +

    This pragma corresponds to the EC++ Compatibility Mode setting . To check this setting, use __option (ecplusplus), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_enumsalwaysint.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_enumsalwaysint.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_enumsalwaysint.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,39 +1,39 @@ - - - - - - - enumsalwaysint - - - - -

    enumsalwaysint

    -

    Specifies the size of enumerated types.

    -
    Syntax
    -

    #pragma enumsalwaysint on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the C/C++ compiler makes an enumerated type the same size as an int. If an enumerated constant is larger than int, the compiler generates an error. If this pragma is not enabled, the compiler makes an enumerated type the size of any integral type. It chooses the integral type with the size that most closely matches the size of the largest enumerated constant.

    -

    The type could be as small as a char or as large as a long long. Listing 10.15 shows an example.

    -
    -

    Listing 10.15 Example of Enumerations the Same as Size as int

    -

    enum SmallNumber { One = 1, Two = 2 };
    - /* If you enable enumsalwaysint, this type is the same size as an int.
    - Otherwise, this type is the same size as a char. */

    -

    enum BigNumber
    - { ThreeThousandMillion = 3000000000 };
    - /* If you enable enumsalwaysint, the compiler might generate an error.
    - Otherwise, this type is the same size as a long long. */

    -
    -

    For more information on how the compiler handles enumerated types, see Enumerated Types.

    -

    This pragma corresponds to the Enums Always Int setting . To check this setting, use __option (enumsalwaysint), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + enumsalwaysint + + + + +

    enumsalwaysint

    +

    Specifies the size of enumerated types.

    +
    Syntax
    +

    #pragma enumsalwaysint on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the C/C++ compiler makes an enumerated type the same size as an int. If an enumerated constant is larger than int, the compiler generates an error. If this pragma is not enabled, the compiler makes an enumerated type the size of any integral type. It chooses the integral type with the size that most closely matches the size of the largest enumerated constant.

    +

    The type could be as small as a char or as large as a long long. Listing 10.15 shows an example.

    +
    +

    Listing 10.15 Example of Enumerations the Same as Size as int

    +

    enum SmallNumber { One = 1, Two = 2 };
    + /* If you enable enumsalwaysint, this type is the same size as an int.
    + Otherwise, this type is the same size as a char. */

    +

    enum BigNumber
    + { ThreeThousandMillion = 3000000000 };
    + /* If you enable enumsalwaysint, the compiler might generate an error.
    + Otherwise, this type is the same size as a long long. */

    +
    +

    For more information on how the compiler handles enumerated types, see Enumerated Types.

    +

    This pragma corresponds to the Enums Always Int setting . To check this setting, use __option (enumsalwaysint), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_errno_name.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_errno_name.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_errno_name.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,33 +1,33 @@ - - - - - - - errno_name - - - - -

    errno_name

    -

    Tells the optimizer how to find the errno identifier.

    -
    Syntax
    -

    #pragma errno_name id | ... -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When this pragma is used, the optimizer can use the identifier errno (either a macro or a function call) to optimize standard C library functions better. If not used, the optimizer makes worst-case assumptions about the effects of calls to the standard C library.

    -

    NOTE The MSL C library already includes a use of this pragma, so you would only need to use it for third-party C libraries.

    -

    If errno resolves to a variable name, specify it like this:

    -

    #pragma errno_name _Errno

    -

    If errno is a function call accessing ordinarily inaccessible globals, use this form:

    -

    #pragma errno_name ...

    -

    Otherwise, do not use this pragma as it can result in incorrect optimizations in your code.

    -

    This pragma does not correspond to any panel setting. By default, this pragma is unspecified (worst case assumption).

    -

    - - - - - + + + + + + + errno_name + + + + +

    errno_name

    +

    Tells the optimizer how to find the errno identifier.

    +
    Syntax
    +

    #pragma errno_name id | ... +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When this pragma is used, the optimizer can use the identifier errno (either a macro or a function call) to optimize standard C library functions better. If not used, the optimizer makes worst-case assumptions about the effects of calls to the standard C library.

    +

    NOTE The MSL C library already includes a use of this pragma, so you would only need to use it for third-party C libraries.

    +

    If errno resolves to a variable name, specify it like this:

    +

    #pragma errno_name _Errno

    +

    If errno is a function call accessing ordinarily inaccessible globals, use this form:

    +

    #pragma errno_name ...

    +

    Otherwise, do not use this pragma as it can result in incorrect optimizations in your code.

    +

    This pragma does not correspond to any panel setting. By default, this pragma is unspecified (worst case assumption).

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_exceptions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_exceptions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_exceptions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - exceptions - - - - -

    exceptions

    -

    Controls the support of C++ exception handling.

    -
    Syntax
    -

    #pragma exceptions on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, you can use the try and catch statements in C++ to perform exception handling. If your program does not use exception handling, disable this setting to make your program smaller.

    -

    You can throw exceptions across any code compiled by the Carbide C/C++ compiler with #pragma exceptions on. You cannot throw exceptions across libraries compiled with #pragma exceptions off. If you throw an exception across one of these, the code calls terminate() and exits.

    -

    This pragma corresponds to the Enable C++ Exceptions setting . To check this setting, use __option (exceptions), described in Checking Settings. The default setting is on.

    -

    - - - - - + + + + + + + exceptions + + + + +

    exceptions

    +

    Controls the support of C++ exception handling.

    +
    Syntax
    +

    #pragma exceptions on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, you can use the try and catch statements in C++ to perform exception handling. If your program does not use exception handling, disable this setting to make your program smaller.

    +

    You can throw exceptions across any code compiled by the Carbide C/C++ compiler with #pragma exceptions on. You cannot throw exceptions across libraries compiled with #pragma exceptions off. If you throw an exception across one of these, the code calls terminate() and exits.

    +

    This pragma corresponds to the Enable C++ Exceptions setting . To check this setting, use __option (exceptions), described in Checking Settings. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_explicit_zero_data.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_explicit_zero_data.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_explicit_zero_data.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - explicit_zero_data - - - - -

    explicit_zero_data

    -

    Controls the placement of zero-initialized data.

    -
    Syntax
    -

    #pragma explicit_zero_data on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    Places zero-initialized data into the initialized data section instead of the BSS section when on.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (explicit_zero_data), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + explicit_zero_data + + + + +

    explicit_zero_data

    +

    Controls the placement of zero-initialized data.

    +
    Syntax
    +

    #pragma explicit_zero_data on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    Places zero-initialized data into the initialized data section instead of the BSS section when on.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (explicit_zero_data), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_export.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_export.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_export.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - export - - - - -

    export

    -

    Controls the exporting of data or functions.

    -
    Syntax
    -

    #pragma export on | off | reset
    -
    #pragma export list name1 [, name2 ]*

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When using the #pragma export on format, all functions are automatically exported.

    -

    When using the #pragma export list format, use it to tag data or functions for exporting. It applies to all names if it is used on an overloaded function. You cannot use this pragma for C++ member functions or static class members. An example of an lxported list:

    -

    extern int f(),g;
    -#pragma export list f,g

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (export), described in Checking Settings.

    -

    - - - - - + + + + + + + export + + + + +

    export

    +

    Controls the exporting of data or functions.

    +
    Syntax
    +

    #pragma export on | off | reset
    +
    #pragma export list name1 [, name2 ]*

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When using the #pragma export on format, all functions are automatically exported.

    +

    When using the #pragma export list format, use it to tag data or functions for exporting. It applies to all names if it is used on an overloaded function. You cannot use this pragma for C++ member functions or static class members. An example of an lxported list:

    +

    extern int f(),g;
    +#pragma export list f,g

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (export), described in Checking Settings.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_extended_errorcheck.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_extended_errorcheck.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_extended_errorcheck.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - extended_errorcheck - - - - -

    extended_errorcheck

    -

    Controls the issuing of warnings for possible unintended logical errors.

    -
    Syntax
    -

    #pragma extended_errorcheck on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the C compiler generates a warning (not an error) if it encounters some common programming errors. See “Suspicious Assignments and Incorrect Function Returns” for descriptions of the errors that result in this warning.

    -

    This pragma corresponds to the Extended Error Checking setting . To check this setting, use __option (extended_errorcheck), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + extended_errorcheck + + + + +

    extended_errorcheck

    +

    Controls the issuing of warnings for possible unintended logical errors.

    +
    Syntax
    +

    #pragma extended_errorcheck on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the C compiler generates a warning (not an error) if it encounters some common programming errors. See “Suspicious Assignments and Incorrect Function Returns” for descriptions of the errors that result in this warning.

    +

    This pragma corresponds to the Extended Error Checking setting . To check this setting, use __option (extended_errorcheck), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_faster_pch_gen.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_faster_pch_gen.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_faster_pch_gen.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - access_errors - - - - -

    faster_pch_gen

    -

    Controls the performance of precompiled header generation.

    -
    Syntax
    -

    #pragma faster_pch_gen on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, generating a precompiled header can be much faster, depending on the header structure. However, it can also be slightly larger.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (faster_pch_gen), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + access_errors + + + + +

    faster_pch_gen

    +

    Controls the performance of precompiled header generation.

    +
    Syntax
    +

    #pragma faster_pch_gen on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, generating a precompiled header can be much faster, depending on the header structure. However, it can also be slightly larger.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (faster_pch_gen), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_flat_include.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_flat_include.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_flat_include.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - flat_include - - - - -

    flat_include

    -

    Searches an #include using a relative path using only the base filename.

    -
    Syntax
    -

    #pragma flat_include on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When on, searches are performed where, for example “#include <sys/stat.h>” is treated the same as “#include <stat.h>”.
    - This pragma is useful when porting code form a different operating system, or when a project’s access paths cannot reach a given file.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (flat_include), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + flat_include + + + + +

    flat_include

    +

    Searches an #include using a relative path using only the base filename.

    +
    Syntax
    +

    #pragma flat_include on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When on, searches are performed where, for example “#include <sys/stat.h>” is treated the same as “#include <stat.h>”.
    + This pragma is useful when porting code form a different operating system, or when a project’s access paths cannot reach a given file.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (flat_include), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_float_constants.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_float_constants.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_float_constants.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - float_constants - - - - -

    float_constants

    -

    Controls how floating pointing constants are treated.

    -
    Syntax
    -

    #pragma float_constants on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler assumes that all unqualified floating point constant values are of type float, not double. This pragma is useful when porting source code for programs optimized for the “float” rather than the “double” type.

    -

    When you enable this pragma, you can still explicitly declare a constant value as double by appending a “D” suffix. For related information, see “The “D” Constant Suffix”.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (float_constants), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + float_constants + + + + +

    float_constants

    +

    Controls how floating pointing constants are treated.

    +
    Syntax
    +

    #pragma float_constants on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler assumes that all unqualified floating point constant values are of type float, not double. This pragma is useful when porting source code for programs optimized for the “float” rather than the “double” type.

    +

    When you enable this pragma, you can still explicitly declare a constant value as double by appending a “D” suffix. For related information, see “The “D” Constant Suffix”.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (float_constants), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_force_active.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_force_active.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_force_active.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - force_active - - - - -

    force_active

    -

    Controls how “dead” functions are linked.

    -
    Syntax
    -

    #pragma force_active on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the linker leaves functions within the scope of the pragma in the finished application, even if the functions are never called in the program.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (force_active), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + force_active + + + + +

    force_active

    +

    Controls how “dead” functions are linked.

    +
    Syntax
    +

    #pragma force_active on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the linker leaves functions within the scope of the pragma in the finished application, even if the functions are never called in the program.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (force_active), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_fullpath_file.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_fullpath_file.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_fullpath_file.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - fullpath_file - - - - -

    fullpath_file

    -

    Controls if the __FILE__ macro returns a full path or the base filename. The default is off.

    -
    Syntax
    -

    #pragma fullpath_file on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When on, the __FILE__ macro returns a full path to the current file, otherwise it returns the base filename.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (fullpath_file), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + fullpath_file + + + + +

    fullpath_file

    +

    Controls if the __FILE__ macro returns a full path or the base filename. The default is off.

    +
    Syntax
    +

    #pragma fullpath_file on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When on, the __FILE__ macro returns a full path to the current file, otherwise it returns the base filename.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (fullpath_file), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_fullpath_prepdump.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_fullpath_prepdump.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_fullpath_prepdump.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - fullpath_prepdump - - - - -

    fullpath_prepdump

    -

    Shows the full path of included files in preprocessor output.

    -
    Syntax
    -

    #pragma fullpath_prepdump on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler shows the full paths of files specified by the #include directive as comments in the preprocessor output. Otherwise, only the file name portion of the path appears.

    -

    This pragma corresponds to the Show full paths option . To check this setting, use the __option (fullpath_prepdump), described in Checking Settings. See also “line_prepdump”. The default setting is off.

    -

    - - - - - + + + + + + + fullpath_prepdump + + + + +

    fullpath_prepdump

    +

    Shows the full path of included files in preprocessor output.

    +
    Syntax
    +

    #pragma fullpath_prepdump on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler shows the full paths of files specified by the #include directive as comments in the preprocessor output. Otherwise, only the file name portion of the path appears.

    +

    This pragma corresponds to the Show full paths option . To check this setting, use the __option (fullpath_prepdump), described in Checking Settings. See also “line_prepdump”. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_gcc_extensions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_gcc_extensions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_gcc_extensions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,77 +1,77 @@ - - - - - - - access_errors - - - - -

    gcc_extensions

    -

    Controls the acceptance of GNU C language extensions.

    -
    Syntax
    -

    #pragma gcc_extensions on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler accepts GNU C extensions in C source code. This includes the following non-ANSI C extensions:

    -
      -
    • Initialization of automatic struct or array variables with non-const values
    • -
    -
    -

    int foo(int arg)
    - {
    - int arr[2] = { arg, arg+1 };
    - }

    -
    -
      -
    • sizeof( void ) == 1
    • -
    • sizeof( function-type ) == 1
    • -
    • Limited support for GCC statements and declarations within expressions
    • -
    -
    -

    pragma gcc_extensions on
    - #define POW2(n) ({ int i,r; for(r=1,i=n; i>0; --i) r<<=1; r;})

    -

    This feature only works for expressions in function bodies and does not support code that requires any form of C++ exception handling (for example, throwing or catching exceptions or creating local or temporary class objects that require a destructor call).

    -

    int main()
    - {
    - return POW2(4);
    - }

    -
    -
      -
    • Macro redefinitions without a previous #undef.
    • -
    • The GCC keyword typeof. See “The __typeof__() and typeof() operators”, “Initialization of Local Arrays and Structures” for a description of these extensions.
    • -
    • Function pointer arithmetic supported
    • -
    • void* arithmetic supported
    • -
    • __builtin_constant_p (<expr>) supported
    • -
    • Forward declarations of arrays of incomplete type supported
    • -
    • Pre-C99 designated initializer syntax (deprecated) supported
    • -
    -
    -

    #pragma gcc_extensions on
    - struct S { int a, b, b; } s = { c:3, b:2, a:1 };

    -
    -
      -
    • Conditionals with omitted Operands supported
    • -
    -
    -

    #pragma gcc_extensions on
    - int x, y, z;
    - x = y ?: z;
    - Outputs:
    - x = y ? y ? z;

    -
    -
      -
    • long __builtin_expect (long exp, long c) now accepted
    • -
    -

    This pragma corresponds to the Enable GCC Extensions setting . To check the global optimizer, use __option (gcc_extensions), described in Checking Settings. The default setting is off.
    -

    -

    - - - - - + + + + + + + access_errors + + + + +

    gcc_extensions

    +

    Controls the acceptance of GNU C language extensions.

    +
    Syntax
    +

    #pragma gcc_extensions on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler accepts GNU C extensions in C source code. This includes the following non-ANSI C extensions:

    +
      +
    • Initialization of automatic struct or array variables with non-const values
    • +
    +
    +

    int foo(int arg)
    + {
    + int arr[2] = { arg, arg+1 };
    + }

    +
    +
      +
    • sizeof( void ) == 1
    • +
    • sizeof( function-type ) == 1
    • +
    • Limited support for GCC statements and declarations within expressions
    • +
    +
    +

    pragma gcc_extensions on
    + #define POW2(n) ({ int i,r; for(r=1,i=n; i>0; --i) r<<=1; r;})

    +

    This feature only works for expressions in function bodies and does not support code that requires any form of C++ exception handling (for example, throwing or catching exceptions or creating local or temporary class objects that require a destructor call).

    +

    int main()
    + {
    + return POW2(4);
    + }

    +
    +
      +
    • Macro redefinitions without a previous #undef.
    • +
    • The GCC keyword typeof. See “The __typeof__() and typeof() operators”, “Initialization of Local Arrays and Structures” for a description of these extensions.
    • +
    • Function pointer arithmetic supported
    • +
    • void* arithmetic supported
    • +
    • __builtin_constant_p (<expr>) supported
    • +
    • Forward declarations of arrays of incomplete type supported
    • +
    • Pre-C99 designated initializer syntax (deprecated) supported
    • +
    +
    +

    #pragma gcc_extensions on
    + struct S { int a, b, b; } s = { c:3, b:2, a:1 };

    +
    +
      +
    • Conditionals with omitted Operands supported
    • +
    +
    +

    #pragma gcc_extensions on
    + int x, y, z;
    + x = y ?: z;
    + Outputs:
    + x = y ? y ? z;

    +
    +
      +
    • long __builtin_expect (long exp, long c) now accepted
    • +
    +

    This pragma corresponds to the Enable GCC Extensions setting . To check the global optimizer, use __option (gcc_extensions), described in Checking Settings. The default setting is off.
    +

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_global_optimizer.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_global_optimizer.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_global_optimizer.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - global_optimizer - - - - -

    global_optimizer

    -

    Controls whether the Global Optimizer is invoked by the compiler.

    -
    Syntax
    -

    #pragma global_optimizer on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    In most compilers, this pragma determines whether the Global Optimizer is invoked in the Global Optimizations panel. If disabled, only simple optimizations and back-end optimizations are performed.

    -

    NOTE This is not the same as #pragma optimization_level. The Global Optimizer is invoked even at optimization_level 0 if #pragma global_optimizer is enabled.

    -

    This pragma corresponds to the settings in the Global Optimizations panel. To check this setting, use __option (global_optimizer) described in Checking Settings. The default setting is on.

    - - - - - + + + + + + + global_optimizer + + + + +

    global_optimizer

    +

    Controls whether the Global Optimizer is invoked by the compiler.

    +
    Syntax
    +

    #pragma global_optimizer on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    In most compilers, this pragma determines whether the Global Optimizer is invoked in the Global Optimizations panel. If disabled, only simple optimizations and back-end optimizations are performed.

    +

    NOTE This is not the same as #pragma optimization_level. The Global Optimizer is invoked even at optimization_level 0 if #pragma global_optimizer is enabled.

    +

    This pragma corresponds to the settings in the Global Optimizations panel. To check this setting, use __option (global_optimizer) described in Checking Settings. The default setting is on.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ignore_oldstyle.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ignore_oldstyle.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_ignore_oldstyle.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,42 +1,42 @@ - - - - - - - access_errors - - - - -

    ignore_oldstyle

    -

    Controls the recognition of function declarations that follow the conventions in place before ANSI/ISO C (i.e., “K&R” style).

    -
    Syntax
    - -

    #pragma ignore_oldstyle on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler ignores old-style function declarations and lets you prototype a function any way you want. In old-style declarations, you do not specify the types of the arguments in the argument list but on separate lines.

    -

    For example, the code in Listing 10.21 defines a prototype for a function with an old-style declaration.

    -
    -

    Listing 10.21 Mixing Old-style and Prototype Function Declarations

    -

    int f(char x, short y, float z);

    -

    #pragma ignore_oldstyle on

    -

    f(x, y, z)
    - char x;
    - short y;
    - float z;
    - {
    - return (int)x+y+z;
    - }

    -

    #pragma ignore_oldstyle reset

    -
    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (ignore_oldstyle), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + access_errors + + + + +

    ignore_oldstyle

    +

    Controls the recognition of function declarations that follow the conventions in place before ANSI/ISO C (i.e., “K&R” style).

    +
    Syntax
    + +

    #pragma ignore_oldstyle on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler ignores old-style function declarations and lets you prototype a function any way you want. In old-style declarations, you do not specify the types of the arguments in the argument list but on separate lines.

    +

    For example, the code in Listing 10.21 defines a prototype for a function with an old-style declaration.

    +
    +

    Listing 10.21 Mixing Old-style and Prototype Function Declarations

    +

    int f(char x, short y, float z);

    +

    #pragma ignore_oldstyle on

    +

    f(x, y, z)
    + char x;
    + short y;
    + float z;
    + {
    + return (int)x+y+z;
    + }

    +

    #pragma ignore_oldstyle reset

    +
    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (ignore_oldstyle), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_import.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_import.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_import.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - import - - - - -

    import

    -

    Controls the importing of data or functions.

    -
    Syntax
    - #pragma import on | off | reset
    - #pragma import list name1 [, name2 ]*

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When using the #pragma import on format, all functions are automatically imported.

    -

    When using the #pragma import list format, use to tag data or functions for importing. It applies to all names if it is used on an overloaded function. You cannot use this pragma for C++ member functions or static class members. An example of an imported list:

    -

    extern int f(),g;
    - #pragma import list f,g

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (import), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + import + + + + +

    import

    +

    Controls the importing of data or functions.

    +
    Syntax
    + #pragma import on | off | reset
    + #pragma import list name1 [, name2 ]*

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When using the #pragma import on format, all functions are automatically imported.

    +

    When using the #pragma import list format, use to tag data or functions for importing. It applies to all names if it is used on an overloaded function. You cannot use this pragma for C++ member functions or static class members. An example of an imported list:

    +

    extern int f(),g;
    + #pragma import list f,g

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (import), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_bottom_up.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_bottom_up.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_bottom_up.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,40 +1,40 @@ - - - - - - - inline_bottom_up - - - - -

    inline_bottom_up

    -

    Controls the bottom-up function inlining method.

    -
    Syntax
    -

    #pragma inline_bottom_up on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    Bottom-up function inlining tries to expand up to eight levels of inline leaf functions. The maximum size of an expanded inline function and the caller of an inline function can be controlled by the pragmas shown in Listing 10.23 and Listing 10.24.

    -
    -

    Listing 10.23 Maximum Complexity of an Inlined Function

    -

    // maximum complexity of an inlined function
    - #pragma inline_max_size( max ) // default max == 256

    -
    -
    -

    Listing 10.24 Maximum Complexity of a Function that Calls Inlined Functions

    -

    // maximum complexity of a function that calls inlined functions
    - #pragma inline_max_total_size( max ) // default max == 10000

    -
    -

    where max loosely corresponds to the number of instructions in a function.

    -

    If you enable this pragma, the compiler calculates inline depth from the last function in the call chain up to the first function that starts the call chain. The number of functions the compiler inlines from the bottom depends on the values of inline_depth, inline_max_size, and inline_max_total_size. This method generates faster and smaller source code for some (but not all) programs with many nested inline function calls.

    -

    If you disable this pragma, top-down inlining is selected, and the inline_depth setting determines the limits for top-down inlining.

    -

    The pragmas inline_max_size and inline_max_total_size do not affect the compiler in top-down mode.

    -

    This pragma corresponds to the Bottom-up Inline setting . To check this setting, use __option (inline_bottom_up), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + inline_bottom_up + + + + +

    inline_bottom_up

    +

    Controls the bottom-up function inlining method.

    +
    Syntax
    +

    #pragma inline_bottom_up on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    Bottom-up function inlining tries to expand up to eight levels of inline leaf functions. The maximum size of an expanded inline function and the caller of an inline function can be controlled by the pragmas shown in Listing 10.23 and Listing 10.24.

    +
    +

    Listing 10.23 Maximum Complexity of an Inlined Function

    +

    // maximum complexity of an inlined function
    + #pragma inline_max_size( max ) // default max == 256

    +
    +
    +

    Listing 10.24 Maximum Complexity of a Function that Calls Inlined Functions

    +

    // maximum complexity of a function that calls inlined functions
    + #pragma inline_max_total_size( max ) // default max == 10000

    +
    +

    where max loosely corresponds to the number of instructions in a function.

    +

    If you enable this pragma, the compiler calculates inline depth from the last function in the call chain up to the first function that starts the call chain. The number of functions the compiler inlines from the bottom depends on the values of inline_depth, inline_max_size, and inline_max_total_size. This method generates faster and smaller source code for some (but not all) programs with many nested inline function calls.

    +

    If you disable this pragma, top-down inlining is selected, and the inline_depth setting determines the limits for top-down inlining.

    +

    The pragmas inline_max_size and inline_max_total_size do not affect the compiler in top-down mode.

    +

    This pragma corresponds to the Bottom-up Inline setting . To check this setting, use __option (inline_bottom_up), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_bottom_up_once.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_bottom_up_once.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_bottom_up_once.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - inline_bottom_up_once - - - - -

    inline_bottom_up_once

    -

    Performs a single bottom-up function inlining operation.

    -
    Syntax
    -

    #pragma inline_bottom_up_once on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma does not correspond to any panel setting. To check this setting, use __option (inline_bottom_up_once), described in Checking Settings. The default setting is on. -

    - - - - - + + + + + + + inline_bottom_up_once + + + + +

    inline_bottom_up_once

    +

    Performs a single bottom-up function inlining operation.

    +
    Syntax
    +

    #pragma inline_bottom_up_once on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma does not correspond to any panel setting. To check this setting, use __option (inline_bottom_up_once), described in Checking Settings. The default setting is on. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_depth.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_depth.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_depth.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,39 +1,39 @@ - - - - - - - inline_depth - - - - -

    inline_depth

    -

    Controls how many passes are used to expand inline function calls.

    -
    Syntax
    -

    #pragma inline_depth(n)
    - #pragma inline_depth(smart)

    -
    Parameters
    -

    n

    -
    -

    Sets the number of passes used to expand inline function calls. The number n is an integer from 0 to 1024 or the smart specifier. It also represents the distance allowed in the call chain from the last function up. For example, if d is the total depth of a call chain, then functions below (d-n) are inlined if they do not exceed the following size settings:

    -

    #pragma inline_max_size(n)
    - #pragma inline_max_total_size(n)

    -

    The first pragma sets the maximum function size to be considered for inlining; the second sets the maximum size to which a function is allowed to grow after the functions it calls are inlined. Here, n is the number of statements, operands, and operators in the function, which turns out to be roughly twice the number of instructions generated by the function. However, this number can vary from function to function. For the inline_max_size pragma, the default value of n is 256; for the pragma inline_max_total_size, the default value of n is 10000.

    -
    -

    smart

    -
    -

    The smart specifier is the default mode, with four passes where the passes 2-4 are limited to small inline functions. All inlineable functions are expanded if inline_depth is set to 1-1024.
    -

    -
    -
    Targets
    - All platforms.
    -
    Remarks
    - The pragmas dont_inline and always_inline override this pragma. This pragma corresponds to the Inline Depth setting . The default setting is off. -

    - - - - - + + + + + + + inline_depth + + + + +

    inline_depth

    +

    Controls how many passes are used to expand inline function calls.

    +
    Syntax
    +

    #pragma inline_depth(n)
    + #pragma inline_depth(smart)

    +
    Parameters
    +

    n

    +
    +

    Sets the number of passes used to expand inline function calls. The number n is an integer from 0 to 1024 or the smart specifier. It also represents the distance allowed in the call chain from the last function up. For example, if d is the total depth of a call chain, then functions below (d-n) are inlined if they do not exceed the following size settings:

    +

    #pragma inline_max_size(n)
    + #pragma inline_max_total_size(n)

    +

    The first pragma sets the maximum function size to be considered for inlining; the second sets the maximum size to which a function is allowed to grow after the functions it calls are inlined. Here, n is the number of statements, operands, and operators in the function, which turns out to be roughly twice the number of instructions generated by the function. However, this number can vary from function to function. For the inline_max_size pragma, the default value of n is 256; for the pragma inline_max_total_size, the default value of n is 10000.

    +
    +

    smart

    +
    +

    The smart specifier is the default mode, with four passes where the passes 2-4 are limited to small inline functions. All inlineable functions are expanded if inline_depth is set to 1-1024.
    +

    +
    +
    Targets
    + All platforms.
    +
    Remarks
    + The pragmas dont_inline and always_inline override this pragma. This pragma corresponds to the Inline Depth setting . The default setting is off. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_auto_size.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_auto_size.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_auto_size.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - inline_max_auto_size - - - - -

    inline_max_auto_size

    -

    Determines the maximum complexity for an auto-inlined function.

    -
    Syntax
    -

    #pragma inline_max_auto_size ( complex )

    -
    Parameters
    -

    complex

    -
    -

    The complex value is an approximation of the number of statements in a function, the current default is 15. Selecting a higher value will inline more functions, but can lead to excessive code bloat.

    -
    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma does not correspond to any panel setting. To check this setting, use __option (inline_max_auto_size), described in Checking Settings. -

    - - - - - + + + + + + + inline_max_auto_size + + + + +

    inline_max_auto_size

    +

    Determines the maximum complexity for an auto-inlined function.

    +
    Syntax
    +

    #pragma inline_max_auto_size ( complex )

    +
    Parameters
    +

    complex

    +
    +

    The complex value is an approximation of the number of statements in a function, the current default is 15. Selecting a higher value will inline more functions, but can lead to excessive code bloat.

    +
    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma does not correspond to any panel setting. To check this setting, use __option (inline_max_auto_size), described in Checking Settings. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_size.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_size.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_size.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - inline_max_size - - - - -

    inline_max_size

    -

    Sets the maximum number of statements, operands, and operators used to consider the function for inlining.

    -
    Syntax
    -

    #pragma inline_max_size ( size )

    -
    Parameters
    -

    size

    -
    -

    The maximum number of statements, operands, and operators in the function to consider it for inlining, up to a maximum of 256.

    -
    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma does not correspond to any panel setting. To check this setting, use __option (inline_max_size), described in Checking Settings. The default is 256. -

    - - - - - + + + + + + + inline_max_size + + + + +

    inline_max_size

    +

    Sets the maximum number of statements, operands, and operators used to consider the function for inlining.

    +
    Syntax
    +

    #pragma inline_max_size ( size )

    +
    Parameters
    +

    size

    +
    +

    The maximum number of statements, operands, and operators in the function to consider it for inlining, up to a maximum of 256.

    +
    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma does not correspond to any panel setting. To check this setting, use __option (inline_max_size), described in Checking Settings. The default is 256. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_total_size.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_total_size.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_max_total_size.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - inline_max_total_size - - - - -

    inline_max_total_size

    -

    Sets the maximum total size a function can grow to when the function it calls is inlined.

    -
    Syntax
    -

    #pragma inline_max_total_size ( max_size )

    -
    Parameters
    -

    max_size

    -
    -

    The maximum number of statements, operands, and operators the inlined function calls that are also inlined, up to a maximum of 10000.

    -
    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma does not correspond to any panel setting. To check this setting, use __option (inline_max_total_size), described in Checking Settings. The default is 10000. -

    - - - - - + + + + + + + inline_max_total_size + + + + +

    inline_max_total_size

    +

    Sets the maximum total size a function can grow to when the function it calls is inlined.

    +
    Syntax
    +

    #pragma inline_max_total_size ( max_size )

    +
    Parameters
    +

    max_size

    +
    +

    The maximum number of statements, operands, and operators the inlined function calls that are also inlined, up to a maximum of 10000.

    +
    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma does not correspond to any panel setting. To check this setting, use __option (inline_max_total_size), described in Checking Settings. The default is 10000. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_instmgr_file.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_instmgr_file.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_instmgr_file.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - instmgr_file - - - - -

    instmgr_file

    -

    Controls where the instance manager database is written, to the target data directory or to a separate file.

    -
    Syntax
    -

    #pragma instmgr_file "name" -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When the Use Instance Manager option is on, the IDE writes the instance manager database to the project’s data directory. If the #pragma instmgr_file is used, the database is written to a separate file.

    -

    Also, a separate instance file is always written when the command-line tools are used.

    -

    NOTE Should you need to report a bug, use this option to create a separate instance manager database, which can then be sent to technical support with your bug report.

    -

    This pragma corresponds to the Use Instance Manager setting . The default setting is off.

    -

    - - - - - + + + + + + + instmgr_file + + + + +

    instmgr_file

    +

    Controls where the instance manager database is written, to the target data directory or to a separate file.

    +
    Syntax
    +

    #pragma instmgr_file "name" +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When the Use Instance Manager option is on, the IDE writes the instance manager database to the project’s data directory. If the #pragma instmgr_file is used, the database is written to a separate file.

    +

    Also, a separate instance file is always written when the command-line tools are used.

    +

    NOTE Should you need to report a bug, use this option to create a separate instance manager database, which can then be sent to technical support with your bug report.

    +

    This pragma corresponds to the Use Instance Manager setting . The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_internal.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_internal.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_internal.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - internal - - - - -

    internal

    -

    Controls the internalization of data or functions.

    -
    Syntax
    -

    #pragma internal on | off | reset
    - #pragma internal list name1 [, name2 ]*

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When using the #pragma internal on format, all data and functions are automatically internalized.

    -

    Use the #pragma internal list format to tag specific data or functions for internalization. It applies to all names if it is used on an overloaded function. You cannot use this pragma for C++ member functions or static class members. An example of an internalized list:

    -

    extern int f(),g;
    - #pragma internal list f,g

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (internal), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + internal + + + + +

    internal

    +

    Controls the internalization of data or functions.

    +
    Syntax
    +

    #pragma internal on | off | reset
    + #pragma internal list name1 [, name2 ]*

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When using the #pragma internal on format, all data and functions are automatically internalized.

    +

    Use the #pragma internal list format to tag specific data or functions for internalization. It applies to all names if it is used on an overloaded function. You cannot use this pragma for C++ member functions or static class members. An example of an internalized list:

    +

    extern int f(),g;
    + #pragma internal list f,g

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (internal), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_keepcomments.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_keepcomments.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_keepcomments.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - access_errors - - - - -

    keepcomments

    -

    Controls whether comments are emitted in the preprocessor output.

    -
    Syntax
    -

    #pragma keepcomments on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma corresponds to the Keep comments option . The default setting is off. -

    - - - - - + + + + + + + access_errors + + + + +

    keepcomments

    +

    Controls whether comments are emitted in the preprocessor output.

    +
    Syntax
    +

    #pragma keepcomments on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma corresponds to the Keep comments option . The default setting is off. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_lib_export.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_lib_export.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_lib_export.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,31 +1,31 @@ - - - - - - - lib_export - - - - -

    lib_export

    -

    Controls the exporting of data or functions.

    -
    Syntax
    -

    #pragma lib_export on | off | reset
    - #pragma lib_export list name1 [, name2 ]*
    -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When using the #pragma lib_export on format, all data and functions are automatically exported.

    -

    Use the #pragma lib_export list format to tag specific data or functions for exporting. It applies to all names if it is used on an overloaded function. You cannot use this pragma for C++ member functions or static class members. An example of a lib_export list:

    -

    extern int f(),g;
    - #pragma lib_export list f,g

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (lib_export), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + lib_export + + + + +

    lib_export

    +

    Controls the exporting of data or functions.

    +
    Syntax
    +

    #pragma lib_export on | off | reset
    + #pragma lib_export list name1 [, name2 ]*
    +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When using the #pragma lib_export on format, all data and functions are automatically exported.

    +

    Use the #pragma lib_export list format to tag specific data or functions for exporting. It applies to all names if it is used on an overloaded function. You cannot use this pragma for C++ member functions or static class members. An example of a lib_export list:

    +

    extern int f(),g;
    + #pragma lib_export list f,g

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (lib_export), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_line_prepdump.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_line_prepdump.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_line_prepdump.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - line_prepdump - - - - -

    line_prepdump

    -

    Shows #line directives in preprocessor output.

    -
    Syntax
    -

    #pragma line_prepdump on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, #line directives appear in preprocessor output, and line spacing is preserved through the insertion of empty lines.

    -

    Use this pragma with the command-line compiler’s -E option to make sure that #line directives are inserted in the compiler’s output.

    -

    This pragma corresponds to the Use #line option . To check this setting, use the __option (line_prepdump), described in Checking Settings. See also “fullpath_prepdump”. The default setting is off.

    -

    - - - - - + + + + + + + line_prepdump + + + + +

    line_prepdump

    +

    Shows #line directives in preprocessor output.

    +
    Syntax
    +

    #pragma line_prepdump on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, #line directives appear in preprocessor output, and line spacing is preserved through the insertion of empty lines.

    +

    Use this pragma with the command-line compiler’s -E option to make sure that #line directives are inserted in the compiler’s output.

    +

    This pragma corresponds to the Use #line option . To check this setting, use the __option (line_prepdump), described in Checking Settings. See also “fullpath_prepdump”. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - longlong - - - - -

    longlong

    -

    Controls the availability of the long long type.

    -
    Syntax
    -

    #pragma longlong on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When the longlong pragma is enabled, the C or C++ compiler lets you define a 64-bit integer with the type specifier long long. This type is twice as large as a long int, which is a 32-bit integer. A variable of type long long can hold values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

    -

    An unsigned long long can hold values from 0 to 18,446,744,073,709,551,615.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (longlong), described in Checking Settings.

    -

    This pragma is on in compiles that support the long long type by default. It is off in compiles that do not support, or cannot turn on, the long long type.

    -

    - - - - - + + + + + + + longlong + + + + +

    longlong

    +

    Controls the availability of the long long type.

    +
    Syntax
    +

    #pragma longlong on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When the longlong pragma is enabled, the C or C++ compiler lets you define a 64-bit integer with the type specifier long long. This type is twice as large as a long int, which is a 32-bit integer. A variable of type long long can hold values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

    +

    An unsigned long long can hold values from 0 to 18,446,744,073,709,551,615.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (longlong), described in Checking Settings.

    +

    This pragma is on in compiles that support the long long type by default. It is off in compiles that do not support, or cannot turn on, the long long type.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong_enums.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong_enums.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong_enums.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - longlong_enums - - - - -

    longlong_enums

    -

    Controls whether or not enumerated types may have the size of the long long type.

    -
    Syntax
    -

    #pragma longlong_enums on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma lets you use enumerators that are large enough to be long long integers. It is ignored if you enable the pragma enumsalwaysint (described in “enumsalwaysint”).

    -

    For more information on how the compiler handles enumerated types, see Enumerated Types.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (longlong_enums), described in Checking Settings. The default setting is on.

    -

    - - - - - + + + + + + + longlong_enums + + + + +

    longlong_enums

    +

    Controls whether or not enumerated types may have the size of the long long type.

    +
    Syntax
    +

    #pragma longlong_enums on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma lets you use enumerators that are large enough to be long long integers. It is ignored if you enable the pragma enumsalwaysint (described in “enumsalwaysint”).

    +

    For more information on how the compiler handles enumerated types, see Enumerated Types.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (longlong_enums), described in Checking Settings. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong_prepeval.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong_prepeval.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_longlong_prepeval.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - longlong_prepeval - - - - -

    longlong_prepeval

    -

    Controls whether or not the preprocessor treats integral constant expressions as long long.

    -
    Syntax
    -

    #pragma longlong_prepeval on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the C/C++ preprocessor treats integral constant expressions in #if, #elif as type long long.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (longlong_prepeval), described in Checking Settings. The default setting is on.

    -

    - - - - - + + + + + + + longlong_prepeval + + + + +

    longlong_prepeval

    +

    Controls whether or not the preprocessor treats integral constant expressions as long long.

    +
    Syntax
    +

    #pragma longlong_prepeval on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the C/C++ preprocessor treats integral constant expressions in #if, #elif as type long long.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (longlong_prepeval), described in Checking Settings. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_macro_prepdump.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_macro_prepdump.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_macro_prepdump.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - macro_prepdump - - - - -

    macro_prepdump

    -

    Controls whether macro #defines and #undefs are emitted in the output when parsed.

    -
    Syntax
    -

    #pragma macro_prepdump on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    TIP Use this pragma to help unravel confusing problems like macros that are aliasing indentifiers or where headers are redefining macros unexpectedly.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (macro_prepdump), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + macro_prepdump + + + + +

    macro_prepdump

    +

    Controls whether macro #defines and #undefs are emitted in the output when parsed.

    +
    Syntax
    +

    #pragma macro_prepdump on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    TIP Use this pragma to help unravel confusing problems like macros that are aliasing indentifiers or where headers are redefining macros unexpectedly.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (macro_prepdump), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mark.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mark.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mark.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - mark - - - - -

    mark

    -

    Adds an item to the Function pop-up menu in the IDE editor.

    -
    Syntax
    -

    #pragma mark itemName

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma adds itemName to the source file’s Function pop-up menu. If you open the file in the Carbide Editor and select the item from the Function pop-up menu, the editor brings you to the pragma. Note that if the pragma is inside a function definition, the item does not appear in the Function pop-up menu.

    -

    If itemName begins with “--”, a menu separator appears in the IDE’s Function pop-up menu:

    -

    #pragma mark --

    -

    This pragma does not correspond to any panel setting.

    -

    - - - - - + + + + + + + mark + + + + +

    mark

    +

    Adds an item to the Function pop-up menu in the IDE editor.

    +
    Syntax
    +

    #pragma mark itemName

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma adds itemName to the source file’s Function pop-up menu. If you open the file in the Carbide Editor and select the item from the Function pop-up menu, the editor brings you to the pragma. Note that if the pragma is inside a function definition, the item does not appear in the Function pop-up menu.

    +

    If itemName begins with “--”, a menu separator appears in the IDE’s Function pop-up menu:

    +

    #pragma mark --

    +

    This pragma does not correspond to any panel setting.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_maxerrorcount.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_maxerrorcount.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_maxerrorcount.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,35 +1,35 @@ - - - - - - - maxerrorcount - - - - -

    maxerrorcount

    -

    Limits the number of errors emitted while compiling a single file.

    -
    Syntax
    -

    #pragma maxerrorcount( <num> | off )

    -
    Parameters
    -

    num

    -
    -

    Specifies the maximum number of error messages issued per source file.

    -
    -

    off

    -
    -

    Effectively unbounds the number of issued error messages.

    -
    -
    Targets
    - All platforms.
    -
    Remarks
    -

    The total number of error messages emitted may include one final message "Too many errors emitted."

    -

    This pragma does not correspond to any panel setting. By default, this pragma is off.

    -

    - - - - - + + + + + + + maxerrorcount + + + + +

    maxerrorcount

    +

    Limits the number of errors emitted while compiling a single file.

    +
    Syntax
    +

    #pragma maxerrorcount( <num> | off )

    +
    Parameters
    +

    num

    +
    +

    Specifies the maximum number of error messages issued per source file.

    +
    +

    off

    +
    +

    Effectively unbounds the number of issued error messages.

    +
    +
    Targets
    + All platforms.
    +
    Remarks
    +

    The total number of error messages emitted may include one final message "Too many errors emitted."

    +

    This pragma does not correspond to any panel setting. By default, this pragma is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_message.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_message.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_message.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - message - - - - -

    message

    -

    Tells the compiler to issue a text message to the user. The message appears in the Errors & Warnings window.

    -
    Syntax
    -

    #pragma message( msg )

    -
    Parameter
    -

    msg

    -
    -

    Actual message to issue. Does not have to be a string literal.

    -
    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma does not correspond to any panel setting. -

    - - - - - + + + + + + + message + + + + +

    message

    +

    Tells the compiler to issue a text message to the user. The message appears in the Errors & Warnings window.

    +
    Syntax
    +

    #pragma message( msg )

    +
    Parameter
    +

    msg

    +
    +

    Actual message to issue. Does not have to be a string literal.

    +
    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma does not correspond to any panel setting. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mpwc_newline.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mpwc_newline.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mpwc_newline.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - mpwc_newline - - - - -

    mpwc_newline

    -

    Controls the newline character convention.

    -
    Syntax
    -

    #pragma mpwc_newline on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler uses the MPW conventions for the '\n' and '\r' characters. Otherwise, the compiler uses the ANSI C/C++ conventions for these characters.

    -

    In MPW, '\n' is a Carriage Return (0x0D) and '\r' is a Line Feed (0x0A). In ANSI C/C++, they are reversed: '\n' is a Line Feed and '\r' is a Carriage Return.

    -

    If you enable this pragma, use ANSI C/C++ libraries that were compiled when this pragma was enabled. The file names of the 68K versions of these libraries include the letters NL (for example, MSL C.68K (NL_2i).Lib). The PowerPC versions of these libraries are marked with NL; for example, MSL C.PPC (NL).Lib.

    -

    If you enable this pragma and use the standard ANSI C/C++ libraries, you cannot read and write '\n' and '\r' properly. For example, printing '\n' brings you to the beginning of the current line instead of inserting a newline.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (mpwc_newline), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + mpwc_newline + + + + +

    mpwc_newline

    +

    Controls the newline character convention.

    +
    Syntax
    +

    #pragma mpwc_newline on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler uses the MPW conventions for the '\n' and '\r' characters. Otherwise, the compiler uses the ANSI C/C++ conventions for these characters.

    +

    In MPW, '\n' is a Carriage Return (0x0D) and '\r' is a Line Feed (0x0A). In ANSI C/C++, they are reversed: '\n' is a Line Feed and '\r' is a Carriage Return.

    +

    If you enable this pragma, use ANSI C/C++ libraries that were compiled when this pragma was enabled. The file names of the 68K versions of these libraries include the letters NL (for example, MSL C.68K (NL_2i).Lib). The PowerPC versions of these libraries are marked with NL; for example, MSL C.PPC (NL).Lib.

    +

    If you enable this pragma and use the standard ANSI C/C++ libraries, you cannot read and write '\n' and '\r' properly. For example, printing '\n' brings you to the beginning of the current line instead of inserting a newline.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (mpwc_newline), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mpwc_relax.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mpwc_relax.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_mpwc_relax.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,33 +1,33 @@ - - - - - - - mpwc_relax - - - - -

    mpwc_relax

    -

    Controls the compatibility of the char* and unsigned char* types.

    -
    Syntax
    -

    #pragma mpwc_relax on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler treats char* and unsigned char* as the same type. This setting is especially useful if you are using code written before the ANSI C standard. This old source code frequently used these types interchangeably.

    -

    This setting has no effect on C++ source code.

    -

    You can use this pragma to relax function pointer checking:

    -

    #pragma mpwc_relax on
    - extern void f(char *);
    - extern void(*fp1)(void *) = &f; // error but allowed
    - extern void(*fp2)(unsigned char *) = &f; // error but allowed

    -

    This pragma does not correspond to any panel setting. To check this setting, __option (mpwc_relax), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + mpwc_relax + + + + +

    mpwc_relax

    +

    Controls the compatibility of the char* and unsigned char* types.

    +
    Syntax
    +

    #pragma mpwc_relax on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler treats char* and unsigned char* as the same type. This setting is especially useful if you are using code written before the ANSI C standard. This old source code frequently used these types interchangeably.

    +

    This setting has no effect on C++ source code.

    +

    You can use this pragma to relax function pointer checking:

    +

    #pragma mpwc_relax on
    + extern void f(char *);
    + extern void(*fp1)(void *) = &f; // error but allowed
    + extern void(*fp2)(unsigned char *) = &f; // error but allowed

    +

    This pragma does not correspond to any panel setting. To check this setting, __option (mpwc_relax), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_msg_show_lineref.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_msg_show_lineref.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_msg_show_lineref.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - msg_show_lineref - - - - -

    msg_show_lineref

    -

    Controls diagnostic output by showing errors in source pointed to by #line.

    -
    Syntax
    -

    #pragma msg_show_lineref on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma does not correspond to any panel setting. To check this setting, use __option (msg_show_lineref), described in Checking Settings. The default setting is on. -

    - - - - - + + + + + + + msg_show_lineref + + + + +

    msg_show_lineref

    +

    Controls diagnostic output by showing errors in source pointed to by #line.

    +
    Syntax
    +

    #pragma msg_show_lineref on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma does not correspond to any panel setting. To check this setting, use __option (msg_show_lineref), described in Checking Settings. The default setting is on. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_msg_show_realref.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_msg_show_realref.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_msg_show_realref.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - msg_show_realref - - - - -

    msg_show_realref

    -

    Controls diagnostic output showing errors in actual source where #line reference exists.

    -
    Syntax
    -

    #pragma msg_show_realref on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma does not correspond to any panel setting. To check this setting, use __option (msg_show_realref), described in Checking Settings. The default setting is on. -

    - - - - - + + + + + + + msg_show_realref + + + + +

    msg_show_realref

    +

    Controls diagnostic output showing errors in actual source where #line reference exists.

    +
    Syntax
    +

    #pragma msg_show_realref on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma does not correspond to any panel setting. To check this setting, use __option (msg_show_realref), described in Checking Settings. The default setting is on. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_multibyteaware.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_multibyteaware.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_multibyteaware.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - multibyteaware - - - - -

    multibyteaware

    -

    Controls how the Source encoding option is treated

    -
    Syntax
    -

    #pragma multibyteaware on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma has been deprecated. See the section “Multibyte and Unicode Support” and the #pragma text_encoding for more details.

    -

    When on, this pragma treats the Source encoding of “ASCII” like “Autodetect”. When off, this pragma treats a Source encoding of “Autodetect” like “ASCII” setting.

    -

    NOTE Previously, this pragma told the compiler to “look twice” at the “\” character to avoid misinterpreting the character in a multibyte character sequence.

    -

    This pragma does not correspond to any panel setting, but the replacement option Source encoding appears . To check this setting, use __option (multibyteaware), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + multibyteaware + + + + +

    multibyteaware

    +

    Controls how the Source encoding option is treated

    +
    Syntax
    +

    #pragma multibyteaware on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma has been deprecated. See the section “Multibyte and Unicode Support” and the #pragma text_encoding for more details.

    +

    When on, this pragma treats the Source encoding of “ASCII” like “Autodetect”. When off, this pragma treats a Source encoding of “Autodetect” like “ASCII” setting.

    +

    NOTE Previously, this pragma told the compiler to “look twice” at the “\” character to avoid misinterpreting the character in a multibyte character sequence.

    +

    This pragma does not correspond to any panel setting, but the replacement option Source encoding appears . To check this setting, use __option (multibyteaware), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_new_mangler.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_new_mangler.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_new_mangler.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - access_errors - - - - -

    new_mangler

    -

    Controls the inclusion or exclusion of a template instance’s function return type to the mangled name of the instance.

    -
    Syntax
    -

    #pragma new_mangler on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    The C++ standard requires that the function return type of a template instance to be included in the mangled name, which can cause incompatibilities. Enabling this pragma within a prefix file resolves those incompatibilities.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (new_mangler), described in Checking Settings. The default setting is on.

    -

    - - - - - + + + + + + + access_errors + + + + +

    new_mangler

    +

    Controls the inclusion or exclusion of a template instance’s function return type to the mangled name of the instance.

    +
    Syntax
    +

    #pragma new_mangler on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    The C++ standard requires that the function return type of a template instance to be included in the mangled name, which can cause incompatibilities. Enabling this pragma within a prefix file resolves those incompatibilities.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (new_mangler), described in Checking Settings. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_no_conststringconv.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_no_conststringconv.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_no_conststringconv.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,34 +1,34 @@ - - - - - - - no_conststringconv - - - - -

    no_conststringconv

    -

    Disables the deprecated implicit const string literal conversion (ISO C++, §4.2).

    -
    Syntax
    -

    #pragma no_conststringconv on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When enabled, the compiler generates an error when it encounters an implicit const string conversion. See example in Listing 10.27.

    -
    -

    Listing 10.27 Example of const string conversion

    -

    #pragma no_conststringconv on
    - char *cp = "Hello World"; // generates error: illegal
    - // implicit conversion from
    - // ’const char[12]’ to ’char *’

    -
    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (no_conststringconv), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + no_conststringconv + + + + +

    no_conststringconv

    +

    Disables the deprecated implicit const string literal conversion (ISO C++, §4.2).

    +
    Syntax
    +

    #pragma no_conststringconv on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When enabled, the compiler generates an error when it encounters an implicit const string conversion. See example in Listing 10.27.

    +
    +

    Listing 10.27 Example of const string conversion

    +

    #pragma no_conststringconv on
    + char *cp = "Hello World"; // generates error: illegal
    + // implicit conversion from
    + // ’const char[12]’ to ’char *’

    +
    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (no_conststringconv), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_no_static_dtors.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_no_static_dtors.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_no_static_dtors.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - no_static_dtors - - - - -

    no_static_dtors

    -

    Controls the generation of static destructors in C++.

    -
    Syntax
    -

    #pragma no_static_dtors on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler does not generate destructor calls for static data objects. Use this pragma for smaller object code for C++ programs that never exit.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (no_static_dtors), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + no_static_dtors + + + + +

    no_static_dtors

    +

    Controls the generation of static destructors in C++.

    +
    Syntax
    +

    #pragma no_static_dtors on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler does not generate destructor calls for static data objects. Use this pragma for smaller object code for C++ programs that never exit.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (no_static_dtors), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_nosyminline.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_nosyminline.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_nosyminline.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - nosyminline - - - - -

    nosyminline

    -

    Controls whether debug information is gathered for inline/template functions.

    -
    Syntax
    -

    #pragma nosyminline on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When on, debug information is not gathered for inline/template functions.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (nosyminline), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + nosyminline + + + + +

    nosyminline

    +

    Controls whether debug information is gathered for inline/template functions.

    +
    Syntax
    +

    #pragma nosyminline on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When on, debug information is not gathered for inline/template functions.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (nosyminline), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_notonce.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_notonce.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_notonce.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - notonce - - - - -

    notonce

    -

    Controls whether or not the compiler lets included files be repeatedly included, even with #pragma once on.

    -
    Syntax
    -

    #pragma notonce

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, files can be repeatedly #included, even if you have enabled #pragma once on. For more information, see “once”.

    -

    This pragma does not correspond to any panel setting.

    -

    - - - - - + + + + + + + notonce + + + + +

    notonce

    +

    Controls whether or not the compiler lets included files be repeatedly included, even with #pragma once on.

    +
    Syntax
    +

    #pragma notonce

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, files can be repeatedly #included, even if you have enabled #pragma once on. For more information, see “once”.

    +

    This pragma does not correspond to any panel setting.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_objective_c.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_objective_c.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_objective_c.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,61 +1,61 @@ - - - - - - - access_errors - - - - -

    objective_c

    -

    Controls the use of Objective-C keywords.

    -
    Syntax
    -

    #pragma objective_c on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler lets you use the following additional objective C keywords:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @class@def@encode
    @end@implementation@interface
    @private@protocol@protected
    @public@selectorbycopy
    byrefininout
    onewayout 
    -

    The @protocol forward declarations are supported

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (objective_c), described in Checking Settings.

    -

    By default, this setting is automatically enabled when a file’s extension is “.m” or “.pchm”. This setting and #pragma cplusplus on are automatically enabled when a file's extension is “.mm”, “.M”, or “.pchmm”.

    -

    - - - - - + + + + + + + access_errors + + + + +

    objective_c

    +

    Controls the use of Objective-C keywords.

    +
    Syntax
    +

    #pragma objective_c on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler lets you use the following additional objective C keywords:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    @class@def@encode
    @end@implementation@interface
    @private@protocol@protected
    @public@selectorbycopy
    byrefininout
    onewayout 
    +

    The @protocol forward declarations are supported

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (objective_c), described in Checking Settings.

    +

    By default, this setting is automatically enabled when a file’s extension is “.m” or “.pchm”. This setting and #pragma cplusplus on are automatically enabled when a file's extension is “.mm”, “.M”, or “.pchmm”.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_old_pragma_once.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_old_pragma_once.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_old_pragma_once.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - - - old_pragma_once - - - - -

    old_pragma_once (not available)

    -

    This pragma is no longer available.

    - - - - - + + + + + + + old_pragma_once + + + + +

    old_pragma_once (not available)

    +

    This pragma is no longer available.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_old_vtable.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_old_vtable.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_old_vtable.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - - - old_vtable - - - - -

    old_vtable (not available)

    -

    This pragma is no longer available.

    - - - - - + + + + + + + old_vtable + + + + +

    old_vtable (not available)

    +

    This pragma is no longer available.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_once.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_once.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_once.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - once - - - - -

    once

    -

    Controls whether or not a header file can be included more than once in the same compilation unit.

    -
    Syntax
    -

    #pragma once [ on ] -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    Use this pragma to ensure that the compiler includes header files only once in a source file. This pragma is especially useful in precompiled header files.

    -

    There are two versions of this pragma: #pragma once and #pragma once on. Use #pragma once in a header file to ensure that the header file is included only once in a source file. Use #pragma once on in a header file or source file to insure that any file is included only once in a source file.

    -

    Be aware that when using #pragma once on, precompiled headers might not necessarily transfer from machine to machine and provide the same results. This is because the full paths of included files are stored to distinguish between two distinct files that have identical filenames but different paths. Use the warn_pch_portability pragma to issue a warning when #pragma once on is used in a precompiled header. For more information, see pragma warn_pch_portability.

    -

    This pragma does not correspond to any panel setting. The default setting is off.

    -

    - - - - - + + + + + + + once + + + + +

    once

    +

    Controls whether or not a header file can be included more than once in the same compilation unit.

    +
    Syntax
    +

    #pragma once [ on ] +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    Use this pragma to ensure that the compiler includes header files only once in a source file. This pragma is especially useful in precompiled header files.

    +

    There are two versions of this pragma: #pragma once and #pragma once on. Use #pragma once in a header file to ensure that the header file is included only once in a source file. Use #pragma once on in a header file or source file to insure that any file is included only once in a source file.

    +

    Be aware that when using #pragma once on, precompiled headers might not necessarily transfer from machine to machine and provide the same results. This is because the full paths of included files are stored to distinguish between two distinct files that have identical filenames but different paths. Use the warn_pch_portability pragma to issue a warning when #pragma once on is used in a precompiled header. For more information, see pragma warn_pch_portability.

    +

    This pragma does not correspond to any panel setting. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_only_std_keywords.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_only_std_keywords.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_only_std_keywords.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - only_std_keywords - - - - -

    only_std_keywords

    -

    Controls the use of ISO keywords.

    -
    Syntax
    -

    #pragma only_std_keywords on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    The C/C++ compiler recognizes additional reserved keywords. If you are writing code that must follow the ANSI standard strictly, enable the pragma only_std_keywords. For more information, see “ANSI Keywords Only”.

    -

    This pragma corresponds to the ANSI Keywords Only setting . To check this setting, use __option (only_std_keywords), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + only_std_keywords + + + + +

    only_std_keywords

    +

    Controls the use of ISO keywords.

    +
    Syntax
    +

    #pragma only_std_keywords on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    The C/C++ compiler recognizes additional reserved keywords. If you are writing code that must follow the ANSI standard strictly, enable the pragma only_std_keywords. For more information, see “ANSI Keywords Only”.

    +

    This pragma corresponds to the ANSI Keywords Only setting . To check this setting, use __option (only_std_keywords), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_classresults.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_classresults.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_classresults.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,39 +1,39 @@ - - - - - - - opt_classresults - - - - -

    opt_classresults

    -

    Controls the omission of the copy constructor call for class return types if all return statements in a function return the same local class object.

    -
    Syntax
    -

    #pragma opt_classresults on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    Example of using #pragma opt_classresults:

    -
    -

    #pragma opt_classresults on

    -

    struct X {
    - X();
    - X(const X&);
    - // ...
    - };

    -

    X f() {
    - X x; // directly constructed in function result buffer
    - // ...
    - return x; // no copy-ctor call
    - }

    -
    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_classresults), described in Checking Settings. The default setting is on.

    - - - - - + + + + + + + opt_classresults + + + + +

    opt_classresults

    +

    Controls the omission of the copy constructor call for class return types if all return statements in a function return the same local class object.

    +
    Syntax
    +

    #pragma opt_classresults on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    Example of using #pragma opt_classresults:

    +
    +

    #pragma opt_classresults on

    +

    struct X {
    + X();
    + X(const X&);
    + // ...
    + };

    +

    X f() {
    + X x; // directly constructed in function result buffer
    + // ...
    + return x; // no copy-ctor call
    + }

    +
    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_classresults), described in Checking Settings. The default setting is on.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_common_subs.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_common_subs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_common_subs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - access_errors - - - - -

    opt_common_subs

    -

    Controls the use of common subexpression optimization.

    -
    Syntax
    -

    #pragma opt_common_subs on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler replaces similar redundant expressions with a single expression. For example, if two statements in a function both use the expression

    -

    a * b * c + 10

    -

    the compiler generates object code that computes the expression only once and applies the resulting value to both statements.

    -

    The compiler applies this optimization to its own internal representation of the object code it produces.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_common_subs), this settings is related to the “global_optimizer” level.

    - - - - - + + + + + + + access_errors + + + + +

    opt_common_subs

    +

    Controls the use of common subexpression optimization.

    +
    Syntax
    +

    #pragma opt_common_subs on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler replaces similar redundant expressions with a single expression. For example, if two statements in a function both use the expression

    +

    a * b * c + 10

    +

    the compiler generates object code that computes the expression only once and applies the resulting value to both statements.

    +

    The compiler applies this optimization to its own internal representation of the object code it produces.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_common_subs), this settings is related to the “global_optimizer” level.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_dead_assignments.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_dead_assignments.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_dead_assignments.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - opt_dead_assignments - - - - -

    opt_dead_assignments

    -

    Controls the use of dead store optimization.

    -
    Syntax
    -

    #pragma opt_dead_assignments on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler removes assignments to unused variables before reassigning them.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_dead_assignments), this settings is related to the “global_optimizer” level.

    -

    - - - - - + + + + + + + opt_dead_assignments + + + + +

    opt_dead_assignments

    +

    Controls the use of dead store optimization.

    +
    Syntax
    +

    #pragma opt_dead_assignments on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler removes assignments to unused variables before reassigning them.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_dead_assignments), this settings is related to the “global_optimizer” level.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_dead_code.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_dead_code.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_dead_code.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - opt_dead_code - - - - -

    opt_dead_code

    -

    Controls the use of dead code optimization.

    -
    Syntax
    -

    #pragma opt_dead_code on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler removes a statement that other statements never execute or call.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_dead_code), this settings is related to the “global_optimizer” level.

    -

    - - - - - + + + + + + + opt_dead_code + + + + +

    opt_dead_code

    +

    Controls the use of dead code optimization.

    +
    Syntax
    +

    #pragma opt_dead_code on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler removes a statement that other statements never execute or call.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_dead_code), this settings is related to the “global_optimizer” level.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_lifetimes.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_lifetimes.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_lifetimes.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - opt_lifetimes - - - - -

    opt_lifetimes

    -

    Controls the use of lifetime analysis optimization.

    -
    Syntax
    -

    #pragma opt_lifetimes on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler uses the same processor register for different variables that exist in the same routine but not in the same statement.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_lifetimes), described in Checking Settings. This settings is related to the “global_optimizer” level.

    - - - - - + + + + + + + opt_lifetimes + + + + +

    opt_lifetimes

    +

    Controls the use of lifetime analysis optimization.

    +
    Syntax
    +

    #pragma opt_lifetimes on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler uses the same processor register for different variables that exist in the same routine but not in the same statement.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_lifetimes), described in Checking Settings. This settings is related to the “global_optimizer” level.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_loop_invariants.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_loop_invariants.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_loop_invariants.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - opt_loop_invariants - - - - -

    opt_loop_invariants

    -

    Controls the use of loop invariant optimization.

    -
    Syntax
    -

    #pragma opt_loop_invariants on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler moves all computations that do not change inside a loop outside the loop, which then runs faster.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_loop_invariants), described in Checking Settings. This settings is related to the “global_optimizer” level.

    -

    - - - - - + + + + + + + opt_loop_invariants + + + + +

    opt_loop_invariants

    +

    Controls the use of loop invariant optimization.

    +
    Syntax
    +

    #pragma opt_loop_invariants on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler moves all computations that do not change inside a loop outside the loop, which then runs faster.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_loop_invariants), described in Checking Settings. This settings is related to the “global_optimizer” level.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_propagation.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_propagation.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_propagation.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - opt_propagation - - - - -

    opt_propagation

    -

    Controls the use of copy and constant propagation optimization.

    -
    Syntax
    - #pragma opt_propagation on | off | reset
    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler replaces multiple occurrences of one variable with a single occurrence.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_propagation), described in Checking Settings. This settings is related to the “global_optimizer” level.

    -

    - - - - - + + + + + + + opt_propagation + + + + +

    opt_propagation

    +

    Controls the use of copy and constant propagation optimization.

    +
    Syntax
    + #pragma opt_propagation on | off | reset
    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler replaces multiple occurrences of one variable with a single occurrence.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_propagation), described in Checking Settings. This settings is related to the “global_optimizer” level.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_strength_reduction.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_strength_reduction.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_strength_reduction.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - opt_strength_reduction - - - - -

    opt_strength_reduction

    -

    Controls the use of strength reduction optimization.

    -
    Syntax
    -

    #pragma opt_strength_reduction on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler replaces array element arithmetic instructions with pointer arithmetic instructions to make loops faster.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_strength_reduction), described in Checking Settings. This settings is related to the “global_optimizer” level.

    -

    - - - - - + + + + + + + opt_strength_reduction + + + + +

    opt_strength_reduction

    +

    Controls the use of strength reduction optimization.

    +
    Syntax
    +

    #pragma opt_strength_reduction on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler replaces array element arithmetic instructions with pointer arithmetic instructions to make loops faster.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_strength_reduction), described in Checking Settings. This settings is related to the “global_optimizer” level.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_strength_reduction_strict.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_strength_reduction_strict.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_strength_reduction_strict.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - opt_strength_reduction_strict - - - - -

    opt_strength_reduction_strict

    -

    Uses a safer variation of strength reduction optimization.

    -
    Syntax
    -

    #pragma opt_strength_reduction_strict on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    Like the pragma opt_strength_reduction, this setting replaces multiplication instructions that are inside loops with addition instructions to speed up the loops. However, unlike the regular strength reduction optimization, this variation ensures that the optimization is only applied when the array element arithmetic is not of an unsigned type that is smaller than a pointer type.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_strength_reduction_strict), described in Checking Settings. The default varies according to the compiler.

    -

    - - - - - + + + + + + + opt_strength_reduction_strict + + + + +

    opt_strength_reduction_strict

    +

    Uses a safer variation of strength reduction optimization.

    +
    Syntax
    +

    #pragma opt_strength_reduction_strict on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    Like the pragma opt_strength_reduction, this setting replaces multiplication instructions that are inside loops with addition instructions to speed up the loops. However, unlike the regular strength reduction optimization, this variation ensures that the optimization is only applied when the array element arithmetic is not of an unsigned type that is smaller than a pointer type.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_strength_reduction_strict), described in Checking Settings. The default varies according to the compiler.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_unroll_loops.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_unroll_loops.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_unroll_loops.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - opt_unroll_loops - - - - -

    opt_unroll_loops

    -

    Controls the use of loop unrolling optimization.

    -
    Syntax
    -

    #pragma opt_unroll_loops on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler places multiple copies of a loop’s statements inside a loop to improve its speed.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_unroll_loops), described in Checking Settings. This settings is related to the “global_optimizer” level.

    - - - - - + + + + + + + opt_unroll_loops + + + + +

    opt_unroll_loops

    +

    Controls the use of loop unrolling optimization.

    +
    Syntax
    +

    #pragma opt_unroll_loops on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler places multiple copies of a loop’s statements inside a loop to improve its speed.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (opt_unroll_loops), described in Checking Settings. This settings is related to the “global_optimizer” level.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_vectorize_loops.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_vectorize_loops.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_opt_vectorize_loops.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - opt_vectorize_loops - - - - -

    opt_vectorize_loops

    -

    Controls the use of loop vectorizing optimization.

    -
    Syntax
    -

    #pragma opt_vectorize_loops on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler improves loop performance on compilers that support loop vectorization, like the x86 compiler.

    -

    NOTE Do not confuse loop vectorizing with the vector instructions supported by some chips, like MMX/SSE on x86. For x86, processor-specific instructions and vector instruction sets must be enabled as well.

    -

    Only the x86 CodeGen settings panel has the Autovectorize loops option, it is not available as an option setting in any other panel.

    -

    To check this setting, use __option (opt_vectorize_loops), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + opt_vectorize_loops + + + + +

    opt_vectorize_loops

    +

    Controls the use of loop vectorizing optimization.

    +
    Syntax
    +

    #pragma opt_vectorize_loops on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler improves loop performance on compilers that support loop vectorization, like the x86 compiler.

    +

    NOTE Do not confuse loop vectorizing with the vector instructions supported by some chips, like MMX/SSE on x86. For x86, processor-specific instructions and vector instruction sets must be enabled as well.

    +

    Only the x86 CodeGen settings panel has the Autovectorize loops option, it is not available as an option setting in any other panel.

    +

    To check this setting, use __option (opt_vectorize_loops), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimization_level.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimization_level.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimization_level.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - optimization_level - - - - -

    optimization_level

    -

    Controls global optimization.

    -
    Syntax
    -

    #pragma optimization_level 0 | 1 | 2 | 3 | 4 -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma specifies the degree of optimization that the global optimizer performs.

    -

    To select optimizations, use the pragma optimization_level with an argument from 0 to 4. The higher the argument, the more optimizations performed by the global optimizer.

    -

    For more information on the optimization the compiler performs for each optimization level, refer to the Targeting manual for your target platform.

    -

    These pragmas correspond to the settings in the Global Optimizations panel. By default, the settings corresponds to the level set in the Global Optimizations panel.

    -

    - - - - - + + + + + + + optimization_level + + + + +

    optimization_level

    +

    Controls global optimization.

    +
    Syntax
    +

    #pragma optimization_level 0 | 1 | 2 | 3 | 4 +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma specifies the degree of optimization that the global optimizer performs.

    +

    To select optimizations, use the pragma optimization_level with an argument from 0 to 4. The higher the argument, the more optimizations performed by the global optimizer.

    +

    For more information on the optimization the compiler performs for each optimization level, refer to the Targeting manual for your target platform.

    +

    These pragmas correspond to the settings in the Global Optimizations panel. By default, the settings corresponds to the level set in the Global Optimizations panel.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimize_for_size.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimize_for_size.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimize_for_size.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - optimize_for_size - - - - -

    optimize_for_size

    -

    Controls optimization to reduce the size of object code.

    -
    Syntax
    -

    #pragma optimize_for_size on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This setting lets you choose what the compiler does when it must decide between creating small code or fast code. If you enable this pragma, the compiler creates smaller object code at the expense of speed. It also ignores the inline directive and generates function calls to call any function declared inline. If you disable this pragma, the compiler creates faster object code at the expense of size.

    -

    The pragma corresponds to the Optimize for Size setting in the Global Optimizations panel. To check this setting, use __option (optimize_for_size), described in Checking Settings.

    -

    - - - - - + + + + + + + optimize_for_size + + + + +

    optimize_for_size

    +

    Controls optimization to reduce the size of object code.

    +
    Syntax
    +

    #pragma optimize_for_size on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This setting lets you choose what the compiler does when it must decide between creating small code or fast code. If you enable this pragma, the compiler creates smaller object code at the expense of speed. It also ignores the inline directive and generates function calls to call any function declared inline. If you disable this pragma, the compiler creates faster object code at the expense of size.

    +

    The pragma corresponds to the Optimize for Size setting in the Global Optimizations panel. To check this setting, use __option (optimize_for_size), described in Checking Settings.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimizewithasm.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimizewithasm.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimizewithasm.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - optimizewithasm - - - - -

    optimizewithasm

    -

    Controls optimization of assembly language.

    -
    Syntax
    -

    #pragma optimizewithasm on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This #pragma controls whether the optimizer queries the backend compiler for the effects of inline assembly instructions so it can safely perform code motion, dead code removal, and constant propagation that may affect assembly code. This #pragma should usually remain on.

    -

    Use #pragma optimizewithasm on to tell the optimizer it is safe to optimize assembly language statements in C/C++ source code. This is available in the x86 compiler.

    -

    Use #pragma optimizewithasm off to tell the optimizer to explicitly disable several optimizations in functions containing inline assembly to avoid removing or reordering code that might change the bahavior of the inline assembly.

    -

    NOTE The backend compiler may have additional options or directives to control optimization of the actual inline assembly code.

    -

    This pragma corresponds to the Inline Assembly settings in the CodeGen panel. To check this setting, use __option (optimizewithasm), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + optimizewithasm + + + + +

    optimizewithasm

    +

    Controls optimization of assembly language.

    +
    Syntax
    +

    #pragma optimizewithasm on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This #pragma controls whether the optimizer queries the backend compiler for the effects of inline assembly instructions so it can safely perform code motion, dead code removal, and constant propagation that may affect assembly code. This #pragma should usually remain on.

    +

    Use #pragma optimizewithasm on to tell the optimizer it is safe to optimize assembly language statements in C/C++ source code. This is available in the x86 compiler.

    +

    Use #pragma optimizewithasm off to tell the optimizer to explicitly disable several optimizations in functions containing inline assembly to avoid removing or reordering code that might change the bahavior of the inline assembly.

    +

    NOTE The backend compiler may have additional options or directives to control optimization of the actual inline assembly code.

    +

    This pragma corresponds to the Inline Assembly settings in the CodeGen panel. To check this setting, use __option (optimizewithasm), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_options.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_options.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_options.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,62 +1,62 @@ - - - - - - - options - - - - -

    options

    -

    Specifies how to align struct and class data.

    -
    Syntax
    -

    #pragma options align= alignment

    -
    Parameter
    -

    alignment

    -
    -

    Specifies the boundary on which struct and class data is aligned in memory. Values for alignment range from 1 to 16, or use one of the following preset values:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    If alignment is …The compiler …
    mac68kAligns every field on a 2-byte boundaries, unless a field is only 1 byte long. This is the standard alignment for 68K Macintoshes.
    mac68k4byteAligns every field on 4-byte boundaries.
    powerAligns every field on its natural boundary. This is the standard alignment for Power Macintoshes. For example, it aligns a character on a 1-byte boundary and a 16-bit integer on a 2-byte boundary. The compiler applies this alignment recursively to structured data and arrays containing structured data. So, for example, it aligns an array of structured types containing an 4-byte floating point member on an 4-byte boundary.
    nativeAligns every field using the standard alignment. It is equivalent to using mac68k for 68K Macintoshes and power for Power Macintoshes.
    packedAligns every field on a 1-byte boundary. It is not available in any panel. This alignment causes your code to crash or run slowly on many platforms. Use it with caution.
    resetResets to the value in the previous #pragma options align statement. -

    NOTE There is a space between options and align

    -
    -
    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma corresponds to the Struct Alignment setting in the <Target> Processor or <Target> CodeGen panel. -

    - - - - - + + + + + + + options + + + + +

    options

    +

    Specifies how to align struct and class data.

    +
    Syntax
    +

    #pragma options align= alignment

    +
    Parameter
    +

    alignment

    +
    +

    Specifies the boundary on which struct and class data is aligned in memory. Values for alignment range from 1 to 16, or use one of the following preset values:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    If alignment is …The compiler …
    mac68kAligns every field on a 2-byte boundaries, unless a field is only 1 byte long. This is the standard alignment for 68K Macintoshes.
    mac68k4byteAligns every field on 4-byte boundaries.
    powerAligns every field on its natural boundary. This is the standard alignment for Power Macintoshes. For example, it aligns a character on a 1-byte boundary and a 16-bit integer on a 2-byte boundary. The compiler applies this alignment recursively to structured data and arrays containing structured data. So, for example, it aligns an array of structured types containing an 4-byte floating point member on an 4-byte boundary.
    nativeAligns every field using the standard alignment. It is equivalent to using mac68k for 68K Macintoshes and power for Power Macintoshes.
    packedAligns every field on a 1-byte boundary. It is not available in any panel. This alignment causes your code to crash or run slowly on many platforms. Use it with caution.
    resetResets to the value in the previous #pragma options align statement. +

    NOTE There is a space between options and align

    +
    +
    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma corresponds to the Struct Alignment setting in the <Target> Processor or <Target> CodeGen panel. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_parse_func_templ.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_parse_func_templ.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_parse_func_templ.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - access_errors - - - - -

    parse_func_templ

    -

    Controls strict versus relaxed parser setttings supported by the Carbide.c++ compiler.

    -
    Syntax
    -

    #pragma parse_func_templ on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, your C++ source code is compiled using the strict version of the language parser.

    -

    This option actually corresponds to the ISO C++ Template Parser setting . To check this setting, use __option (parse_func_templ), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + access_errors + + + + +

    parse_func_templ

    +

    Controls strict versus relaxed parser setttings supported by the Carbide.c++ compiler.

    +
    Syntax
    +

    #pragma parse_func_templ on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, your C++ source code is compiled using the strict version of the language parser.

    +

    This option actually corresponds to the ISO C++ Template Parser setting . To check this setting, use __option (parse_func_templ), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_parse_mfunc_templ.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_parse_mfunc_templ.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_parse_mfunc_templ.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - parse_mfunc_templ - - - - -

    parse_mfunc_templ

    -

    Controls strict versus relaxed parser setttings for member function bodies.

    -
    Syntax
    -

    #pragma parse_mfunc_templ on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, member function bodies within your C++ source code are compiled using the strict version of the language parser.

    -

    This option actually corresponds to the ISO C++ Template Parser setting . To check this setting, use __option (parse_mfunc_templ), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + parse_mfunc_templ + + + + +

    parse_mfunc_templ

    +

    Controls strict versus relaxed parser setttings for member function bodies.

    +
    Syntax
    +

    #pragma parse_mfunc_templ on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, member function bodies within your C++ source code are compiled using the strict version of the language parser.

    +

    This option actually corresponds to the ISO C++ Template Parser setting . To check this setting, use __option (parse_mfunc_templ), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pool_strings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pool_strings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pool_strings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,31 +1,31 @@ - - - - - - - pool_strings - - - - -

    pool_strings

    -

    Controls how string literals are stored.

    -
    Syntax
    -

    #pragma pool_strings on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler collects all string constants into a single data object so your program needs one data section for all of them. If you disable this pragma, the compiler creates a unique data object and TOC entry for each string constant. While this decreases the number of data sections in your program, on some processors, like the PowerPC, it also makes your program bigger because it uses a less efficient method to store the address of the string.

    -

    This pragma is especially useful if your program is large and has many string constants or uses the Metrowerks Profiler.

    -

    NOTE If you enable this pragma, the compiler ignores the setting of the pragma pcrelstrings.

    -

    This pragma corresponds to the Pool Strings setting .

    -

    NOTE A compiler may override this panel setting in a processor-specific code generation panel.

    -

    To check this setting, use __option (pool_strings), described in Checking Settings.

    -

    - - - - - + + + + + + + pool_strings + + + + +

    pool_strings

    +

    Controls how string literals are stored.

    +
    Syntax
    +

    #pragma pool_strings on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler collects all string constants into a single data object so your program needs one data section for all of them. If you disable this pragma, the compiler creates a unique data object and TOC entry for each string constant. While this decreases the number of data sections in your program, on some processors, like the PowerPC, it also makes your program bigger because it uses a less efficient method to store the address of the string.

    +

    This pragma is especially useful if your program is large and has many string constants or uses the Metrowerks Profiler.

    +

    NOTE If you enable this pragma, the compiler ignores the setting of the pragma pcrelstrings.

    +

    This pragma corresponds to the Pool Strings setting .

    +

    NOTE A compiler may override this panel setting in a processor-specific code generation panel.

    +

    To check this setting, use __option (pool_strings), described in Checking Settings.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pop_push.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pop_push.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pop_push.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,39 +1,39 @@ - - - - - - - pop, push - - - - -

    pop, push

    -

    Save and restore pragma settings.

    -
    Syntax
    -

    #pragma push
    - #pragma pop

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    The pragma push saves all the current pragma settings. The pragma pop restores all the pragma settings that resulted from the last push pragma. For example, see Listing 10.29.

    -
    -

    Listing 10.29 push and pop Example

    -

    #pragma far_data on
    - #pragma pointers_in_A0
    - #pragma push // push all compiler settings
    - #pragma far_data off
    - #pragma pointers_in_D0
    - // pop restores "far_data" and "pointers_in_A0"
    - #pragma pop

    -
    -

    NOTE This example uses some platform-specific pragmas for illustrative purposes only. See the Targeting manual for your platform to determine which pragmas are supported.

    -

    This pragma does not correspond to any panel setting.

    -

    TIP Pragmas that allow on | off | reset already form a stack of previous option values. It is not necessary to use #pragma pop/push with such pragmas.

    -

    - - - - - + + + + + + + pop, push + + + + +

    pop, push

    +

    Save and restore pragma settings.

    +
    Syntax
    +

    #pragma push
    + #pragma pop

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    The pragma push saves all the current pragma settings. The pragma pop restores all the pragma settings that resulted from the last push pragma. For example, see Listing 10.29.

    +
    +

    Listing 10.29 push and pop Example

    +

    #pragma far_data on
    + #pragma pointers_in_A0
    + #pragma push // push all compiler settings
    + #pragma far_data off
    + #pragma pointers_in_D0
    + // pop restores "far_data" and "pointers_in_A0"
    + #pragma pop

    +
    +

    NOTE This example uses some platform-specific pragmas for illustrative purposes only. See the Targeting manual for your platform to determine which pragmas are supported.

    +

    This pragma does not correspond to any panel setting.

    +

    TIP Pragmas that allow on | off | reset already form a stack of previous option values. It is not necessary to use #pragma pop/push with such pragmas.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pragma_prepdump.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pragma_prepdump.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_pragma_prepdump.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - access_errors - - - - -

    pragma_prepdump

    -

    Controls whether pragmas encountered in the source text appear in the preprocessor output.

    -
    Syntax
    -

    #pragma pragma_prepdump on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma corresponds to the Emit #pragmas option . The default setting is off.

    -

    TIP When submitting bug reports with a preprocessor dump, be sure this option is enabled.

    -

    - - - - - + + + + + + + access_errors + + + + +

    pragma_prepdump

    +

    Controls whether pragmas encountered in the source text appear in the preprocessor output.

    +
    Syntax
    +

    #pragma pragma_prepdump on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma corresponds to the Emit #pragmas option . The default setting is off.

    +

    TIP When submitting bug reports with a preprocessor dump, be sure this option is enabled.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_precompile_target.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_precompile_target.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_precompile_target.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,31 +1,31 @@ - - - - - - - precompile_target - - - - -

    precompile_target

    -

    Specifies the file name for a precompiled header file.

    -
    Syntax
    -

    #pragma precompile_target filename

    -
    Parameters
    -

    filename

    -
    -

    Filename can be a simple filename or an absolute pathname. If filename is a simple filename, the compiler saves the file in the same folder as the source file. If filename is a path name, the compiler saves the file in the specified folder.

    -
    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma specifies the filename for a precompiled header file. If you do not specify the filename, the compiler gives the precompiled header file the same base name as its source file minus any extension and prepended with the “#” character. For example, this_file becomes #this_file.

    -

    This pragma does not correspond to any panel setting.

    -

    - - - - - + + + + + + + precompile_target + + + + +

    precompile_target

    +

    Specifies the file name for a precompiled header file.

    +
    Syntax
    +

    #pragma precompile_target filename

    +
    Parameters
    +

    filename

    +
    +

    Filename can be a simple filename or an absolute pathname. If filename is a simple filename, the compiler saves the file in the same folder as the source file. If filename is a path name, the compiler saves the file in the specified folder.

    +
    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma specifies the filename for a precompiled header file. If you do not specify the filename, the compiler gives the precompiled header file the same base name as its source file minus any extension and prepended with the “#” character. For example, this_file becomes #this_file.

    +

    This pragma does not correspond to any panel setting.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_readonly_strings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_readonly_strings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_readonly_strings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - access_errors - - - - -

    readonly_strings

    -

    Controls whether string objects are placed in a read-write or a read-only data section.

    -
    Syntax
    -

    #pragma readonly_strings on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, C strings used in your source code (for example, "hello") are output to the read-only data section instead of the global data section. In effect, these strings act like const char *, even though their type is really char *.

    -

    This pragma corresponds to the Make strings read-only setting in the processor x86 CodeGen panel and the Make string constants read-only setting in the processor ARM CodeGen panel. To check this setting, use __option (readonly_strings), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + access_errors + + + + +

    readonly_strings

    +

    Controls whether string objects are placed in a read-write or a read-only data section.

    +
    Syntax
    +

    #pragma readonly_strings on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, C strings used in your source code (for example, "hello") are output to the read-only data section instead of the global data section. In effect, these strings act like const char *, even though their type is really char *.

    +

    This pragma corresponds to the Make strings read-only setting in the processor x86 CodeGen panel and the Make string constants read-only setting in the processor ARM CodeGen panel. To check this setting, use __option (readonly_strings), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_require_prototypes.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_require_prototypes.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_require_prototypes.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - require_prototypes - - - - -

    require_prototypes

    -

    Controls whether or not the compiler should expect function prototypes.

    -
    Syntax
    -

    #pragma require_prototypes on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma only affects non-static functions.

    -

    If you enable this pragma, the compiler generates an error if you use a function that does not have a prototype. This pragma helps you prevent errors that happen when you use a function before you define it or refer to it.

    -

    This pragma corresponds to the Require Function Prototypes setting . To check this setting, use __option (require_prototypes), described in Checking Settings. The default setting is processor-specific.

    -

    - - - - - + + + + + + + require_prototypes + + + + +

    require_prototypes

    +

    Controls whether or not the compiler should expect function prototypes.

    +
    Syntax
    +

    #pragma require_prototypes on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma only affects non-static functions.

    +

    If you enable this pragma, the compiler generates an error if you use a function that does not have a prototype. This pragma helps you prevent errors that happen when you use a function before you define it or refer to it.

    +

    This pragma corresponds to the Require Function Prototypes setting . To check this setting, use __option (require_prototypes), described in Checking Settings. The default setting is processor-specific.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_reverse_bitfields.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_reverse_bitfields.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_reverse_bitfields.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - reverse_bitfields - - - - -

    reverse_bitfields

    -

    Controls whether or not the compiler reverses the bitfield allocation.

    -
    Syntax
    -

    #pragma reverse_bitfields on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma reverses the bitfield allocation, so that bitfields are arranged from the opposite side of the storage unit from that ordinarily used on the target. The compiler still orders the bits within a single bitfield such that the lowest-valued bit is in the rightmost position.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (reverse_bitfields), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + reverse_bitfields + + + + +

    reverse_bitfields

    +

    Controls whether or not the compiler reverses the bitfield allocation.

    +
    Syntax
    +

    #pragma reverse_bitfields on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma reverses the bitfield allocation, so that bitfields are arranged from the opposite side of the storage unit from that ordinarily used on the target. The compiler still orders the bits within a single bitfield such that the lowest-valued bit is in the rightmost position.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (reverse_bitfields), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_rtti.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_rtti.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_rtti.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - RTTI - - - - -

    RTTI

    -

    Controls the availability of runtime type information.

    -
    Syntax
    -

    #pragma RTTI on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, you can use runtime type information (or RTTI) features such as dynamic_cast and typeid. The other RTTI expressions are available even if you disable the Enable RTTI setting. Note that *type_info::before(const type_info&) is not yet implemented.

    -

    This pragma corresponds to the Enable RTTI setting . To check this setting, use __option (RTTI), described in Checking Settings.

    -

    - - - - - + + + + + + + RTTI + + + + +

    RTTI

    +

    Controls the availability of runtime type information.

    +
    Syntax
    +

    #pragma RTTI on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, you can use runtime type information (or RTTI) features such as dynamic_cast and typeid. The other RTTI expressions are available even if you disable the Enable RTTI setting. Note that *type_info::before(const type_info&) is not yet implemented.

    +

    This pragma corresponds to the Enable RTTI setting . To check this setting, use __option (RTTI), described in Checking Settings.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_show_error_filestack.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_show_error_filestack.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_show_error_filestack.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - - - show_error_filestack - - - - -

    show_error_filestack

    -

    Controls the appearance of the current #includes file stack within error messages occuring inside deeply-included files.

    -
    Syntax
    -

    #pragma show_error_filestack on | off | reset

    -
    Targets
    - All targets.
    -
    Remarks
    - This pragma does not correspond to any panel setting. The default setting is on. -

    - - - - - + + + + + + + show_error_filestack + + + + +

    show_error_filestack

    +

    Controls the appearance of the current #includes file stack within error messages occuring inside deeply-included files.

    +
    Syntax
    +

    #pragma show_error_filestack on | off | reset

    +
    Targets
    + All targets.
    +
    Remarks
    + This pragma does not correspond to any panel setting. The default setting is on. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_showmessagenumber.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_showmessagenumber.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_showmessagenumber.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - access_errors - - - - -

    showmessagenumber

    -

    Controls the appearance of warning or error numbers in displayed messages. -

    Syntax
    - -

    #pragma showmessagenumber on | off | reset

    -
    Targets
    - All targets.
    -
    Remarks
    -

    When enabled, this pragma causes messages to appear with their numbers visible. You can then use the warning pragma with a warning number to suppress the appearance of specific warning messages.

    -

    This pragma does not correspond to any panel setting. To check this pragma use __option (showmessagenumber), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + access_errors + + + + +

    showmessagenumber

    +

    Controls the appearance of warning or error numbers in displayed messages. +

    Syntax
    + +

    #pragma showmessagenumber on | off | reset

    +
    Targets
    + All targets.
    +
    Remarks
    +

    When enabled, this pragma causes messages to appear with their numbers visible. You can then use the warning pragma with a warning number to suppress the appearance of specific warning messages.

    +

    This pragma does not correspond to any panel setting. To check this pragma use __option (showmessagenumber), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_simple_prepdump.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_simple_prepdump.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_simple_prepdump.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - simple_prepdump - - - - -

    simple_prepdump

    -

    Controls the suppression of comments in preprocessor dumps.

    -
    Syntax
    -

    #pragma simple_prepdump on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    By default, the preprocessor adds comments about the current include file being processed in its output. Enabling this pragma disables these comments.

    -

    This pragma corresponds to the Emit file changes option . To check this setting, use __option (simple_prepdump), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + simple_prepdump + + + + +

    simple_prepdump

    +

    Controls the suppression of comments in preprocessor dumps.

    +
    Syntax
    +

    #pragma simple_prepdump on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    By default, the preprocessor adds comments about the current include file being processed in its output. Enabling this pragma disables these comments.

    +

    This pragma corresponds to the Emit file changes option . To check this setting, use __option (simple_prepdump), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_space_prepdump.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_space_prepdump.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_space_prepdump.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - space_prepdump - - - - -

    space_prepdump

    -

    Controls whether whitespace is stripped out or copied into the output.

    -
    Syntax
    -

    #pragma space_prepdump on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma is useful for keeping the starting column aligned with the original source, though the compiler attempts to preserve space within the line. This doesn’t apply when macros are expanded.

    -

    This pragma corresponds to the Keep whitespace option . The default setting is off.

    -

    - - - - - + + + + + + + space_prepdump + + + + +

    space_prepdump

    +

    Controls whether whitespace is stripped out or copied into the output.

    +
    Syntax
    +

    #pragma space_prepdump on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma is useful for keeping the starting column aligned with the original source, though the compiler attempts to preserve space within the line. This doesn’t apply when macros are expanded.

    +

    This pragma corresponds to the Keep whitespace option . The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_srcrelincludes.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_srcrelincludes.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_srcrelincludes.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - srcrelincludes - - - - -

    srcrelincludes

    -

    Controls the lookup of #include files.

    -
    Syntax
    -

    #pragma srcrelincludes on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When on, this IDE looks for #include files relative to the previously #include file (not just the source file). This is useful when multiple files use the same filename and are intended to be picked up by another header in that directory. This is a common occurrence in UNIX.

    -

    This pragma corresponds to the Source relative includes option in the Access Paths panel. The default setting is off.

    -

    - - - - - + + + + + + + srcrelincludes + + + + +

    srcrelincludes

    +

    Controls the lookup of #include files.

    +
    Syntax
    +

    #pragma srcrelincludes on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When on, this IDE looks for #include files relative to the previously #include file (not just the source file). This is useful when multiple files use the same filename and are intended to be picked up by another header in that directory. This is a common occurrence in UNIX.

    +

    This pragma corresponds to the Source relative includes option in the Access Paths panel. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_store_object_files.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_store_object_files.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_store_object_files.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - store_object_files - - - - -

    store_object_files

    -

    Controls the storage location of object data, either in the target data driectory or as a separate file.

    -
    Syntax
    -

    #pragma store_object_files on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    By default, the IDE writes object data to the project’s target data directory. When this pragma is on, the object data is written to a separate object file.

    -

    NOTE For some targets, the object file emitted may not be recognized as actual object data.

    -

    This pragma does not correspond to any panel setting. The default setting is off.

    - - - - - + + + + + + + store_object_files + + + + +

    store_object_files

    +

    Controls the storage location of object data, either in the target data driectory or as a separate file.

    +
    Syntax
    +

    #pragma store_object_files on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    By default, the IDE writes object data to the project’s target data directory. When this pragma is on, the object data is written to a separate object file.

    +

    NOTE For some targets, the object file emitted may not be recognized as actual object data.

    +

    This pragma does not correspond to any panel setting. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_strictheaderchecking.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_strictheaderchecking.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_strictheaderchecking.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - strictheaderchecking - - - - -

    strictheaderchecking

    -

    Controls how strictly the compiler checks headers for standard C library functions.

    -
    Syntax
    -

    #pragma strictheaderchecking on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    The 3.2 version compiler recognizes standard C library functions. If the correct prototype is used, and, in C++, if the function appears in the “std” or root namespace, the compiler recognizes the function, and is able to optimize calls to it based on its documented effects.

    -

    When this pragma is on, in addition to having the correct prototype, the declaration must also appear in the proper standard header file (and not in a user header or source file).

    -

    This pragma does not correspond to any panel setting. The default setting is on.

    -

    - - - - - + + + + + + + strictheaderchecking + + + + +

    strictheaderchecking

    +

    Controls how strictly the compiler checks headers for standard C library functions.

    +
    Syntax
    +

    #pragma strictheaderchecking on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    The 3.2 version compiler recognizes standard C library functions. If the correct prototype is used, and, in C++, if the function appears in the “std” or root namespace, the compiler recognizes the function, and is able to optimize calls to it based on its documented effects.

    +

    When this pragma is on, in addition to having the correct prototype, the declaration must also appear in the proper standard header file (and not in a user header or source file).

    +

    This pragma does not correspond to any panel setting. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_suppress_init_code.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_suppress_init_code.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_suppress_init_code.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - suppress_init_code - - - - -

    suppress_init_code

    -

    Controls the suppression of static initialization object code.

    -
    Syntax
    -

    #pragma suppress_init_code on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler does not generate any code for static data initialization such as C++ constructors.

    -

    WARNING! Beware when using this pragma because it can produce erratic or unpredictable behavior in your program.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (suppress_init_code), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + suppress_init_code + + + + +

    suppress_init_code

    +

    Controls the suppression of static initialization object code.

    +
    Syntax
    +

    #pragma suppress_init_code on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler does not generate any code for static data initialization such as C++ constructors.

    +

    WARNING! Beware when using this pragma because it can produce erratic or unpredictable behavior in your program.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (suppress_init_code), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_suppress_warnings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_suppress_warnings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_suppress_warnings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - suppress_warnings - - - - -

    suppress_warnings

    -

    Controls the issuing of warnings.

    -
    Syntax
    -

    #pragma suppress_warnings on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler does not generate warnings, including those that are enabled.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (suppress_warnings), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + suppress_warnings + + + + +

    suppress_warnings

    +

    Controls the issuing of warnings.

    +
    Syntax
    +

    #pragma suppress_warnings on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler does not generate warnings, including those that are enabled.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (suppress_warnings), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_sym.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_sym.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_sym.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - sym - - - - -

    sym

    -

    Controls the generation of debugger symbol information.

    -
    Syntax
    -

    #pragma sym on | off | reset | [no]scope

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    The compiler pays attention to this pragma only if you enable the debug marker for a file in the IDE project window. If you disable this pragma, the compiler does not put debugging information into the source file debugger symbol file (SYM or DWARF) for the functions that follow. Enables the emit local scopes feature by default. Use -sym noscopes to disable.

    -

    The compiler always generates a debugger symbol file for a source file that has a debug diamond next to it in the project window. This pragma changes only which functions have information in that symbol file.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (sym), described in Checking Settings. The default setting is on.

    - - - - - + + + + + + + sym + + + + +

    sym

    +

    Controls the generation of debugger symbol information.

    +
    Syntax
    +

    #pragma sym on | off | reset | [no]scope

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    The compiler pays attention to this pragma only if you enable the debug marker for a file in the IDE project window. If you disable this pragma, the compiler does not put debugging information into the source file debugger symbol file (SYM or DWARF) for the functions that follow. Enables the emit local scopes feature by default. Use -sym noscopes to disable.

    +

    The compiler always generates a debugger symbol file for a source file that has a debug diamond next to it in the project window. This pragma changes only which functions have information in that symbol file.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (sym), described in Checking Settings. The default setting is on.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_syspath_once.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_syspath_once.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_syspath_once.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - syspath_once - - - - -

    syspath_once

    -

    Controls how include files are treated when #pragma once is enabled.

    -
    Syntax
    -

    #pragma syspath_once on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, files called in #include <> and #include "" directives are treated as distinct, even if they refer to the same file.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (syspath_once), described in Checking Settings. The default setting is on.

    -

    - - - - - + + + + + + + syspath_once + + + + +

    syspath_once

    +

    Controls how include files are treated when #pragma once is enabled.

    +
    Syntax
    +

    #pragma syspath_once on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, files called in #include <> and #include "" directives are treated as distinct, even if they refer to the same file.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (syspath_once), described in Checking Settings. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_template_depth.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_template_depth.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_template_depth.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - template_depth - - - - -

    template_depth

    -

    Controls how many nested or recursive class templates you can instantiate.

    -
    Syntax
    -

    #pragma template_depth(n)

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma lets you increase the number of nested or recursive class template instantiations allowed. By default, n equals 64; it can be set from 1 to 30000. You should always use the default value unless you receive the error message template too complex or recursive.

    -

    This pragma does not correspond to any panel setting.

    -

    - - - - - + + + + + + + template_depth + + + + +

    template_depth

    +

    Controls how many nested or recursive class templates you can instantiate.

    +
    Syntax
    +

    #pragma template_depth(n)

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma lets you increase the number of nested or recursive class template instantiations allowed. By default, n equals 64; it can be set from 1 to 30000. You should always use the default value unless you receive the error message template too complex or recursive.

    +

    This pragma does not correspond to any panel setting.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_text_encoding.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_text_encoding.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_text_encoding.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,43 +1,43 @@ - - - - - - - text_encoding - - - - -

    text_encoding

    -

    Identifies the files source text encoding format to the compiler.

    -
    Syntax
    -

    #pragma text_encoding ( "name" | unknown | reset [, global] )

    -
    Parameters
    -

    name

    -
    -

    The IANA or MIME encoding name or an OS-specific string that identifies the text encoding. The compiler recognizes these names and maps them to its internal decoders:

    -

    system US-ASCII ASCII ANSI_X3.4-1968
    - ANSI_X3.4 UTF-8 UTF8 ISO-2022-JP
    - CSISO2022JP ISO2022JP CSSHIFTJIS SHIFT-JIS
    - SHIFT_JIS SJIS EUC-JP EUCJP UCS-2 UCS-2BE
    - UCS-2LE UCS2 UCS2BE UCS2LE UTF-16 UTF-16BE
    - UTF-16LE UTF16 UTF16BE UTF16LE UCS-4 UCS-4BE
    - UCS-4LE UCS4 UCS4BE UCS4LE 10646-1:1993
    - ISO-10646-1 ISO-10646 unicode

    -
    -

    global

    -
    -

    Tells the compiler that the current and all subsequent files use the same text encoding. By default, text encoding is effective only to the end of the file.

    -
    -
    Targets
    - All platforms.
    -
    Remarks
    -

    By default, #pragma text_encoding is only effective through the end of the file. To affect the default text encoding assumed for the current and all subsequent files, supply the “global” modifier.

    -

    This pragma corresponds to the Source Encoding option . The default setting is ASCII.

    -

    - - - - - + + + + + + + text_encoding + + + + +

    text_encoding

    +

    Identifies the files source text encoding format to the compiler.

    +
    Syntax
    +

    #pragma text_encoding ( "name" | unknown | reset [, global] )

    +
    Parameters
    +

    name

    +
    +

    The IANA or MIME encoding name or an OS-specific string that identifies the text encoding. The compiler recognizes these names and maps them to its internal decoders:

    +

    system US-ASCII ASCII ANSI_X3.4-1968
    + ANSI_X3.4 UTF-8 UTF8 ISO-2022-JP
    + CSISO2022JP ISO2022JP CSSHIFTJIS SHIFT-JIS
    + SHIFT_JIS SJIS EUC-JP EUCJP UCS-2 UCS-2BE
    + UCS-2LE UCS2 UCS2BE UCS2LE UTF-16 UTF-16BE
    + UTF-16LE UTF16 UTF16BE UTF16LE UCS-4 UCS-4BE
    + UCS-4LE UCS4 UCS4BE UCS4LE 10646-1:1993
    + ISO-10646-1 ISO-10646 unicode

    +
    +

    global

    +
    +

    Tells the compiler that the current and all subsequent files use the same text encoding. By default, text encoding is effective only to the end of the file.

    +
    +
    Targets
    + All platforms.
    +
    Remarks
    +

    By default, #pragma text_encoding is only effective through the end of the file. To affect the default text encoding assumed for the current and all subsequent files, supply the “global” modifier.

    +

    This pragma corresponds to the Source Encoding option . The default setting is ASCII.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_thread_safe_int.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_thread_safe_int.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_thread_safe_int.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,40 +1,40 @@ - - - - - - - thread_safe_init - - - - -

    thread_safe_init

    -

    Controls the addition of extra code in the binary to ensure that multiple threads cannot enter a static local initialization at the same time.

    -
    Syntax
    -

    #pragma thread_safe_init on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When C++ programs use static local initializations, like this:

    -

    int func() {
    - static int countdown = 20;
    - return countdown--;
    - }

    -

    the static locals are initialized the first time the function is executed. As such, if multiple threads are running at the same time, and two of them happen to enter the function at the same time, there will be contention over which one initializes the variable.

    -

    When this pragma is on, the compiler inserts a mutex around the initialization to avoid this problem as shown below:

    -

    NOTE This requires runtime support which may not be implemented on all platforms, due to the possible need for operating system support.

    -

    #pragma thread_safe_init on
    - void thread_heavy_func()
    - {
    - // multiple routines cannot enter at the same time
    - static std::string localstring = thread_unsafe_func();
    -}

    -

    NOTE When an exception is thrown from a static local initializer, the initializer is retried by the next client that enters the scope of the local.

    -

    This pragma does not correspond to any panel setting. The default setting is off.

    -

    - - - - - + + + + + + + thread_safe_init + + + + +

    thread_safe_init

    +

    Controls the addition of extra code in the binary to ensure that multiple threads cannot enter a static local initialization at the same time.

    +
    Syntax
    +

    #pragma thread_safe_init on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When C++ programs use static local initializations, like this:

    +

    int func() {
    + static int countdown = 20;
    + return countdown--;
    + }

    +

    the static locals are initialized the first time the function is executed. As such, if multiple threads are running at the same time, and two of them happen to enter the function at the same time, there will be contention over which one initializes the variable.

    +

    When this pragma is on, the compiler inserts a mutex around the initialization to avoid this problem as shown below:

    +

    NOTE This requires runtime support which may not be implemented on all platforms, due to the possible need for operating system support.

    +

    #pragma thread_safe_init on
    + void thread_heavy_func()
    + {
    + // multiple routines cannot enter at the same time
    + static std::string localstring = thread_unsafe_func();
    +}

    +

    NOTE When an exception is thrown from a static local initializer, the initializer is retried by the next client that enters the scope of the local.

    +

    This pragma does not correspond to any panel setting. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_trigraphs.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_trigraphs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_trigraphs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,70 +1,70 @@ - - - - - - - trigraphs - - - - -

    trigraphs

    -

    Controls the use of ISO trigraph sequences.

    -
    Syntax
    -

    #pragma trigraphs on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you are writing code that must strictly adhere to the ANSI standard, enable this pragma. Listing 10.31 shows an example of a trigraph.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Trigraph
    Character
    ??=
    #
    ??/
    ^
    ??(
    [
    ??)
    ]
    ??!
    |
    ??<
    {
    ??>
    }
    ??-
    ~
    -

    NOTE Use of this pragma may cause a portability issue for some targets.

    -
    -

    Listing 10.31 Example of Pragma trigraphs

    -

    char c = '????'; // ERROR: Trigraph sequence expands to '??^
    - char d = '\?\?\?\?'; // OK

    -
    -

    This pragma corresponds to the Expand Trigraphs setting . To check this setting, use __option (trigraphs), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + trigraphs + + + + +

    trigraphs

    +

    Controls the use of ISO trigraph sequences.

    +
    Syntax
    +

    #pragma trigraphs on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you are writing code that must strictly adhere to the ANSI standard, enable this pragma. Listing 10.31 shows an example of a trigraph.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Trigraph
    Character
    ??=
    #
    ??/
    ^
    ??(
    [
    ??)
    ]
    ??!
    |
    ??<
    {
    ??>
    }
    ??-
    ~
    +

    NOTE Use of this pragma may cause a portability issue for some targets.

    +
    +

    Listing 10.31 Example of Pragma trigraphs

    +

    char c = '????'; // ERROR: Trigraph sequence expands to '??^
    + char d = '\?\?\?\?'; // OK

    +
    +

    This pragma corresponds to the Expand Trigraphs setting . To check this setting, use __option (trigraphs), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_unsigned_char.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_unsigned_char.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_unsigned_char.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - access_errors - - - - -

    unsigned_char

    -

    Controls whether or not declarations of type char are treated as unsigned char.

    -
    Syntax
    -

    #pragma unsigned_char on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler treats a char declaration as if it were an unsigned char declaration.

    -

    NOTE If you enable this pragma, your code might not be compatible with libraries that were compiled when the pragma was disabled. In particular, your code might not work with the ANSI libraries included with Carbide.

    -

    This pragma corresponds to the Use Unsigned Chars setting . To check this setting, use __option (unsigned_char), described in Checking Settings. The default setting is processor-specific.

    - - - - - + + + + + + + access_errors + + + + +

    unsigned_char

    +

    Controls whether or not declarations of type char are treated as unsigned char.

    +
    Syntax
    +

    #pragma unsigned_char on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler treats a char declaration as if it were an unsigned char declaration.

    +

    NOTE If you enable this pragma, your code might not be compatible with libraries that were compiled when the pragma was disabled. In particular, your code might not work with the ANSI libraries included with Carbide.

    +

    This pragma corresponds to the Use Unsigned Chars setting . To check this setting, use __option (unsigned_char), described in Checking Settings. The default setting is processor-specific.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_unused.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_unused.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_unused.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,48 +1,48 @@ - - - - - - - unused - - - - -

    unused

    -

    Controls the suppression of warnings for variables and parameters that are not referenced in a function.

    -
    Syntax
    -

    #pragma unused ( var_name [, var_name ]... )

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    This pragma suppresses the compile time warnings for the unused variables and parameters specified in its argument list as shown in Listing 10.32 and Listing 10.33. You can use this pragma only within a function body, and the listed variables must be within the scope of the function. You cannot use this pragma with functions defined within a class definition or with template functions.

    -
    -

    Listing 10.32 Example of Pragma unused() in C

    -

    #pragma warn_unusedvar on
    - #pragma warn_unusedarg on

    -

    static void ff(int a)
    - {
    - int b;
    - #pragma unused(a,b) // Compiler does not warn
    - // that a and b are unused
    - // . . .
    - }

    -
    -
    -

    Listing 10.33 Example of Pragma unused() in C++

    -

    #pragma warn_unusedvar on
    - #pragma warn_unusedarg on

    -

    static void ff(int /* No warning */)
    - {
    - int b;
    - #pragma unused(b) // Compiler does not warn that b is not used.
    - // . . .
    - }

    -
    -

    This pragma does not correspond to any panel setting.

    - - - - - + + + + + + + unused + + + + +

    unused

    +

    Controls the suppression of warnings for variables and parameters that are not referenced in a function.

    +
    Syntax
    +

    #pragma unused ( var_name [, var_name ]... )

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    This pragma suppresses the compile time warnings for the unused variables and parameters specified in its argument list as shown in Listing 10.32 and Listing 10.33. You can use this pragma only within a function body, and the listed variables must be within the scope of the function. You cannot use this pragma with functions defined within a class definition or with template functions.

    +
    +

    Listing 10.32 Example of Pragma unused() in C

    +

    #pragma warn_unusedvar on
    + #pragma warn_unusedarg on

    +

    static void ff(int a)
    + {
    + int b;
    + #pragma unused(a,b) // Compiler does not warn
    + // that a and b are unused
    + // . . .
    + }

    +
    +
    +

    Listing 10.33 Example of Pragma unused() in C++

    +

    #pragma warn_unusedvar on
    + #pragma warn_unusedarg on

    +

    static void ff(int /* No warning */)
    + {
    + int b;
    + #pragma unused(b) // Compiler does not warn that b is not used.
    + // . . .
    + }

    +
    +

    This pragma does not correspond to any panel setting.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_any_ptr_int_conv.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_any_ptr_int_conv.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_any_ptr_int_conv.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,42 +1,42 @@ - - - - - - - warn_any_ptr_int_conv - - - - -

    warn_any_ptr_int_conv

    -

    Controls if the compiler generates a warning when an integral type is explicitly converted to a pointer type or vice versa.

    -
    Syntax
    -

    #pragma warn_any_ptr_int_conv on | off | reset -

    -
    Targets
    - All targets.
    -
    Remarks
    -

    This pragma is useful to identify potential 64-bit pointer portability issues. An example is shown in Listing 10.34.

    -
    -

    Listing 10.34 Example of warn_any_ptr_int_conv

    -

    #pragma warn_ptr_int_conv on

    -

    short i, *ip

    -

    void foo() {
    - i = (short)ip; // WARNING: integral type is not
    - // large enough to hold pointer
    - }

    -

    #pragma warn_any_ptr_int_conv on

    -

    void bar() {
    - i = (int)ip; // WARNING: pointer to integral conversion
    - ip = (short *)i; // WARNING: integral to pointer conversion
    - }

    -
    -
    Remarks
    -

    See also pragma warn_ptr_int_conv.

    -

    This pragma corresponds to the Pointer/Integral Conversions setting . To check this setting, use __option (warn_any_ptr_int_conv), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + warn_any_ptr_int_conv + + + + +

    warn_any_ptr_int_conv

    +

    Controls if the compiler generates a warning when an integral type is explicitly converted to a pointer type or vice versa.

    +
    Syntax
    +

    #pragma warn_any_ptr_int_conv on | off | reset +

    +
    Targets
    + All targets.
    +
    Remarks
    +

    This pragma is useful to identify potential 64-bit pointer portability issues. An example is shown in Listing 10.34.

    +
    +

    Listing 10.34 Example of warn_any_ptr_int_conv

    +

    #pragma warn_ptr_int_conv on

    +

    short i, *ip

    +

    void foo() {
    + i = (short)ip; // WARNING: integral type is not
    + // large enough to hold pointer
    + }

    +

    #pragma warn_any_ptr_int_conv on

    +

    void bar() {
    + i = (int)ip; // WARNING: pointer to integral conversion
    + ip = (short *)i; // WARNING: integral to pointer conversion
    + }

    +
    +
    Remarks
    +

    See also pragma warn_ptr_int_conv.

    +

    This pragma corresponds to the Pointer/Integral Conversions setting . To check this setting, use __option (warn_any_ptr_int_conv), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_emptydecl.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_emptydecl.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_emptydecl.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,38 +1,38 @@ - - - - - - - access_errors - - - - -

    warn_emptydecl

    -

    Controls the recognition of declarations without variables.

    -
    Syntax
    -

    #pragma warn_emptydecl on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler displays a warning when it encounters a declaration with no variables as shown in Listing 10.35.

    -
    -

    Listing 10.35 Examples of Pragma warn_emptydecl

    -

    int ; // WARNING
    - int i; // OK
    - ...
    - long j;; // WARNING
    - long j; // OK
    - ...
    - extern "C" {
    - ...
    - }; // WARNING

    -
    -

    This pragma corresponds to the Empty Declarations setting . To check this setting, use __option (warn_emptydecl), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + access_errors + + + + +

    warn_emptydecl

    +

    Controls the recognition of declarations without variables.

    +
    Syntax
    +

    #pragma warn_emptydecl on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler displays a warning when it encounters a declaration with no variables as shown in Listing 10.35.

    +
    +

    Listing 10.35 Examples of Pragma warn_emptydecl

    +

    int ; // WARNING
    + int i; // OK
    + ...
    + long j;; // WARNING
    + long j; // OK
    + ...
    + extern "C" {
    + ...
    + }; // WARNING

    +
    +

    This pragma corresponds to the Empty Declarations setting . To check this setting, use __option (warn_emptydecl), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_extracomma.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_extracomma.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_extracomma.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - warn_extracomma - - - - -

    warn_extracomma

    -

    Controls the recognition of superfluous commas.

    -
    Syntax
    -

    #pragma warn_extracomma on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning when it encounters an extra comma. For more information about this warning, see “Extra Commas”.

    -

    This pragma corresponds to the Extra Commas setting . To check this setting, use __option (warn_extracomma), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + warn_extracomma + + + + +

    warn_extracomma

    +

    Controls the recognition of superfluous commas.

    +
    Syntax
    +

    #pragma warn_extracomma on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning when it encounters an extra comma. For more information about this warning, see “Extra Commas”.

    +

    This pragma corresponds to the Extra Commas setting . To check this setting, use __option (warn_extracomma), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_filenamecaps.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_filenamecaps.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_filenamecaps.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - warn_filenamecaps - - - - -

    warn_filenamecaps

    -

    Controls the recognition of conflicts involving case-sensitive filenames within user includes.

    -
    Syntax
    -

    #pragma warn_filenamecaps on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning when an include directive capitalizes a filename within a user include differently from the way the filename appears on a disk. It also detects use of 8.3 DOS filenames in Windows when a long filename is available. This pragma helps avoid porting problems to operating systems with case-sensitive filenames.

    -

    By default, this pragma only checks the spelling of user includes such as the following:

    -

    #include "file"

    -

    For more information on checking system includes, see pragma warn_filenamecaps_system.

    -

    This pragma corresponds to the Include File Capitalization setting . To check this setting, use __option (warn_filenamecaps), described in Checking Settings. The default setting is off.
    -

    - - - - - + + + + + + + warn_filenamecaps + + + + +

    warn_filenamecaps

    +

    Controls the recognition of conflicts involving case-sensitive filenames within user includes.

    +
    Syntax
    +

    #pragma warn_filenamecaps on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning when an include directive capitalizes a filename within a user include differently from the way the filename appears on a disk. It also detects use of 8.3 DOS filenames in Windows when a long filename is available. This pragma helps avoid porting problems to operating systems with case-sensitive filenames.

    +

    By default, this pragma only checks the spelling of user includes such as the following:

    +

    #include "file"

    +

    For more information on checking system includes, see pragma warn_filenamecaps_system.

    +

    This pragma corresponds to the Include File Capitalization setting . To check this setting, use __option (warn_filenamecaps), described in Checking Settings. The default setting is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_filenamecaps_system.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_filenamecaps_system.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_filenamecaps_system.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - - warn_filenamecaps_system - - - - -

    warn_filenamecaps_system

    -

    Controls the recognition of conflicts involving case-sensitive filenames within system includes.

    -
    Syntax
    -

    #pragma warn_filenamecaps_system on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma along with warn_filenamecaps, the compiler issues a warning when an include directive capitalizes a filename within a system include differently from the way the filename appears on a disk. It also detects use of 8.3 DOS filenames in Windows when a long filename is available. This pragma helps avoid porting problems to operating systems with case-sensitive filenames.

    -

    To check the spelling of system includes such as the following:

    -

    #include <file>

    -

    use this pragma along with the warn_filenamecaps pragma.

    -

    This pragma corresponds to the Check System Includes setting . To check this setting, use __option (warn_filenamecaps_system), described in Checking Settings. The default setting is off.

    -

    NOTE Some SDKs use “colorful” capitalization, so this pragma may issue a lot of unwanted messages.

    - - - - - + + + + + + + warn_filenamecaps_system + + + + +

    warn_filenamecaps_system

    +

    Controls the recognition of conflicts involving case-sensitive filenames within system includes.

    +
    Syntax
    +

    #pragma warn_filenamecaps_system on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma along with warn_filenamecaps, the compiler issues a warning when an include directive capitalizes a filename within a system include differently from the way the filename appears on a disk. It also detects use of 8.3 DOS filenames in Windows when a long filename is available. This pragma helps avoid porting problems to operating systems with case-sensitive filenames.

    +

    To check the spelling of system includes such as the following:

    +

    #include <file>

    +

    use this pragma along with the warn_filenamecaps pragma.

    +

    This pragma corresponds to the Check System Includes setting . To check this setting, use __option (warn_filenamecaps_system), described in Checking Settings. The default setting is off.

    +

    NOTE Some SDKs use “colorful” capitalization, so this pragma may issue a lot of unwanted messages.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_hiddenlocals.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_hiddenlocals.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_hiddenlocals.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,37 +1,37 @@ - - - - - - - warn_hiddenlocals - - - - -

    warn_hiddenlocals

    -

    Controls the recognition of a local variable that hides another local variable.

    -
    Syntax
    -

    #pragma warn_hiddenlocals on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    When on, the compiler issues a warning when it encounters a local variable that hides another local variable. An example appears in Listing 10.36.

    -
    -

    Listing 10.36 Example of hidden local variables warning

    -

    #pragma warn_hiddenlocals on

    -

    void foo(int a)
    - {
    - {
    - int a;
    - }
    - } // generates a warning: object ’a’ hidden by
    - // local declaration

    -
    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_hiddenlocals), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + warn_hiddenlocals + + + + +

    warn_hiddenlocals

    +

    Controls the recognition of a local variable that hides another local variable.

    +
    Syntax
    +

    #pragma warn_hiddenlocals on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    When on, the compiler issues a warning when it encounters a local variable that hides another local variable. An example appears in Listing 10.36.

    +
    +

    Listing 10.36 Example of hidden local variables warning

    +

    #pragma warn_hiddenlocals on

    +

    void foo(int a)
    + {
    + {
    + int a;
    + }
    + } // generates a warning: object ’a’ hidden by
    + // local declaration

    +
    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_hiddenlocals), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_hidevirtual.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_hidevirtual.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_hidevirtual.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - warn_hidevirtual - - - - -

    warn_hidevirtual

    -

    Controls the recognition of a non-virtual member function that hides a virtual function in a superclass.

    -
    Syntax
    -

    #pragma warn_hidevirtual on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning if you declare a non-virtual member function that hides a virtual function in a superclass. For more information about this warning, see “Hidden Virtual Functions”. The ISO C++ Standard does not require this pragma.

    -

    NOTE A warning normally indicates that the pragma name is not recognized, but an error indicates either a syntax problem or that the pragma is not valid in the given context.

    -

    This pragma corresponds to the Hidden Virtual Functions setting . To check this setting, use __option (warn_hidevirtual). The default settings is off.
    -

    - - - - - + + + + + + + warn_hidevirtual + + + + +

    warn_hidevirtual

    +

    Controls the recognition of a non-virtual member function that hides a virtual function in a superclass.

    +
    Syntax
    +

    #pragma warn_hidevirtual on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning if you declare a non-virtual member function that hides a virtual function in a superclass. For more information about this warning, see “Hidden Virtual Functions”. The ISO C++ Standard does not require this pragma.

    +

    NOTE A warning normally indicates that the pragma name is not recognized, but an error indicates either a syntax problem or that the pragma is not valid in the given context.

    +

    This pragma corresponds to the Hidden Virtual Functions setting . To check this setting, use __option (warn_hidevirtual). The default settings is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illpragma.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illpragma.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illpragma.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - warn_illpragma - - - - -

    warn_illpragma

    -

    Controls the recognition of illegal pragma directives.

    -
    Syntax
    -

    #pragma warn_illpragma on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler displays a warning when it encounters a pragma it does not recognize. For more information about this warning, see “Illegal Pragmas”.

    -

    This pragma corresponds to the Illegal Pragmas setting . To check this setting, use __option (warn_illpragma), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + warn_illpragma + + + + +

    warn_illpragma

    +

    Controls the recognition of illegal pragma directives.

    +
    Syntax
    +

    #pragma warn_illpragma on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler displays a warning when it encounters a pragma it does not recognize. For more information about this warning, see “Illegal Pragmas”.

    +

    This pragma corresponds to the Illegal Pragmas setting . To check this setting, use __option (warn_illpragma), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illtokenpasting.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illtokenpasting.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illtokenpasting.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - - warn_illtokenpasting - - - - -

    warn_illtokenpasting

    -

    Controls whether a warning is issued with illegal token pasting.

    -
    Syntax
    -

    #pragma warn_illtokenpasting on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    An example of this is shown below:

    -

    #define PTR(x) x##* / PTR(foo)

    -

    Token pasting is used to create a single token. In this example, foo and x cannot be combined. Often the warning indicates the macro uses “##” unnecessarilly.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_illtokenpasting), described in Checking Settings. The default setting is on.

    -

    - - - - - + + + + + + + warn_illtokenpasting + + + + +

    warn_illtokenpasting

    +

    Controls whether a warning is issued with illegal token pasting.

    +
    Syntax
    +

    #pragma warn_illtokenpasting on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    An example of this is shown below:

    +

    #define PTR(x) x##* / PTR(foo)

    +

    Token pasting is used to create a single token. In this example, foo and x cannot be combined. Often the warning indicates the macro uses “##” unnecessarilly.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_illtokenpasting), described in Checking Settings. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illunionmembers.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illunionmembers.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_illunionmembers.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - access_errors - - - - -

    warn_illunionmembers

    -

    Controls whether a warning is issued when illegal union members are made, such as unions with reference or non-trivial class members.

    -
    Syntax
    -

    #pragma warn_illunionmembers on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma does not correspond to any panel setting. To check this setting, use __option (warn_illunionmembers), described in Checking Settings. The default setting is on. -

    - - - - - + + + + + + + access_errors + + + + +

    warn_illunionmembers

    +

    Controls whether a warning is issued when illegal union members are made, such as unions with reference or non-trivial class members.

    +
    Syntax
    +

    #pragma warn_illunionmembers on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma does not correspond to any panel setting. To check this setting, use __option (warn_illunionmembers), described in Checking Settings. The default setting is on. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_f2i_conv.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_f2i_conv.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_f2i_conv.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,41 +1,41 @@ - - - - - - - warn_impl_f2i_conv - - - - -

    warn_impl_f2i_conv

    -

    Controls the issuing of warnings for implicit float-to-int conversions.

    -
    Syntax
    -

    #pragma warn_impl_f2i_conv on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning for implicitly converting floating-point values to integral values. Listing 10.37 provides an example.

    -
    -

    Listing 10.37 Example of Implicit float-to-int Conversion

    -

    #pragma warn_implicitconv on // required to enable warnings
    - #pragma warn_impl_f2i_conv on // enable conversion warning

    -

    float f1, f2;
    - signed int si1, si2;

    -

    int main()
    - {
    - si1 = f1; // WARNING
    - #pragma warn_impl_f2i_conv off // disable conversion warning
    - si2 = f2; // OK
    - }

    -
    -

    This pragma corresponds to the Float to Integer setting . To check this setting, use __option (warn_impl_f2i_conv), described in Checking Settings. The default setting is off.

    -

    NOTE The setting of this pragma is ignored unless warn_implicitconv is on.

    -

    - - - - - + + + + + + + warn_impl_f2i_conv + + + + +

    warn_impl_f2i_conv

    +

    Controls the issuing of warnings for implicit float-to-int conversions.

    +
    Syntax
    +

    #pragma warn_impl_f2i_conv on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning for implicitly converting floating-point values to integral values. Listing 10.37 provides an example.

    +
    +

    Listing 10.37 Example of Implicit float-to-int Conversion

    +

    #pragma warn_implicitconv on // required to enable warnings
    + #pragma warn_impl_f2i_conv on // enable conversion warning

    +

    float f1, f2;
    + signed int si1, si2;

    +

    int main()
    + {
    + si1 = f1; // WARNING
    + #pragma warn_impl_f2i_conv off // disable conversion warning
    + si2 = f2; // OK
    + }

    +
    +

    This pragma corresponds to the Float to Integer setting . To check this setting, use __option (warn_impl_f2i_conv), described in Checking Settings. The default setting is off.

    +

    NOTE The setting of this pragma is ignored unless warn_implicitconv is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_i2f_conv.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_i2f_conv.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_i2f_conv.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,41 +1,41 @@ - - - - - - - warn_impl_i2f_conv - - - - -

    warn_impl_i2f_conv

    -

    Controls the issuing of warnings for implicit int-to-float conversions.

    -
    Syntax
    -

    #pragma warn_impl_i2f_conv on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning for implicitly converting integral values to floating-point values. Listing 10.38 provides an example.

    -
    -

    Listing 10.38 Example of Implicit int-to-float Conversion

    -

    #pragma warn_implicitconv on // required to enable warnings
    - #pragma warn_impl_i2f_conv on // enable conversion warning

    -

    float f1, f2;
    - signed int si1, si2;

    -

    int main()
    - {
    - f1 = si1; // WARNING

    -

    #pragma warn_impl_i2f_conv off // disable conversion warning
    - f2 = si2; // OK
    - }

    -
    -

    This pragma corresponds to the Integer to Float setting . To check this setting, use __option (warn_impl_i2f_conv), described in Checking Settings. The default setting is off.

    -

    NOTE The setting of this pragma is ignored unless warn_implicitconv is on.

    -

    - - - - - + + + + + + + warn_impl_i2f_conv + + + + +

    warn_impl_i2f_conv

    +

    Controls the issuing of warnings for implicit int-to-float conversions.

    +
    Syntax
    +

    #pragma warn_impl_i2f_conv on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning for implicitly converting integral values to floating-point values. Listing 10.38 provides an example.

    +
    +

    Listing 10.38 Example of Implicit int-to-float Conversion

    +

    #pragma warn_implicitconv on // required to enable warnings
    + #pragma warn_impl_i2f_conv on // enable conversion warning

    +

    float f1, f2;
    + signed int si1, si2;

    +

    int main()
    + {
    + f1 = si1; // WARNING

    +

    #pragma warn_impl_i2f_conv off // disable conversion warning
    + f2 = si2; // OK
    + }

    +
    +

    This pragma corresponds to the Integer to Float setting . To check this setting, use __option (warn_impl_i2f_conv), described in Checking Settings. The default setting is off.

    +

    NOTE The setting of this pragma is ignored unless warn_implicitconv is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_s2u_conv.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_s2u_conv.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_impl_s2u_conv.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,41 +1,41 @@ - - - - - - - warn_impl_s2u_conv - - - - -

    warn_impl_s2u_conv

    -

    Controls the issuing of warnings for implicit conversions between the signed int and unsigned int data types.

    -
    Syntax
    -

    #pragma warn_impl_s2u_conv on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning for implicitly converting either from signed int to unsigned int or vice versa. Listing 10.39 provides an example.

    -
    -

    Listing 10.39 Example of Implicit Conversions Between Signed int and unsigned int

    -

    #pragma warn_implicitconv on // required to enable warnings
    - #pragma warn_impl_s2u_conv on // enable conversion warningsigned int si;
    - unsigned int ui;

    -

    int main()
    - {
    - ui = si; // WARNING
    - si = ui; // WARNING

    -

    #pragma warn_impl_s2u_conv off // disable conversion warning
    - ui = si; // OK
    - si = ui; // OK
    - }

    -
    -

    This pragma corresponds to the Signed / Unsigned setting . To check this setting, use __option (warn_impl_s2u_conv), described in Checking Settings. The default setting is off.

    -

    NOTE The setting of this pragma is ignored unless warn_implicitconv is on.

    - - - - - + + + + + + + warn_impl_s2u_conv + + + + +

    warn_impl_s2u_conv

    +

    Controls the issuing of warnings for implicit conversions between the signed int and unsigned int data types.

    +
    Syntax
    +

    #pragma warn_impl_s2u_conv on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning for implicitly converting either from signed int to unsigned int or vice versa. Listing 10.39 provides an example.

    +
    +

    Listing 10.39 Example of Implicit Conversions Between Signed int and unsigned int

    +

    #pragma warn_implicitconv on // required to enable warnings
    + #pragma warn_impl_s2u_conv on // enable conversion warningsigned int si;
    + unsigned int ui;

    +

    int main()
    + {
    + ui = si; // WARNING
    + si = ui; // WARNING

    +

    #pragma warn_impl_s2u_conv off // disable conversion warning
    + ui = si; // OK
    + si = ui; // OK
    + }

    +
    +

    This pragma corresponds to the Signed / Unsigned setting . To check this setting, use __option (warn_impl_s2u_conv), described in Checking Settings. The default setting is off.

    +

    NOTE The setting of this pragma is ignored unless warn_implicitconv is on.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_implicitconv.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_implicitconv.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_implicitconv.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,46 +1,46 @@ - - - - - - - warn_implicitconv - - - - -

    warn_implicitconv

    -

    Controls the issuing of warnings for all implicit arithmetic conversions.

    -
    Syntax
    -

    #pragma warn_implicitconv on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning for all implicit arithmetic conversions when the destination type might not represent the source value. Listing 10.40 provides an example.

    -
    -

    Listing 10.40 Example of Implicit Conversion

    -

    #pragma warn_implicitconv on // required to enable warnings
    - #pragma warn_impl_f2i_conv on // enable conversion warning
    - #pragma warn_impl_i2f_conv on // enable conversion warning
    - #pragma warn_impl_s2u_conv on // enable conversion warning

    -

    float f;
    - signed int si;
    - unsigned int ui;

    -

    int main()
    - {
    - f = si; // WARNING
    - si = f; // WARNING
    - ui = si; // WARNING
    - si = ui; // WARNING
    - }

    -
    -

    For more information about this warning, see “Implicit Arithmetic Conversions”.

    -

    NOTE This option “opens the gate” for the checking of implicit conversions. The sub-pragmas warn_impl_f2i_conv, warn_impl_i2f_conv, and warn_impl_s2u_conv control the classes of conversions checked.

    -

    This pragma corresponds to the Implicit Arithmetic Conversions setting . To check this setting, use __option (warn_implicitconv), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_implicitconv + + + + +

    warn_implicitconv

    +

    Controls the issuing of warnings for all implicit arithmetic conversions.

    +
    Syntax
    +

    #pragma warn_implicitconv on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning for all implicit arithmetic conversions when the destination type might not represent the source value. Listing 10.40 provides an example.

    +
    +

    Listing 10.40 Example of Implicit Conversion

    +

    #pragma warn_implicitconv on // required to enable warnings
    + #pragma warn_impl_f2i_conv on // enable conversion warning
    + #pragma warn_impl_i2f_conv on // enable conversion warning
    + #pragma warn_impl_s2u_conv on // enable conversion warning

    +

    float f;
    + signed int si;
    + unsigned int ui;

    +

    int main()
    + {
    + f = si; // WARNING
    + si = f; // WARNING
    + ui = si; // WARNING
    + si = ui; // WARNING
    + }

    +
    +

    For more information about this warning, see “Implicit Arithmetic Conversions”.

    +

    NOTE This option “opens the gate” for the checking of implicit conversions. The sub-pragmas warn_impl_f2i_conv, warn_impl_i2f_conv, and warn_impl_s2u_conv control the classes of conversions checked.

    +

    This pragma corresponds to the Implicit Arithmetic Conversions setting . To check this setting, use __option (warn_implicitconv), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_largeargs.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_largeargs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_largeargs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - warn_largeargs - - - - -

    warn_largeargs

    -

    Controls the issuing of warnings for passing non-“int” numeric values to unprototyped functions.

    -
    Syntax
    -

    #pragma warn_largeargs on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning if you attempt to pass a non-integer numeric value, such as a float or long long, to an unprototyped function when the require_prototypes pragma is disabled.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_largeargs), described in Checking Settings. The default setting is off.

    - - - - - + + + + + + + warn_largeargs + + + + +

    warn_largeargs

    +

    Controls the issuing of warnings for passing non-“int” numeric values to unprototyped functions.

    +
    Syntax
    +

    #pragma warn_largeargs on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning if you attempt to pass a non-integer numeric value, such as a float or long long, to an unprototyped function when the require_prototypes pragma is disabled.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_largeargs), described in Checking Settings. The default setting is off.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_missingreturn.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_missingreturn.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_missingreturn.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,36 +1,36 @@ - - - - - - - warn_missingreturn - - - - -

    warn_missingreturn

    -

    Controls whether the compiler generates a warning when a function that returns a value is missing a return statement.

    -
    Syntax
    -

    #pragma warn_missingreturn on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    An example is shown in Listing 10.41.

    -
    -

    Listing 10.41 Example of warn_missingreturn pragma

    -

    #pragma warn_missingreturn on

    -

    int foo()
    - {
    - // no return statement in foo()
    - } // generates a warning: return value expected

    -
    -

    This pragma corresponds to the Missing ‘return’ Statements option . To check this setting, use __option (warn_missingreturn), described in Checking Settings. The default setting is off.
    -

    -

    - - - - - + + + + + + + warn_missingreturn + + + + +

    warn_missingreturn

    +

    Controls whether the compiler generates a warning when a function that returns a value is missing a return statement.

    +
    Syntax
    +

    #pragma warn_missingreturn on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    An example is shown in Listing 10.41.

    +
    +

    Listing 10.41 Example of warn_missingreturn pragma

    +

    #pragma warn_missingreturn on

    +

    int foo()
    + {
    + // no return statement in foo()
    + } // generates a warning: return value expected

    +
    +

    This pragma corresponds to the Missing ‘return’ Statements option . To check this setting, use __option (warn_missingreturn), described in Checking Settings. The default setting is off.
    +

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_explicit_virtual.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_explicit_virtual.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_explicit_virtual.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,40 +1,40 @@ - - - - - - - warn_no_explicit_virtual - - - - -

    warn_no_explicit_virtual

    -

    Controls the issuing of warnings if an overriding function is not declared with a virtual keyword.

    -
    Syntax
    -

    #pragma warn_no_explicit_virtual on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    Listing 10.42 shows an example.

    -
    -

    Listing 10.42 Example of warn_no_explicit_virtual pragma

    -

    #pragma warn_no_explicit_virtual on

    -

    struct A {
    - virtual void f();
    - };

    -

    struct B {
    - void f(); // WARNING: override ‘B::f()’ is declared
    - // without ’virtual’ keyword
    - }
    -

    -
    -

    TIP This warning is not required by the ISO C++ standard, but can help you track down unwanted overrides.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_no_explicit_virtual), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_no_explicit_virtual + + + + +

    warn_no_explicit_virtual

    +

    Controls the issuing of warnings if an overriding function is not declared with a virtual keyword.

    +
    Syntax
    +

    #pragma warn_no_explicit_virtual on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    Listing 10.42 shows an example.

    +
    +

    Listing 10.42 Example of warn_no_explicit_virtual pragma

    +

    #pragma warn_no_explicit_virtual on

    +

    struct A {
    + virtual void f();
    + };

    +

    struct B {
    + void f(); // WARNING: override ‘B::f()’ is declared
    + // without ’virtual’ keyword
    + }
    +

    +
    +

    TIP This warning is not required by the ISO C++ standard, but can help you track down unwanted overrides.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_no_explicit_virtual), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_side_effect.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_side_effect.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_side_effect.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,37 +1,37 @@ - - - - - - - warn_no_side_effect - - - - -

    warn_no_side_effect

    -

    Controls the issuing of warnings for redundant statements.

    -
    Syntax
    -

    #pragma warn_no_side_effect on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning when it encounters a statement that produces no side effect. To suppress this warning, cast the statement with (void). Listing 10.43 provides an example

    -
    -

    Listing 10.43 Example of Pragma warn_no_side_effect

    -

    #pragma warn_no_side_effect on
    - void foo(int a,int b)
    - {
    - a+b; // WARNING: expression has no side effect
    - (void)(a+b); // void cast suppresses warning
    - }

    -
    -

    For more information about this warning, see “Redundant Statements”.

    -

    This pragma corresponds to the Expression Has No Side Effect panel setting . To check this setting, use __option (warn_no_side_effect), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_no_side_effect + + + + +

    warn_no_side_effect

    +

    Controls the issuing of warnings for redundant statements.

    +
    Syntax
    +

    #pragma warn_no_side_effect on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning when it encounters a statement that produces no side effect. To suppress this warning, cast the statement with (void). Listing 10.43 provides an example

    +
    +

    Listing 10.43 Example of Pragma warn_no_side_effect

    +

    #pragma warn_no_side_effect on
    + void foo(int a,int b)
    + {
    + a+b; // WARNING: expression has no side effect
    + (void)(a+b); // void cast suppresses warning
    + }

    +
    +

    For more information about this warning, see “Redundant Statements”.

    +

    This pragma corresponds to the Expression Has No Side Effect panel setting . To check this setting, use __option (warn_no_side_effect), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_typename.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_typename.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_no_typename.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - warn_no_typename - - - - -

    warn_no_typename

    -

    Controls the issuing of warnings for missing typenames.

    -
    Syntax
    -

    #pragma warn_no_typename on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    The compiler issues a warning if a typenames required by the C++ standard is missing but can still be determined by the compiler based on the context of the surrounding C++ syntax.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_no_typename), described in Checking Settings. This pragma is enabled by the ISO C++ Template Parser. The default settings is off.

    -

    - - - - - + + + + + + + warn_no_typename + + + + +

    warn_no_typename

    +

    Controls the issuing of warnings for missing typenames.

    +
    Syntax
    +

    #pragma warn_no_typename on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    The compiler issues a warning if a typenames required by the C++ standard is missing but can still be determined by the compiler based on the context of the surrounding C++ syntax.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_no_typename), described in Checking Settings. This pragma is enabled by the ISO C++ Template Parser. The default settings is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_notinlined.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_notinlined.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_notinlined.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - warn_notinlined - - - - -

    warn_notinlined

    -

    Controls the issuing of warnings for functions the compiler cannot inline.

    -
    Syntax
    -

    #pragma warn_notinlined on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    An inline function is indicated by the inline keyword or is implicitly inline because it is defined, rather than just declared, within its class definition. If you enable this pragma, the compiler issues a warning for non-inlined inline function calls. For more information about this warning, see “inline Functions That Are Not Inlined”.

    -

    This pragma corresponds to the Non-Inlined Functions setting . To check this setting, use __option (warn_notinlined), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_notinlined + + + + +

    warn_notinlined

    +

    Controls the issuing of warnings for functions the compiler cannot inline.

    +
    Syntax
    +

    #pragma warn_notinlined on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    An inline function is indicated by the inline keyword or is implicitly inline because it is defined, rather than just declared, within its class definition. If you enable this pragma, the compiler issues a warning for non-inlined inline function calls. For more information about this warning, see “inline Functions That Are Not Inlined”.

    +

    This pragma corresponds to the Non-Inlined Functions setting . To check this setting, use __option (warn_notinlined), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_padding.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_padding.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_padding.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - - - warn_padding - - - - -

    warn_padding

    -

    Controls the issuing of warnings for data structure padding.

    -
    Syntax
    -

    #pragma warn_padding on | off | reset -

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler warns about any bytes that were implicitly added after an ANSI C struct member to improve memory alignment. Refer to the appropriate Targeting manual for more information on how the compiler pads data structures for a particular processor or operating system. For more information about this warning, see “Realigned Data Structures”.

    -

    This pragma corresponds to the Pad Bytes Added setting . To check this setting, use __option (warn_padding), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_padding + + + + +

    warn_padding

    +

    Controls the issuing of warnings for data structure padding.

    +
    Syntax
    +

    #pragma warn_padding on | off | reset +

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler warns about any bytes that were implicitly added after an ANSI C struct member to improve memory alignment. Refer to the appropriate Targeting manual for more information on how the compiler pads data structures for a particular processor or operating system. For more information about this warning, see “Realigned Data Structures”.

    +

    This pragma corresponds to the Pad Bytes Added setting . To check this setting, use __option (warn_padding), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_pch_portability.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_pch_portability.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_pch_portability.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - warn_pch_portability - - - - -

    warn_pch_portability

    -

    Controls whether or not to issue a warning when #pragma once on is used in a precompiled header.

    -
    Syntax
    -

    #pragma warn_pch_portability on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning when you use #pragma once on in a precompiled header. This helps you avoid situations in which transferring a precompiled header from machine to machine causes the precompiled header to produce different results. For more information, see pragma once.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_pch_portability), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_pch_portability + + + + +

    warn_pch_portability

    +

    Controls whether or not to issue a warning when #pragma once on is used in a precompiled header.

    +
    Syntax
    +

    #pragma warn_pch_portability on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning when you use #pragma once on in a precompiled header. This helps you avoid situations in which transferring a precompiled header from machine to machine causes the precompiled header to produce different results. For more information, see pragma once.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_pch_portability), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_possunwant.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_possunwant.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_possunwant.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - warn_possunwant - - - - -

    warn_possunwant

    -

    Controls the recognition of possible unintentional logical errors.

    -
    Syntax
    -

    #pragma warn_possunwant on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler checks for common errors that are legal C/C++ but might produce unexpected results, such as putting in unintended semicolons or confusing = and ==. For more information about this warning, see “Common Errors”.

    -

    This pragma corresponds to the Possible Errors setting . To check this setting, use __option (warn_possunwant), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_possunwant + + + + +

    warn_possunwant

    +

    Controls the recognition of possible unintentional logical errors.

    +
    Syntax
    +

    #pragma warn_possunwant on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler checks for common errors that are legal C/C++ but might produce unexpected results, such as putting in unintended semicolons or confusing = and ==. For more information about this warning, see “Common Errors”.

    +

    This pragma corresponds to the Possible Errors setting . To check this setting, use __option (warn_possunwant), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_ptr_int_conv.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_ptr_int_conv.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_ptr_int_conv.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,34 +1,34 @@ - - - - - - - warn_ptr_int_conv - - - - -

    warn_ptr_int_conv

    -

    Controls the recognition of the conversion of pointer values to incorrectly-sized integral values.

    -
    Syntax
    -

    #pragma warn_ptr_int_conv on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning if an expression attempts to convert a pointer value to an integral type that is not large enough to hold the pointer value.

    -
    -

    Listing 10.44 Example for #pragma warn_ptr_int_conv

    -

    #pragma warn_ptr_int_conv on

    -

    char *my_ptr;
    - char too_small = (char)my_ptr; // WARNING: char is too small

    -
    -

    See also pragma warn_any_ptr_int_conv.

    -

    For more information about this warning, see “Common Errors”.

    -

    This pragma corresponds to the Pointer / Integral Conversions setting . To check this setting, use __option (warn_ptr_int_conv), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_ptr_int_conv + + + + +

    warn_ptr_int_conv

    +

    Controls the recognition of the conversion of pointer values to incorrectly-sized integral values.

    +
    Syntax
    +

    #pragma warn_ptr_int_conv on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning if an expression attempts to convert a pointer value to an integral type that is not large enough to hold the pointer value.

    +
    +

    Listing 10.44 Example for #pragma warn_ptr_int_conv

    +

    #pragma warn_ptr_int_conv on

    +

    char *my_ptr;
    + char too_small = (char)my_ptr; // WARNING: char is too small

    +
    +

    See also pragma warn_any_ptr_int_conv.

    +

    For more information about this warning, see “Common Errors”.

    +

    This pragma corresponds to the Pointer / Integral Conversions setting . To check this setting, use __option (warn_ptr_int_conv), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_resultnotused.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_resultnotused.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_resultnotused.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,37 +1,37 @@ - - - - - - - warn_resultnotused - - - - -

    warn_resultnotused

    -

    Controls the issuing of warnings when function results are ignored.

    -
    Syntax
    -

    #pragma warn_resultnotused on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning when it encounters a statement that calls a function without using its result. To prevent this, cast the statement with (void). Listing 10.45 provides an example.

    -
    -

    Listing 10.45 Example of Function Calls with Unused Results

    -

    #pragma warn_resultnotused on

    -

    extern int bar();
    - void foo()
    - {
    - bar(); // WARNING: result of function call is not used
    - (void)bar(); // ‘void’ cast suppresses warning
    - }

    -
    -

    For more information about this warning, see Ignored Function Results.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_resultnotused), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_resultnotused + + + + +

    warn_resultnotused

    +

    Controls the issuing of warnings when function results are ignored.

    +
    Syntax
    +

    #pragma warn_resultnotused on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning when it encounters a statement that calls a function without using its result. To prevent this, cast the statement with (void). Listing 10.45 provides an example.

    +
    +

    Listing 10.45 Example of Function Calls with Unused Results

    +

    #pragma warn_resultnotused on

    +

    extern int bar();
    + void foo()
    + {
    + bar(); // WARNING: result of function call is not used
    + (void)bar(); // ‘void’ cast suppresses warning
    + }

    +
    +

    For more information about this warning, see Ignored Function Results.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (warn_resultnotused), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_structclass.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_structclass.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_structclass.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - warn_structclass - - - - -

    warn_structclass

    -

    Controls the issuing of warnings for the inconsistent use of the class and struct keywords.

    -
    Syntax
    -

    #pragma warn_structclass on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning if you use the class and struct keywords in the definition and declaration of the same identifier. For more information about this warning, see Mixed Use of ‘class’ and ‘struct’ Keywords.

    -

    This pragma corresponds to the Inconsistent ‘class’ / ‘struct’ Usage setting . To check this setting, use __option (warn_structclass), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_structclass + + + + +

    warn_structclass

    +

    Controls the issuing of warnings for the inconsistent use of the class and struct keywords.

    +
    Syntax
    +

    #pragma warn_structclass on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning if you use the class and struct keywords in the definition and declaration of the same identifier. For more information about this warning, see Mixed Use of ‘class’ and ‘struct’ Keywords.

    +

    This pragma corresponds to the Inconsistent ‘class’ / ‘struct’ Usage setting . To check this setting, use __option (warn_structclass), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_undefmacro.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_undefmacro.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_undefmacro.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,35 +1,35 @@ - - - - - - - warn_undefmacro - - - - -

    warn_undefmacro

    -

    Controls the detection of undefined macros in #if/#elif conditionals.

    -
    Syntax
    -

    #pragma warn_undefmacro on | off | reset

    -
    Target
    -

    All targets.

    -
    Remarks
    -

    Listing 10.46 provides an example.

    -
    -

    Listing 10.46 Example of Undefined Macro

    -

    #if UNDEFINEDMACRO == 4 // WARNING: undefined macro
    - // ’UNDEFINEDMACRO’ used in
    - // #if/#elif conditional

    -
    -

    Use this pragma to detect the use of undefined macros (especially expressions) where the default value 0 is used. To suppress this warning, check if the macro is defined before using it in a #if or #elif conditional.

    -

    NOTE A warning is only issued when a macro is evaluated. A short-circuited “&&” or “||” test or unevaluated “?:” will not produce a warning.

    -

    This pragma corresponds to the Undefined Macro in #if setting . To check this setting, use __option (warn_undefmacro), described in Checking Settings. The default setting is off.

    -

    -

    - - - - - + + + + + + + warn_undefmacro + + + + +

    warn_undefmacro

    +

    Controls the detection of undefined macros in #if/#elif conditionals.

    +
    Syntax
    +

    #pragma warn_undefmacro on | off | reset

    +
    Target
    +

    All targets.

    +
    Remarks
    +

    Listing 10.46 provides an example.

    +
    +

    Listing 10.46 Example of Undefined Macro

    +

    #if UNDEFINEDMACRO == 4 // WARNING: undefined macro
    + // ’UNDEFINEDMACRO’ used in
    + // #if/#elif conditional

    +
    +

    Use this pragma to detect the use of undefined macros (especially expressions) where the default value 0 is used. To suppress this warning, check if the macro is defined before using it in a #if or #elif conditional.

    +

    NOTE A warning is only issued when a macro is evaluated. A short-circuited “&&” or “||” test or unevaluated “?:” will not produce a warning.

    +

    This pragma corresponds to the Undefined Macro in #if setting . To check this setting, use __option (warn_undefmacro), described in Checking Settings. The default setting is off.

    +

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_unitializedvar.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_unitializedvar.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_unitializedvar.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - - - warn_uninitializedvar - - - - -

    warn_uninitializedvar

    -

    Controls the issuing of warnings whenever local variables are initialized before being used.

    -
    Syntax
    -

    #pragma warn_uninitializedvar on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    - This pragma corresponds to the Unused Variables setting . To check this setting, use __option (warn_uninitializedvar), described in Checking Settings. The default setting is off. -

    - - - - - + + + + + + + warn_uninitializedvar + + + + +

    warn_uninitializedvar

    +

    Controls the issuing of warnings whenever local variables are initialized before being used.

    +
    Syntax
    +

    #pragma warn_uninitializedvar on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    + This pragma corresponds to the Unused Variables setting . To check this setting, use __option (warn_uninitializedvar), described in Checking Settings. The default setting is off. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_unusedarg.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_unusedarg.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warn_unusedarg.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - warn_unusedarg - - - - -

    warn_unusedarg

    -

    Controls the recognition of unreferenced arguments.

    -
    Syntax
    -

    #pragma warn_unusedarg on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    -

    If you enable this pragma, the compiler issues a warning when it encounters an argument you declare but do not use. For more information about this warning, see “Unused Arguments”. To suppress this warning in C++ source code, leave an argument identifier out of the function parameter list. Listing 10.33 shows an example.

    -

    This pragma corresponds to the Unused Arguments setting . To check this setting, use __option (warn_unusedarg), described in Checking Settings. The default setting is off.

    -

    - - - - - + + + + + + + warn_unusedarg + + + + +

    warn_unusedarg

    +

    Controls the recognition of unreferenced arguments.

    +
    Syntax
    +

    #pragma warn_unusedarg on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    +

    If you enable this pragma, the compiler issues a warning when it encounters an argument you declare but do not use. For more information about this warning, see “Unused Arguments”. To suppress this warning in C++ source code, leave an argument identifier out of the function parameter list. Listing 10.33 shows an example.

    +

    This pragma corresponds to the Unused Arguments setting . To check this setting, use __option (warn_unusedarg), described in Checking Settings. The default setting is off.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warning.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warning.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warning.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,43 +1,43 @@ - - - - - - - access_errors - - - - -

    warning

    -

    Controls which warning numbers are displayed during compiling. -

    Syntax
    -

    #pragma warning on | off | reset (num [, ...])

    -

    This alternate syntax is allowed but ignored (message numbers don’t match):

    -

    #pragma warning(warning_type : warning_num_list)

    -
    Parameters
    - -

    num

    -
    -

    The number of the warning message to show or suppress.

    -
    -

    warning_type

    -
    -

    Specifies the warning type. Included for Microsoft compatability but ignored.

    -
    -

    warning_num_list

    -
    -

    The warning_num_list is a list of warning numbers separated by spaces. Included for Microsoft compatability but ignored.

    -
    -
    Targets
    - All targets.
    -
    Remarks
    -

    Use the pragma showmessagenumber to display warning messages with their warning numbers on a Windows-based system.
    - The alternative syntax applies to x86 programming only. Included for compatibility with Microsoft code but not implemented.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (warning), described in Checking Settings. The default setting is on.

    -

    - - - - - + + + + + + + access_errors + + + + +

    warning

    +

    Controls which warning numbers are displayed during compiling. +

    Syntax
    +

    #pragma warning on | off | reset (num [, ...])

    +

    This alternate syntax is allowed but ignored (message numbers don’t match):

    +

    #pragma warning(warning_type : warning_num_list)

    +
    Parameters
    + +

    num

    +
    +

    The number of the warning message to show or suppress.

    +
    +

    warning_type

    +
    +

    Specifies the warning type. Included for Microsoft compatability but ignored.

    +
    +

    warning_num_list

    +
    +

    The warning_num_list is a list of warning numbers separated by spaces. Included for Microsoft compatability but ignored.

    +
    +
    Targets
    + All targets.
    +
    Remarks
    +

    Use the pragma showmessagenumber to display warning messages with their warning numbers on a Windows-based system.
    + The alternative syntax applies to x86 programming only. Included for compatibility with Microsoft code but not implemented.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (warning), described in Checking Settings. The default setting is on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warning_errors.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warning_errors.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_warning_errors.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - - - access_errors - - - - -

    warning_errors

    -

    Controls whether or not warnings are treated as errors.

    -
    Syntax
    -

    #pragma warning_errors on | off | reset

    -
    Targets
    - All platforms.
    -
    Remarks
    - If you enable this pragma, the compiler treats all warnings as though they were errors and does not translate your file until you resolve them.
    - This pragma corresponds to the Treat All Warnings As Errors setting in the C/C++ Warnings panel. To check this setting, use __option (warning_errors), described in Checking Settings. -

    - - - - - + + + + + + + access_errors + + + + +

    warning_errors

    +

    Controls whether or not warnings are treated as errors.

    +
    Syntax
    +

    #pragma warning_errors on | off | reset

    +
    Targets
    + All platforms.
    +
    Remarks
    + If you enable this pragma, the compiler treats all warnings as though they were errors and does not translate your file until you resolve them.
    + This pragma corresponds to the Treat All Warnings As Errors setting in the C/C++ Warnings panel. To check this setting, use __option (warning_errors), described in Checking Settings. +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_wchar_type.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_wchar_type.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_wchar_type.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - access_errors - - - - -

    wchar_type

    -

    Controls the size and format of the wchar_t type. -

    Syntax
    -

    #pragma wchar_type on | off | reset

    -
    Targets
    - All platforms. -
    Remarks
    -

    If you enable this pragma, wchar_t is treated as a built-in type.

    -

    This pragma corresponds to the Enable wchar_t Support setting . To check this setting, use __option (.*), described in Checking Settings. The default setting is on. -

    -

    -

    - - - - - + + + + + + + access_errors + + + + +

    wchar_type

    +

    Controls the size and format of the wchar_t type. +

    Syntax
    +

    #pragma wchar_type on | off | reset

    +
    Targets
    + All platforms. +
    Remarks
    +

    If you enable this pragma, wchar_t is treated as a built-in type.

    +

    This pragma corresponds to the Enable wchar_t Support setting . To check this setting, use __option (.*), described in Checking Settings. The default setting is on. +

    +

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_reference.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_reference.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_reference.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,37 +1,37 @@ - - - - - - - Pragma Scope - - - - -

    Common Pragma Reference

    -

    The common pragmas include:

    - - - - - - - - - - - -
    A-FG-MN-Z
      
    -

    - - - - - + + + + + + + Pragma Scope + + + + +

    Common Pragma Reference

    +

    The common pragmas include:

    + + + + + + + + + + + +
    A-FG-MN-Z
      
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_scope.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_scope.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_scope.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - - - Pragma Syntax - - - - -

    Pragma Scope

    -

    The scope of a pragma setting is usually limited to a single compilation unit.

    -

    As discussed in Pragma Syntax, you should use on or off after the name of the pragma to change its setting to the desired condition. All code after that point is compiled with that setting until either:

    -
      -
    • You change the setting with on, off, or (preferred) reset
    • -
    • You reach the end of the compilation unit
    • -
    -

    At the beginning of each file, the compiler reverts to the target or default settings.

    -

    - - - - - + + + + + + + Pragma Syntax + + + + +

    Pragma Scope

    +

    The scope of a pragma setting is usually limited to a single compilation unit.

    +

    As discussed in Pragma Syntax, you should use on or off after the name of the pragma to change its setting to the desired condition. All code after that point is compiled with that setting until either:

    +
      +
    • You change the setting with on, off, or (preferred) reset
    • +
    • You reach the end of the compilation unit
    • +
    +

    At the beginning of each file, the compiler reverts to the target or default settings.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_syntax.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_syntax.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragma_syntax.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,46 +1,46 @@ - - - - - - - Pragma Syntax - - - - -

    Pragma Syntax

    -

    Most pragmas have this syntax:

    -

    #pragma setting-name on | off | reset

    -
    Parameters
    -

    off

    -
    -

    Enables the pragma for any functions that follow.

    -
    -

    on

    -
    -

    Disables the pragma for any functions that follow.

    -
    -

    reset

    -
    -

    Restores the pragma to its original setting.

    -
    -

    An exampe of this is shown below:

    -
    -

    #pragma profile off

    -

    // If the Generate Profiler Calls setting is on, turns it off for these functions.

    -

    #include <smallfuncs.h>

    -

    #pragma profile reset

    -

    // If the Generate Profiler Calls setting was originally on, turns it back on.
    - // - Otherwise, the setting remains off

    -
    -

    Suppose that you use #pragma profile on instead of #pragma profile reset. If you later disable Generate Profiler Calls from the Preference dialog box, that pragma turns it on. Using reset ensures that you do not inadvertently change the settings in the Project Settings dialog box.

    -

    TIP To catch pragmas that the Carbide x86 compiler does not recognize, use the pragma warn_illpragma. See also Illegal Pragmas.

    -

    NOTE The default setting of a pragma is based on the command-line default setting. These default settings used in project stationery may differ across target devices when creating a specific project. For example, a pragma for an x86 target may default to off while the same setting for an ARM target may default to on.

    -

    - - - - - + + + + + + + Pragma Syntax + + + + +

    Pragma Syntax

    +

    Most pragmas have this syntax:

    +

    #pragma setting-name on | off | reset

    +
    Parameters
    +

    off

    +
    +

    Enables the pragma for any functions that follow.

    +
    +

    on

    +
    +

    Disables the pragma for any functions that follow.

    +
    +

    reset

    +
    +

    Restores the pragma to its original setting.

    +
    +

    An exampe of this is shown below:

    +
    +

    #pragma profile off

    +

    // If the Generate Profiler Calls setting is on, turns it off for these functions.

    +

    #include <smallfuncs.h>

    +

    #pragma profile reset

    +

    // If the Generate Profiler Calls setting was originally on, turns it back on.
    + // + Otherwise, the setting remains off

    +
    +

    Suppose that you use #pragma profile on instead of #pragma profile reset. If you later disable Generate Profiler Calls from the Preference dialog box, that pragma turns it on. Using reset ensures that you do not inadvertently change the settings in the Project Settings dialog box.

    +

    TIP To catch pragmas that the Carbide x86 compiler does not recognize, use the pragma warn_illpragma. See also Illegal Pragmas.

    +

    NOTE The default setting of a pragma is based on the command-line default setting. These default settings used in project stationery may differ across target devices when creating a specific project. For example, a pragma for an x86 target may default to off while the same setting for an ARM target may default to on.

    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragmas.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragmas.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/pragmas.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - - - Common Pragmas - - - - -

    Common Pragmas

    -

    -You configure the compiler for a project by changing the appropriate pragmas.

    -

    Many of the pragmas correspond to settings and the settings panels for processors and operating systems.

    -

    Typically, you use these panels to select the settings for most of your code and use pragmas to change settings for special cases. For example, within the Global Optimizations panel, you can set code generation to a specific optimization level and then use a pragma to re-enable an optimization only for the code that benefits from the optimization. The targeting manual for the target processor or device may have details on enabling or disabling specific optimizations. When in doubt, just use the preset options.

    -

    The sections includee:

    - -

    TIP If you use the command-line tools, such as those for UNIX, see Command-Line Tools for information on how to duplicate the effect of #pragma statements using command-line tool options.

    - - - - - + + + + + + + Common Pragmas + + + + +

    Common Pragmas

    +

    +You configure the compiler for a project by changing the appropriate pragmas.

    +

    Many of the pragmas correspond to settings and the settings panels for processors and operating systems.

    +

    Typically, you use these panels to select the settings for most of your code and use pragmas to change settings for special cases. For example, within the Global Optimizations panel, you can set code generation to a specific optimization level and then use a pragma to re-enable an optimization only for the code that benefits from the optimization. The targeting manual for the target processor or device may have details on enabling or disabling specific optimizations. When in doubt, just use the preset options.

    +

    The sections includee:

    + +

    TIP If you use the command-line tools, such as those for UNIX, see Command-Line Tools for information on how to duplicate the effect of #pragma statements using command-line tool options.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_asm_fixup_dllimports.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_asm_fixup_dllimports.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_asm_fixup_dllimports.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -asm_fixup_dllimports - - - -

    asm_fixup_dllimports

    -

    Instructs the compiler to correct inline assembly that incorrectly accesses global variables from a DLL.

    -
    Syntax
    -

    #pragma asm_fixup_dllimports on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    In the Win32 DLL model, variables must be addressed indirectly through the symbol __imp_<symbol> and replaced with the normal link-time symbol _<symbol>. The compiler detects references to _<symbol> and replaces them with the correct sequence of code.

    -

    NOTE This transformation may not always be possible and an “illegal operand” error is reported when the compiler can’t make the substitution.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (asm_fixup_dllimports). The default setting is off.
    -

    - - - - - + + + + + +asm_fixup_dllimports + + + +

    asm_fixup_dllimports

    +

    Instructs the compiler to correct inline assembly that incorrectly accesses global variables from a DLL.

    +
    Syntax
    +

    #pragma asm_fixup_dllimports on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    In the Win32 DLL model, variables must be addressed indirectly through the symbol __imp_<symbol> and replaced with the normal link-time symbol _<symbol>. The compiler detects references to _<symbol> and replaces them with the correct sequence of code.

    +

    NOTE This transformation may not always be possible and an “illegal operand” error is reported when the compiler can’t make the substitution.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (asm_fixup_dllimports). The default setting is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_avoid_ebp.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_avoid_ebp.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_avoid_ebp.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -avoid_ebp - - - -

    avoid_ebp

    -

    Disables the EBP as a temporary register to ensure that the base pointer is valid even when full optimizations are enabled.

    -
    Syntax
    -

    #pragma avoid_ebp on | off

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    Disabling the use of the EBP register with #pragma avoid_ebp on ensures that the stack chains are coherent, even if they do not include every called function, so code that relies on the stack chain (i.e. crash recovery tools and structured exception handling) will work more consistently. Note that this can have an effect on performance (only 6 internal registers are available instead of 7) so do not use it in speed-critical code.

    -

    This #pragma is recommended for programs using _set_se_translator() under the zero-overhead exceptions model. The SEH handler chain and the zero-overhead exception stack are independent of each other, unlike the MS exceptions model where both share the same chain, so the zero-overhead exceptions model needs more help reconciling the fact that exceptions can be thrown from anywhere in the program.
    -

    - - - - - + + + + + +avoid_ebp + + + +

    avoid_ebp

    +

    Disables the EBP as a temporary register to ensure that the base pointer is valid even when full optimizations are enabled.

    +
    Syntax
    +

    #pragma avoid_ebp on | off

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    Disabling the use of the EBP register with #pragma avoid_ebp on ensures that the stack chains are coherent, even if they do not include every called function, so code that relies on the stack chain (i.e. crash recovery tools and structured exception handling) will work more consistently. Note that this can have an effect on performance (only 6 internal registers are available instead of 7) so do not use it in speed-critical code.

    +

    This #pragma is recommended for programs using _set_se_translator() under the zero-overhead exceptions model. The SEH handler chain and the zero-overhead exception stack are independent of each other, unlike the MS exceptions model where both share the same chain, so the zero-overhead exceptions model needs more help reconciling the fact that exceptions can be thrown from anywhere in the program.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_code_seg.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_code_seg.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_code_seg.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - - - - -code_seg - - - -

    code_seg

    -

    Specifies the segment into which code is placed.

    -
    Syntax
    -

    #pragma code_seg(name)

    -
    Targets
    - Intel x86
    -
    Remarks
    - This pragma designates the segment into which compiled code is placed. The name is a string specifying the name of the code segment. For example, the pragma - #pragma code_seg(".code")places all subsequent code into a segment named .code.
    - - - - - + + + + + +code_seg + + + +

    code_seg

    +

    Specifies the segment into which code is placed.

    +
    Syntax
    +

    #pragma code_seg(name)

    +
    Targets
    + Intel x86
    +
    Remarks
    + This pragma designates the segment into which compiled code is placed. The name is a string specifying the name of the code segment. For example, the pragma + #pragma code_seg(".code")places all subsequent code into a segment named .code.
    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_codeviewpro9compatible.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_codeviewpro9compatible.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_codeviewpro9compatible.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,33 +1,33 @@ - - - - - -codeviewpro9compatible - - - -

    codeviewpro9compatible

    -

    Controls the emission of CodeView 5.0 formatted debug files compatible with MSVC 6 or MSVC .NET 2003. The default is on.

    -
    Syntax
    -

    #pragma codeviewpro9compatible on | off | reset

    -
    Parameters
    -

    on

    -
    -

    Format debug files for MSVC 6 and CodeWarrior Professional 9. This is the equivilent of Symbian’s command-line option -sym codeview.

    -
    -

    off

    -
    -

    Format debug files for MSVC .NET 2003. This is the equivalent of Symbian’s command-line option -sym codeview_new.

    -

    NOTE If you normally use the command line option "-g" to enable debug information and wish to use "-sym codeview_new", note that "-g" also implies "-sym fullpath", so specify either "-g -sym codeview_new" or "-sym fullpath,codeview_new" to retain full paths in the debug information.

    -
    -
    Targets
    - Intel x86
    -
    Remarks
    -

    NOTE The Carbide linker can accept object files or libraries using both the old and the new Codeview formats and generates an executable using a mixture of formats. The Carbide debugger will accept such mixed-format information. MSVC 6 and .NET 2003, however, only accept one format, erroneously interpreting the non-favored format. You may need to rebuild all your libraries and DLLs if you wish to debug fully under those debuggers.
    -

    - - - - - + + + + + +codeviewpro9compatible + + + +

    codeviewpro9compatible

    +

    Controls the emission of CodeView 5.0 formatted debug files compatible with MSVC 6 or MSVC .NET 2003. The default is on.

    +
    Syntax
    +

    #pragma codeviewpro9compatible on | off | reset

    +
    Parameters
    +

    on

    +
    +

    Format debug files for MSVC 6 and CodeWarrior Professional 9. This is the equivilent of Symbian’s command-line option -sym codeview.

    +
    +

    off

    +
    +

    Format debug files for MSVC .NET 2003. This is the equivalent of Symbian’s command-line option -sym codeview_new.

    +

    NOTE If you normally use the command line option "-g" to enable debug information and wish to use "-sym codeview_new", note that "-g" also implies "-sym fullpath", so specify either "-g -sym codeview_new" or "-sym fullpath,codeview_new" to retain full paths in the debug information.

    +
    +
    Targets
    + Intel x86
    +
    Remarks
    +

    NOTE The Carbide linker can accept object files or libraries using both the old and the new Codeview formats and generates an executable using a mixture of formats. The Carbide debugger will accept such mixed-format information. MSVC 6 and .NET 2003, however, only accept one format, erroneously interpreting the non-favored format. You may need to rebuild all your libraries and DLLs if you wish to debug fully under those debuggers.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_comment.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_comment.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_comment.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,59 +1,59 @@ - - - - - -comment - - - -

    comment

    -

    Embeds information into the object code for the linker.

    -
    Syntax
    -

    #pragma comment(type [ “value”])

    -
    Parameters
    -

    type

    -
    -

    Set type to: lib, exestr, linker, user, or compiler.

    -
    -

    value

    -
    -

    Name of file without extension to embed into the object code.

    -
    -
    Targets
    - Intel x86
    -
    Remarks
    -

    Embeds information into the object code. The linker searches for the library file using the access paths in the IDE or the MWLibraries environment variable in the command line tool and include it after any explicitly-specified files on the command line. See Table 11.1 for a list of comment usage examples.

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    ExampleDescription
    comment(lib, “library”)Instructs the linker to automatically link against library[.lib] file when the Link with default libraries setting is enabled.
    comment(linker, “directive”) Embed a linker directive using the Linker Command File (.cmd) syntax.
    comment(user, “string”)Embed a comment into the object file.
    comment(exestr, “string”)Embed a string into the executable.
    comment(compiler)Embed compiler version into object file. Normally ignored for compatability.
    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (comment).
    -

    - - - - - + + + + + +comment + + + +

    comment

    +

    Embeds information into the object code for the linker.

    +
    Syntax
    +

    #pragma comment(type [ “value”])

    +
    Parameters
    +

    type

    +
    +

    Set type to: lib, exestr, linker, user, or compiler.

    +
    +

    value

    +
    +

    Name of file without extension to embed into the object code.

    +
    +
    Targets
    + Intel x86
    +
    Remarks
    +

    Embeds information into the object code. The linker searches for the library file using the access paths in the IDE or the MWLibraries environment variable in the command line tool and include it after any explicitly-specified files on the command line. See Table 11.1 for a list of comment usage examples.

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ExampleDescription
    comment(lib, “library”)Instructs the linker to automatically link against library[.lib] file when the Link with default libraries setting is enabled.
    comment(linker, “directive”) Embed a linker directive using the Linker Command File (.cmd) syntax.
    comment(user, “string”)Embed a comment into the object file.
    comment(exestr, “string”)Embed a string into the executable.
    comment(compiler)Embed compiler version into object file. Normally ignored for compatability.
    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (comment).
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_disable_stackalloc.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_disable_stackalloc.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_disable_stackalloc.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - -disable_stackalloc - - - -

    disable_stackalloc

    -

    Controls the compiler method used to grow the size of the stack.

    -
    Syntax
    -

    #pragma disable_stackalloc on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    The compiler controls how stack space is grown as follows:

    -
      -
    • off – for each object on the stack larger than 4096 bytes, the compiler calls a runtime routine to touch each new page on the stack to tell the OS to allocate more stack space.
    • -
    • on – the compiler only touches the last (topmost) page of the stack after allocating local space.
    • -
    -

    NOTE Use of this pragma is required for Win32 code.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (disable_stackalloc). The default setting for Win32 targets is off.
    -

    - - - - - + + + + + +disable_stackalloc + + + +

    disable_stackalloc

    +

    Controls the compiler method used to grow the size of the stack.

    +
    Syntax
    +

    #pragma disable_stackalloc on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    The compiler controls how stack space is grown as follows:

    +
      +
    • off – for each object on the stack larger than 4096 bytes, the compiler calls a runtime routine to touch each new page on the stack to tell the OS to allocate more stack space.
    • +
    • on – the compiler only touches the last (topmost) page of the stack after allocating local space.
    • +
    +

    NOTE Use of this pragma is required for Win32 code.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (disable_stackalloc). The default setting for Win32 targets is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_disableopts.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_disableopts.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_disableopts.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,31 +1,31 @@ - - - - - -disableopts - - - -

    disableopts

    -

    Use to make the debugging of optimized code easier while having no effect on non-optimized code.

    -
    Syntax
    -

    #pragma disableopts on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    To make debugging opimized code easier disableopts on:

    -
      -
    • forces use of a stack frame so that the call stack is always available
    • -
    • disables local stack variable overlapping
    • -
    • disables automatic stack alignment, which may result in the odd use of EBX, EBP, and ESP
    • -
    • disables allocation of long long to pairs of integer registers
    • -
    • prevents the scheduler from moving code in front of the epilog or past the prolog, preventing local variables from appearing mangled when the program counter is within this range
    • -
    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (disableopts). The default setting is off.
    -

    - - - - - + + + + + +disableopts + + + +

    disableopts

    +

    Use to make the debugging of optimized code easier while having no effect on non-optimized code.

    +
    Syntax
    +

    #pragma disableopts on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    To make debugging opimized code easier disableopts on:

    +
      +
    • forces use of a stack frame so that the call stack is always available
    • +
    • disables local stack variable overlapping
    • +
    • disables automatic stack alignment, which may result in the odd use of EBX, EBP, and ESP
    • +
    • disables allocation of long long to pairs of integer registers
    • +
    • prevents the scheduler from moving code in front of the epilog or past the prolog, preventing local variables from appearing mangled when the program counter is within this range
    • +
    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (disableopts). The default setting is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_emit_local_scopes.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_emit_local_scopes.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_emit_local_scopes.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -emit_local_scopes - - - -

    emit_local_scopes

    -

    Instructs the compiler to emit the scopes of local variables into debugger information.

    -
    Syntax
    -

    #pragma emit_local_scopes on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    This pragma enables debuggers to decide, among several variables using the same name, which one is actually used at the current program counter. This only effects debugging information generated for Codeview.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (emit_local_scopes). The default setting is on.
    -

    - - - - - + + + + + +emit_local_scopes + + + +

    emit_local_scopes

    +

    Instructs the compiler to emit the scopes of local variables into debugger information.

    +
    Syntax
    +

    #pragma emit_local_scopes on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    This pragma enables debuggers to decide, among several variables using the same name, which one is actually used at the current program counter. This only effects debugging information generated for Codeview.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (emit_local_scopes). The default setting is on.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_exceptions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_exceptions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_exceptions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -exceptions - - - -

    exceptions

    -

    Set exception handling to use Microsoft-compatible exceptions or Carbide zero-overhead exceptions (default). Implies the use of pragma# -cpp_exceptions on.

    -
    Syntax
    -

    #pragma exc[eptions] mw | ms | sync | async

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    This pragma emulates the /EHS option of MSVC. In this model, Win32 structured exception handling (SEH) is not caught by C++ catch(...) blocks.

    -

    This pragma corresponds to the C++ exception handling setting in the Microsoft Compatability group of the x86 CodeGen panel. To check this setting, use __option (exceptions), described in Checking Settings. By default, this pragma is on.
    -

    - - - - - + + + + + +exceptions + + + +

    exceptions

    +

    Set exception handling to use Microsoft-compatible exceptions or Carbide zero-overhead exceptions (default). Implies the use of pragma# -cpp_exceptions on.

    +
    Syntax
    +

    #pragma exc[eptions] mw | ms | sync | async

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    This pragma emulates the /EHS option of MSVC. In this model, Win32 structured exception handling (SEH) is not caught by C++ catch(...) blocks.

    +

    This pragma corresponds to the C++ exception handling setting in the Microsoft Compatability group of the x86 CodeGen panel. To check this setting, use __option (exceptions), described in Checking Settings. By default, this pragma is on.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_exceptions_synchronous.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_exceptions_synchronous.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_exceptions_synchronous.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - -exceptions_synchronous - - - -

    exceptions_synchronous

    -

    Set exception handling to use Microsoft-compatible exceptions. The default is off.

    -
    Syntax
    -

    #pragma exceptions_synchronous on | off | reset

    -
    Parameters
    -

    on

    -
    -

    Ignore C++ catch(...) blocks for Win32 exceptions when using Structured Exception Handling (SEH). For Microsoft-compatible mode only. Equivilent to #pragma exc sync.

    -
    -

    off

    -
    -

    Let C++ catch(...) blocks trap Win32 exceptions when using SEH. For Microsoft-compatible mode only. Equivilent to #pragma exc async. This is the default.

    -
    -
    Targets
    -

    Intel x86

    -

    NOTE To translate Win32 exceptions into C++ exceptions, use the routine set_se_translator() found in the header <eh.h>.

    - - - - - + + + + + +exceptions_synchronous + + + +

    exceptions_synchronous

    +

    Set exception handling to use Microsoft-compatible exceptions. The default is off.

    +
    Syntax
    +

    #pragma exceptions_synchronous on | off | reset

    +
    Parameters
    +

    on

    +
    +

    Ignore C++ catch(...) blocks for Win32 exceptions when using Structured Exception Handling (SEH). For Microsoft-compatible mode only. Equivilent to #pragma exc sync.

    +
    +

    off

    +
    +

    Let C++ catch(...) blocks trap Win32 exceptions when using SEH. For Microsoft-compatible mode only. Equivilent to #pragma exc async. This is the default.

    +
    +
    Targets
    +

    Intel x86

    +

    NOTE To translate Win32 exceptions into C++ exceptions, use the routine set_se_translator() found in the header <eh.h>.

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_fill_stack.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_fill_stack.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_fill_stack.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -fill_stack - - - -

    fill_stack

    -

    Instructs the compiler to initialize locals to a fixed bit pattern (0xCC) upon entry to a function.

    -
    Syntax
    -

    #pragma fill_stack on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    Use of this pragma helps to diagnose program failures or crashes caused by the use of uninitialized variables. I.e., a bit pattern of 0xCC is not a normally-encountered integer or floating-point value, and 0xCCCCCCCC is almost never a valide pointer value. If the program counter does point to such a variable, it will be “executed” as an int3 breakpoint.

    -

    This pragma does not correspond to any panel setting. To check this setting, use the __option (fill_stack). The default setting for is off at optimization level 0.
    -

    - - - - - + + + + + +fill_stack + + + +

    fill_stack

    +

    Instructs the compiler to initialize locals to a fixed bit pattern (0xCC) upon entry to a function.

    +
    Syntax
    +

    #pragma fill_stack on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    Use of this pragma helps to diagnose program failures or crashes caused by the use of uninitialized variables. I.e., a bit pattern of 0xCC is not a normally-encountered integer or floating-point value, and 0xCCCCCCCC is almost never a valide pointer value. If the program counter does point to such a variable, it will be “executed” as an int3 breakpoint.

    +

    This pragma does not correspond to any panel setting. To check this setting, use the __option (fill_stack). The default setting for is off at optimization level 0.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_function.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_function.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_function.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -function - - - -

    function

    -

    Ignored but included for compatibility with Microsoft compilers.

    -
    Syntax
    -

    #pragma function( funcname1, funcname2, ... )

    -
    Targets
    - Intel x86
    -
    Remarks
    - Ignored. Included for compatibility with Microsoft compilers.
    - - - - - + + + + + +function + + + +

    function

    +

    Ignored but included for compatibility with Microsoft compilers.

    +
    Syntax
    +

    #pragma function( funcname1, funcname2, ... )

    +
    Targets
    + Intel x86
    +
    Remarks
    + Ignored. Included for compatibility with Microsoft compilers.
    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_ieeefp.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_ieeefp.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_ieeefp.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,39 +1,39 @@ - - - - - -ieeefp - - - -

    ieeefp

    -

    Controls whether floating point comparisons and some other optimizations are performed as per the IEEE standard. The default is off.

    -
    Syntax
    -

    #pragma ieeefp on | off

    -

    Parameters

    -

    on

    -
    -

    Floating-point comparisons are done using these conditions:

    -
      -
    • checks for NANs are not performed in comparisons, floating-point conditional moves, or integer conditional moves with floating-point tests in the condition
    • -
    • divides of all constants are changed to multiples of 1.0/constant
    • -
    • when performing float->integer conversions, the control word is reset to the assumed default of “round to nearest” instead of the original value, saving a few read/writes as the operation is performed
    • -
    -
    -

    off

    -
    -

    Floating-point comparisons are done using IEEE standards.

    -
    -
    Targets
    - Intel x86
    -
    Remarks
    -

    Use #pragma ieeefp on to reduce floating-point accuracy and increase calculation speed. The same effect can be achieved in the command-line using -opt ieeefp or -fast_math off commands.

    -

    Use #pragma ieeefp off to maximize floating-point accuracy and decrease calculation speed. The same effect can be achieved in the command-line using -opt noieeefp or -fast_math on commands.

    -

    This pragma corresponds to the Relax IEEE floating point setting in the processor-specific CodeGen panel. To check this setting, use __option (ieeefp), described in Checking Settings. By default, this setting is on.
    -

    - - - - - + + + + + +ieeefp + + + +

    ieeefp

    +

    Controls whether floating point comparisons and some other optimizations are performed as per the IEEE standard. The default is off.

    +
    Syntax
    +

    #pragma ieeefp on | off

    +

    Parameters

    +

    on

    +
    +

    Floating-point comparisons are done using these conditions:

    +
      +
    • checks for NANs are not performed in comparisons, floating-point conditional moves, or integer conditional moves with floating-point tests in the condition
    • +
    • divides of all constants are changed to multiples of 1.0/constant
    • +
    • when performing float->integer conversions, the control word is reset to the assumed default of “round to nearest” instead of the original value, saving a few read/writes as the operation is performed
    • +
    +
    +

    off

    +
    +

    Floating-point comparisons are done using IEEE standards.

    +
    +
    Targets
    + Intel x86
    +
    Remarks
    +

    Use #pragma ieeefp on to reduce floating-point accuracy and increase calculation speed. The same effect can be achieved in the command-line using -opt ieeefp or -fast_math off commands.

    +

    Use #pragma ieeefp off to maximize floating-point accuracy and decrease calculation speed. The same effect can be achieved in the command-line using -opt noieeefp or -fast_math on commands.

    +

    This pragma corresponds to the Relax IEEE floating point setting in the processor-specific CodeGen panel. To check this setting, use __option (ieeefp), described in Checking Settings. By default, this setting is on.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_init_seg.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_init_seg.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_init_seg.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - -init_seg - - - -

    init_seg

    -

    Controls the order in which initialization code is executed.

    -
    Syntax
    -

    pragma init_seg( compiler | lib | user | "name")

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    This pragma controls the order in which initialization code is executed. The initialization code for a C++ compiled module calls constructors for any statically declared objects. For C, no initialization code is generated.

    -

    The order of initialization is:

    -
      -
    • compiler
    • -
    • lib
    • -
    • user
    • -
    -

    If you specify the name of a segment, a pointer to the initialization code is placed in the designated segment. In this case, the initialization code is not called automatically; you must call it explicitly.
    -

    - - - - - + + + + + +init_seg + + + +

    init_seg

    +

    Controls the order in which initialization code is executed.

    +
    Syntax
    +

    pragma init_seg( compiler | lib | user | "name")

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    This pragma controls the order in which initialization code is executed. The initialization code for a C++ compiled module calls constructors for any statically declared objects. For C, no initialization code is generated.

    +

    The order of initialization is:

    +
      +
    • compiler
    • +
    • lib
    • +
    • user
    • +
    +

    If you specify the name of a segment, a pointer to the initialization code is placed in the designated segment. In this case, the initialization code is not called automatically; you must call it explicitly.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_intrinsics_regabi.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_intrinsics_regabi.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_intrinsics_regabi.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,21 +1,21 @@ - - - - - -intrinsics_regabi - - - -

    intrinsics_regabi

    -

    Controls whether __m64 arguments and __m128{i,d,f} arguments are passed on the stack or via the MMX and SSE registers respectively. The default setting is off.

    -
    Syntax
    -

    #pragma intrinsics_regabi on | off | reset

    -
    Targets
    -

    Intel x86
    -

    - - - - - + + + + + +intrinsics_regabi + + + +

    intrinsics_regabi

    +

    Controls whether __m64 arguments and __m128{i,d,f} arguments are passed on the stack or via the MMX and SSE registers respectively. The default setting is off.

    +
    Syntax
    +

    #pragma intrinsics_regabi on | off | reset

    +
    Targets
    +

    Intel x86
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_k63d.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_k63d.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_k63d.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - -k63d - - - -

    k63d

    -

    Controls special code generation for AMD K6 3D extensions.

    -
    Syntax
    -

    #pragma k63d on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    This pragma tells the x86 compiler to generate code specifically for processors that have the circuitry needed to execute specialized 3D instructions, such as AMD K6 3D extensions.

    -

    NOTE When enabled, the autovectorize loops option (#pragma opt_vectorize_loops on) will use these instructions if possible.
    - This pragma corresponds to the K6 3D Favored setting in the Extended Instruction Set menu of the x86 CodeGen panel.

    -

    NOTE This pragma generates code that is not compatible with the Intel Pentium class of microprocessors.

    -

    To check this setting, use __option (k63d).
    -

    - - - - - + + + + + +k63d + + + +

    k63d

    +

    Controls special code generation for AMD K6 3D extensions.

    +
    Syntax
    +

    #pragma k63d on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    This pragma tells the x86 compiler to generate code specifically for processors that have the circuitry needed to execute specialized 3D instructions, such as AMD K6 3D extensions.

    +

    NOTE When enabled, the autovectorize loops option (#pragma opt_vectorize_loops on) will use these instructions if possible.
    + This pragma corresponds to the K6 3D Favored setting in the Extended Instruction Set menu of the x86 CodeGen panel.

    +

    NOTE This pragma generates code that is not compatible with the Intel Pentium class of microprocessors.

    +

    To check this setting, use __option (k63d).
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_line_trace.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_line_trace.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_line_trace.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,27 @@ - - - - - -line_trace - - - -

    line_trace

    -

    Instructs the compiler to emit a call to an external function on each transition to a new source line.

    -
    Syntax
    -

    #pragma line_trace on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    Use this pragma to output a log of all executed source lines to enable you to track down difficult errors or act as a statement-level profiler on a line-by-line level.

    -

    To make line_trace work you need to write an external function to output the line information. The function should have this signature:

    -

    extern "C" void __stdcall _LineTrace( const char *function, int line );

    -

    and must save and restore any registers it uses. For example, pushad and popad work for saving and restoring integer registers.

    -

    To check this setting, use __option (line_trace). The default setting is off.
    -

    - - - - - + + + + + +line_trace + + + +

    line_trace

    +

    Instructs the compiler to emit a call to an external function on each transition to a new source line.

    +
    Syntax
    +

    #pragma line_trace on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    Use this pragma to output a log of all executed source lines to enable you to track down difficult errors or act as a statement-level profiler on a line-by-line level.

    +

    To make line_trace work you need to write an external function to output the line information. The function should have this signature:

    +

    extern "C" void __stdcall _LineTrace( const char *function, int line );

    +

    and must save and restore any registers it uses. For example, pushad and popad work for saving and restoring integer registers.

    +

    To check this setting, use __option (line_trace). The default setting is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_microsoft_exceptions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_microsoft_exceptions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_microsoft_exceptions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -microsoft_exceptions - - - -

    microsoft_exceptions

    -

    Controls the use of Microsoft C++ exception handling.

    -
    Syntax
    -

    #pragma microsoft_exceptions on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    This pragma tells the x86 compiler to generate exception handling code that is compatible with Microsoft C++ exception handling code.

    -

    To check this setting, use __option (microsoft_exceptions).
    -

    - - - - - + + + + + +microsoft_exceptions + + + +

    microsoft_exceptions

    +

    Controls the use of Microsoft C++ exception handling.

    +
    Syntax
    +

    #pragma microsoft_exceptions on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    This pragma tells the x86 compiler to generate exception handling code that is compatible with Microsoft C++ exception handling code.

    +

    To check this setting, use __option (microsoft_exceptions).
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_mmcalls.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_mmcalls.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_mmcalls.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -mmcalls - - - -

    mmcalls

    -

    Instructs the compiler to optimize arithmetic and function calling code for use of MMX registers (AMD K6 + 3DNow! instruction set) or SSE registers (Intel SSE or SSE-2 instruction sets) when the related pragmas or options are enabled.

    -
    Syntax
    -

    #pragma mmcalls on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    This pragma corresponds to the Use multimedia calling convention setting in the the x86 CodeGen panel.

    -

    NOTE This pragma generates code that is not compatible with the Intel Pentium class of microprocessors.

    -

    To check this setting, use __option (mmcalls).
    -

    - - - - - + + + + + +mmcalls + + + +

    mmcalls

    +

    Instructs the compiler to optimize arithmetic and function calling code for use of MMX registers (AMD K6 + 3DNow! instruction set) or SSE registers (Intel SSE or SSE-2 instruction sets) when the related pragmas or options are enabled.

    +
    Syntax
    +

    #pragma mmcalls on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    This pragma corresponds to the Use multimedia calling convention setting in the the x86 CodeGen panel.

    +

    NOTE This pragma generates code that is not compatible with the Intel Pentium class of microprocessors.

    +

    To check this setting, use __option (mmcalls).
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_mmx.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_mmx.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_mmx.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -mmx - - - -

    mmx

    -

    Controls special code generation Intel MMX extensions.

    -
    Syntax
    -

    #pragma mmx on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    This pragma tells the x86 compiler to generate Intel MMX extension code that only runs on processors that have with the circuitry needed to execute the more than 50 specialized MMX instructions.

    -

    NOTE When enabled, the autovectorize loops option (#pragma opt_vectorize_loops on) will use these instructions if possible.

    -

    This pragma corresponds to the MMX setting in the Extended Instruction Set menu of the x86 CodeGen panel. To check this setting, use __option (mmx), described in Checking Settings.
    -

    - - - - - + + + + + +mmx + + + +

    mmx

    +

    Controls special code generation Intel MMX extensions.

    +
    Syntax
    +

    #pragma mmx on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    This pragma tells the x86 compiler to generate Intel MMX extension code that only runs on processors that have with the circuitry needed to execute the more than 50 specialized MMX instructions.

    +

    NOTE When enabled, the autovectorize loops option (#pragma opt_vectorize_loops on) will use these instructions if possible.

    +

    This pragma corresponds to the MMX setting in the Extended Instruction Set menu of the x86 CodeGen panel. To check this setting, use __option (mmx), described in Checking Settings.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_overlap_locals.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_overlap_locals.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_overlap_locals.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -overlap_locals - - - -

    overlap_locals

    -

    Instructs the compiler to analyze the lifetimes of variables on the stack and use the same storage location for variables with non-overlapping lifetimes.

    -
    Syntax
    -

    #pragma overlap_locals on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    The compiler can analyze the lifetime of variables on the stack, either those too large for register storage or those forced on the stack by register spilling, or being marked as volatile, and use the same storage location for variables with non-overlapping lifetimes.

    -

    This can dramatically reduce the stack size.

    -

    The default setting is on for optimization levels 2 and above.
    -

    - - - - - + + + + + +overlap_locals + + + +

    overlap_locals

    +

    Instructs the compiler to analyze the lifetimes of variables on the stack and use the same storage location for variables with non-overlapping lifetimes.

    +
    Syntax
    +

    #pragma overlap_locals on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    The compiler can analyze the lifetime of variables on the stack, either those too large for register storage or those forced on the stack by register spilling, or being marked as volatile, and use the same storage location for variables with non-overlapping lifetimes.

    +

    This can dramatically reduce the stack size.

    +

    The default setting is on for optimization levels 2 and above.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_pack.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_pack.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_pack.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,46 +1,46 @@ - - - - - -pack - - - -

    pack

    -

    Controls the alignment of data structures.

    -
    Syntax
    -

    #pragma pack( [n | push, n | pop] )

    -
    Targets
    - Intel x86, MIPS
    -
    Remarks
    -

    Sets the packing alignment for data structures. It affects all data structures declared after this pragma until you change it again with another pack pragma.

    - - - - - - - - - - - - - - - - - - - - - -
    This pragma…Does this…
    #pragma pack(n)Sets the alignment modulus to n, where n can be 1, 2, 4, 8, or 16. For MIPS compilers, if n is 0, structure alignment is reset to the default setting.
    #pragma pack(push, n)Pushes the current alignment modulus on a stack, then sets it to n, where n can be 1, 2, 4, 8, or 16. Use push and pop when you need a specific modulus for some declaration or set of declarations, but do not want to disturb the default setting. MIPS compilers do not support this form.
    #pragma pack(pop)Pops a previously pushed alignment modulus from the stack. MIPS compilers do not support this form.
    #pragma pack()For x86 compilers, resets alignment modulus to the value specified in the x86 CodeGen panel. For MIPS compilers, resets structure alignment to the default setting.
    -

    This pragma corresponds to the Byte Alignment setting in the x86 CodeGen panel.
    -

    - - - - - + + + + + +pack + + + +

    pack

    +

    Controls the alignment of data structures.

    +
    Syntax
    +

    #pragma pack( [n | push, n | pop] )

    +
    Targets
    + Intel x86, MIPS
    +
    Remarks
    +

    Sets the packing alignment for data structures. It affects all data structures declared after this pragma until you change it again with another pack pragma.

    + + + + + + + + + + + + + + + + + + + + + +
    This pragma…Does this…
    #pragma pack(n)Sets the alignment modulus to n, where n can be 1, 2, 4, 8, or 16. For MIPS compilers, if n is 0, structure alignment is reset to the default setting.
    #pragma pack(push, n)Pushes the current alignment modulus on a stack, then sets it to n, where n can be 1, 2, 4, 8, or 16. Use push and pop when you need a specific modulus for some declaration or set of declarations, but do not want to disturb the default setting. MIPS compilers do not support this form.
    #pragma pack(pop)Pops a previously pushed alignment modulus from the stack. MIPS compilers do not support this form.
    #pragma pack()For x86 compilers, resets alignment modulus to the value specified in the x86 CodeGen panel. For MIPS compilers, resets structure alignment to the default setting.
    +

    This pragma corresponds to the Byte Alignment setting in the x86 CodeGen panel.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_peephole.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_peephole.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_peephole.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -peephole - - - -

    peephole

    -

    Controls the use peephole optimization.

    -
    Syntax
    -

    #pragma peephole on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    If you enable this pragma, the compiler performs peephole optimizations, which are small, local optimizations that eliminate some compare instructions and improve branch sequences.

    -

    This pragma corresponds to the Peephole Optimizer setting in the PPC Processor panel. To check this setting, use __option (peephole). This settings is on at optimization level 1 and above.
    -

    - - - - - + + + + + +peephole + + + +

    peephole

    +

    Controls the use peephole optimization.

    +
    Syntax
    +

    #pragma peephole on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    If you enable this pragma, the compiler performs peephole optimizations, which are small, local optimizations that eliminate some compare instructions and improve branch sequences.

    +

    This pragma corresponds to the Peephole Optimizer setting in the PPC Processor panel. To check this setting, use __option (peephole). This settings is on at optimization level 1 and above.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_register_coloring.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_register_coloring.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_register_coloring.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -register_coloring - - - -

    register_coloring

    -

    Controls the use of register coloring.

    -
    Syntax
    -

    #pragma register_coloring on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    If you enable this pragma, the compiler uses a single register to hold the values of multiple variables that are never used in the same statement. This improves program performance.

    -

    TIP Disable this setting when debugging a program.

    -

    This pragma does not correspond to any panel setting. To check this setting, use __option (register_coloring). This settings is on at optimization level 2 and above
    -

    - - - - - + + + + + +register_coloring + + + +

    register_coloring

    +

    Controls the use of register coloring.

    +
    Syntax
    +

    #pragma register_coloring on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    If you enable this pragma, the compiler uses a single register to hold the values of multiple variables that are never used in the same statement. This improves program performance.

    +

    TIP Disable this setting when debugging a program.

    +

    This pragma does not correspond to any panel setting. To check this setting, use __option (register_coloring). This settings is on at optimization level 2 and above
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_scheduling.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_scheduling.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_scheduling.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -scheduling - - - -

    scheduling

    -

    Specifies the use of instruction scheduling optimization.

    -
    Syntax
    -

    #pragma scheduling on | off

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    This pragma lets you choose how the compiler rearranges instructions to increase speed. Some instructions, such as a memory load, take more than one processor cycle. By moving an unrelated instruction between the load and the instruction that uses the loaded item, the compiler saves a cycle when executing the program.

    -

    NOTE When enabled, the relationship between the source and object code is not guaranteed to be one-to-one. This may cause the “current source line” cursor to jump around unpredictably in editor windows showing the scheduled code. The worst of this can be avoided by enabling the Disable opimizations for debug setting in the x86 CodeGen panel.

    -

    This pragma correspondes to the x86 CodeGen panel setting.
    -

    - - - - - + + + + + +scheduling + + + +

    scheduling

    +

    Specifies the use of instruction scheduling optimization.

    +
    Syntax
    +

    #pragma scheduling on | off

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    This pragma lets you choose how the compiler rearranges instructions to increase speed. Some instructions, such as a memory load, take more than one processor cycle. By moving an unrelated instruction between the load and the instruction that uses the loaded item, the compiler saves a cycle when executing the program.

    +

    NOTE When enabled, the relationship between the source and object code is not guaranteed to be one-to-one. This may cause the “current source line” cursor to jump around unpredictably in editor windows showing the scheduled code. The worst of this can be avoided by enabling the Disable opimizations for debug setting in the x86 CodeGen panel.

    +

    This pragma correspondes to the x86 CodeGen panel setting.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_sse.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_sse.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_sse.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -sse - - - -

    sse

    -

    Controls the generation of SSE instructions for single-precision floating point operations.

    -
    Syntax
    -

    #pragma sse on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    NOTE When enabled, the autovectorize loops option (#pragma opt_vectorize_loops on) will use these instructions if possible.

    -

    This pragma corresponds to the Use extended instructions setting in the x86 CodeGen panel setting or #pragma use_extinst on. The default settings is off.
    -

    - - - - - + + + + + +sse + + + +

    sse

    +

    Controls the generation of SSE instructions for single-precision floating point operations.

    +
    Syntax
    +

    #pragma sse on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    NOTE When enabled, the autovectorize loops option (#pragma opt_vectorize_loops on) will use these instructions if possible.

    +

    This pragma corresponds to the Use extended instructions setting in the x86 CodeGen panel setting or #pragma use_extinst on. The default settings is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_sse2.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_sse2.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_sse2.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -sse2 - - - -

    sse2

    -

    Controls the generation of SSE-2 instructions for single and double-precision floating point and 16-byte integer vector operations.

    -
    Syntax
    -

    #pragma sse2 on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    NOTE When enabled, the autovectorize loops option (#pragma opt_vectorize_loops on) will use these instructions if possible.

    -

    This pragma corresponds to the Use extended instructions setting in the x86 CodeGen panel setting or #pragma use_extinst on. The default settings is off.
    -

    - - - - - + + + + + +sse2 + + + +

    sse2

    +

    Controls the generation of SSE-2 instructions for single and double-precision floating point and 16-byte integer vector operations.

    +
    Syntax
    +

    #pragma sse2 on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    NOTE When enabled, the autovectorize loops option (#pragma opt_vectorize_loops on) will use these instructions if possible.

    +

    This pragma corresponds to the Use extended instructions setting in the x86 CodeGen panel setting or #pragma use_extinst on. The default settings is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_stack_alignment.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_stack_alignment.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_stack_alignment.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,31 +1,31 @@ - - - - - -stack_alignment - - - -

    stack_alignment

    -

    Recommends the minimum stack alignment size based on a power of 2.

    -
    Syntax
    -

    #pragma stack_alignment( power )

    -
    Parameters
    -

    power

    -
    -

    Stack alignment value based on a power of 2.

    -
    -
    Targets
    - Intel x86
    -
    Remarks
    -

    By default, the global stack alignment is 4 as per the Win32 ABI. When doubles are accessed in a function, the alignment is bumped to 8 for that function. Spills of SSE registers (e.g. in autovectorized code or code using SSE intrinsics) bump alignment to 16 bytes.

    -

    Finally, the GCC-style __attribute__((aligned(xxx))) on a local variable declaration can be used to align specific variables, which in turn aligns the stack while use of #pragma disablopts off turns off stack alignment.

    -

    This pragma recommends a minimum alignment. When one of the above situations occurs, the actual alignment may be greater.
    - In some functions, in order to guarantee alignment, the EBX register is used as a surrogate local base pointer. This happens in functions which have indeterminate control flow (i.e., jump through a pointer), which are involved in exception handling, or which use alloca(). Use of EBX to access locals is not possible if Microsoft C++ exception handling is used in the function, so alignment is disabled for such functions. You can use #pragma warn_stack_alignment to check for such cases.
    -

    - - - - - + + + + + +stack_alignment + + + +

    stack_alignment

    +

    Recommends the minimum stack alignment size based on a power of 2.

    +
    Syntax
    +

    #pragma stack_alignment( power )

    +
    Parameters
    +

    power

    +
    +

    Stack alignment value based on a power of 2.

    +
    +
    Targets
    + Intel x86
    +
    Remarks
    +

    By default, the global stack alignment is 4 as per the Win32 ABI. When doubles are accessed in a function, the alignment is bumped to 8 for that function. Spills of SSE registers (e.g. in autovectorized code or code using SSE intrinsics) bump alignment to 16 bytes.

    +

    Finally, the GCC-style __attribute__((aligned(xxx))) on a local variable declaration can be used to align specific variables, which in turn aligns the stack while use of #pragma disablopts off turns off stack alignment.

    +

    This pragma recommends a minimum alignment. When one of the above situations occurs, the actual alignment may be greater.
    + In some functions, in order to guarantee alignment, the EBX register is used as a surrogate local base pointer. This happens in functions which have indeterminate control flow (i.e., jump through a pointer), which are involved in exception handling, or which use alloca(). Use of EBX to access locals is not possible if Microsoft C++ exception handling is used in the function, so alignment is disabled for such functions. You can use #pragma warn_stack_alignment to check for such cases.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_struct_reg_return.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_struct_reg_return.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_struct_reg_return.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ - - - - - -struct_reg_return - - - -

    struct_reg_return

    -

    Controls how small structs are returned from a function.

    -
    Syntax
    -

    #pragma struct_reg_return on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    structs are returned as follows:

    -
      -
    • on – structs of size 1, 2, 4, or 8-bytes are returned in registers AL, AX, EAX, or EDX:EAX respectively
    • -
    • off – always returns structs on the stack in space allocated by the caller
    • -
    -

    The default setting is on.
    -

    - - - - - + + + + + +struct_reg_return + + + +

    struct_reg_return

    +

    Controls how small structs are returned from a function.

    +
    Syntax
    +

    #pragma struct_reg_return on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    structs are returned as follows:

    +
      +
    • on – structs of size 1, 2, 4, or 8-bytes are returned in registers AL, AX, EAX, or EDX:EAX respectively
    • +
    • off – always returns structs on the stack in space allocated by the caller
    • +
    +

    The default setting is on.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_symbian.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_symbian.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_symbian.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ - - - - - -symbian - - - -

    symbian

    -

    Switch to maintain binary compatability with the 2.4.7 compiler. Implicitly enabled whenever mwccsym2 is run.

    -
    Syntax
    -

    #pragma symbian

    -
    Targets
    - Intel x86
    -
    Remarks
    - This pragma restores C++ name mangling, struct layout, struct/argument alignment, and bitfield layout semantics to that of the 2.4.7 compiler.
    - - - - - + + + + + +symbian + + + +

    symbian

    +

    Switch to maintain binary compatability with the 2.4.7 compiler. Implicitly enabled whenever mwccsym2 is run.

    +
    Syntax
    +

    #pragma symbian

    +
    Targets
    + Intel x86
    +
    Remarks
    + This pragma restores C++ name mangling, struct layout, struct/argument alignment, and bitfield layout semantics to that of the 2.4.7 compiler.
    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_ten_byte_long_double.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_ten_byte_long_double.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_ten_byte_long_double.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -ten_byte_long_double - - - -

    ten_byte_long_double

    -

    Changes the size of the long double to 80-bits (10 bytes) allowing the full precision and range of extended precision or temporary real format used in x86 floating point registers.

    -
    Syntax
    -

    #pragma ten_byte_long_double on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    The range is approximately 3.632^10-4932 to 1.190^10+4932.

    -

    Note there is no indication in the object code about what long double size was used to create it, thus the linker cannot warn on mismatches. To ensure a match, all libraries and programs exchanging long double must be rebuilt.

    -

    The default setting is off, where both long double and double are both 64-bits.
    -

    - - - - - + + + + + +ten_byte_long_double + + + +

    ten_byte_long_double

    +

    Changes the size of the long double to 80-bits (10 bytes) allowing the full precision and range of extended precision or temporary real format used in x86 floating point registers.

    +
    Syntax
    +

    #pragma ten_byte_long_double on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    The range is approximately 3.632^10-4932 to 1.190^10+4932.

    +

    Note there is no indication in the object code about what long double size was used to create it, thus the linker cannot warn on mismatches. To ensure a match, all libraries and programs exchanging long double must be rebuilt.

    +

    The default setting is off, where both long double and double are both 64-bits.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_cmov.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_cmov.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_cmov.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -use_cmov - - - -

    use_cmov

    -

    Instructs the compiler to use the CMOV instruction to perform conditional integer assignments.

    -
    Syntax
    -

    #pragma use_cmov on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    Use this pragma to reduce code size and improve speed in certain loops. This is only available for Pentium Pro, Athlon, and newer target processors.

    -

    The default setting is off.
    -

    - - - - - + + + + + +use_cmov + + + +

    use_cmov

    +

    Instructs the compiler to use the CMOV instruction to perform conditional integer assignments.

    +
    Syntax
    +

    #pragma use_cmov on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    Use this pragma to reduce code size and improve speed in certain loops. This is only available for Pentium Pro, Athlon, and newer target processors.

    +

    The default setting is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_extinst.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_extinst.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_extinst.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,25 +1,25 @@ - - - - - -use_extinst - - - -

    use_extinst

    -

    Controls the code generator’s use of processor-specific instructions.

    -
    Syntax
    -

    #pragma use_extinst on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    When off, all compiler generated code is targeted to run on a 486 processor with the exception of any inline assembly which may explicitly use newer instructions.

    -

    When on, the compiler uses instructions corresponding to the target processor whenever possible.

    -

    NOTE Some instruction subsets, like AMD 3DNow!, Intel’s MMX, and Intel’s SSE and SSE-2 instruction sets are generated only when additional options are activated.
    -

    - - - - - + + + + + +use_extinst + + + +

    use_extinst

    +

    Controls the code generator’s use of processor-specific instructions.

    +
    Syntax
    +

    #pragma use_extinst on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    When off, all compiler generated code is targeted to run on a 486 processor with the exception of any inline assembly which may explicitly use newer instructions.

    +

    When on, the compiler uses instructions corresponding to the target processor whenever possible.

    +

    NOTE Some instruction subsets, like AMD 3DNow!, Intel’s MMX, and Intel’s SSE and SSE-2 instruction sets are generated only when additional options are activated.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_fcmov.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_fcmov.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_fcmov.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -use_fcmov - - - -

    use_fcmov

    -

    Instructs the compiler to use the FCMOV instruction to perform conditional float assignments.

    -
    Syntax
    -

    #pragma use_fcmov on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    Use this pragma to reduce code size and improve speed in certain loops. This is only available for Pentium Pro, Athlon, and newer target processors.

    -

    The default setting is off.
    -

    - - - - - + + + + + +use_fcmov + + + +

    use_fcmov

    +

    Instructs the compiler to use the FCMOV instruction to perform conditional float assignments.

    +
    Syntax
    +

    #pragma use_fcmov on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    Use this pragma to reduce code size and improve speed in certain loops. This is only available for Pentium Pro, Athlon, and newer target processors.

    +

    The default setting is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_frame.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_frame.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_use_frame.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -use_frame - - - -

    use_frame

    -

    Controls the use of the BP register for stack frames.

    -
    Syntax
    -

    #pragma use_frame on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    If you enable this pragma, the compiler uses the BP register to point to the start of the stack frame.

    -

    To check this setting, use __option (use_frame), described in Checking Settings.
    -

    - - - - - + + + + + +use_frame + + + +

    use_frame

    +

    Controls the use of the BP register for stack frames.

    +
    Syntax
    +

    #pragma use_frame on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    If you enable this pragma, the compiler uses the BP register to point to the start of the stack frame.

    +

    To check this setting, use __option (use_frame), described in Checking Settings.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_volatile_asm.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_volatile_asm.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_volatile_asm.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -volatile_asm - - - -

    volatile_asm

    -

    Controls the compiler’s optimization of inline assembly

    -
    Syntax
    -

    #pragma volatile_asm on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    When on, the compiler allows these optimizations to occur inside inline assembly code: peepholing, scheduling, and constant propagation.

    -

    This settting is controls by the Optimize inline assembly setting in the CodeGen panel. The default setting is off.
    -

    - - - - - + + + + + +volatile_asm + + + +

    volatile_asm

    +

    Controls the compiler’s optimization of inline assembly

    +
    Syntax
    +

    #pragma volatile_asm on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    When on, the compiler allows these optimizations to occur inside inline assembly code: peepholing, scheduling, and constant propagation.

    +

    This settting is controls by the Optimize inline assembly setting in the CodeGen panel. The default setting is off.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_warn_illegal_instructions.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_warn_illegal_instructions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_warn_illegal_instructions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,24 @@ - - - - - -warn_illegal_instructions - - - -

    warn_illegal_instructions

    -

    Controls the recognition of assembly instructions not available to an Intel x86 processor.

    -
    Syntax
    -

    #pragma warn_illegal_instructions on | off | reset

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    If you enable this pragma, the compiler displays a warning when it encounters an assembly language instruction that is not available on the Intel x86 processor for which the compiler is generating object code.

    -

    To check this setting, use __option (warn_illegal_instructions), described in Checking Settings.
    -

    - - - - - + + + + + +warn_illegal_instructions + + + +

    warn_illegal_instructions

    +

    Controls the recognition of assembly instructions not available to an Intel x86 processor.

    +
    Syntax
    +

    #pragma warn_illegal_instructions on | off | reset

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    If you enable this pragma, the compiler displays a warning when it encounters an assembly language instruction that is not available on the Intel x86 processor for which the compiler is generating object code.

    +

    To check this setting, use __option (warn_illegal_instructions), described in Checking Settings.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_x86_processor.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_x86_processor.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/p_x86_processor.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,86 +1,86 @@ - - - - - -x86_processor - - - -

    x86_processor

    -

    Specifies the scheduling model used for instruction scheduling optimization.

    -
    Syntax
    -

    #pragma x86_processor generic | pentium | pentiumpro | pentiumII | pentiumIII | pentiumIV | k6 | k7 | athlon | athlonIV | AthlonXP

    -
    Targets
    - Intel x86
    -
    Remarks
    -

    The processor options include:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    This option…ValueDoes this…
    generic
    500
    Generic x86 instructions. This is the default.
    pentium
    500
    Use Pentium instruction set.
    pentiumpro
    600
    Use Pentium Pro instruction set.
    pentiumII
    650
    Use Pentium II instruction set.
    pentiumIII
    655
    Use Pentium III instruction set.
    pentiumIV
    660
    Use Pentium IV instruction set.
    k6
    550
    Use AMD K6 instruction set.
    k7
    700
    Use AMD K7 instruction set.
    athlon
    700
    Use Athlon instruction set.
    athlonIV
    700
     
    athlonXP
    700
    Use Athlon XP instruction set.
    -

    You can test for a specific processor using the _M_IX86 macro using the values shown in Table 11.3.
    -

    - - - - - + + + + + +x86_processor + + + +

    x86_processor

    +

    Specifies the scheduling model used for instruction scheduling optimization.

    +
    Syntax
    +

    #pragma x86_processor generic | pentium | pentiumpro | pentiumII | pentiumIII | pentiumIV | k6 | k7 | athlon | athlonIV | AthlonXP

    +
    Targets
    + Intel x86
    +
    Remarks
    +

    The processor options include:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    This option…ValueDoes this…
    generic
    500
    Generic x86 instructions. This is the default.
    pentium
    500
    Use Pentium instruction set.
    pentiumpro
    600
    Use Pentium Pro instruction set.
    pentiumII
    650
    Use Pentium II instruction set.
    pentiumIII
    655
    Use Pentium III instruction set.
    pentiumIV
    660
    Use Pentium IV instruction set.
    k6
    550
    Use AMD K6 instruction set.
    k7
    700
    Use AMD K7 instruction set.
    athlon
    700
    Use Athlon instruction set.
    athlonIV
    700
     
    athlonXP
    700
    Use Athlon XP instruction set.
    +

    You can test for a specific processor using the _M_IX86 macro using the values shown in Table 11.3.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/pragmas_x86.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/pragmas_x86.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/pragmas_x86.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,26 @@ - - - - - -Intel x86 Pragmas - - - -

    Intel x86 Pragmas

    -

    This section provides information on Intel x86 specific pragmas. You configure the compiler for a project by changing the settings in the <Target> CodeGen panel. You can also control compiler behavior in your code by including the appropriate pragmas. -

    -

    Many of the pragmas correspond to option settings in the settings panels for processors and operating systems. Topics include: -

    - -

    NOTE See your target documentation for information on any pragmas you use in your programs. If your target documentation covers any of the pragmas listed in this section, the information provided by your target documentation always takes precedence.
    -

    - - - - - + + + + + +Intel x86 Pragmas + + + +

    Intel x86 Pragmas

    +

    This section provides information on Intel x86 specific pragmas. You configure the compiler for a project by changing the settings in the <Target> CodeGen panel. You can also control compiler behavior in your code by including the appropriate pragmas. +

    +

    Many of the pragmas correspond to option settings in the settings panels for processors and operating systems. Topics include: +

    + +

    NOTE See your target documentation for information on any pragmas you use in your programs. If your target documentation covers any of the pragmas listed in this section, the information provided by your target documentation always takes precedence.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/pragmas_x86_ref.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/pragmas_x86_ref.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas_x86/pragmas_x86_ref.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,18 +1,18 @@ - - - - - -x86 Pragma Reference - - - -

    x86 Pragma Reference

    -

    The following pragmas apply to the x86 compiler:

    -


    -

    - - - - - + + + + + +x86 Pragma Reference + + + +

    x86 Pragma Reference

    +

    The following pragmas apply to the x86 compiler:

    +


    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_ansi.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_ansi.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_ansi.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,66 +1,66 @@ - - - - - -ANSI Predefined Symbols - - - -

    ANSI Predefined Symbols

    -

    Table 1 lists the symbols required by the ANSI/ISO C standard.

    -
    Table 1. ANSI Predefined Symbols
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    This symbol…is…
    __DATE__The date the file is compiled; for example, "Jul 14, 1995". This symbol is a predefined macro.
    __FILE__The name of the file being compiled; for example "prog.c". This symbol is a predefined macro.
    __func__The name of the function currently being compiled. This predefined identifier is only available under the emerging ANSI/ISO C99 standard.
    __LINE__The number of the line being compiled (before including any header files). This symbol is a predefined macro.
    __TIME__The time the file is compiled in 24-hour format; for example, "13:01:45". This symbol is a predefined macro.
    __STDC__Defined as 1 if compiling C source code; undefined when compiling C++ source code. This macro lets you know that Carbide C implements the ANSI C standard.
    -
    -
    Listing 1 shows a small program that uses the ANSI predefined symbols.
    -

    Listing 1. Using ANSI Predefined Symbols
    - #include <stdio.h>

    -

    void main(void)
    - {
    - printf("Hello World!\n");
    -
    - printf("%s, %s\n", __DATE__, __TIME__);
    - printf("%s, line: %d\n", __FILE__, __LINE__);
    - }

    -

    /* The program prints something like the following:
    - Hello World!
    - Oct 31 2005, 18:53:50
    - main.ANSI.c, line: 10
    - */
    -

    -
    -

    - - - - - + + + + + +ANSI Predefined Symbols + + + +

    ANSI Predefined Symbols

    +

    Table 1 lists the symbols required by the ANSI/ISO C standard.

    +
    Table 1. ANSI Predefined Symbols
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    This symbol…is…
    __DATE__The date the file is compiled; for example, "Jul 14, 1995". This symbol is a predefined macro.
    __FILE__The name of the file being compiled; for example "prog.c". This symbol is a predefined macro.
    __func__The name of the function currently being compiled. This predefined identifier is only available under the emerging ANSI/ISO C99 standard.
    __LINE__The number of the line being compiled (before including any header files). This symbol is a predefined macro.
    __TIME__The time the file is compiled in 24-hour format; for example, "13:01:45". This symbol is a predefined macro.
    __STDC__Defined as 1 if compiling C source code; undefined when compiling C++ source code. This macro lets you know that Carbide C implements the ANSI C standard.
    +
    +
    Listing 1 shows a small program that uses the ANSI predefined symbols.
    +

    Listing 1. Using ANSI Predefined Symbols
    + #include <stdio.h>

    +

    void main(void)
    + {
    + printf("Hello World!\n");
    +
    + printf("%s, %s\n", __DATE__, __TIME__);
    + printf("%s, line: %d\n", __FILE__, __LINE__);
    + }

    +

    /* The program prints something like the following:
    + Hello World!
    + Oct 31 2005, 18:53:50
    + main.ANSI.c, line: 10
    + */
    +

    +
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_carbide.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_carbide.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_carbide.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,129 +1,129 @@ - - - - - -Carbide.c++ Predefined Symbols - - - - -

    Carbide.c++ Predefined Symbols

    -

    Table 1 lists additional symbols provided by Carbide C/C++ but not defined as part of the ANSI/ISO C/C++ standards.

    -

    NOTE The Carbide C compiler was formerly known as the Metrowerks C compiler. For Symbian development, only the x86 based features are supported. All references to other processor architectures are for historical purposes only.

    -
    Table 1. Predefined Symbols for Carbide C/C++ compilers
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    This symbol…is…
    __A5__ Defined as 1 if data is A5-relative, 0 if data is A4-relative. This symbol is defined for 68K compilers and undefined for other target platforms.
    __ALTIVEC__Currently defined as 100000000 when you enable PowerPC AltiVec™ features using pragma altivec_model.
    __cplusplusDefined as 199711L if you are compiling this file as a C++ file; undefined if you are compiling this file as a C file. The value 199711L indicates conformance with the ANSI/ISO C++ specification.
    __EMU_SYMBIAN_OS__Defined as 1 .
    __embedded_cplusplus Defined as 1 if EC++ is activated; undefined if EC++ is not activated.
    __embedded__Defined as 1 if you are compiling code for an embedded target.
    __FUNCTION__Defined by the compiler as the name of the function currently being compiled. This symbol is a predefined identifier for GCC compatibility.
    __fourbyteints__Defined as 1 if you enable the 4-byte Ints setting in the 68K Processor panel; 0 if you disable that setting. This symbol is defined for 68K compilers and undefined for other platforms.
    __ide_target("target_name")Returns 1 if target_name is the same as the active build target in the Carbide IDE’s active project. Returns 0 otherwise.
    __IEEEdoubles__Defined as 1 if you enable the 8-Byte Doubles setting in the 68K Processor panel; 0 if you disable that setting. This symbol is defined for 68K compilers and undefined for all other target platforms.
    __INTEL__Defined as 1 if you are compiling this code with the x86 compiler; undefined for all other target platforms.
    __MC68K__Defined as 1 if you are compiling this code with the 68K compiler; undefined for all other target platforms.
    __MC68020__Defined as 1 if you enable the 68020 Codegen setting in the Processor panel; 0 if you disable it. This symbol is defined for 68K compilers and undefined for all other target platforms.
    __MC68881__Defined as 1 if you enable the 68881 Codegen setting in the 68K Processor panel; 0 if you disable it. This symbol is defined for 68K compilers and undefined for all other target platforms.
    __MIPS__Defined as 1 for MIPS compilers; undefined for other target platforms.
    __MIPS_ISA2__Defined as 1 if the compiler’s target platform is MIPS and you select the ISA II checkbox in the MIPS Processor panel. Undefined if you deselect the ISA II checkbox. It is always undefined for other target platforms.
    __MIPS_ISA3__Defined as 1 if the compiler’s target platform is MIPS and you select the ISA III checkbox in the MIPS Processor panel. Undefined if you deselect the ISA III checkbox. It is always undefined for other target platforms.
    __MIPS_ISA4__Defined as 1 if the compiler’s target platform is MIPS and you select the ISA IV checkbox in the MIPS Processor panel. Undefined if you deselect the ISA IV checkbox. It is always undefined for other target platforms.
    __MWBROWSER__Defined as 1 if the Carbide browser is parsing your code; 0 if not.
    __MWERKS__Defined as the version number of the Carbide C/C++ compiler. For example, with the Carbide C/C++ compiler version 2.2, the value of __MWERKS__ is 0x2200. This macro is defined as 1 if the compiler was released in 1995 or earlier.
    __PRETTY_FUNCTION__Defined by the compiler as the name of the qualified (“unmangled”) C++ function currently being compiled. This predefined identifier is only defined when the C++ compiler is active. See C++ Compiler for related information.
    __profile__Defined as 1 if you enable the Generate Profiler Calls setting in the Processor panel; 0 if you disable it.
    __POWERPC__Defined as 1 if you are compiling this code with the PowerPC compiler; 0 if not.
    __VEC__Defined as the version of Motorola’s AltiVec ™ Technology Programming Interface Manual to which the compiler conforms. This value takes the form vrrnn which corresponds to the version number (v.rr.nn) of the Programming Interface Manual. Otherwise, this macro is undefined.
    macintoshDefined as 1 if you are compiling this code with the 68K or PowerPC compilers for Mac OS; 0 if not.
    - - - - - + + + + + +Carbide.c++ Predefined Symbols + + + + +

    Carbide.c++ Predefined Symbols

    +

    Table 1 lists additional symbols provided by Carbide C/C++ but not defined as part of the ANSI/ISO C/C++ standards.

    +

    NOTE The Carbide C compiler was formerly known as the Metrowerks C compiler. For Symbian development, only the x86 based features are supported. All references to other processor architectures are for historical purposes only.

    +
    Table 1. Predefined Symbols for Carbide C/C++ compilers
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    This symbol…is…
    __A5__ Defined as 1 if data is A5-relative, 0 if data is A4-relative. This symbol is defined for 68K compilers and undefined for other target platforms.
    __ALTIVEC__Currently defined as 100000000 when you enable PowerPC AltiVec™ features using pragma altivec_model.
    __cplusplusDefined as 199711L if you are compiling this file as a C++ file; undefined if you are compiling this file as a C file. The value 199711L indicates conformance with the ANSI/ISO C++ specification.
    __EMU_SYMBIAN_OS__Defined as 1 .
    __embedded_cplusplus Defined as 1 if EC++ is activated; undefined if EC++ is not activated.
    __embedded__Defined as 1 if you are compiling code for an embedded target.
    __FUNCTION__Defined by the compiler as the name of the function currently being compiled. This symbol is a predefined identifier for GCC compatibility.
    __fourbyteints__Defined as 1 if you enable the 4-byte Ints setting in the 68K Processor panel; 0 if you disable that setting. This symbol is defined for 68K compilers and undefined for other platforms.
    __ide_target("target_name")Returns 1 if target_name is the same as the active build target in the Carbide IDE’s active project. Returns 0 otherwise.
    __IEEEdoubles__Defined as 1 if you enable the 8-Byte Doubles setting in the 68K Processor panel; 0 if you disable that setting. This symbol is defined for 68K compilers and undefined for all other target platforms.
    __INTEL__Defined as 1 if you are compiling this code with the x86 compiler; undefined for all other target platforms.
    __MC68K__Defined as 1 if you are compiling this code with the 68K compiler; undefined for all other target platforms.
    __MC68020__Defined as 1 if you enable the 68020 Codegen setting in the Processor panel; 0 if you disable it. This symbol is defined for 68K compilers and undefined for all other target platforms.
    __MC68881__Defined as 1 if you enable the 68881 Codegen setting in the 68K Processor panel; 0 if you disable it. This symbol is defined for 68K compilers and undefined for all other target platforms.
    __MIPS__Defined as 1 for MIPS compilers; undefined for other target platforms.
    __MIPS_ISA2__Defined as 1 if the compiler’s target platform is MIPS and you select the ISA II checkbox in the MIPS Processor panel. Undefined if you deselect the ISA II checkbox. It is always undefined for other target platforms.
    __MIPS_ISA3__Defined as 1 if the compiler’s target platform is MIPS and you select the ISA III checkbox in the MIPS Processor panel. Undefined if you deselect the ISA III checkbox. It is always undefined for other target platforms.
    __MIPS_ISA4__Defined as 1 if the compiler’s target platform is MIPS and you select the ISA IV checkbox in the MIPS Processor panel. Undefined if you deselect the ISA IV checkbox. It is always undefined for other target platforms.
    __MWBROWSER__Defined as 1 if the Carbide browser is parsing your code; 0 if not.
    __MWERKS__Defined as the version number of the Carbide C/C++ compiler. For example, with the Carbide C/C++ compiler version 2.2, the value of __MWERKS__ is 0x2200. This macro is defined as 1 if the compiler was released in 1995 or earlier.
    __PRETTY_FUNCTION__Defined by the compiler as the name of the qualified (“unmangled”) C++ function currently being compiled. This predefined identifier is only defined when the C++ compiler is active. See C++ Compiler for related information.
    __profile__Defined as 1 if you enable the Generate Profiler Calls setting in the Processor panel; 0 if you disable it.
    __POWERPC__Defined as 1 if you are compiling this code with the PowerPC compiler; 0 if not.
    __VEC__Defined as the version of Motorola’s AltiVec ™ Technology Programming Interface Manual to which the compiler conforms. This value takes the form vrrnn which corresponds to the version number (v.rr.nn) of the Programming Interface Manual. Otherwise, this macro is undefined.
    macintoshDefined as 1 if you are compiling this code with the 68K or PowerPC compilers for Mac OS; 0 if not.
    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_settings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_settings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_settings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,643 +1,643 @@ - - - - - -Checking Settings - - - -

    Checking Settings

    -

    The preprocessor function __option() lets you check pragmas and other settings that control the C/C++ compiler and code generation. You typically modify these settings using various panels in the Project Settings window.

    -

    The syntax for this preprocessor function is as follows:

    -

    __option(setting-name)

    -

    If the specified setting is enabled, __option() returns 1; otherwise it returns 0.

    -

    To determine if a setting-name is invalid, see Warnings as Errors.

    -

    Use this function when you want one source file to contain code that uses different settings. The example below shows how to compile one series of lines if you are compiling for machines with the MC68881 floating-point unit and another series if you are compiling for machines without it:

    -

    #if __option (code68881) // Code for 68K chip with FPU
    - #else
    - // Code for any 68K processor
    - #endif

    -

    Table 1 lists all the setting names you can use in the preprocessor function __option().

    -
    Table 1. Preprocessor Setting Names for __option()
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    This argument...Corresponds to the…
    a6framesPragma a6frames.
    align_array_membersPragma align_array_members.
    altivec_codegenPragma altivec_codegen.
    altivec_modelPragma altivec_model.
    altivec_vrsavePragma altivec_vrsave.
    always_inlinePragma always_inline.
    ANSI_strictANSI Strict setting and pragma ANSI_strict.
    arg_dep_lookupPragma arg_dep_lookup.
    ARM_conformPragma ARM_conform.
    array_new_deletePragma array_new_delete
    auto_inlineAuto-Inline setting of the Inlining menu and pragma auto_inline.
    boolEnable bool Support setting and pragma bool.
    check_header_flagsPragma check_header_flags.
    code68020Pragma code68020.
    code68881Pragma code68881.
    const_multiplyPragma const_multiply.
    const_stringsPragma const_strings.
    cplusplusForce C++ Compilation setting , the pragma cplusplus, and the macro cplusplus. Indicates whether the compiler is compiling this file as a C++ file.
    cpp_extensionsPragma cpp_extensions.
    d0_pointersPragmas pointers_in_D0 and pointers_in_A0.
    def_inheritedPragma def_inherited.
    defer_codegenPragma defer_codegen.
    defer_defarg_parsingPragma defer_defarg_parsing
    direct_destructionNo longer available
    direct_to_SOMPragma direct_to_SOM.
    disable_registersPragma disable_registers.
    dollar_identifiersPragma dollar_identifiers.
    dont_inlineDon’t Inline setting and pragma dont_inline.
    dont_reuse_stringsReuse Strings setting and pragma dont_reuse_strings.
    ecplusplusPragma ecplusplus.
    EIPC_EIPSWPragma EIPC_EIPSW.
    enumsalwaysintEnums Always Int setting and pragma enumsalwaysint.
    exceptionsEnable C++ Exceptions setting and pragma exceptions.
    exportPragma export.
    extended_errorcheckExtended Error Checking setting and pragma extended_errorcheck.
    far_dataPragma far_data.
    far_stringsPragma far_strings.
    far_vtablesPragma far_vtables.
    faster_pch_genPragma faster_pch_gen.
    float_constantsPragma float_constants.
    force_activePragma force_active.
    fourbyteintsPragma fourbyteints.
    fp_contractPragma fp_contract.
    fullpath_prepdumpPragma fullpath_prepdump.
    function_alignPragma function_align.
    gcc_extensionsPragma gcc_extensions.
    IEEEdoublesPragma IEEEdoubles.
    ignore_oldstylePragma ignore_oldstyle.
    importPragma import.
    inline_bottom_upPragma inline_bottom_up.
    inline_bottom_up_oncePragma inline_bottom_up_once
    inline_intrinsicsPragma inline_intrinsics.
    inline_max_auto_sizePragma inline_max_auto_size
    inline_max_sizePragma inline_max_size
    inline_max_total_sizePragma inline_max_total_size
    internalPragma internal.
    interruptPragma interrupt.
    k63dK6 3D Favored setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma k63d.
    k63d_calls MMX + K6 3D setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma k63d_calls.
    lib_exportPragma lib_export.
    line_prepdumpPragma line_prepdump.
    little_endianNo option. Defined as 1 if you are compiling for a little endian target (such as x86); 0 if you are compiling for a big endian target (such as PowerPC).
    longlongPragma longlong.
    longlong_enumsPragma longlong_enums.
    longlong_prepevalPragma longlong_prepeval.
    macsbugPragma macsbug.
    max_errorsPragma max_errors
    microsoft_exceptionsPragma microsoft_exceptions.
    microsoft_RTTIPragma microsoft_RTTI.
    mmxMMX setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma mmx.
    mmx_callPragma mmx_call.
    mpwcPragma mpwc.
    mpwc_newlinePragma mpwc_newline.
    mpwc_relaxPragma mpwc_relax.
    msg_show_linerefPragma msg_show_lineref
    msg_show_realrefPragma msg_show_realref
    multibyteaware_ preserve_literalsPragma multibyteaware_ -preserve_literals
    no_conststringconvPragma no_conststringconv
    no_register_coloringPragma no_register_coloring.
    no_static_dtorsPragma no_static_dtors.
    no_conststringconvPragma no_conststringconv
    oldstyle_symbolsPragma oldstyle_symbols.
    only_std_keywordsANSI Keywords Only setting and pragma only_std_keywords.
    opt_classresultsPragma opt_classresults
    opt_common_subsPragma opt_common_subs.
    opt_dead_assignmentsPragma opt_dead_assignments.
    opt_dead_codePragma opt_dead_code.
    opt_lifetimesPragma opt_lifetimes.
    opt_loop_invariantsPragma opt_loop_invariants.
    opt_propagationPragma opt_propagation.
    opt_strength_reductionPragma opt_strength_reduction.
    opt_strength_reduction_strictPragma opt_strength_reduction_strict.
    opt_unroll_loopsPragma opt_unroll_loops.
    opt_vectorize_loopsPragma opt_vectorize_loops.
    optimize_for_sizePragma optimize_for_size.
    optimizewithasmPragma optimizewithasm.
    pool_dataPragma pool_data.
    pool_stringsPool Strings setting and pragma pool_strings.
    ppc_unroll_speculativePragma ppc_unroll_speculative.
    precompileWhether or not the file is precompiled.
    preprocessWhether or not the file is preprocessed.
    profilePragma profile.
    readonly_stringsPragma readonly_strings.
    register_coloringPragma register_coloring.
    require_prototypesRequire Function Prototypes setting and pragma require_prototypes.
    RTTIEnable RTTI setting and pragma RTTI.
    showmessagenumberPragma showmessagenumber
    side_effectsPragma side_effects.
    simple_prepdumpPragma simple_prepdump.
    SOMCallOptimizationPragma SOMCallOptimization.
    SOMCheckEnvironmentPragma SOMCheckEnvironment.
    stack_cleanupPragma stack_cleanup.
    suppress_init_codePragma suppress_init_code.
    suppress_warningsPragma suppress_warnings.
    symMarker in the project window debug column and pragma sym.
    syspath_oncePragma syspath_once.
    text_encodingPragma text_encoding
    toc_dataPragma toc_data.
    tracebackPragma traceback.
    trigraphsExpand Trigraphs setting and pragma trigraphs.
    unsigned_charUse Unsigned Chars setting and pragma unsigned_char.
    use_fp_instructionsPragma use_fp_instructions.
    use_framePragma use_frame.
    use_mask_registersPragma use_mask_registers.
    warningPragma warning
    warn_any_ptr_int_convPragma warn_any_ptr_int_conv
    warn_emptydeclEmpty Declarations setting and pragma warn_emptydecl.
    warn_extracommaExtra Commas setting and pragma warn_extracomma.
    warn_hiddenlocalsPragma warn_hiddenlocals
    warn_hidevirtualHidden virtual functions setting and pragma warn_hidevirtual.
    warn_illegal_instructions Pragma warn_illegal_instructions.
    warn_illpragmaIllegal Pragmas setting and pragma warn_illpragma.
    warn_illtokenpastingPragma warn_illtokenpasting
    warn_illunionmembersPragma warn_illunionmembers
    warn_impl_f2i_convPragma warn_impl_f2i_conv.
    warn_impl_i2f_convPragma warn_impl_i2f_conv.
    warn_impl_s2u_convPragma warn_impl_s2u_conv.
    warn_implicitconvImplicit Arithmetic Conversions setting and pragma warn_implicitconv.
    warn_missingreturnPragma warn_missingreturn
    warn_no_explicit_virtualPragma warn_no_explicit_virtual
    warn_no_side_effectpragma warn_no_side_effect.
    warn_notinlinedNon-Inlined Functions setting and pragma warn_notinlined.
    warn_paddingpragma warn_padding.
    warn_possunwantPossible Errors setting and pragma warn_possunwant.
    warn_ptr_int_convpragma warn_ptr_int_conv.
    warn_resultnotusedpragma warn_resultnotused.
    warn_structclassInconsistent ‘class’ / ‘struct’ Usage setting and pragma warn_structclass.
    warn_undefmacropragma warn_undefmacro
    warn_unusedargUnused Arguments setting and pragma warn_unusedarg.
    warn_unusedvarUnused Variables setting and pragma warn_unusedvar.
    warning_errorsTreat Warnings As Errors setting and pragma warning_errors.
    wchar_typeEnable wchar_t Support setting and pragma wchar_type.
    -

    - - - - - + + + + + +Checking Settings + + + +

    Checking Settings

    +

    The preprocessor function __option() lets you check pragmas and other settings that control the C/C++ compiler and code generation. You typically modify these settings using various panels in the Project Settings window.

    +

    The syntax for this preprocessor function is as follows:

    +

    __option(setting-name)

    +

    If the specified setting is enabled, __option() returns 1; otherwise it returns 0.

    +

    To determine if a setting-name is invalid, see Warnings as Errors.

    +

    Use this function when you want one source file to contain code that uses different settings. The example below shows how to compile one series of lines if you are compiling for machines with the MC68881 floating-point unit and another series if you are compiling for machines without it:

    +

    #if __option (code68881) // Code for 68K chip with FPU
    + #else
    + // Code for any 68K processor
    + #endif

    +

    Table 1 lists all the setting names you can use in the preprocessor function __option().

    +
    Table 1. Preprocessor Setting Names for __option()
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    This argument...Corresponds to the…
    a6framesPragma a6frames.
    align_array_membersPragma align_array_members.
    altivec_codegenPragma altivec_codegen.
    altivec_modelPragma altivec_model.
    altivec_vrsavePragma altivec_vrsave.
    always_inlinePragma always_inline.
    ANSI_strictANSI Strict setting and pragma ANSI_strict.
    arg_dep_lookupPragma arg_dep_lookup.
    ARM_conformPragma ARM_conform.
    array_new_deletePragma array_new_delete
    auto_inlineAuto-Inline setting of the Inlining menu and pragma auto_inline.
    boolEnable bool Support setting and pragma bool.
    check_header_flagsPragma check_header_flags.
    code68020Pragma code68020.
    code68881Pragma code68881.
    const_multiplyPragma const_multiply.
    const_stringsPragma const_strings.
    cplusplusForce C++ Compilation setting , the pragma cplusplus, and the macro cplusplus. Indicates whether the compiler is compiling this file as a C++ file.
    cpp_extensionsPragma cpp_extensions.
    d0_pointersPragmas pointers_in_D0 and pointers_in_A0.
    def_inheritedPragma def_inherited.
    defer_codegenPragma defer_codegen.
    defer_defarg_parsingPragma defer_defarg_parsing
    direct_destructionNo longer available
    direct_to_SOMPragma direct_to_SOM.
    disable_registersPragma disable_registers.
    dollar_identifiersPragma dollar_identifiers.
    dont_inlineDon’t Inline setting and pragma dont_inline.
    dont_reuse_stringsReuse Strings setting and pragma dont_reuse_strings.
    ecplusplusPragma ecplusplus.
    EIPC_EIPSWPragma EIPC_EIPSW.
    enumsalwaysintEnums Always Int setting and pragma enumsalwaysint.
    exceptionsEnable C++ Exceptions setting and pragma exceptions.
    exportPragma export.
    extended_errorcheckExtended Error Checking setting and pragma extended_errorcheck.
    far_dataPragma far_data.
    far_stringsPragma far_strings.
    far_vtablesPragma far_vtables.
    faster_pch_genPragma faster_pch_gen.
    float_constantsPragma float_constants.
    force_activePragma force_active.
    fourbyteintsPragma fourbyteints.
    fp_contractPragma fp_contract.
    fullpath_prepdumpPragma fullpath_prepdump.
    function_alignPragma function_align.
    gcc_extensionsPragma gcc_extensions.
    IEEEdoublesPragma IEEEdoubles.
    ignore_oldstylePragma ignore_oldstyle.
    importPragma import.
    inline_bottom_upPragma inline_bottom_up.
    inline_bottom_up_oncePragma inline_bottom_up_once
    inline_intrinsicsPragma inline_intrinsics.
    inline_max_auto_sizePragma inline_max_auto_size
    inline_max_sizePragma inline_max_size
    inline_max_total_sizePragma inline_max_total_size
    internalPragma internal.
    interruptPragma interrupt.
    k63dK6 3D Favored setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma k63d.
    k63d_calls MMX + K6 3D setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma k63d_calls.
    lib_exportPragma lib_export.
    line_prepdumpPragma line_prepdump.
    little_endianNo option. Defined as 1 if you are compiling for a little endian target (such as x86); 0 if you are compiling for a big endian target (such as PowerPC).
    longlongPragma longlong.
    longlong_enumsPragma longlong_enums.
    longlong_prepevalPragma longlong_prepeval.
    macsbugPragma macsbug.
    max_errorsPragma max_errors
    microsoft_exceptionsPragma microsoft_exceptions.
    microsoft_RTTIPragma microsoft_RTTI.
    mmxMMX setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma mmx.
    mmx_callPragma mmx_call.
    mpwcPragma mpwc.
    mpwc_newlinePragma mpwc_newline.
    mpwc_relaxPragma mpwc_relax.
    msg_show_linerefPragma msg_show_lineref
    msg_show_realrefPragma msg_show_realref
    multibyteaware_ preserve_literalsPragma multibyteaware_ +preserve_literals
    no_conststringconvPragma no_conststringconv
    no_register_coloringPragma no_register_coloring.
    no_static_dtorsPragma no_static_dtors.
    no_conststringconvPragma no_conststringconv
    oldstyle_symbolsPragma oldstyle_symbols.
    only_std_keywordsANSI Keywords Only setting and pragma only_std_keywords.
    opt_classresultsPragma opt_classresults
    opt_common_subsPragma opt_common_subs.
    opt_dead_assignmentsPragma opt_dead_assignments.
    opt_dead_codePragma opt_dead_code.
    opt_lifetimesPragma opt_lifetimes.
    opt_loop_invariantsPragma opt_loop_invariants.
    opt_propagationPragma opt_propagation.
    opt_strength_reductionPragma opt_strength_reduction.
    opt_strength_reduction_strictPragma opt_strength_reduction_strict.
    opt_unroll_loopsPragma opt_unroll_loops.
    opt_vectorize_loopsPragma opt_vectorize_loops.
    optimize_for_sizePragma optimize_for_size.
    optimizewithasmPragma optimizewithasm.
    pool_dataPragma pool_data.
    pool_stringsPool Strings setting and pragma pool_strings.
    ppc_unroll_speculativePragma ppc_unroll_speculative.
    precompileWhether or not the file is precompiled.
    preprocessWhether or not the file is preprocessed.
    profilePragma profile.
    readonly_stringsPragma readonly_strings.
    register_coloringPragma register_coloring.
    require_prototypesRequire Function Prototypes setting and pragma require_prototypes.
    RTTIEnable RTTI setting and pragma RTTI.
    showmessagenumberPragma showmessagenumber
    side_effectsPragma side_effects.
    simple_prepdumpPragma simple_prepdump.
    SOMCallOptimizationPragma SOMCallOptimization.
    SOMCheckEnvironmentPragma SOMCheckEnvironment.
    stack_cleanupPragma stack_cleanup.
    suppress_init_codePragma suppress_init_code.
    suppress_warningsPragma suppress_warnings.
    symMarker in the project window debug column and pragma sym.
    syspath_oncePragma syspath_once.
    text_encodingPragma text_encoding
    toc_dataPragma toc_data.
    tracebackPragma traceback.
    trigraphsExpand Trigraphs setting and pragma trigraphs.
    unsigned_charUse Unsigned Chars setting and pragma unsigned_char.
    use_fp_instructionsPragma use_fp_instructions.
    use_framePragma use_frame.
    use_mask_registersPragma use_mask_registers.
    warningPragma warning
    warn_any_ptr_int_convPragma warn_any_ptr_int_conv
    warn_emptydeclEmpty Declarations setting and pragma warn_emptydecl.
    warn_extracommaExtra Commas setting and pragma warn_extracomma.
    warn_hiddenlocalsPragma warn_hiddenlocals
    warn_hidevirtualHidden virtual functions setting and pragma warn_hidevirtual.
    warn_illegal_instructions Pragma warn_illegal_instructions.
    warn_illpragmaIllegal Pragmas setting and pragma warn_illpragma.
    warn_illtokenpastingPragma warn_illtokenpasting
    warn_illunionmembersPragma warn_illunionmembers
    warn_impl_f2i_convPragma warn_impl_f2i_conv.
    warn_impl_i2f_convPragma warn_impl_i2f_conv.
    warn_impl_s2u_convPragma warn_impl_s2u_conv.
    warn_implicitconvImplicit Arithmetic Conversions setting and pragma warn_implicitconv.
    warn_missingreturnPragma warn_missingreturn
    warn_no_explicit_virtualPragma warn_no_explicit_virtual
    warn_no_side_effectpragma warn_no_side_effect.
    warn_notinlinedNon-Inlined Functions setting and pragma warn_notinlined.
    warn_paddingpragma warn_padding.
    warn_possunwantPossible Errors setting and pragma warn_possunwant.
    warn_ptr_int_convpragma warn_ptr_int_conv.
    warn_resultnotusedpragma warn_resultnotused.
    warn_structclassInconsistent ‘class’ / ‘struct’ Usage setting and pragma warn_structclass.
    warn_undefmacropragma warn_undefmacro
    warn_unusedargUnused Arguments setting and pragma warn_unusedarg.
    warn_unusedvarUnused Variables setting and pragma warn_unusedvar.
    warning_errorsTreat Warnings As Errors setting and pragma warning_errors.
    wchar_typeEnable wchar_t Support setting and pragma wchar_type.
    +

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/symbols.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/symbols.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/symbols.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,21 +1,21 @@ - - - - - -Predefined Symbols - - - -

    Predefined Symbols

    -

    Carbide C/C++ compilers define several preprocessor and compiler symbols that give you information about the compile-time environment. The compiler evaluates these symbols at compile time, not runtime. The topics in this section are:

    - - - - - - + + + + + +Predefined Symbols + + + +

    Predefined Symbols

    +

    Carbide C/C++ compilers define several preprocessor and compiler symbols that give you information about the compile-time environment. The compiler evaluates these symbols at compile time, not runtime. The topics in this section are:

    + + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/book.css --- a/core/com.nokia.carbide.cpp.doc.user/book.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/book.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,5 +1,5 @@ /* - Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: http://www.eclipse.org/legal/epl-v10.html */ @@ -10,7 +10,7 @@ } /* 20091007 added verdana and ariel to list to match SFO website fonts choices */ -body, p, table { +body, p, table, li { font-family: Verdana, Ariel, Helvetica, sans-serif; font-size: 1.0em; font-weight: normal; @@ -101,7 +101,7 @@ } th { - background-color: #ffd62c; + background-color: #66CC66; } div.ol.p { @@ -120,7 +120,7 @@ div h5, div h4 { padding:5px 0px 5px 12px; - background-color: #FFCC00; + background-color: #D3DAD4; font-weight:bold; color: #000000; } diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/bugs_fixed.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/bugs_fixed.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/bugs_fixed.htm Wed Jul 21 12:11:48 2010 -0500 @@ -17,12 +17,25 @@

    This is a comprehensive list of bugs fixed by release:

    Bugs Fixed in v3.0.0

    • 0 - nada
    +

    v2.7.0

    +
      + +
    • 11222 - You can now disable device discovery in the Remote Connection view to avoid conflicts between different connection protocols within Carbide.
    • +
    • 11240 - Ensured that the temporary project session property symbian-abld is set before qmake is called.
    • +
    • 11255 - The Run builds concurrently option now correctly passes '-j 1' when disabled.
    • +
    • 11353 - Fixed a parsing issue where non-alphanumeric characters would halt the parsing process.
    • +
    • 11381 - Customizing a perspective should no longer generate an NPE.
    • +
    • 11390 - Fixed an issue that would sometimes cause the Symbian OS SDK list to remain blank when creating a new template project.
    • +
    • 11397 - Fixed bug where program arguments were not being passed with run configurations.
    • +
    • 11416 - Fixed an issue where the debugger might crash when it encountered breakpoints in several projects.
    • +
    • 11442 - Compiler no longer interprets the string 'instantiated from here' as an error in GCC builds.
    • +

    v2.6.0

    • 10267 - Fixed an issue that prevented some executables from appearing in the Executables view.
    • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/AIFDefWizard.html --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/AIFDefWizard.html Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ - - - -AIF File in Concepts - - - -

      AIF File

      - -

      - The AIF, or application information file, is a Symbian OS-specific file - format. An AIF file contains information about captions, icons, capabilities - and MIME priority support used by the application. The MMP editor provides support for the AIF editor in the Sources > Resources group.

      -

      - NOTE AIF files are used only for Symbian OS versions before 9.1. -

      -

      - The kind of information an AIF file can contain are:

      -
        -
      • -

        - Icons: Icons are used to represent applications and - their associated document files in the system shell or application launcher. If - the phone's UI supports embedding, icons may also be used to represent embedded - documents. -

        -

        - The source files for icons are .bmp bitmaps. These source files are - built into a single .mbm file (Symbian OS multiple bitmap file) which is - incorporated into the aif file as part of the build process. -

        -
      • -
      • -

        - Captions: A caption is the text displayed beside its - icon. Typically it is the application's name.

        -

        - Captions for multiple languages can be defined in a single aif, and - the one corresponding to the current system language will be used. In some UIs, - captions may be defined in a caption file, separate from the aif file. -

        -
      • -
      • -

        - MIME Support: Multipurpose Internet Mail Extensions, - MIMEs, define a file format for transferring non-ASCII data, such as graphics, - audio and fax, over the Internet. The AIF file lists the MIME types that the - application supports, and the priority of support that each type is given. When - a file is opened, Symbian OS launches the application which has the highest - priority of support for the type of data in the file. -

        -

        - Given two applications with the same MIME type priority, Symbian OS - arbitrarily launches one of them. -

        -
      • -
      -
      Related tasks
      - -
      Related references
      - - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/CarbidePerspective.html --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/CarbidePerspective.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/CarbidePerspective.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,48 +1,43 @@ - -Carbide.c++ perspective - - - -

      Carbide.c++ perspective

      - - -

      - The Carbide C/C++ perspective is a set of tools and layout of views provided for Symbian OS development. This perspective is designed to work with Symbian OS C++ projects. The commonly used views include:

      -
        -
      • Project Explorer view - displays C/C++ projects located in the current workspace
      • -
      • Symbian Project Navigator view - shows all files that belong to the - current build configuration
      • -
      • Editor view - one or more source code editor windows
      • -
      • Outline view - displays an outline of a structured C/C++ file that is currently open in the editor view
      • -
      • Problems view - displays build errors
      • -
      • Console view - shows the output of a process and allows you to provide keyboard input to a -process
      • -
      • Properties view - displays property names and basic properties of a selected resource
      • -
      • Tasks view - displays tasks that you manually add
      • -
      • Include Browser view - visualizes the include relations among files
      • -
      • Call Hierarchy view - explore call-graphs by means of a tree
      • -
      • Type Hierarchy view - presents inheritance relations and members of type
      • -
      • Executables view - provides a dynamic list of executables and their related source files
      • -
      -

      NOTE When launching a program to debug, the Debug perspective appears.

      - -

      -

      Figure 1 - Carbide C/C++ perspective

      -

      NOTE Click the icon to show additional options that may not be visible in the perspective view.

      -

      For more information on perspectives see Workbench User Guide > Concepts > Perspectives, and for views see C/C++ Development User Guide > Reference - > C/C++ Views and Editors.

      -

      - For more details on the Symbian OS Build Configurations, see - Active Configurations.

      -
      Related references
      - - - - - - + +Carbide.c++ perspective + + + +

      Carbide.c++ perspective

      + + +

      + The Carbide C/C++ perspective is a set of tools and layout of views provided for Symbian OS development. This perspective is designed to work with Symbian OS C++ projects. The commonly used views include:

      +
        +
      • Project Explorer view - displays C/C++ projects located in the current workspace
      • +
      • Symbian Project Navigator view - shows all files that belong to the + current build configuration
      • +
      • Editor view - one or more source code editor windows
      • +
      • Outline view - displays an outline of a structured C/C++ file that is currently open in the editor view
      • +
      • Install Extensions view - displays a list of installable plug-ins
      • +
      • Problems view - displays build errors
      • +
      • Console view - shows the output of a process and allows you to provide keyboard input to a +process
      • +
      • Executables view - provides a dynamic list of executables and their related source files
      • +
      • Remote Connections view – use to monitor, create, edit, or remove common connection settings
      • +
      +

      +

      Figure 1 - Carbide C/C++ perspective

      +

      NOTE Click the icon to show additional options that may not be visible in the perspective view.

      +

      For more information on perspectives see Workbench User Guide > Concepts > Perspectives, and for views see C/C++ Development User Guide > Reference + > C/C++ Views and Editors.

      +

      + For more details on the Symbian OS Build Configurations, see + Active Configurations.

      +
      Related references
      + + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/MBMDefWizard.html --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/MBMDefWizard.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/MBMDefWizard.html Wed Jul 21 12:11:48 2010 -0500 @@ -7,7 +7,7 @@

      MBM, or multi-bitmap, is a Symbian OS-specific bitmap file format. This - file contains multiple bitmaps and it can contain both bitmaps with masks and + file contains multiple bitmaps and can contain bitmaps with masks and bitmaps without masks. It optimizes the bitmap handling capability of Symbian OS. The MMP Editor (in Sources tab > Resources > Bitmaps) and Symbian Project Navigator view provide support for creating and editing MBM files. In the Symbian Project Navigator view you can right-click on a scalable icon makefile (for example, Icons_scalable_dc.mk) and select Add MBM/MIF Entry... to open the Edit MBM/MIF Contents window.

      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/Modify.html --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/Modify.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/Modify.html Wed Jul 21 12:11:48 2010 -0500 @@ -21,8 +21,7 @@

      +
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/SampleExampleProjectCreate.html --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/SampleExampleProjectCreate.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/SampleExampleProjectCreate.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,45 +1,45 @@ - - - - - -Simple Example Project in Getting Started - - -

    Simple DLL Example

    - -

    - This example walks through the process of creating a basic - “MyDynamicDLL” DLL project.

    -

    For more information on creating new projects of all types, see Creating New Projects.

    -
    -

    Creating a DLL Project

    -
      -
    1. Click File > New > Symbian OS C++ Project to invoke the New Symbian OS C++ Project wizard.
    2. -
    3. Select Basic dynamically linked library (DLL) project template and click Next.
    4. -

      -

      Figure 1. Select Basic DLL template

      -
    5. Enter a project name and specify a workspace location to store the project.
    6. -

      -

      Figure 2. Project name and location information

      -
    7. Select the Symbian OS SDK and Build Configurations to use for this project, then click Next.
    8. -

      -

      Figure 3. SDK selection for project

      -
    9. Enter Specify UID2 as “0x0000008d”, your name as the Author and your Copyright notice. - For more details on UID2, see Creating New Projects. -

      -
    10. -
    -

    Figure 4. Basic settings for DLL

    -
      -
    1. Click Finish to generate the project.
    2. -

      The simple “MyDynamicDLL” project is listed in the Project Explorer view with the set of files created for the project.

      -
    -

    -

    Figure 5. DLL example project in Project Explorer view

    -
    - - - - + + + + + +Simple Example Project in Getting Started + + +

    Simple DLL Example

    + +

    + This example walks through the process of creating a basic + “MyDynamicDLL” DLL project.

    +

    For more information on creating new projects of all types, see Creating New Projects.

    +
    +

    Creating a DLL Project

    +
      +
    1. Click File > New > Symbian OS C++ Project to invoke the New Symbian OS C++ Project wizard.
    2. +
    3. Select Basic dynamically linked library (DLL) project template and click Next.
    4. +

      +

      Figure 1. Select Basic DLL template

      +
    5. Enter a project name and specify a workspace location to store the project.
    6. +

      +

      Figure 2. Project name and location information

      +
    7. Select the Symbian OS SDK and Build Configurations to use for this project, then click Next.
    8. +

      +

      Figure 3. SDK selection for project

      +
    9. Enter Specify UID2 as “0x0000008d”, your name as the Author and your Copyright notice. + For more details on UID2, see Creating New Projects. +

      +
    10. +
    +

    Figure 4. Basic settings for DLL

    +
      +
    1. Click Finish to generate the project.
    2. +

      The simple “MyDynamicDLL” project is listed in the Project Explorer view with the set of files created for the project.

      +
    +

    +

    Figure 5. DLL example project in Project Explorer view

    +
    + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/breakpoints.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/breakpoints.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/breakpoints.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,66 +1,66 @@ - - - - - - -Breakpoints - - - -

    Breakpoints

    -

    A breakpoint is a marker set on a specific line of source code and is designed to halt program execution when encountered by the debugger. After you set a breakpoint at a key point in the program, you can halt its execution, examine its current state, and check register and variable values. You can also change values and alter the flow of normal program execution. Setting breakpoints helps you debug your program and verify its efficiency.

    -

    A project can have multiple breakpoints set in the source code files. All breakpoints in a project are shown in the Breakpoints view. Breakpoints are enabled or disabled on the currently selected line within a source code editor by selecting the Run > Toggle Breakpoint menu option, right-clicking the marker bar in the editor and selecting Toggle Breakpoint, or by pressing CTRL-SHIFT-B.

    -

    You can set a breakpoint on any executable line of code that the debugger can resolve. Lines containing comments and other non executable code cannot be assigned a breakpoint as they are normally stripped from the compiled binary. The debugger must load the symbols for a module before it can attempt to resolve breakpoints within the module. This is most easily done using the Executables view to import a binary file, especially if the binary is not in the workspace.

    -

    When the debugger attempts to resolve a breakpoint it will result in:

    -
      -
    • resolved — the symbols for the module are loaded and the breakpoint located in the executable that’s currently being debugged, circle icon changes to flagged icon
    • -
    • resolved and moved —the breakpoint is not found in the executable at the specified point. Debugger moves breakpoint forward in the current function until a line is found that can be resolved. Breakpoint icon moved to source line matching new breakpoint location and changed to flagged icon.
    • -
    • unresolved — if the symbols for the module are not loaded or the breakpoint was not able to be set within the current function. This may indicate no executable code in the source line or a deadstripped function not present in the executable. Breakpoint icon remains in unflagged state indicating unresolved status.
    • -
    -

    Breakpoints have enabled and disabled types as well as resolved and unresolved states. Table 1 explains the different breakpoint types and states.

    -
    Table 1 Breakpoint—type and states
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeStateIconExplanation
    Enabled
    Unresolved
    Indicates that the breakpoint is currently enabled but not located in the executable during a debug session. Debugger cannot halt program execution.
    Enabled
    Resolved
    Indicates that the breakpoint is currently enabled and resolved for the source line. The debugger halts program execution at an enabled breakpoint.
    Disabled
    Unresolved
    Indicates that the breakpoint is currently disabled but not located in the executable during a debug session. The debugger does not halt program execution at a disabled breakpoint.
    Disabled
    Resolved
    Indicates that the breakpoint is currently disabled and resolved for the source line. The debugger does not halt program execution at a disabled breakpoint.
    -

    Other references

    - - - - - + + + + + + +Breakpoints Overview + + + +

    Breakpoints Overview

    +

    A breakpoint is a marker set on a specific line of source code and is designed to halt program execution when encountered by the debugger. After you set a breakpoint at a key point in the program, you can halt its execution, examine its current state, and check register and variable values. You can also change values and alter the flow of normal program execution. Setting breakpoints helps you debug your program and verify its efficiency.

    +

    A project can have multiple breakpoints set in the source code files. All breakpoints in a project are shown in the Breakpoints view. Breakpoints are enabled or disabled on the currently selected line within a source code editor by selecting the Run > Toggle Breakpoint menu option, right-clicking the marker bar in the editor and selecting Toggle Breakpoint, or by pressing CTRL-SHIFT-B.

    +

    You can set a breakpoint on any executable line of code that the debugger can resolve. Lines containing comments and other non executable code cannot be assigned a breakpoint as they are normally stripped from the compiled binary. The debugger must load the symbols for a module before it can attempt to resolve breakpoints within the module. This is most easily done using the Executables view to import a binary file, especially if the binary is not in the workspace.

    +

    When the debugger attempts to resolve a breakpoint it will result in:

    +
      +
    • resolved — the symbols for the module are loaded and the breakpoint located in the executable that’s currently being debugged, circle icon changes to flagged icon
    • +
    • resolved and moved —the breakpoint is not found in the executable at the specified point. Debugger moves breakpoint forward in the current function until a line is found that can be resolved. Breakpoint icon moved to source line matching new breakpoint location and changed to flagged icon.
    • +
    • unresolved — if the symbols for the module are not loaded or the breakpoint was not able to be set within the current function. This may indicate no executable code in the source line or a deadstripped function not present in the executable. Breakpoint icon remains in unflagged state indicating unresolved status.
    • +
    +

    Breakpoints have enabled and disabled types as well as resolved and unresolved states. Table 1 explains the different breakpoint types and states.

    +
    Table 1 Breakpoint—type and states
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeStateIconExplanation
    Enabled
    Unresolved
    Indicates that the breakpoint is currently enabled but not located in the executable during a debug session. Debugger cannot halt program execution.
    Enabled
    Resolved
    Indicates that the breakpoint is currently enabled and resolved for the source line. The debugger halts program execution at an enabled breakpoint.
    Disabled
    Unresolved
    Indicates that the breakpoint is currently disabled but not located in the executable during a debug session. The debugger does not halt program execution at a disabled breakpoint.
    Disabled
    Resolved
    Indicates that the breakpoint is currently disabled and resolved for the source line. The debugger does not halt program execution at a disabled breakpoint.
    +

    Other references

    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/build_configurations.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/build_configurations.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/build_configurations.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,56 +1,56 @@ - - - - - - -Active Build Configuration - - - -

    Active Build Configuration

    -

    Use the Active Configuration option in the Carbide Build Configurations panel to specify the build target. Since a project can contain one or more build targets, the active configuration defines which build configuration to use when the project is run or debugged. A launch configuration consists of the following:

    -
      -
    • a project
    • -
    • a build configuration - a project level configuration that includes an SDK and any related files required to compile and build the project
    • -
    -

    Build configurations are defined when the project is created. A project can have any number of build configurations and more can be added as necessary. Each build configuration can have its own combination of tool settings to precisely control how it is defined and built. Build configurations are maintained in the project Properties window in the Carbide Build Configurations panel. To open the panel, select a project in the Symbian Project Navigator or Project Explorer view and select Project > Properties or right-click and select Properties.

    -

    -

    You can select a build configuration in the Active Configuration dropdown list or use the Project > Active Configuration menu option to set which build configuration to launch when running or debugging a program. The currently selected project can be launched by clicking the Run () or Debug () control on the tool bar to launch the project with the currently active build configuration. When no project is selected the last project debugged will be launched.

    -

    If no launch configuration is present in the project, one is created on initial launch. Subsequent launches of the project will use either the last launch configuration or if more than one launch configuration exists, it uses the most correct one.

    -

    NOTE The Carbide Run and Debug buttons are shaded in blue to indicate their behavior differs from the standard Eclipse behavior.

    -
    Table 1 Carbide Build Configuration items
    - - - - - - - - - - - - - -
    ItemExplanation
    Active Configuration The Active Configuration drop down list allows you to select a configuration that is currently available for the selected project. The entries in the related sub-panes will change according to the selected configuration. The Configuration name consists of a target name and an SDK identifier in brackets.
    Manage...Click the Manage... button to add a new SDK/Configuration or remove an existing configuration.
    -
    Build Configuration Naming
    -

    When the Carbide.c++ IDE creates an build configuration it uses a standard naming convention to make it easy to identify. For example, HelloCarbide S60 5.0 Emulator Debug is a typical configuration name. The default name follows the form of:

    -
      -
    • <Phone|Emulator> The build target (Emulator, Phone, etc.)
    • -
    • <Debug|Release> Debug (final file contains debug symbols) or Release version
    • -
    • <platform> Platform on which you are building
    • -
    • <sdk ID from devices.xml> The SDK and version used by the build configurations (S60, etc.)
    • -
    -

    You can use the Debug window to edit the default build configuration names.

    -
    Other references
    - - - - + + + + + + +Active Build Configuration + + + +

    Active Build Configuration

    +

    Use the Active Configuration option in the Carbide Build Configurations panel to specify the build target. Since a project can contain one or more build targets, the active configuration defines which build configuration to use when the project is run or debugged. A launch configuration consists of the following:

    +
      +
    • a project
    • +
    • a build configuration - a project level configuration that includes an SDK and any related files required to compile and build the project
    • +
    +

    Build configurations are defined when the project is created. A project can have any number of build configurations and more can be added as necessary. Each build configuration can have its own combination of tool settings to precisely control how it is defined and built. Build configurations are maintained in the project Properties window in the Carbide Build Configurations panel. To open the panel, select a project in the Project Explorer or Symbian Project Navigator view and select Project > Properties or right-click and select Properties.

    +

    +

    You can select a build configuration in the Active Configuration group or use the Project > Active Configuration menu option to set which build configuration to launch when running or debugging a program. The currently selected project can be launched by clicking the Run () or Debug () control on the tool bar to launch the project with the currently active build configuration. When no project is selected the last project debugged will be launched.

    +

    If no launch configuration is present in the project, one is created on initial launch. Subsequent launches of the project will use either the last launch configuration or if more than one launch configuration exists, it uses the most correct one.

    +

    NOTE The Carbide Run and Debug buttons are shaded in blue to indicate their behavior differs from the standard Eclipse behavior.

    +
    Table 1 Build Configuration items
    + + + + + + + + + + + + + +
    ItemExplanation
    Configuration The Configuration drop down list allows you to select a configuration that is currently available for the selected project. The entries in the related sub-panes will change according to the selected configuration. The Configuration name consists of a target name and an SDK identifier in brackets.
    Manage...Click the Manage... button to add a new SDK/Configuration or remove an existing configuration.
    +
    Build Configuration Naming
    +

    When the Carbide.c++ IDE creates an build configuration it uses a standard naming convention to make it easy to identify. For example, HelloCarbide (armv5_udeb) Emulator Debug is a typical configuration name. The default name follows the form of:

    +
      +
    • <Phone|Emulator> The build target (Emulator, Phone, etc.)
    • +
    • <Debug|Release> Debug (final file contains debug symbols) or Release version
    • +
    • <platform_build> Platform on which you are building (winscw_urel, armv5_udeb)
    • +
    • <sdk ID from devices.xml> The SDK and version used by the build configurations (Symbian3, etc.)
    • +
    +

    You can use the Debug window to edit the default build configuration names.

    +
    Other references
    + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/build_targets.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/build_targets.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/build_targets.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,71 +1,71 @@ - - - - - - -Supported Target Types - - - - -

    Supported Target Types

    -

    Carbide.c++ supports a variety of build targets based upon the SDKs and which version of the Carbide tools used by the project. The table below identifies which build targets are possible for a specific SDK.

    -

    NOTE Check the SDK Preferences page to see if an SDK you have installed and whether its build configurations are supported.

    -
    Table 1. Supported target types for all versions of Carbide.c++
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Target Types Platform Security
    -(S60 3.2, S60 5.0)
    RAPTOR, GCCE, ARMV5, ARMV5_ABIV2
    WINSCW
    - (EKA2)
    APP (DLL)
    DLL
    Yes
    Yes
    EXE (console)
    Yes
    Yes
    EXE (OS 9.1 GUI)
    Yes
    Yes
    Polymorphic DLL
    Yes
    Yes
    STDLIB
    Yes
    Yes
    -
    Related tasks
    - - - - + + + + + + +Supported Target Types + + + + +

    Supported Target Types

    +

    Carbide.c++ supports a variety of build targets based upon the SDKs and which version of the Carbide tools used by the project. The table below identifies which build targets are possible for a specific SDK.

    +

    NOTE Check the SDK Preferences page to see if an SDK you have installed and whether its build configurations are supported.

    +
    Table 1. Supported target types for all versions of Carbide.c++
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Target Types Platform Security
    +(S60 5.0, Symbian ^3)
    RAPTOR, GCCE, ARMV5, ARMV5_ABIV2
    WINSCW
    + (EKA2)
    APP (DLL)
    DLL
    Yes
    Yes
    EXE (console)
    Yes
    Yes
    EXE (OS 9.1 GUI)
    Yes
    Yes
    Polymorphic DLL
    Yes
    Yes
    STDLIB
    Yes
    Yes
    +
    Related tasks
    + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/concepts.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/concepts.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/concepts.htm Wed Jul 21 12:11:48 2010 -0500 @@ -16,7 +16,7 @@ functionality provided by Eclipse and the C/C++ Development Toolkit (CDT).

    The plug-ins simplify Symbian OS development by removing the need to use command line build tools, and provide a graphical interface to Symbian OS - specific file formats, such as AIF and MBM.

    + specific file formats, such as MBM.

    The plug-ins provide a new perspective, called the Carbide.c++ Perspective, on the Eclipse workbench. This perspective enhances the standard CDT C/C++ perspective by allowing you to select easily the SDKs and build target types @@ -24,11 +24,9 @@

    The following topics discuss these concepts in more detail:

    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/contextual_menus.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/contextual_menus.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/contextual_menus.htm Wed Jul 21 12:11:48 2010 -0500 @@ -21,7 +21,7 @@

    TIP Experiment using the context menu in various views to discover additional capabilities.

    Figure 1 shows a sample context menu in the Breakpoints view.

    -

    +

    Figure 1 - Example context menu in Breakpoints view

    Using Context Menus

    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/cvs.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/cvs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/cvs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -4,13 +4,25 @@ -Concurrent Versions System (CVS) +Software Configuration Management -

    Concurrent Versions System (CVS)

    -

    Carbide.c++ supports the Concurrent Versions System (CVS) for immediate version control support. Other revision systems are also supported but require the downloading of an Eclipse plug-in to add that feature to Carbide. Visit the eclipse.org or eclipse-plugins.2y.net sites to locate the plug-ins you need.

    -

    For more informaton on using CVS within Carbide, see the Workbench User Guide > Concepts > Team programming with CVS.

    +

    Software Configuration Management (SCM)

    +

    The Carbide.c++ tools are built on top of the Eclipse and CDT open source projects (eclipse.org). Carbide can use several popular software configuration management systems including:

    + +

    Other revision systems are also supported but require the downloading of an Eclipse plug-in to add that capability to Carbide. Visit the eclipse-plugins.2y.net sites to locate the plug-ins you need.

    +

    Using SCM in Carbide

    +

    The SCM you install normally adds its commands to the Team sub-menu in the Project Explorer view's context menu (Figure 1). Some SCM's install their own menu to Carbide. If this is the case, refer to the documentation included with the plug-in for details.

    +

    Team commands

    +

    Figure 1. Team sub-menu

    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/dependency_tracking.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/dependency_tracking.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ - - - - - - -Dependency Tracking - - - - -

    Dependency Tracking

    -

    This section only applies to the SBSv1 (abld) build system. If you are using the Raptor (SBSv2) build system Carbide does not perform any build system modifications to optimize dependency tracking.

    -

    Carbide has made some performance improvements over command-line builds when performing incremental builds. Once a project has been built, many users invoke 'abld build' on their project, not knowing that their makefiles are regenerated each time, taking a large performance hit. Although a command-line user can invoke 'abld target' to improve incremental build performance, Carbide invokes each build stage independently for a full incremental build (including the 'abld makefile' stage). In order to get around this performance hit from the IDE, Carbide manages the source and resource dependencies in separate .d (dependency) files generated under the build system. Then Carbide makes a small modification to each component's (MMP) makefile under the \epoc32\build\ directory by including the generated .d files as dependency includes. This performance modification makes incremental builds faster from Carbide.

    -

    Normally, you do not need to know the details of dependency management unless you first build from the command-line and then try to build their project from the IDE. When this happens, Carbide will prompt you with the Project rebuild notification dialog when you initiate a build from the IDE.

    -

    -

    Figure 1 -Dependency Tracking dialog

    -

    It is recommended you choose the Improve Carbide build times option if you plan to continue building in Carbide. However, be cautious of this as Carbide will remove all the object code and build everything from scratch.

    -

    If you choose the option Do not update dependencies, Carbide disables the option to manage dependencies under the Carbide Project Settings, SBSv1 tab.

    -
    Related references
    - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/ext_build_support.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/ext_build_support.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/ext_build_support.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,7 @@

    External Builds Support

    -

    The IDE will perform the following tasks on external makefiles:

    +

    The Carbide IDE performs the following tasks on external makefiles:

    • Build
    • Debug
    • @@ -17,10 +17,10 @@
    • Source Browsing
    • Error Lookup
    -

    The IDE can build an external makefile and debug its output. A linker plugin will enable the IDE to manage a command line and targets associated with a makefile. The command line is executed when a build step is initiated. The linker plugin will also supply the executable to use for debugging.

    -

    The linker plugin will provide a preference panel named External Build that is used to configure a target. The preference panel provides text fields for you to configure the command line for the target (which will enable building), specify the working directory and the output file used to launch a debugging session, and the debug platform.

    +

    Carbide can build an external makefile and debug its output. A linker plugin enables Carbide to manage a command line and targets associated with a makefile. The command line is executed when a build step is initiated. The linker plugin will also supply the executable to use for debugging.

    +

    The linker plugin provides a preference panel named External Build that is used to configure a target. The preference panel provides text fields for you to configure the command line for the target (which will enable building), specify the working directory and the output file used to launch a debugging session, and the debug platform.

    The linker plugin is generic so that it can be used regardless of the target CPU and OS. The list of available debugger preference panels will be updated by the IDE when you select the debug platform.

    -

    The External Build Target preference panel will collect the following information:

    +

    The External Build Target preference panel collects the following information:

    • Build command line to be executed in the build step
    @@ -38,12 +38,12 @@

    If multiple build steps are performed on the same target, the output from each build step will be appended to the build output window. Each block of output will be separated by “----Build started----” and “----Done----” tags.

    The build output window will allow users to navigate directly to the location of a compilation error. Double-click a line that contains an error message or press Enter when the cursor is in the line. If the IDE determines that a valid error message exists on the selected line, the source file is opened to the line on which the error occurred.

    Click the right mouse button in the build output window to display a context menu.

    +
      +
    • The Copy command copies selected text to the clipboard. If no text is selected then the line that contains the cursor is copied.
    • +
    • The Clear All command clears the contents of output window.
    • +
    • The Go To Error command navigates to the error location. This is identical to double-clicking.
    • +
    -
      -
    • The Copy command will copy selected text to the clipboard. If no text is selected then the line that contains the cursor will be copied.
    • -
    • The Clear All command will clear contents of output window.
    • -
    • The Go To Error command will navigate to the error location. This is identical to double-clicking.
    • -
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/images/build_configs.png Binary file core/com.nokia.carbide.cpp.doc.user/html/concepts/images/build_configs.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/images/deps_track_query.png Binary file core/com.nokia.carbide.cpp.doc.user/html/concepts/images/deps_track_query.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/images/wnd_workspace_launcher.png Binary file core/com.nokia.carbide.cpp.doc.user/html/concepts/images/wnd_workspace_launcher.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/images/workbench.png Binary file core/com.nokia.carbide.cpp.doc.user/html/concepts/images/workbench.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/ngage_projects.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/ngage_projects.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/ngage_projects.htm Wed Jul 21 12:11:48 2010 -0500 @@ -17,12 +17,12 @@
  • Install the N-Gage SDK on your PC
  • Place your game project inside the N-Gage SDK
  • In Carbide.c++, click File > Import
  • -
  • Select Symbian OS Bld.inf importer and navigate to your bld.inf file to import it
  • +
  • Select Symbian OS Bld.inf File importer and navigate to your bld.inf file to import it
  • Building the N-Gage project

    Once the game project has been imported, use these steps to create an N-GAGE game file:

      -
    1. Right-click the project and choose Properties to open the Properties for project_name window
    2. +
    3. Right-click the project name and choose Properties to open the Properties for project_name window
    4. In the Carbide.c++ > Carbide Build Configuration > SIS Builder panel, click Add.
    5. In the SIS Properties window:
        @@ -67,10 +67,10 @@

        Debugging the Game project

        With your game file installed on the device, create a launch configuration for the project. In Carbide:

          -
        1. OpenWindow > Preferences > Run/Debug > Launching preference panel and disable the Build (if required) before launching option
        2. -
        3. Right-click the project and choose Debug As > Debug As to open the Debug window
        4. -
        5. Create an Application TRK launch configuration -
            +
          • Open Window > Preferences > Run/Debug > Launching preference panel and disable the Build (if required) before launching option under the General Options group
          • +
          • Right-click the project and choose Debug As > Debug Configuration to open the Debug Cinfigurations window
          • +
          • Create an Symbian OS Application TRK launch configuration +
            • In the Connection tab select the COM port used to connect to the device.
            • In the Installation tab, verify that the game SISX file is correct
            • In the Debug tab, enable the View messges between PC and debug agent on the phone if you want to monitor communications between TRK and Carbide
            • @@ -82,13 +82,13 @@

              The Debugger launches the game project in the device and halts when it encounters the breakpoint you set.

              For Emulator Debugging

              Deploying and debugging the N-Gage project on an emulator

              -

              With your game file installed to the emulator, create a launch configuration for the project. In Carbide:

              +

              With your game file installed on the emulator, create a launch configuration for the project. In Carbide:

                -
              1. Open Window > Preferences > Run/Debug > Launching and disable the Build (if required) before launching option
              2. -
              3. Right-click the project and choose Debug As > Debug As to open the Debug window
              4. +
              5. Open Window > Preferences > Run/Debug > Launching and disable the Build (if required) before launching option under the General Options group
              6. +
              7. Right-click the project and choose Debug As > Debug Configurations to open the Debug Configurations window
              8. Create an Symbian OS Emulation launch configuration
              9. Click Debug to launch the emulator
              10. -
              11. In the emulator, select File > Open, locate and select the .N-GAGE installation file and click Open to install the project
              12. +
              13. In the emulator, select File > Open, locate and select the .N-GAGE installation file and click Open to install the project
              14. Open the Installation folder, launch the N-Gage runtime application
              15. In the N-Gage runtime launch the game
              16. If any breakpoint is hit in the game project, the debugger suspends
              17. diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/templates.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/templates.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/templates.htm Wed Jul 21 12:11:48 2010 -0500 @@ -29,9 +29,8 @@ S60
                • GUI Application
                • -
                • GUI Application with UI Designer
                • -
                • Open C Console application - project template based on industry-standard POSIX and middleware C libraries for S60
                • -
                +
              18. Open C Console application - project template based on industry-standard POSIX and middleware C libraries for S60
              19. +
            Tutorials diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/tour.html --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/tour.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/tour.html Wed Jul 21 12:11:48 2010 -0500 @@ -20,7 +20,7 @@ something like this:

            -

            +

            @@ -37,7 +37,7 @@
          • Create new Symbian OS projects using the New command, which is available on the File menu, and on the - pop-up menus of the C/C++ Projects and Navigator views.

            + pop-up menus of the Project Explorer and Symbian Project Navigator views.

            For more information, see Creating New Projects.

            @@ -45,19 +45,17 @@
          • Import existing projects from Symbian OS bld.inf files using the Import command, which is - available on the File menu, and on the pop-up menus of the C/C++ Projects and Navigator views.

            + available on the File menu, and on the pop-up menus of the Project Explorer and Symbian Project Navigator views.

            For more information, see Importing Projects from a Bld.Inf File.

          • - Add scalable graphics (MIF), Symbian OS bitmaps (MBM) and application information (AIF) - resources to projects, and edit these resources. You can add these using the New command, which is available on the File menu, and on the pop-up menus of the C/C++ Projects and Navigator views. MBM, MIF and AIF editors are provided to modify + Add scalable graphics (MIF) and Symbian OS bitmaps (MBM) to projects, and edit these resources. You can add these using the New command, which is available on the File menu, and on the pop-up menus of the Project Explorer and Symbian Project Navigator views. MBM and MIF editors are provided to modify the resources.

            - For more information, see Creating an MBM File and Creating an AIF File. -

            + For more information, see Creating an MBM File.

          • @@ -75,8 +73,8 @@

            • - Configure the SDKs that are available for use with Carbide.c++ in the SDK Preferences settings. Select Window - > Preferences, expand the Carbide.c++ group and select SDK Preferences.

              + Configure the SDKs that are available for use with Carbide.c++ in the SDK Preferences settings. Select Window + > Preferences, expand the Carbide.c++ group and select SDK Preferences.

              For more information, see SDK Properties.

            • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/watchpoints.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/watchpoints.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/watchpoints.htm Wed Jul 21 12:11:48 2010 -0500 @@ -5,7 +5,7 @@ Watchpoints Overview - +

              Watchpoints Overview

              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/working_with_data.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/working_with_data.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/working_with_data.htm Wed Jul 21 12:11:48 2010 -0500 @@ -10,8 +10,7 @@

              Working with Debugger Data

              This section explains how to work with data that the Carbide.c++ debugger generates. The following windows show various types of debugger data.

              -
              • System Browser Window view —shows individual processes and tasks that the debugger can control
              • -
              • Console view —shows messages generated during the debugging session
              • +
                • Console view —shows messages generated during the debugging session
                diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/concepts/workspaces.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/workspaces.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/workspaces.htm Wed Jul 21 12:11:48 2010 -0500 @@ -18,7 +18,9 @@

                Workspace Information

                A workspace is the default place to store and create resources like projects, folders, and files. These are then presented to the user in a perspective which enables the presentation and manipulation of the stored resources.

                -

                When Carbide is launched it asks for a workspace to open. As you can have multiple workspaces, all independent from each other, choosing the workspace containing the projects to work on is important. Projects within a workspace are shown in the Carbide workbench within the Project Explorer and C/C++ Project views. When you create a new project it is automatically added to the currently open workspace. You can import existing projects into a workspace from INF files.

                +

                When Carbide is launched it asks for a workspace to open (Figure 1). As you can have multiple workspaces, all independent from each other, choosing the workspace containing the projects to work on is important. Projects within a workspace are shown in the Carbide workbench within the Project Explorer and C/C++ Project views. When you create a new project it is automatically added to the currently open workspace. You can import existing projects into a workspace from INF files.

                +

                Workspace Launcher dialog

                +

                Figure 1. Workspace Launcher dialog

                WARNING Bld.inf imported projects are not copied, so do not delete the contents when deleting the project.

                Projects in one workspace cannot refer to projects in a different workspace. Thus, large projects spanning folders outside of the workspace are not handled at all. Storing all the project files in the workspace makes managing them easier from a project management perspective. Files accessible inside the workspace, like project source and resource files, are better supported than those outside the workspace (for example, SDK headers). Local History, CVS, MMP/bld.inf editors, etc. are available for files inside the workspace but not for those outside the workspace.

                NOTE Carbide automatically updates MMP and INF files as changes are made within the MMP and INF editors.

                diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/context_help/carbide_ide_dialogs_help.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/context_help/carbide_ide_dialogs_help.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/context_help/carbide_ide_dialogs_help.xml Wed Jul 21 12:11:48 2010 -0500 @@ -6,7 +6,6 @@ - @@ -15,6 +14,7 @@ + @@ -97,17 +97,6 @@ - - - - - - Specify the Leavescan directory. - - - - - @@ -360,19 +349,10 @@ - - - Use the AIF editor to specify the Symbian OS resource file and bitmaps that should be included in a Symbian OS application information (AIF) file. - - - - - Use the add image from project dialog to search for image files in your project. - @@ -381,7 +361,6 @@ Use the add image from file system dialog to search for image files on your file system. - @@ -615,4 +594,14 @@ + + + + + + + Locate, download, and install Carbide plug-ins. + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/context_help/eclipse_dialogs_help.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/context_help/eclipse_dialogs_help.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/context_help/eclipse_dialogs_help.xml Wed Jul 21 12:11:48 2010 -0500 @@ -20,8 +20,12 @@ The Debug view shows the target debugging information in a tree hierarchy. - - + + + + + + @@ -29,9 +33,8 @@ Use the Variables view to manipulate the variables or variable hierarchy used in source code. - - - + + @@ -39,8 +42,10 @@ Use the Breakpoints view to examine, enable or disable the breakpoints in one or more build configurations. - - + + + + @@ -48,10 +53,18 @@ Use the Expressions view to monitor and manipulate variables, structures, and arrays. - - - - + + + + + + + + + + Find elements in view. + + @@ -280,6 +293,7 @@ + Select the project, class, or file to create. @@ -290,11 +304,10 @@ + Select the type of file to import for debugging. - - @@ -306,8 +319,8 @@ - Use the Console view to show the output of a process and provide keyboard input to a process. - + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/debugger.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/debugger.htm Wed Jul 21 12:11:48 2010 -0500 @@ -11,7 +11,7 @@ font-size: 1em; } body { - background-color: #CCCCCC; + background-color: #D4D6EA; } .style1 { font-size: 2em; @@ -27,7 +27,6 @@

                 

                -

                 

                Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
                License: http://www.eclipse.org/legal/epl-v10.html

                @@ -35,7 +34,7 @@
                Carbide.c++ User Guide
                -

                Version 3.0.0, May, 2010

                +

                Version 3.0.0, June, 2010

                 

                diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/debug/cmds_starting.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/debugger/debug/cmds_starting.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/debugger/debug/cmds_starting.htm Wed Jul 21 12:11:48 2010 -0500 @@ -25,7 +25,7 @@

              To launch a specific launch configuration:

                -
              • Right-click the project's EXE file in the C/C++ Projects view and select Debug As > Project_Name from the context menu
              • +
              • Right-click the project's EXE file in the Project Explorer view and select Debug As > Project_Name from the context menu

              Terminating a session

              Use the Terminate command () to stop or halt a program based on the type of debugging session underway. Terminate behavior includes:

              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/icon_add.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/icon_add.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/menu_vew_expressions_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/menu_vew_expressions_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/menu_vew_expressions_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/menu_vew_expressions_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/menu_view_variables_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/menu_view_variables_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/menu_view_variables_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/menu_view_variables_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/view_expressions.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/view_expressions.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/view_variables.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/view_variables.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_add_watch_expr.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_add_watch_expr.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_add_watchpoint.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_add_watchpoint.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_cast_to_type.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_cast_to_type.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_display_as_array.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_display_as_array.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_find_expressions.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_find_expressions.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_find_variables.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_find_variables.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_global_variables.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_global_variables.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_set_value.png Binary file core/com.nokia.carbide.cpp.doc.user/html/debugger/images/wnd_set_value.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/adding_variables.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/adding_variables.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/adding_variables.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,24 +1,23 @@ - - - - - - -Adding and Removing Global Variables - - - -

              Adding and Removing Global Variables

              -

              The Variables view can also display global variables used by the program. Right-click in the Variables view and select the Add Global Variables menu option to open the Global Variables dialog. There you can select one or more global variables to display in the Variables view, clickiing OK when done.

              -

              -

              Figure 1 - Global Variables selection dialog

              -

               

              -

              Removing Global Variables

              -

              Right-click in the Variables view and select the Add Global Variables menu option to open the Global Variables dialog. Locate and uncheckmark the global variable to stop displaying, then click OK. This removes the selected global variable from the variables list.

              -
              Other references
              - - - - + + + + + + +Adding and Removing Global Variables + + + +

              Adding and Removing Global Variables

              +

              The Variables view can also display global variables used by the program. Right-click in the Variables view and select the Add Global Variables menu option to open the Global Variables dialog. There you can select one or more global variables to display in the Variables view, clickiing OK when done.

              +

              Global Variables window

              +

              Figure 1 - Global Variables selection dialog

              +

              Removing Global Variables

              +

              Right-click in the Variables view and select the Add Global Variables menu option to open the Global Variables dialog. Locate and uncheckmark the global variable to stop displaying, then click OK. This removes the selected global variable from the variables list.

              +
              Other references
              + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/viewing_expressions.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/viewing_expressions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/viewing_expressions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -20,20 +20,20 @@
            • Expressions list pane—Lists expressions and expression hierarchies. Click the hierarchical controls to expand or collapse the expression. Right-click to open the Expressions view context menu.
            • Value pane—Shows the current value of each corresponding expression. Double-click a value to change it. Right-click to set viewing options.
            -

            +

            Figure 1 - Expressions view

            Expressions view toolbar icons

            The following commands appear on the Expressions view toolbar:

            - - - + + + - + @@ -46,6 +46,12 @@ + + + + + @@ -55,10 +61,16 @@ + + + + +
            ItemIconsExplanationItemIconsExplanation
            Show Type Names
            Toggles the display of type names in the Expressions view. Toggles the display of type names in the Expressions view.
            Show Logical Structure Collapses all expanded expressions into the top level.
            Create a New Watch Expression
            Add New Watch Expression icon

            Click to open the Add New Expression dialog. Enter the expression to add, then click OK.

            +

            Add Watch Expression window

            Remove Selected Expression
            Click to remove all currently selected expressions from the expressions list.
            Click to remove all expressions from the expressions list.
            View Menu
            View menu

            Click the View Menu icon to set the layout of the Expressions view.

            +

            View menu

            Expressions view context menu options

            Right-click in the Expression's pane in the Expressions view to access the context menu commands shown in Figure 2.

            -

            +

            Expressions view context menu

            Figure 2. Expressions view context menu commands (Expression list pane)

            The commands include:

            @@ -68,33 +80,35 @@ - + - + - + - + - + +

            - + @@ -109,8 +123,32 @@ - - + + + + + + + + + + + + + + + + + +
            Select AllSelects all the expressions shown in the Expressions view.Selects all the expressions shown in the Expressions view.
            Copy ExpressionsCopies the selected expressions to the clipboard.

            Copies the selected expressions to the clipboard.

            +

            NOTE Only the selected expressions visible in the Expressions view are copied. Expressions listed outside the boundary of the view are not in memory and can't be copied at this time.

            RemoveRemove the selected expressions from the Expressions view list.

            Remove the selected expressions from the Expressions view list.

            +
            Remove AllRemove all expressions from the Expressions view list.Remove all expressions from the Expressions view list.
            Find...Opens a Find dialog to search the Expressions view list.

            Opens a Find dialog to search the Expressions view list. Enter the expression to search for and click OK.

            +

            Find Expressions dialog

            Change Value...

            Opens the Set Value dialog where you can modify the value assigned to the selected expressions. Change the value and click OK.

            -

            Add Watch Expression...

            Opens the Add Watch Exression dialog for creation of a new expression.

            -

            Opens the Add Watch Exression dialog for creation of a new expression.

            DisableOpens the Edit Watch Expression dialog where you can modify the expression and enable it for automatic evaluation.
            Reevaluate Watch ExpressionForces the expression to be reevaluated. Useful after the expressions has been edited or not evaluated due to being disabled.Add Watchpoint (C/C++)...

            Opens the Add Watchpoint dialog enabling you to define a watchpoint on the variable.

            +

            Add Watchpoint window

            Cast To Type...

            Opens the Cast to Type dialog where you can assign a new type to the expression. Enter the type and click OK.

            +

            All cast expressions are then shown using the Restore Original Type menu option making them easy to identify and restore later.

            Display As Array...Opens the Display as Array dialog where you can set array parameters to show the variables. Enter the Start index and Length, then click OK to update how the variables are shown in the Variables view.
            Format

            Change the selected variable's display format. The default setting is Natural, or the format assigned when the variable is defined. For example, the decimal value of 256 would appear as:

            +
              +
            • Binary (0b100000)
            • +
            • Natural (256)
            • +
            • Decimal (256)
            • +
            • Hexadecimal (0x100)
            • +
            WatchCreates a watchpoint on the selected variable and displays it in the Watchpoint view.
            Other references
            diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/viewing_variables.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/viewing_variables.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/debugger/variables/viewing_variables.htm Wed Jul 21 12:11:48 2010 -0500 @@ -11,7 +11,7 @@

            Viewing Variables

            The Variables view allows manipulation of project variables and the variable hierarchy used in the source code. For example, you can change the variable format, change a variable value, add watch expressions, or add global variables.

            Figure 1 shows the Variables view with Show Type Names option enabled. The default view shows the variables list and include the Name and Value for all the variables within scope. In addition, when you select a variable its value is also shown in a different pane within the view.

            -

            +

            Figure 1 - Variables view

            Variables view toolbar icons

            The following commands appear on the Variables view toolbar:

            @@ -52,15 +52,16 @@ Click to remove all global variables from the variables list. - Menu + View Menu
            -

            Enables you to modifiy the Layout to change the view orientation between: horizontal, vertical, or variables pane only.

            +

            Enables you to modifiy the Layout to change the view orientation between: horizontal, vertical, or variables pane only and customize the columns shown in the view.

            +

            View menu

            In addition, use Show All Variables to toggle between showing only those variables that are in scope and live or show all local variables, even if redundant. With this option on you will see all of the variables including the multiple defined variables like “i” for your loops and ones that may no longer have accurate values.

            Variables view context menu options

            Right-click in the Variables view to access the commands on the Variables view context menu.

            -

            +

            Variables view context menu

            Figure 2. Variables view context menu commands

            The commands include:

            @@ -74,7 +75,8 @@ - + @@ -85,60 +87,62 @@ - - + + - - - - - - + + - + + + + + - + +

            + + + + + + + + + + + + - - - - - - - - - + - - - - - + - - - -
            Copy VariablesCopies the selected variables to the clipboard.

            Copies the selected variables to the clipboard.

            +

            NOTE Only the selected variables visible in the Variables view are copied. Variables listed outside the boundary of the view are not in memory and can't be copied at this time.

            EnableDisables the selected variable.
            Display as Array... Cast To Type...

            Opens the Cast to Type dialog where you can assign a new type to the variable. Enter the type and click OK.

            +

            All cast variables are then shown using the Restore Original Type menu option making them easy to identify and restore later.

            +

            Cast To Type window

            +
            Cast To Type...Opens the Cast to Type dialog where you can assign a new type to the variable.

            Restore Original Type

            Resets the selected variable to the original type assigned by the program.Display As Array...

            Opens the Display as Array dialog where you can set array parameters to show the variables. Enter the Start index and Length, then click OK to update how the variables are shown in the Variables view.

            +

            Display as Array

            View MemoryOpens a Memory view on the selected variable so you can examine it.Opens a Memory view on the selected variable so you can examine it.
            Format

            Change the selected variable's display format. The default setting is Natural, or the format assigned when the variable is defined. For example, the decimal value of 256 would appear as:

            +
              +
            • Binary (0b100000)
            • +
            • Natural (256)
            • +
            • Decimal (256)
            • +
            • Hexadecimal (0x100)
            • +
            Find...Opens a Find dialog to search for variables.

            Opens a Find dialog to search for variables. Enter the variable to search for and click OK.

            +

            Find window

            Change Value...

            Opens the Set Value dialog where you can modify the value assigned to the selected variable. Change the value and click OK.

            -

            Add Global Variables...Select to open the Global Variables dialog where you can select one or more global variables to display in the Variables view. Global variables appear at the top of the variables list.
            Remove Global VariablesRemove the selected global variables from the Variables view.
            Remove All Global VariablesRemove all global variables from the Variables view.
            Add Watchpoint (C/C++)...Opens the Add Watchpoint dialog enabling you to define a watchpoint on the variable.
            Add Global Variables...Select to open the Global Variables dialog where you can select one or more global variables to display in the Variables view. Global variables appear at the top of the variables list.
            Remove Global VariablesRemove the selected global variables from the Variables view.

            Opens the Add Watchpoint dialog enabling you to define a watchpoint on the variable.

            +

            Add Watchpoint window

            Remove All Global VariablesRemove all global variables from the Variables view.
            Create Watch Expression Watch Creates a watchpoint on the selected variable and displays it in the Watchpoint view.
            Format

            Change the selected variable's display format. The default setting is Natural, or the format assigned when the variable is defined. For example, the decimal value of 256 would appear as:

            -
              -
            • Binary (0b100000)
            • -
            • Natural (256)
            • -
            • Decimal (256)
            • -
            • Hexadecimal (0x100)
            • -
            Other references
              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/setting_watchpoints.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/setting_watchpoints.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/setting_watchpoints.htm Wed Jul 21 12:11:48 2010 -0500 @@ -12,7 +12,7 @@

              You create a watchpoint to monitor a value in a specified memory location. The debugger halts program execution on the line of source code that triggered the watchpoint. This is different than a breakpoint, which halts program execution prior to executing the line of source code on which the breakpoint is set.

              Setting watchpoints

              Right-click in the Breakpoints view and choose the Add Watchpoint (C/C++)... command to open the Add Watchpoint window. A watchpoint suspends program execution when the memory location that you specify is accessed with a write or read operation and it's based on the access setting. Use the Add Watchpoint window to specify the memory location, its memory size, unit size, and define whether the watchpoint triggers on a read, write, or on both operations. Watchpoints can also be added directly in the Variables, Outline, and the Memory Rendering views.

              -

              +

              Figure 1. Add Watchpoint window

              Table 1. Add Watchpoint options
              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/status_watchpoints.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/status_watchpoints.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/status_watchpoints.htm Wed Jul 21 12:11:48 2010 -0500 @@ -14,7 +14,7 @@
              • An enabled watchpoint has a non-gray icon () indicating that program execution halts when encountered.
              • A disabled watchpoint displays a gray icon () indicating that program execution will not stop when encountered.
              • -
              • A resolved watchpoint has a small checkmark badge ( ) indicating that the debugger has located it in memory during program launch. When resolved, the debugger can halt program execution if the watchpoint is encountered.
              • +
              • A resolved watchpoint has a small checkmark badge () indicating that the debugger has located it in memory during program launch. When resolved, the debugger can halt program execution if the watchpoint is encountered.

              In effect, a watchpoint that is enabled by the user and resolved by the debugger during program launch can halt program execution. The table below shows the various states that cause the debugger to halt program execution:

              Table 1 Watchpoint—stop execution chart
              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/watchpoints.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/watchpoints.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/debugger/watchpoints/watchpoints.htm Wed Jul 21 12:11:48 2010 -0500 @@ -5,16 +5,16 @@ Watchpoints Overview - +

              Watchpoints Overview

              Use watchpoints (sometimes referred to as access breakpoints) to halt program execution when a specific global location is accessed. After you set a watchpoint at a key point in memory, you can halt program execution whenever that point in memory is written to or read from. You can then examine the call chain, check register and variable values, and step through your code. You can also change values and alter the flow of normal program execution.

              A watchpoint must be both enabled and resolved during a debug session in order to halt program execution. The Breakpoints view indicates the status of any watchpoint using a set of common icons and checkmark status badge. These include:

                -
              • An enabled watchpoint has a non-gray icon () indicating that program execution halts when encountered.
              • -
              • A disabled watchpoint displays a gray icon () indicating that program execution will not stop when encountered.
              • -
              • A resolved watchpoint has a small checkmark badge ( ) indicating that the debugger has located it in memory during program launch. When resolved, the debugger can halt program execution if the watchpoint is encountered.
              • +
              • An enabled watchpoint has a non-gray icon () indicating that program execution halts when encountered.
              • +
              • A disabled watchpoint displays a gray icon () indicating that program execution will not stop when encountered.
              • +
              • A resolved watchpoint has a small checkmark badge (Read Write resolved) indicating that the debugger has located it in memory during program launch. When resolved, the debugger can halt program execution if the watchpoint is encountered.

              In effect, a watchpoint that is enabled by the user and resolved by the debugger during program launch can halt program execution. The table below shows the various states that cause the debugger to halt program execution:

              Table 1 Watchpoint—stop execution chart
              @@ -57,39 +57,39 @@ - + - + - + - + - + - + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/export1.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/export1.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/export2.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/export2.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/export3.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/export3.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/export4.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/export4.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/export4a.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/export4a.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/export4b.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/export4b.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/export5.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/export5.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/export6.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/export6.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/import1.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/import1.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/import3.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/import3.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/import4.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/import4.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/import5.gif Binary file core/com.nokia.carbide.cpp.doc.user/html/images/import5.gif has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/images/views/perspective_debug.png Binary file core/com.nokia.carbide.cpp.doc.user/html/images/views/perspective_debug.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_04.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_04.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_05.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_05.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_07.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_07.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_08.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_08.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_09.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_09.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_10.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_10.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_11.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_11.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_12.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_12.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_13.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_13.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_14.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/debugging_project_14.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/dlg_build_project_progress.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/dlg_build_project_progress.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_attach_to_process.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_attach_to_process.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_build_project.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_build_project.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_change_debug_process.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_change_debug_process.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_change_remote_connection.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_change_remote_connection.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_new_launch_config.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_new_launch_config.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_other_settings.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/dll_other_settings.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_build_project.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_build_project.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_debug.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_debug.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_edit_settings.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_edit_settings.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_project_built.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_project_built.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_project_error_badge.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_project_error_badge.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_project_warning_badge.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_project_warning_badge.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_run.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_run.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/menu_new_proj_build_project.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/menu_new_proj_build_project.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_build_project_console_view.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_build_project_console_view.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_build_project_executables_view.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_build_project_executables_view.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_build_project_problems_view.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_build_project_problems_view.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_dll_project_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_dll_project_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_dll_project_03.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_dll_project_03.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_dll_project_04.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_dll_project_04.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_dll_project_07.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_dll_project_07.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_launch_config_03.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_launch_config_03.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_launch_config_04.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_launch_config_04.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_launch_config_05.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_launch_config_05.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_launch_config_08.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_launch_config_08.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_project_template_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_project_template_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_project_template_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_project_template_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_project_template_07.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/new_project_template_07.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/pref_cdt_build_console.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/pref_cdt_build_console.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_05.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_05.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_06.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_06.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_07.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_07.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/images/filter_launch_config.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/launch/images/filter_launch_config.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_board.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_board.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_board.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,11 @@

              Symbian OS Reference Board Launch

              -

              Use the Debug As dialog to select the New Launch Configuration Wizard to create a launch configuration for a development board or reference hardware using a JTAG connection.

              +

              Use the Debug As dialog to select the New Launch Configuration Wizard to create a launch configuration for a development board or reference hardware using a JTAG connection. Currently there are two choices of debugger:

              +
                +
              • Symbian OS Phone Launch — uses the Eclipse Debugger for C/C++ as the debugger engine which includes snapshots, improved variables view, and other features not available in the Classic debugger.
              • +
              • Classic Symbian OS Reference Board Launch — uses the classic debugger engine.
              • +

              Figure 1. Debug As dialog

              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_configuration_filter.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_configuration_filter.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_configuration_filter.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,29 +1,29 @@ - - - - - - -Launch Configuration Filtering - - - -

              Launch Configuration Filtering

              -

              Use the Launch Configuration preference panel to filter the launch configurations that appear in the configurations list in the Run or Debug dialog. This allows you to manage which configuration types are shown. For example, enable the Filter checked launch configuration types option and check the configuration types that you do not want to appear in the Run and Debug dialogs. As shown in Figure 1, all the configurations related to TRK have been enabled and won't appear in the configurations list.

              -

              -

              Figure 1 - Launch Configurations preference panel

              -
              Related references
              - -
              Related tasks
              - -
              - -
              - - + + + + + + +Launch Configuration Filtering + + + +

              Launch Configuration Filtering

              +

              Use the Launch Configurations preference panel to filter the launch configurations that appear in the configurations list in the Run or Debug dialog. This allows you to manage which configuration types are shown. For example, enable the Filter checked launch configuration types option and check the configuration types that you do not want to appear in the Run and Debug dialogs.

              +

              +

              Figure 1 - Launch Configurations preference panel

              +
              Related references
              + +
              Related tasks
              + +
              + +
              + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_emulator.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_emulator.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_emulator.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,8 +9,12 @@

              Symbian OS Emulator Launch

              -

              Use the Debug As dialog to select the New Launch Configuration Wizard that will create a launch configuration for the project.

              -

              +

              Use the Debug As dialog to select the New Launch Configuration Wizard that will create a launch configuration for the project. Currently there are two choices of debugger:

              +
                +
              • Symbian OS Phone Launch — uses the Eclipse Debugger for C/C++ as the debugger engine which includes snapshots, improved variables view, and other features not available in the Classic debugger.
              • +
              • Classic Symbian OS Reference Board Launch — uses the classic debugger engine.
              • +
              +

              Figure 1. Debug As dialog

              Creating a Launch Configuration for Emulators

              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_phone.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_phone.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/launch_phone.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,11 @@

              Symbian OS Phone Launch

              -

              Use the Debug As dialog to select the New Launch Configuration Wizard that will create a launch configuration for the project.

              +

              Use the Debug As dialog to select the New Launch Configuration Wizard that will create a launch configuration for the project. Currently there are two choices of debugger:

              +
                +
              • Symbian OS Phone Launch — uses the Eclipse Debugger for C/C++ as the debugger engine which includes snapshots, improved variables view, and other features not available in the Classic debugger.
              • +
              • Classic Symbian OS Reference Board Launch — uses the classic debugger engine.
              • +

              Figure 1. Debug As dialog

              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_dll_example_00.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_dll_example_00.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,27 @@ + + + + + + +DLL Projects Tutorial + + + +

              DLL Projects Tutorial

              +

              In this example we show how to create a project for a DLL (Dynamic Linked Library) using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

              +
                +
              1. Creating a project from a project template
              2. +
              3. Building an executable based on the project sources
              4. +
              5. Debugging the DLL using the Carbide debugger
              6. +
              +

              NOTE There must be at least one recognized SDK installed before you can create a project. See the SDK Preferences panel to determine if the installed SDKs are recognized by Carbide.c++ IDE. If the SDK you have installed is not recognized, you may still be able to add it to the Discovered Symbian OS SDK list.

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_dll_example_01.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_dll_example_01.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,66 @@ + + + + + + +Creating DLL Projects Tutorial + + + +

              Creating DLL Projects Tutorial

              +

              In this example we show how to create a project for a DLL (Dynamically Linked Library) using one of the built-in Carbide templates, build it, then attach to another program for debugging. The steps to do this include:

              +
                +
              1. Creating a DLL project from a project template
              2. +
              3. Building the DLL object code based on the project sources
              4. +
              5. Debugging the DLL using the Carbide debugger
              6. +
              +

              NOTE There must be at least one recognized SDK installed before you can create a project. See the SDK Preferences panel to determine if the installed SDKs are recognized by Carbide.c++ IDE. If the SDK you have installed is not recognized, you may still be able to add it to the Discovered Symbian OS SDK list.

              +
              +

              In this tutorial you'll create a simple DLL project using the New Symbian OS C++ Project wizard, attach it to the HelloWorld project created here, then debug it.

              +
              +

              Creating a DLL project from a template

              +
                +
              1. Click the File > New > Symbian OS C++ Project menu option.
                +

                The New Symbian OS C++ Project window appears to guide you through project creation process.

                +

                New DLL project

                +
              2. +
              3. Select a template from the available options, then click Next.
                +

                Select the template for the type of project you want to create. For this example we chose the Generic Symbian OS > Baisc dynamically linked library (DLL) template. Note that as you select a template a brief description appears below the list explaining it attributes.

                +
              4. +
              5. Use the New Symbian OS C++ Project page to define the project name and build system.
                +

                New Symbian OS C++ Project page

                +
                  +
                1. Type a name into the Project name text box.
                  +

                  The project name is used to define several of the pre-build source files in the prject.

                  +
                2. +
                3. (Optional) Change the project location.
                  +

                  Uncheck the Use default location option to specify a different location for the project.

                  +
                4. +
                5. Select the Builder type.
                  +

                  Based on the installed SDKs you can choose between SBSv2 (recommended) and the older SBSv1 build systems.

                  +
                6. +
                7. Click Next.
                8. +
                +
              6. +
              7. In the Symbian OS SDKs page, select the SDK and build configurations for the project.
                +

                Here you can select from any SDK that is both installed and recognized by Carbide. If the SDK supports several build configurations (GCCE, RVCT, etc.) then you can pick and choose among them for your project.

                +

                Symbian OS SDKs page

                +
              8. +
              9. (Optional) Click Next to provide Basic Settings like author, copyright and other info for your project.
              10. +
              11. (Optional) Click Next to rename the Project Directories used to organize the project.
              12. +
              13. Click Finish.
                +

                Carbide uses the selected project template and your settings to create the DLL project in the Project Explorer view.

                +

                DLL project in Project Explorer view

                +
              14. +
              +
              +

              NEXT STEP > Building the object code based on the project sources

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_dll_example_02.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_dll_example_02.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,48 @@ + + + + + + +Building the DLL Project Tutorial + + + +

              Building the DLL Project Tutorial

              +

              In this example we show how to create a project for a DLL (Dynamic Linked Library) using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

              +
                +
              1. Creating a DLL project from a project template
              2. +
              3. Building the DLL object code based on the project sources
              4. +
              5. Debugging the DLL using the Carbide debugger
              6. +
              +
              +

              Building a DLL is just like building any other executable.

              +
              +

              Building the DLL project

              +
                +
              1. Select the project to build in the Project Explorer view.
              2. +
              3. Build the project using one of these actions: +
                +
                  +
                • Right-click the project in the Project Explorer view and choose Build Project.
                • +
                • Click the Run > Build Project menu option.
                • +
                • Click the Build (Build Project icon) icon in the toolbar to build the project.
                • +
                +
              4. +
              5. Verifying a successful project build
                +
              6. +
              +
              +

              Once compiling is complete use the Project Explorer, Problems, Console, and Executables views to locate and resolve any problems generated during the build. See Step 2 here for more details.

              +

              Project Explorer showing DLL project

              +
              +
              +

              NEXT STEP > Defining a launch configuration for running or debugging the DLL

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_dll_example_03.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_dll_example_03.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,65 @@ + + + + + + +Debugging a DLL Project Tutorial + + + +

              Debugging a DLL Project Tutorial

              +

              In this example we show how to create a project for a DLL (Dynamic Linked Library) using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

              +
                +
              1. Creating a DLL project from a project template
              2. +
              3. Building the DLL object code based on the project sources
              4. +
              5. Debugging the DLL using the Carbide debugger
              6. +
              +
              +

              With the DLL compiled into object code, it's time to link it to any process running on the target device, then launch it with the debugger. Using the New Launch Configuration Wizard makes doing this quick, easy, and reliable.

              +
              +

              Debugging a DLL project

              +
                +
              1. Select the project to launch in the Project Explorer view.
              2. +
              3. Launch a debug session using one of these actions:
                +
                  +
                • Right-click the project in the Project Explorer view and choose Debug As > Debug Symbian OS Application on Phone or Simulator menu option.
                • +
                • Click the Run > Debug (F11) menu option.
                • +
                • Click the Debug (Debug icon) icon in the toolbar to build the project.
                • +
                +

                The first time you perform any of the following actions, the New Launch Configuration Wizard appears asking for the additional info to connect to a device.

                +

                New Launch Configuration Wizard

                +
              4. +
              5. Provide the wizard the information it needs to complete the Configure launch configuration.
                +

                Complete all of the options below to create a launch connection for the DLL project.

                +
                  +
                1. Connect to device — click Change... to select a Current connection, create a new one, or edit the chosen remote connection settings.
                  +

                  Change connection dialog

                  +
                2. +
                3. Debug process — click Change... to open the Change Debug Process dialog. Then select the Attach to process option and click OK
                  +

                  To debug a DLL you simply need to attach it to any process running on the target device. Setting the Attach to process option will throw up a Attach to Process dialog when you start a debug session.

                  +

                  Change Debug Process dialog

                  +
                4. +
                5. Other Settings — click Change... to open the Other Settings dialog to set a preference for when the project is built during a launch, then click OK.
                  +

                  Other Settings dialog

                  +
                6. +
                7. (Optional) Edit advanced settings before launch — enable this option and click Edit to open the Debug Configurations dialog where you can set more launch options. Click Close to cancel the debug session launch.
                8. +
                +

                The Debug control enables when all the information is complete.

                +
              6. +
              7. Click Debug.
                +

                The debug session is launched and the Attach to Process dialog appears. Select a process and click OK to continue.

                +

                Attach to Process dialog

                +
              8. +

                The DLL is attached to the running process and control returns to the Carbide debugger. From this point you can use all of the Carbide debugger features to debug the DLL as it runs on the device.

                +
              +
              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_00.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_00.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,27 @@ + + + + + + +Emulator Application Projects Tutorial + + + +

              Emulator Application Projects Tutorial

              +

              In this example we show how to create a new project using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

              +
                +
              1. Creating a project from a project template
              2. +
              3. Building an object code based on the project sources
              4. +
              5. Defining a launch configuration for running or debugging the application
              6. +
              7. Controlling and debugging the running program using the Carbide debugger
              8. +
              +

              NOTE There must be at least one recognized SDK installed before you can create a project. See the SDK Preferences panel to determine if the installed SDKs are recognized by Carbide.c++ IDE. If the SDK you have installed is not recognized, you may still be able to add it to the Discovered Symbian OS SDK list.

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_01.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_01.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,64 @@ + + + + + + +Creating New Projects from Templates + + + +

              Creating New Projects from Templates

              +

              In this example we show how to create a new project using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

              +
                +
              1. Creating a project from a project template
              2. +
              3. Building the object code based on the project sources
              4. +
              5. Defining a launch configuration for running or debugging the application
              6. +
              7. Controlling and debugging the running program using the Carbide debugger
              8. +
              +
              +

              Everything starts with a project. So the first step is to use the New Project wizard to create a project based on a known template. Program templates are designed to make creating common project types fast and simple. They include the basic sources, resources, includes, and build files that Carbide uses to manage your project.

              +
              +

              Creating projects from a template

              +
                +
              1. Click the File > New > Symbian OS C++ Project menu option.
                +

                The New Symbian OS C++ Project window appears to guide you through project creation process.

                +

                New Symbian OS C++ Project window

                +
              2. +
              3. Select a template from the available options, then click Next.
                +

                Select the template for the type of project you want to create. For this example we chose the S60 > GUI Application template. Note that as you select a template a brief description appears below the list explaining it attributes.

                +
              4. +
              5. Use the New Symbian OS C++ Project page to define the project name and build system.
                +

                +
                  +
                1. Type a name into the Project name text box.
                  +

                  The project name is used to define several of the pre-build source files in the prject.

                  +
                2. +
                3. (Optional) Change the project location.
                  +

                  Uncheck the Use default location option to specify a different location for the project.

                  +
                4. +
                5. Select the Builder type.
                  +

                  Based on the installed SDKs you can choose between SBSv2 (recommended) and the older SBSv1 build systems.

                  +
                6. +
                7. Click Next.
                8. +
                +
              6. +
              7. In the Symbian OS SDKs page, select the SDK and build configurations for the project.
                +

                Here you can select from any SDK that is both installed and recognized by Carbide. If the SDK supports several build configurations (GCCE, RVCT, etc.) then you can pick and choose among them for your project.

                +
              8. +
              9. (Optional) Click Next to provide Basic Settings like author, copyright and other info for your project.
              10. +
              11. (Optional) Click Next to rename the Project Directories used to organize the project.
              12. +
              13. Click Finish.
                +

                Carbide uses the selected project template and your settings to create a new project in the Project Explorer view.

                +
              14. +
              +
              +NEXT STEP > Building an executable based on the project sources +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_02.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_02.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,99 @@ + + + + + +Building Projects and Components + + + + +

              Building Projects and Components

              +

              In this example we show how to create a new project using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

              +
                +
              1. Creating a project from a project template
              2. +
              3. Building the object code based on the project sources
              4. +
              5. Defining a launch configuration for running or debugging the application
              6. +
              7. Controlling and debugging the running program using the Carbide debugger
              8. +
              +
              +

              Once you have a project in hand, the next thing to do is compile or build it into object code.

              +

              Building projects consists of a sbs or abld-based build system that wraps build functionality around existing SDK build tools that invoke makmake commands (e.g. makmake bldfiles and sbs build).

              +

              The plug-ins provide extra functionality to set up suitable build configurations for Symbian OS C++ projects. The initial selection of a build configuration is done when you create a project, as described in Creating New Projects from Templates. You can later change the Active Build Configuration. The Build Configurations also provides a command (Project > Build All Configurations) to build all the selected build configurations in a batch.

              +

              Building Symbian OS C++ projects can involve the use of Symbian OS specific tools, such as the Symbian OS resource compiler. For detailed information on such tools, see the documentation for the SDK that you are using.

              +

              You build projects to process the source files that comprise a program and + generate object code. The compiler flags syntax errors in the source files. Use the Properties for <project_name> window to control how the project is built. The following methods build a project:

              +
                +
              • Build All Configurations (CTRL-ALT-A) — builds all build configurations for a project
              • +
              • Build Working Set — specify which projects to build in a working set
              • +
              • Build Project — builds the entire project if it has never been built before or on subsequent builds only those files that have changed since the last build operation
              • +
              +
              +

              Build Project menu

              +
              +
              +

              Building a project

              +
                +
              1. Select the project to build in the Project Explorer view.
              2. +
              3. Build the project using one of these actions: +
                +
                  +
                • Right-click the project in the Project Explorer view and choose Build Project (see above).
                • +
                • Click the Run > Build Project menu option.
                • +
                • Click the Build (Build Project icon) icon in the toolbar to build the project.
                • +
                +
              4. +
              +
              +

              Choosing any of the above actions causes Carbide to build the selected project. A Build Project dialog (below) and a progress bar appear during a lengthy build operation. All build output is shown in a Console view while build errors and warnings appear in the Problems view.

              +

              Build Project progress dialog

              +

              Whether a full build or incremental build is requested, Carbide forwards the request to the SDK make system. The SDK make system determines if anything needs to be + built. Carbide always checks that makefiles are up-to-date and + dependencies present.

              +

              The project is also built if you make a change to it and then click Debug. It may be useful to automatically save modified resources before a manual build process by enabling the Save automatically before build option in the Window > Preferences > General > Workspace preference panel.

              +

              NOTE If you want to turn off building before launching, uncheck the Build (if required) before launching option in the Window > Preferences > Run/Debug > Launching preference panel.

              +

              When performing a build, output is displayed in the Console view. If you do not want to clear the console before each build you need to uncheck the option Always clear console before building in the Console panel. This option is enabled by default. You can access this panel by selecting Window > Preferences > C/C++ > Build > Console preference panel (below).

              +

              Console preference panel

              +

              Not clearing the console is useful when you are performing multiple builds, such as a regular project build, building a project package (.pkg) file, and building a ROM image. For example, if you do not clear the console before each build, then a subsequent build will not overwrite information from a previous build.

              +
              +
                +
              1. Verifying a successful project build
                +

                Once compiling is complete use the Project Explorer, Problems, Console, and Executables views to locate and resolve any problems generated during the build.

                +
                  +
                1. Examine the project icon in the Project Explorer view
                  +
                    +
                  • Project built icon — a successfully built project icon.
                  • +
                  • Warning badge — projects with warning messages show a yield badge.
                  • +
                  • Error badge — projects with error messages show a red badge.
                  • +
                  +
                2. + +
                3. Check the Problems view for error or warning messages
                  +

                  Examine the Problems view to see what errors and warning messages were generated during the build. The Description column contains additional information about the problem that can help you resolve it.

                  +

                  Executables view

                  +
                4. +
                5. Examine the Console view for more specific details on an error or warning message
                  +

                  Use the Console view to see where a specific problem occured during the build.

                  +

                  Executables view

                  +
                6. +
                7. Examine the Executables view for missing source files
                  +

                  Use the Executables view to see what source files were used during the build. Sources shown in gray are those Carbide cannot find. Missing sources in an SDK not built on your machine are common, but missing sources that you created can be resolved.

                  +

                  Executables view

                  +
                8. +
                +

                Once you're resolved all the build errors in a project, its time to link the program to a specific target. This is done with a launch configuration.

                +
              2. +
              +
              +

              NEXT STEP > Defining a launch configuration for running or debugging the application

              +

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_03.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_03.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,65 @@ + + + + + + +Defining a launch configuration + + + +

              Defining a launch configuration

              +

              In this example we show how to create a new project using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

              +
                +
              1. Creating a project from a project template
              2. +
              3. Building the object code based on the project sources
              4. +
              5. Defining a launch configuration for running or debugging the application
              6. +
              7. Controlling and debugging the running program using the Carbide debugger
              8. +
              +
              +

              To run or debug a project you need a launch configuration. A project must have at least one launch configuration, and can have as many as necessary. It is not unusual to have two or more launch configurations per target device, usually a debug version and a run version. You can use the New Launch Configuration Wizard to create them all.

              +
                +
              • On emulator targets, the New Launch Configuration Wizard usually has all the information it requires to create a launch configuration and launch the program on the emulator. If at any time it needs additional information, dialogs will ask for it, then launch the program.
              • +
              • On device targets, the New Launch Configuration Wizard requests all the additional information it needs like the target device, the remote connection, and more, before it creates the launch configuration. Once it has all the required data, it creates the launch configuration, then downloads the executable to the device and launches it.
              • +
              +

              Once the emulator or device is loaded with the executable, a debug session can begin.

              +

              If at any time the New Launch Configuration Wizard encounters a problem during a later launch sequence it will request settings clarification before continuing. For example, maybe the target device has changed, or a new ROM has been installed. Either of these will trigger a request for clarification.

              +
              +

              Defining a launch configuration (emulator example)

              +
                +
              1. Select the project to run in the Project Explorer view.
              2. +
              3. To run the project without the debugger choose:
                +

                To simply run the project on the chosen target use one of the following actions. Use this option to verify a release program's execution without debugging symbols.

                +
                  +
                1. Right-click the project and click Run As > Run Symbian OS Application on Emulator.
                2. +
                3. Click the Run > Run (CTRL-F11) menu item.
                4. +
                5. Click the Run (Run icon) icon in the toolbar.
                6. +
                +
              4. +
              5. Select the Process to launch in the Executable Selection page, then click Next.
                +

                +
              6. +
              7. Set the Build (if required) before launching option in the Build Options Selection page, then click Next.
                +

                +
              8. +
              9. Verify the new launch configuration settings in the New Launch Configuration page.
                +

                +
              10. +
              11. (Optional) Checkmark the Advanced settings option to further customize the launch configuration.
              12. +
              13. Click Finish.
                +

                Carbide launches the emulator, transfers the HelloWorld executable to it, then launches the program (see below). You can then use the soft-keys to choose actions from the Options soft-menu. Click the Exit soft-key to close the emulator and return to Carbide.c++.

                +

                Emulator

                +
              14. +
              +

              With a launch configuration in place, its now possible to edit, build, and run a project in the emulator. However, since none of us can write perfect code the first time the use of a debugger is essential for further development of our project.

              +
              +

              NEXT STEP > Controlling and debugging the running program using the Carbide debugger

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_04.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/new_proj_from_template_04.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,66 @@ + + + + + +Launching and debugging an executable + + + +

              Launching and debugging an executable

              +

              In this example we show how to create a new project using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

              +
                +
              1. Creating a project from a project template
              2. +
              3. Building the object code based on the project sources
              4. +
              5. Defining a launch configuration for running or debugging the application
              6. +
              7. Launching and debugging an executable using the Carbide debugger
              8. +
              +
              +

              NOTE You can only debug compiled programs. Use the Build Project command to compile project sources into a binary file if you do not already have an executable in the project. A symbolics (.sym) file is also required for debugging on a target device. Ensure that a .sym file has been created. If you are importing an existing application, you may have to rebuild the application and create a related .sym file. Make sure a .sym file has been created in the output directory.

              +
              +

              Launching and debugging an executable

              +
                +
              1. Select the project to debug in the Project Explorer view.
                +

                For this example you should choose the HelloWorld project created in Step 1 of this tutorial.

                +
              2. +
              3. Set a breakpoint in the project.
                +

                Open the \src\HelloWorldAppUi.cpp file and set a breakpoint in the HandleCommandL routine on Line 103.

                +

                Setting a breakpoint

                +
              4. +
              5. Launch the debug session.
                +

                To run the project on the chosen target and start a debug session use one of the following actions. Clicking Debug is the most common choice as it enables you to assume control of the executable should you encounter a problem.

                +
                  +
                • Right-click the project and choose Debug As > Debug Symbian OS Application on Emulator.
                • +
                • Click the Run > Debug (F11) menu item.
                • +
                • Click the Debug (Debug icon) icon in the toolbar.
                • +
                +

                The emulator is launched and the Debug perspective appears to manage the debug session.

                +
              6. +
              7. Click the Options soft-menu and select any menu option to hit the breakpoint set in Step 2.
                +

                Select menu option

                +

                Which returns control to the Debug perspective in Carbide. Use the various views to examine the program as it runs. Examine variables, set more breakpoints, etc.

                +

                Select menu option

                +
              8. +
              9. Use any of the step commands in the Debug view to step through the program source code.
                +
                  +
                • Click Step Into (F5) to execute the current line and enter a function or method.
                • +
                • Click Step Over (F6) to execute the current line.
                • +
                • Click Step Return (F7) to execute lines until exiting the function or method.
                • +
                +
              10. +
              11. Click the Resume icon in the Debug view to return control to the program.
              12. +
              13. Click the Exit soft-key in the emulator to exit the debug session.
                +

                The HelloWorld program stops, the emulator exits, and control returns to Carbide.

                +
              14. +
              +
              +

              That's it. Congratulations on creating, building, and debugging a Carbide project.

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_00.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_00.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,27 @@ + + + + + + +Remote Target Debugging (Run-mode) Tutorial + + + +

              Remote Target Debugging (Run-mode) Tutorial

              +

              In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

              +
                +
              1. Connect target device for PC
              2. +
              3. Install TRK remote agent (v3.2.7) or later on the target device
              4. +
              5. Configure project for downloading
              6. +
              7. Debug project on target device
              8. +
              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_01.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_01.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,43 @@ + + + + + + +Connect target device to PC Tutorial + + + +

              Connect target device to PC

              +

              In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

              +
                +
              1. Connect target device to PC
              2. +
              3. Install TRK remote agent (v3.2.7) or later on the target device
              4. +
              5. Configure project for downloading
              6. +
              7. Debug project on target device
              8. +
              +
              +

              The most reliable connection between a remote device and your PC is a cable. In this case, the USB cable that physically connects your phone to the a PC USB connection. Once connected, Carbide uses plug-and-play (PnP) to create a remote connection to the phone or remote device.

              +

              NOTE This tutorial assumes that Carbide is setup properly enabling you to create, build, and debug applications with an emulator.

              +
              +

              Connecting remote devices to PC

              +
                +
              1. Connect the USB cable between the remote device and PC running Carbide.
                +

                Use the Remote Connections view to verify a successful connection or by looking at the remote connection trim display shown at the bottom of the workplace window.

                +

                Remote Connection view   Remote Connection trim indicator

                +

                The Status column indicates whether the service you need for debugging, TRK, is Available. If it's status is Not Accessible you are probably missing the TRK remote agent on the remote device.

                +
              2. +
              3. Click OK on the remote device when it asks to use PC Suite mode with USB.
                +

                NOTE Debugging requires the use of PC Suite mode. If you are in another mode, like Mass storage mode, an alert appears asking you to change.

                +
              4. +
              +
              +

              NEXT: Install TRK remote agent

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_02.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_02.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,49 @@ + + + + + + +Install TRK remote agent Tutorial + + +

              Install TRK remote agent

              +

              In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

              +
                +
              1. Connect target device to PC
              2. +
              3. Install TRK remote agent (v3.2.7) or later on the target device
              4. +
              5. Configure project for downloading
              6. +
              7. Debug project on target device
              8. +
              +
              +

              To debug on a remote device you need a program to communicate between the Carbide debugger and your executable running on the device. That program is the TRK (Terminal Resident Kernel) remote agent, also known as Application TRK.

              +

               

              +
              +

              Installing or updating the TRK remote agent

              +
                +
              1. Select the Connection to edit in the Remote Connections view.
              2. +
              3. Click the Edit Settings... icon (Edit Settings icon) in the Remote Connections toolbar.
                +

                Click Edit Settings icon

                +
              4. +
              5. Click the Install Remote Agents tab.
                +

                Click Install Remote Agents tab

                +
              6. +
              7. Select the latest remote agent to install.
                +

                Choose the remote agent to install. Since there are different builds for different OSes, knowing the OS installed on the device helps.

                +
              8. +

                Click Install Remote Agents tab

                +

                NOTE If you don't know what OS version is on the device, always choose the remote agent that supports the highest OS version available. Should that one not work, drop down to the next OS version in line and repeat.

                +
              9. +

                Click Install.

                +
              10. +
              +
              +

              NEXT: Configure project for debugging

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_03.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_03.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,67 @@ + + + + + + +Configure project for debugging Tutorial + + + +

              Configure project for debugging

              +

              In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

              +
                +
              1. Connect target device to PC
              2. +
              3. Install TRK remote agent (v3.2.7) or later on the target device
              4. +
              5. Configure project for downloading
              6. +
              7. Debug project on target device
              8. +
              +
              +

               

              +
              +

              Configure project for downloading

              +
                +
              1. Select a configuration to debug the HelloWorld application on the target device. +

                We choose Phone Debug (armv5_udeb) for this example using the Manage Configurations icon on the toolbar, but yours name may differ based upon the SDK selected for your project.

                +

                Select device target

                +
              2. +
              3. Click the Debug icon (Debug icon) on the toolbar. +

                This opens the New Launch Configuration Wizard dialog asking for additional information. For the first launch you must define the name of the package to install on the target device.

                +

                New Launch Configuration Wizard

                +
                  +
                1. Click the Change... button in the Debug Process section to open the Change Debug Process dialog. +

                  New Launch Configuration Wizard

                  +
                2. +
                3. Enable the 'Launch program on device' option and select the executable to launch. +

                  This tells the TRK remote agent which application to launch once its downloaded.

                  +
                4. +
                5. Click the 'Modify SIS builder settings for build configuration' to open the Properties for project dialog.
                6. +

                  The Carbide.c++ > Build Configurations > SIS Builder tab is shown.

                  +

                  SIS Builder tab

                  +
                7. Click Add to open the SIS Properties dialog. +

                  SIS Properties dialog

                  +
                8. +
                9. Select the project's PKG file to download to the device, then click OK. +

                  SIS Builder tab

                  +
                10. +
                11. Verify the PKG in the SIS Builder tab, then click OK.
                12. +
                +
              4. Verify the settings in the Change Debug Process, then click OK. +

                SIS Builder tab

                +
              5. +
              6. Review the Configure launch configuration setup, then click Debug. +

                SIS Builder tab

                +

                The project is built, downloaded to the target device, and the executable launched on the device.

                +
              7. +
              +

              On subsequent launches the project will be compiled and downloaded to the target device without any setup on your part. The only time you should need to perform these actions is if you change anything that effects to launch configuration. Of course, you can always modify the settings by using the New or Debug window to edit launch configurations.

              +
              +

              NEXT: Debug project on target device

              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_04.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_04.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,49 @@ + + + + + + +Debug project on target device Tutorial + + + +

              Debug project on target device

              +

              In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

              +
                +
              1. Connect target device to PC
              2. +
              3. Install TRK remote agent (v3.2.7) or later on the target device
              4. +
              5. Configure project for downloading
              6. +
              7. Debug project on target device
              8. +
              +
              +

              You debug on a remote device using the exact same methods used for the emulator. Once the project is built and downloaded to the target device, the TRK remote agent then takes control. Then, using the Carbide debugger you can use all the debugger features to exercise the program on the device while monitoring its vitals in the Debug perspective.

              +
              +

              Debugging a program on a remote device

              +
                +
              1. Set breakpoints in the program. +

                Set breakpoints at the critical points in the program where you want to stop execution.

                +
              2. +
              3. Click the Debug icon (Debug icon) to launch the program for debugging on the target device. +

                Follow the steps in Configure project for downloading to build and launch the program for debugging.

                +
              4. +
              5. Use the Carbide debugger to examine program internals and control its execution. +

                Use any of the following features to debug your program:

                +
                  +
                • Use the various stepping commands to walk through the program.
                • +
                • Examine and change variables and expressions in the Variables view.
                • +
                • Examine the stack in the Debug view
                • +
                • Review the assembler code in the Disassembly view
                • +
                • Examine memory usage in the Memory view
                • +
                +
              6. +
              +
              +

              Other references

              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/qt_help/qt_project_setup.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/qt_help/qt_project_setup.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/qt_help/qt_project_setup.htm Wed Jul 21 12:11:48 2010 -0500 @@ -10,9 +10,9 @@

              Qt Development Setup

              There are some prerequisites to using Qt projects within the Carbide environment. This includes downloading the correct SDKs, building qmake to use the SDKs, and finally, building the libraries for your target environments.

              -

              You should have the Qt SDK for Symbian that works with the S60 SDK in order to develop applications with Carbide. These steps include:

              +

              You should have the Nokia Qt SDK 1.0 in order to develop Qt applications with Carbide. These steps include:

                -
              1. Download the Qt SDK for Symbian package
              2. +
              3. Download the Nokia Qt SDK 1.0 package
              4. Install the Qt SDK using the instructions found in the INSTALL file located in the Qt SDK for Symbian folder, including:
                    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/AIFEditor.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/AIFEditor.html Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ - - -AIF Editor in AIF Definition File - - - -

                    AIF Editor

                    - -

                    - The AIF Editor allows you to specify the Symbian OS - resource file and bitmaps that should be included in a Symbian OS application - information (AIF) file. Use of AIF files is restricted to using .bmp files and works for versions 2.x and later releases of the Symbian OS SDKs. For more information, see AIF File.

                    -

                    - The AIF Editor is shown when a new AIF file is created or an existing file is edited in the Resources group of the MMP editor's Sources tab. Refer to Creating an AIF File for more information.

                    - -

                    -
                    Table 1. AIF Editor —Items
                    -
              Write enabled

              The watchpoint is activated for write access operations on the specific memory location and if resolved, will halt program execution on a write operation at the watchpoint.

              disabled

              Watchpoint is disabled for the source line, debugger does not halt program execution on a write operation.

              Read enabled

              The watchpoint is activated for read access operations on the specific memory location and if resolved, will halt program execution on a read operation at the watchpoint.

              disabled

              Watchpoint is disabled for the source line, debugger does not halt program execution on a read operation.

              Write/Read enabled

              The watchpoint is activated for both read and write access operations on the specific memory location and if resolved, will halt program execution on any read or write operation at the watchpoint.

              disabled

              Watchpoint is disabled for the source line, debugger does not halt program execution on a read or write operation.

              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              ItemExplanation
              Target File

              Specifies the filename of the compiled AIF file, relative to the target path. Click the untitled.aif button to set the target file based on the SDK and project name.

              Resource File Path Choose a resource file from the current project, browse the file system or enter the path. For relative paths use the Carbide project as the reference point, not the MMP file location.
              UpSelect an image in the list and click Up to move the selection one position up in the list.
              Down

              Select an image in the list and click Down to move the selection one position down in the list.

              Pair Image and Mask Select two adjacent unpaired BMP image entries in the list and click this button to combine the images together into image/mask pairs.
              Split Image and Mask Select a paired BMP image in the list and click this button to split the image into image and mask entries.
              Swap Image and Mask Select a paired BMP image in the list and click this button to swap the image and mask files and format information in paired image entries.
              Add From Project Click this button to open an Add Images from Project dialog to reference available images in the project.
              Add From FilesystemClick this button to open an Add Images From Filesystem dialog to locate and reference existing images in the filesystem or copy images to the project.
              RemoveSelect an image and click Remove to remove image entry from the list. This does not delete file from directory.
              Color depth Select the bit depth used to encode the image at build time.
              Mask depth

              Select the bit depth used to encode the mask at build time. Options include:

              -
                -
              • n/a - Do not apply mask depth to images
              • -
              • 1 - A 1-bit mask treats pixels as "on/off" bits, where black is opaque and white is transparent.
              • -
              • 8 - An 8-bit mask is treated as alpha values, where black is transparent and white is opaque.
              • -
              Color format Select Color to encode the image(s) as color or select Grayscale to encode the image(s) as grayscale.
              PreviewA preview of the image as it will appear at runtime.
              -

               

              -
              Related concepts
              - -
              Related tasks
              - - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/BasicSettings.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/BasicSettings.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/BasicSettings.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,57 +1,57 @@ - -Basic Settings in New Project Wizard - - - -

              Basic Settings

              -

              - You can set some basic properties for the project in this page, like Application UID, Author and Copyright - notice for the project.

              -

              NOTE Fields appearing in window vary depending upon the type of project being created.

              -

              - - - - -
              NameFunction
              -

              - Application UID -

              -

              - Specifies a 32-bit ID to identify the project.

              -

              - Vendor ID -

              -

              - Appears for projects that require a 32-bit unique ID to identify the vendor of the - executable. In versions of Symbian OS with platform security, a program can - read a VID at runtime to check that a binary comes from a particular source. In - most cases, the VID should be zero, meaning that source of the executable is - not required for any security checks. -

              -

              - Author -

              -

              - Specifies the name of the Author, who is creating this project. -

              -

              - Copyright Notice -

              -

              - Specifies the copyright notice to be added to the source code of the - project. -

              -

              NOTE Tooltips are available for the various fields. Simply hover the pointer over the field title to view the tooltip.

              -
              Related tasks
              - - - - - + +Basic Settings in New Project Wizard + + + +

              Basic Settings

              +

              + You can set some basic properties for the project in this page, like Application UID, Author and Copyright + notice for the project.

              +

              NOTE Fields appearing in window vary depending upon the type of project being created.

              +

              + + + + +
              NameFunction
              +

              + Application UID +

              +

              + Specifies a 32-bit ID to identify the project.

              +

              + Vendor ID +

              +

              + Appears for projects that require a 32-bit unique ID to identify the vendor of the + executable. In versions of Symbian OS with platform security, a program can + read a VID at runtime to check that a binary comes from a particular source. In + most cases, the VID should be zero, meaning that source of the executable is + not required for any security checks. +

              +

              + Author +

              +

              + Specifies the name of the Author, who is creating this project. +

              +

              + Copyright Notice +

              +

              + Specifies the copyright notice to be added to the source code of the + project. +

              +

              NOTE Tooltips are available for the various fields. Simply hover the pointer over the field title to view the tooltip.

              +
              Related tasks
              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/INF_Editor.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/INF_Editor.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/INF_Editor.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,52 +1,52 @@ - - -INF Editor - - - -

              INF Editor - Overview Tab

              - -

              - The INF Editor allows you to view and modify Symbian project files and export files to be included in building your application. The settings displayed are those active for the active build configuration. However, changes made in the INF editor can be applied globally to all build configurations. Changes made in the INF editor are automatically written to the project's .INF file. You can view the .inf file by selecting the bld.inf tab located along the bottom of the INF editor.

              -

              - The INF Editor is shown when an INF file is - opened from the Project Explorer view or Symbian Project Navigator view by double-clicking on the file. The INF Editor is shown in Figure 1.

              -

              -

              Figure 1 - INF Editor

              -

              - - -
              NameFunction
              -

              - Components

              -

              - Add components such as MMP and make files to be part of the normal build process.

              -
                -
              • Create New MMP File - creates a new MMP file at the bottom of the Component list.
              • -
              • Add Existing MMP File - imports a MMP file at the bottom of the Component list.
              • -
              • Add Existing Makefile - adds a make file to the bottom of the Component list.
              • -
              • Edit - Select a component and click Edit to apply the Tidy attribute or specify the Build as ARM option.
              • -
              • Open - Select a component and click Open to open the component in an editor window.
              • -
              • Up - Select a component and click Up to move the component up in the list.
              • -
              • Down - Select a component and click Down to move the component down in the list.
              • -
              • Remove - Select a component and click Remove to remove the component from the build process.
              • -
              -

              - Test Components -

              -

              - Create, import, edit, open, move, or remove MMP and make files that are part of a test build process.

              -
              Other references
              - - - - - - - + + +INF Editor + + + +

              INF Editor - Overview Tab

              + +

              + The INF Editor allows you to view and modify Symbian project files and export files to be included in building your application. The settings displayed are those active for the active build configuration. However, changes made in the INF editor can be applied globally to all build configurations. Changes made in the INF editor are automatically written to the project's .INF file. You can view the .inf file by selecting the bld.inf tab located along the bottom of the INF editor.

              +

              + The INF Editor is shown when an INF file is + opened from the Project Explorer view or Symbian Project Navigator view by double-clicking on the file. The INF Editor is shown in Figure 1.

              +

              +

              Figure 1 - INF Editor

              +

              + + +
              NameFunction
              +

              + Components

              +

              + Add components such as MMP and make files to be part of the normal build process.

              +
                +
              • Create New MMP File - creates a new MMP file at the bottom of the Component list.
              • +
              • Add Existing MMP File - imports a MMP file at the bottom of the Component list.
              • +
              • Add Existing Makefile - adds a make file to the bottom of the Component list.
              • +
              • Edit - Select a component and click Edit to apply the Tidy attribute or specify the Build as ARM option.
              • +
              • Open - Select a component and click Open to open the component in an editor window.
              • +
              • Up - Select a component and click Up to move the component up in the list.
              • +
              • Down - Select a component and click Down to move the component down in the list.
              • +
              • Remove - Select a component and click Remove to remove the component from the build process.
              • +
              +

              + Test Components +

              +

              + Create, import, edit, open, move, or remove MMP and make files that are part of a test build process.

              +
              Other references
              + + + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/MBMEditor.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/MBMEditor.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/MBMEditor.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,110 +1,110 @@ - -MBM Editor - - - -

              MBM Editor

              - -

              - The MBM Editor allows you to specify the bitmaps that - should be included in a Symbian OS multi-bitmap (MBM) file. Use of MBM files for general purpose graphics is restricted to using .bmp files and works for versions 2.x and later releases of the Symbian OS SDKs. For more - information, see MBM File and Creating a MBM File.

              -

              - The MBM Editor is shown when an MBM file is - opened for editing:

              -

              -

              Figure 1 - MBM Editor

              -
              Table 1. MBM Editor —Items
              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              ItemExplanation
              Target File

              Specifies the EPOCROOT relative path for the compiled images. Click the Default button to set the target file based on the SDK and project name.

              Header File Shows the generated header file. Select the Header option in the Header Generation group to create a default .mbg file. The path cannot be edited in this field.
              Header Generation

              Options include:

              -
                -
              • No header - If selected, no .mbg header will be generated.
              • -
              • Header - If selected, a .mbg header will be generated.
              • -
              UpSelect an image in the list and click Up to move the selection one position up in the list.
              Down

              Select an image in the list and click Down to move the selection one position down in the list.

              Pair Image and Mask Select two adjacent unpaired BMP image entries in the list and click this button to combine the images together into image/mask pairs.
              Split Image and Mask Select a paired BMP image in the list and click this button to split the image into image and mask entries.
              Swap Image and Mask Select a paired BMP image in the list and click this button to swap the image and mask files and format information in paired image entries.
              Add From Project Click this button to open an Add Images from Project dialog to reference available images in the project.
              Add From FilesystemClick this button to open an Add Images From Filesystem dialog to locate and reference existing images in the filesystem or copy images to the project.
              RemoveSelect an image and click Remove to remove image entry from the list. This does not delete file from directory.
              Color depth Select the bit depth used to encode the image at build time.
              Mask depth

              Select the bit depth used to encode the mask at build time. Options include:

              -
                -
              • n/a - Do not apply mask depth to images
              • -
              • 1 - A 1-bit mask treats pixels as "on/off" bits, where black is opaque and white is transparent.
              • -
              • 8 - An 8-bit mask is treated as alpha values, where black is transparent and white is opaque.
              • -
              Color format Select Color to encode the image(s) as color or select Grayscale to encode the image(s) as grayscale.
              Set from image Click this button to auto-detect the image depth, mask depth, and color/grayscale setting from the image contents.
              PreviewA preview of the image as it will appear at runtime.
              -
              Related concepts
              - - -
              Related tasks
              - - - - - + +MBM Editor + + + +

              MBM Editor

              + +

              + The MBM Editor allows you to specify the bitmaps that + should be included in a Symbian OS multi-bitmap (MBM) file. Use of MBM files for general purpose graphics is restricted to using .bmp files and works for versions 2.x and later releases of the Symbian OS SDKs. For more + information, see MBM File and Creating a MBM File.

              +

              + The MBM Editor is shown when an MBM file is + opened for editing:

              +

              Edit MBM Contents window

              +

              Figure 1 - MBM Editor

              +
              Table 1. MBM Editor —Items
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              ItemExplanation
              Target File

              Specifies the EPOCROOT relative path for the compiled images. Click the Default button to set the target file based on the SDK and project name.

              Header File Shows the generated header file. Select the Header option in the Header Generation group to create a default .mbg file. The path cannot be edited in this field.
              Header Generation

              Options include:

              +
                +
              • No header - If selected, no .mbg header will be generated.
              • +
              • Header - If selected, a .mbg header will be generated.
              • +
              UpSelect an image in the list and click Up to move the selection one position up in the list.
              Down

              Select an image in the list and click Down to move the selection one position down in the list.

              Pair Image and Mask Select two adjacent unpaired BMP image entries in the list and click this button to combine the images together into image/mask pairs.
              Split Image and Mask Select a paired BMP image in the list and click this button to split the image into image and mask entries.
              Swap Image and Mask Select a paired BMP image in the list and click this button to swap the image and mask files and format information in paired image entries.
              Add From Project Click this button to open an Add Images from Project dialog to reference available images in the project.
              Add From FilesystemClick this button to open an Add Images From Filesystem dialog to locate and reference existing images in the filesystem or copy images to the project.
              RemoveSelect an image and click Remove to remove image entry from the list. This does not delete file from directory.
              Color depth Select the bit depth used to encode the image at build time.
              Mask depth

              Select the bit depth used to encode the mask at build time. Options include:

              +
                +
              • n/a - Do not apply mask depth to images
              • +
              • 1 - A 1-bit mask treats pixels as "on/off" bits, where black is opaque and white is transparent.
              • +
              • 8 - An 8-bit mask is treated as alpha values, where black is transparent and white is opaque.
              • +
              Color format Select Color to encode the image(s) as color or select Grayscale to encode the image(s) as grayscale.
              Set from image Click this button to auto-detect the image depth, mask depth, and color/grayscale setting from the image contents.
              PreviewA preview of the image as it will appear at runtime.
              +
              Related concepts
              + + +
              Related tasks
              + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor.html Wed Jul 21 12:11:48 2010 -0500 @@ -7,34 +7,25 @@

              MMP Editor

              - The MMP Editor allows you to view and modify your project definitions. Changes made in the MMP editor are automatically written to the project's .MMP file. You can view the .mmp file by selecting the project_name.mmp tab located along the bottom of the MMP editor.

              + The MMP Editor Overview tab allows you to view and modify your project definitions. Changes made in the MMP editor are automatically written to the project's .MMP file. You can view the .mmp file by selecting the project_name.mmp tab located along the bottom of the MMP editor.

              The MMP Editor is shown when an MMP file is - opened from the Project Explorer, C/C++ Projects, or Symbian Project Navigator views. The MMP Editor is shown in Figure 1. MMP editor fields are validated for existing or correct entries. For example, if the UID 2 field is blank the label is highlighted in red. If an error exists in the mmp file, the line where the error occurs is marked and also displayed in the Problems view.

              -

              -

              Figure 1 - MMP Editor

              + opened from the Project Explorer or Symbian Project Navigator views. The MMP Editor is shown in Figure 1. MMP editor fields are validated for existing or correct entries. For example, if the UID 2 field is blank the label is highlighted in red. If an error exists in the mmp file, the line where the error occurs is marked and also displayed in the Problems view.

              +

              +

              Figure 1 - MMP Editor Overview tab

              - + + + + + + Project definition

              NameFunction
              +
              NameFunction

              Target name

              - Enter the name of the target file. -

              + Enter the name of the target file.

              - Target type -

              + Target type

              Select the type of target file from the dropdown list.

              - Target path -

              -

              - Enter the path to the target file. -

              -

              - UID 2 -

              + UID 2

              UID 2 is a unique identifier number that identifies the type of interface that the project implements. The values are defined by Symbian:

              • For GUI applications, it is always 0x100039CE
              • @@ -43,23 +34,20 @@

              - UID 3 -

              -

              - Application UID (or UID3) is used to uniquely identify the binary (EXE or DLL) within the system. The purpose of UID 3 is to prevent one executable from interfering the operation of another executable.

              -

              - Project definition -

              + UID 3

              - The Project definition group provides links to the Sources, Libraries, and Options windows. You can also select the Sources, Libraries, and Options tabs to open the related window.

              -

              - Common tasks -

              + Application UID (or UID3) is used to uniquely identify the binary (EXE or DLL) within the system. The purpose of UID 3 is to prevent one executable from interfering the operation of another executable.

              Common tasks

              This group provides links to the User and System include path options located in the Options window.

              - This group provides links to the User and System include path options located in the Options window. -

              +

              + The Project definition group provides links to the Sources, Libraries, and Options windows. You can also select the Sources, Libraries, and Options tabs to open the related window.

              -

              Any changes made to the MMP file either in Carbide or using an external editor are detected. If the build is for emulation, these changes are detected and used automatically.

              +

              Any changes made to the MMP file either in Carbide or using an external editor are detected. If the build is for emulation, these changes are detected and used automatically.

              For other build types like GCCE you are presented with the Modified MMP Files Detected dialog (Figure 2) and asked which build action to take for each MMP file that has changed. Set the build option for each listed MMP file and click OK.

              Figure 2 - Modified MMP Files Detected dialog

              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor_libraries.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor_libraries.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor_libraries.html Wed Jul 21 12:11:48 2010 -0500 @@ -8,7 +8,7 @@

              The MMP editor libraries window lists the libraries used by the currently selected build configuration in the selected project. The MMP editor libraries window is shown in Figure 1. Click on a library group to expand the list of libraries and show the related control buttons. You can add, remove or edit the list of libraries for each group. You can also move libraries up or down in the list.

              -

              +

              Figure 1 - MMP Editor Libraries window

              MMP Editor MMP File - +

              MMP File Window

              - The MMP file tab in the MMP editor window shows the source text of the mmp file. Changes made directly in the mmp file are reflected in related tabs of the MMP editor and changes made in editor tabs are written to the mmp file. Errors are identified in red and markers are placed in mmp files at the locations errors exist.

              -

              + The MMP file tab in the MMP editor window shows the source text of the mmp file. Changes made directly in the mmp file are reflected in related tabs of the MMP editor and changes made in editor tabs are written to the mmp file. Errors are identified in red and markers are placed in mmp files at the locations errors exist.

              +

              Figure 1 - MMP Editor MMP File

              Related references
              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor_options.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor_options.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/MMP_Editor_options.html Wed Jul 21 12:11:48 2010 -0500 @@ -8,7 +8,7 @@

              The MMP editor options window allows you to edit compiler, linker, and runtime settings. The MMP editor options window is shown in Figure 1.

              -

              +

              Figure 1 - MMP Editor Options window

              The MMP editor sources window lists the C++ and resource files that you can select to be compiled. The MMP editor sources window is shown in Figure 1.

              -

              +

              Figure 1 - MMP Editor Sources window

              - + + + + + + + - - - - + Add, remove, or edit resources, bitmaps, and languages to compile with your project.

              NameFunction
              +
              NameFunction

              C/C++ sources

              - Select the C/C++ files to be compiled with your project.

              -

              - Resources

              + Select the C/C++ files to be compiled with your project.

              Missing C/C++ sourcesShows a list of missing source files referenced by project MMP files.
              +

              + Resources

              - Add, remove, or edit resources, bitmaps, languages, and AIF files to be compiled with your project.

              Missing C/C++ sourcesShows a list of missing source files referenced by project MMP files.
              Related references
    -

    New Class Wizard

    +

    New C++ Class Wizard

    - The New Class wizard allows a developer to add a new C++ class to + The New C++ Class wizard allows a developer to add a new C++ class to existing or new header and source files. This wizard is supplied by the C/C++ Development Toolkit (CDT), and is not customised for Symbian OS development. However, as it is not currently described in the C/C++ Development Toolkit User Guide, you may find this extra information about it useful.

    -

    See Adding a Symbian OS Class for information on adding Symbian-based classes to a project.

    +

    See Adding a Symbian OS Class for information on adding Symbian-based classes to a project.

    - To invoke the wizard, click File > New > Class from the menu bar. The New Class wizard appears.

    -
    + To invoke the wizard, click File > New > Class from the menu bar. The New C++ Class window appears.

    +
    -

    +

    - -
    NameFunction
    +
    NameFunction

    Source Folder

    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/NewMMP_wizard.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/NewMMP_wizard.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/NewMMP_wizard.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,13 +1,13 @@ -Symbian OS MMP File +New Symbian OS MMP File -

    Symbian OS MMP File

    +

    New Symbian OS MMP File

    - Use the Symbian OS MMP File wizard (figure 1) to create a new MMP project file for the currently selected project. Symbian projects are defined by an .mmp file which specifies the essential elements of the project. All details of the project lifecycle are handled by the IDE. There is no editable makefile the user can edit to modify the build behavior of the project.

    + Use the Symbian OS MMP File wizard (figure 1) to create a new MMP project file for the currently selected project. Symbian projects are defined by an .mmp file which specifies the essential project elements of a Symbian OS project. All details of the project lifecycle are handled by the IDE. There is no editable makefile the user can edit to modify the build behavior of the project.

    Creating a New Symbian OS MMP File

      @@ -16,7 +16,7 @@
    1. Select the File > New > Other... menu item (Figure 1)
    2. -

      +

      Figure 1 - Select a wizard page in the New window

      OR

      @@ -25,7 +25,7 @@
      -

      +

      Figure 2 - MMP File page in the New MMP File window

    3. On the Select the wizard page, select Symbian OS > Symbian OS MMP File, then click Next (Figure 1)
    4. diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectDirectories.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectDirectories.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectDirectories.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,61 +1,61 @@ - -Project Directories in New Project Wizard - - - -
      -

      Project Directories

      -
      - -

      - You can specify the name of the project directories, where the project - files are to be stored. -

      -
      - -

      -

      Figure 1 - Project Directories page

      -
      - - - - - - - - - - - - - - - - - -
      NameFunction
      -

      - Include -

      -

      - Specifies the name of the include folder, where all the header - files for the project are located. -

      -

      - Source -

      -

      - Specifies the name of the source folder, where all the source files - for the project are located. -

      GroupSpecifies the name of the group folder, where all the group files for the project are located.
      DataSpecifies the name of the data folder, where all the data files for the project are located.
      InstallSpecifies the name of the Install folder, where all the .sis files for the project are located.
      GraphicsSpecifies the name of the graphics folder, where all the graphic files for the project are located.
      -
      -
      Related tasks
      - - - - - + +Project Directories in New Project Wizard + + + +
      +

      Project Directories

      +
      + +

      + You can specify the name of the project directories, where the project + files are to be stored. +

      +
      + +

      +

      Figure 1 - Project Directories page

      +
      + + + + + + + + + + + + + + + + + +
      NameFunction
      +

      + Include +

      +

      + Specifies the name of the include folder, where all the header + files for the project are located. +

      +

      + Source +

      +

      + Specifies the name of the source folder, where all the source files + for the project are located. +

      GroupSpecifies the name of the group folder, where all the group files for the project are located.
      DataSpecifies the name of the data folder, where all the data files for the project are located.
      InstallSpecifies the name of the Install folder, where all the .sis files for the project are located.
      GraphicsSpecifies the name of the graphics folder, where all the graphic files for the project are located.
      +
      +
      Related tasks
      + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectNameAndLocation.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectNameAndLocation.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectNameAndLocation.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,44 +1,44 @@ - -Name and Location - - - -
      -

      Name and Location

      -
      -

      - You can specify the name of the class and where the generated source and header - files are to be stored. -

      - -

      -

      Figure 1 - Name and Location page

      -
      Table 1 - Name and Locations page options
      - - - - - - - - - - - - - - - -
      NameFunction
      -

      - Class name

      -

      Class name to create.

      Use defaultCheckmark to use the suggested default names, or uncheck to customize the names.
      -

      - Source

      -

      Specify directory to store source information.

      IncludeSpecify directory to store header information.
      Force files to lowercaseCheckmark to force all filenames to use lowercase letters. Uncheck to use mixed case.
      - - - - + +Name and Location + + + +
      +

      Name and Location

      +
      +

      + You can specify the name of the class and where the generated source and header + files are to be stored. +

      + +

      +

      Figure 1 - Name and Location page

      +
      Table 1 - Name and Locations page options
      + + + + + + + + + + + + + + + +
      NameFunction
      +

      + Class name

      +

      Class name to create.

      Use defaultCheckmark to use the suggested default names, or uncheck to customize the names.
      +

      + Source

      +

      Specify directory to store source information.

      IncludeSpecify directory to store header information.
      Force files to lowercaseCheckmark to force all filenames to use lowercase letters. Uncheck to use mixed case.
      + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectPreferences.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectPreferences.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/ProjectPreferences.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,27 +1,25 @@ Project and File Properties - - +

      C/C++ Project and File Properties

      - The Properties window allows you to change the general - settings for a project and individual files.

      + TheProperties for <project_name> window allows you to change a project's build configurations, macros, and other project settings.

      - To change the settings for a project, right-click the project from the Project Explorer, C/C++ Project, or Symbian Project Navigator views, and choose Properties from the context menu. The Properties for <project_name> window will then show all the project settings. If + To change the settings for a project, right-click the project from the Project Explorer or Symbian Project Navigator views, and choose Properties from the context menu. The Properties for <project_name> window then show all the project settings. If you alter the settings, then the settings are applied as defaults for all files in the project.

      -

      The Carbide.c++ panels include:

      +

      The Carbide.c++ panels include:

      -

      +

      Figure 1. Project for project_name dialog

      To change the settings only for a particular file, right-click the file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/add_from_filesys.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/add_from_filesys.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/add_from_filesys.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,55 +1,55 @@ - - -MBM/MIF Editor - - - - -

      Add Images From Filesystem

      - -

      The Add Images from Filesystem dialog allows you to search for and add images currently available in the filesystem. Select an image and click OK to add the image.

      -

      NOTE Information displayed under Help group will vary slightly depending upon whether this dialog was called from a MBM, MIF, or AIF editor.

      -

      -

      Figure 1 - Add Images from Filesystem

      -
      Table 1. Add Images—Items
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ItemExplanation
      Directory

      Browse to the directory containing images you want to add.

      Available directory images Shows the images found in the directory. Select images to be added.
      Detected image pairs

      Lists the selected images and detected image pairs.

      -
      Copy images into project Enable this option to make a copy of selected images in the selected project location.
      Overwrite existing

      Enable this option to overwrite existing images with the same name.

      Project location Click the Choose... button to display the Select a folder dialog, then select a project folder to store the images.
      -
      Other references
      - - - - - + + +MBM/MIF Editor + + + + +

      Add Images From Filesystem

      + +

      The Add Images from Filesystem dialog allows you to search for and add images currently available in the filesystem. Select an image and click OK to add the image.

      +

      NOTE Information displayed under Help group will vary slightly depending upon whether this dialog was called from a MBM or MIF editor.

      +

      +

      Figure 1 - Add Images from Filesystem

      +
      Table 1. Add Images—Items
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ItemExplanation
      Directory

      Browse to the directory containing images you want to add.

      Available directory images Shows the images found in the directory. Select images to be added.
      Detected image pairs

      Lists the selected images and detected image pairs.

      +
      Copy images into project Enable this option to make a copy of selected images in the selected project location.
      Overwrite existing

      Enable this option to overwrite existing images with the same name.

      Project location Click the Choose... button to display the Select a folder dialog, then select a project folder to store the images.
      +
      Other references
      + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/add_from_project.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/add_from_project.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/add_from_project.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,23 @@ - - -MBM/MIF Editor - - - - -

      Add Images From Project

      - -

      The Add Images from Project dialog allows you to add images currently available in the project. Select an image and click OK to add the image.

      -

      NOTE Information displayed under Help group will vary slightly depending upon whether this dialog was called from a MBM, MIF, or AIF editor.

      -

      -

      Figure 1 - Add Images from Project

      -
      Other references
      - - - - - + + +MBM/MIF Editor + + + + +

      Add Images From Project

      + +

      The Add Images from Project dialog allows you to add images currently included in the project. Select one or more images and click OK to add the image to the MMP file.

      +

      NOTE Information displayed under Help group will vary slightly depending upon whether this dialog was called from a MBM or MIF editor.

      +

      +

      Figure 1 - Add Images from Project

      +
      Other references
      + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,62 +1,62 @@ - - - - - - - -Carbide Build Configurations - - - -

      Carbide Build Configurations

      -

      Use the Carbide Build Configurations panel to specify the project's active build configuration and its related build properties.

      -

      -

      Figure 1 - Carbide Build Configurations panel

      -
      Table 1 Carbide Build Configuration items
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ItemExplanation
      Active Configuration The Active Configuration drop down list allows you to select a configuration that is currently available for the selected project. The entries in the related sub-panes will change according to the selected configuration. The Configuration name consists of a target name and an SDK identifier in brackets.
      Manage...Click the Manage... button to add a new SDK/Configuration or remove an existing configuration.
      SIS Builder

      The SIS Builder pane is used to specify a .pkg file and .sis file options to create an application .sis file. These settings apply to the currently selected Configuration.

      SBSv2The SBSv2 pane is used to define which build configuration variant to use.
      Environment

      The Environment tab allows you to view the current User and System environment variables that will be used when any abld command is invoked.

      Paths and Symbols The Paths and Symbols tab allows you to see which paths and symbols have been indexed for the project.
      ROM Builder The ROM Builder tab allows you to specify commands and a working directory for building a GUI ROM Image.
      -
      Other references
      - - - - + + + + + + + +Build Configurations + + + +

      Build Configurations

      +

      Use the Build Configurations panel to specify the project's active build configuration and its related build properties.

      +

      +

      Figure 1 - Carbide Build Configurations panel

      +
      Table 1 Build Configuration items
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ItemExplanation
      Active Configuration The Active Configuration drop down list allows you to select a configuration that is currently available for the selected project. The entries in the related sub-panes will change according to the selected configuration. The Configuration name consists of a target name and an SDK identifier in brackets.
      Manage...Click the Manage... button to add a new SDK/Configuration or remove an existing configuration.
      SIS Builder

      The SIS Builder pane is used to specify a .pkg file and .sis file options to create an application .sis file. These settings apply to the currently selected Configuration.

      SBSv2The SBSv2 pane is used to define which build configuration variant to use.
      Environment

      The Environment tab allows you to view the current User and System environment variables that will be used when any abld command is invoked.

      Paths and Symbols The Paths and Symbols tab allows you to see which paths and symbols have been indexed for the project.
      ROM Builder The ROM Builder tab allows you to specify commands and a working directory for building a GUI ROM Image.
      +
      Other references
      + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_args.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_args.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_args.htm Wed Jul 21 12:11:48 2010 -0500 @@ -33,7 +33,7 @@
    Other references
      -
    • Carbide Build Configurations
    • +
    • Build Configurations
    • SIS Builder
    • Environment
    • Paths and Symbols
    • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_env.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_env.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_env.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,63 +1,63 @@ - - - - - - - -Environment Variables - - - -

      Environment Variables

      -

      The Environment Variables pane allows you to view the current User and System environment variables that will be used when any abld command is invoked. User variables are modified or added when a process is invoked. Read only system variables are listed. Variables and values in bold are items that have been modified from their default values.

      -

      Some variables have special meaning, including:

      -
        -
      • PATH — will always place "${EPOCROOT}\epoc32\tools;${EPOCROOT}\epoc32\gcc\bin;" at the front of the PATH regardless of what it is changed to
      • -
      • PATH, EPOCROOT, and *MW variables — cannot be undefined as they are required for system builds
      • -
      -

      -

      Figure 1 - Environment Variables

      -
      Table 1 Environment variable items
      - - - - - - - - - - - - - - - - - - - - - -
      ItemExplanation
      NewClick to add a new environment variable. You must specify a name and a value.
      EditAllows you to edit the name and value of an environment variable.
      Undefine

      Undefines the selected variable so that it is not used during a build.

      -

      NOTE Some variables, like PATH, EPOCROOT, and those beginning with MW* have special meaning and cannot be undefined.

      Variable use

      Shows the use for the selected variable. Uses include:

      -
        -
      • Default – Take the variable as-is from the system, do not modify it.
      • -
      • Append – Add the value displayed to the end of the existing variable (the existing variable name is not displayed.
      • -
      • Prepend – Add the value displayed to the front of the existing variable (the existing variable name is not displayed.
      • -
      • Replace – Replace the value displayed with the existing variable.
      • -
      • Undefine – Not used during a build
      • -
      -
      Other references
      - - - - + + + + + + + +Environment Variables + + + +

      Environment Variables

      +

      The Environment Variables pane allows you to view the current User and System environment variables that will be used when any abld command is invoked. User variables are modified or added when a process is invoked. Read only system variables are listed. Variables and values in bold are items that have been modified from their default values.

      +

      Some variables have special meaning, including:

      +
        +
      • PATH — will always place "${EPOCROOT}\epoc32\tools;${EPOCROOT}\epoc32\gcc\bin;" at the front of the PATH regardless of what it is changed to
      • +
      • PATH, EPOCROOT, and *MW variables — cannot be undefined as they are required for system builds
      • +
      +

      +

      Figure 1 - Environment Variables

      +
      Table 1 Environment variable items
      + + + + + + + + + + + + + + + + + + + + + +
      ItemExplanation
      NewClick to add a new environment variable. You must specify a name and a value.
      EditAllows you to edit the name and value of an environment variable.
      Undefine

      Undefines the selected variable so that it is not used during a build.

      +

      NOTE Some variables, like PATH, EPOCROOT, and those beginning with MW* have special meaning and cannot be undefined.

      Variable use

      Shows the use for the selected variable. Uses include:

      +
        +
      • Default – Take the variable as-is from the system, do not modify it.
      • +
      • Append – Add the value displayed to the end of the existing variable (the existing variable name is not displayed.
      • +
      • Prepend – Add the value displayed to the front of the existing variable (the existing variable name is not displayed.
      • +
      • Replace – Replace the value displayed with the existing variable.
      • +
      • Undefine – Not used during a build
      • +
      +
      Other references
      + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_paths.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_paths.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_build_config_paths.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,34 +1,34 @@ - - - - - - - -Paths and Symbols - - - -

      Paths and Symbols

      -

      The Paths and Symbols pane shows the paths and symbols used to the build the project index. This is a read-only list based on the setting of the Build configuration for the indexer option in the C/C++ General > Indexer panel. Carbide now caches the paths and symbols which persist between debug sessions. If any of the files like bld.inf, MMP, or any of their include files change, the list is automatically recalculated and CDT notified.

      -

      To change what appears in the list:

      - -

      You can also specify a macro file using the Carbide Macro Settings page in the Properties for project dialog.

      -

      -

      Figure 1 - Paths and Symbols pane

      -
      Other references
      - - - - + + + + + + + +Paths and Symbols + + + +

      Paths and Symbols

      +

      The Paths and Symbols pane shows the paths and symbols used to the build the project index. This is a read-only list based on the setting of the Build configuration for the indexer option in the C/C++ General > Indexer panel. Carbide now caches the paths and symbols which persist between debug sessions. If any of the files like bld.inf, MMP, or any of their include files change, the list is automatically recalculated and CDT notified.

      +

      To change what appears in the list:

      + +

      You can also specify a macro file using the Macro Settings page in the Properties for project dialog.

      +

      +

      Figure 1 - Paths and Symbols pane

      +
      Other references
      + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_macro_settings.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_macro_settings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_macro_settings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -4,19 +4,19 @@ -Carbide Macro Settings +Macro Settings -

      Carbide Macro Settings

      -

      The Carbide Macro Settings properties page allows you to specify a file containing macros that CDT will use when parsing the source code.

      -

      -

      Figure 1 - Carbide Macros Settings panel

      -
      Table 1 Carbide Macros Settings items
      - +

      Macro Settings

      +

      The Macro Settings properties page allows you to specify a file containing macros that CDT uses to parse the source code.

      +

      +

      Figure 1 - Macros Settings panel

      +
      Table 1 Macros Settings items
      +
      - - + + @@ -34,8 +34,7 @@
      Related references
      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_pkg_config.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_pkg_config.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_pkg_config.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,7 @@

      Set PKG File for Build Configuration

      -

      The Set PKG File for Build Configuration dialog appears when an Application TRK build configuration does not include a PKG file. Use it to assign a PKG file to the project's current build configuration that will be used to create a project's SIS installation file. If you define a launch configuration used for on-device debugging with the TRK debug agent, you will need to specify a PKG file for the project. A PKG file primarily provides a list of program and resource files to install on the device.

      +

      The Set PKG File for Build Configuration dialog appears when an Application TRK build configuration does not include a PKG file. Use it to assign a PKG file to the project's current build configuration that will be used to create a project's SIS installation file. If you define a launch configuration used for on-device debugging with the TRK debug agent, you will need to specify a PKG file for the project. A PKG file primarily provides a list of program and resource files to install on the device.

      Figure 1 - Set PKG File for Build Configuration

      Table 1 Items
      @@ -44,7 +44,7 @@
      Related reference
      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_project_settings.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_project_settings.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/pane_project_settings.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,126 +1,133 @@ - - - - - - -Carbide Project Settings - - - - -

      Carbide Project Settings

      -

      Use the Carbide Project Settings window to specify whether all components or selected subcomponents listed in a build information file (bld.inf) should be built for the currently selected project. You can also specify whether to perform a clean or reallyclean command on the project before building a project.

      -

      -

      Figure 1 - Carbide Project Settings

      -
      Table 1 Carbide Project Settings items
      -
      ItemExplanationItemExplanation
      Macro File
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ItemExplanation
      Bld.inf fileThis is the path to the bld.inf file that lists the makefile and mmp components.
      Bld.infSelect this option to ensure all components are built for the selected project.
      Selected Components

      Select this option to specify which components of the bld.inf file to be built, including makefiles. The equivalent call to abld is abld build <subcomponent>. Use the Exclude extension makefiles and Exclude test components options to manage the items that appear in the list.

      -

      Toggle the state of each component to set its build state to true or not. A checkmark indicates a component is built. Click on a column title to sort the items by that columns contents.

      -
      Exclude extension makefiles Toggles the presense of extension makefiles in the Selected components list.
      Exclude test components Toggles the presense of test components in the Selected components list.
      Enable project specific settings Click to set project specific build settings. By default a project in the workspace uses the global build settings unless this option is enabled. See the Build preference panel for details on these options.
      Configure Workspace Settings... Opens the Build preference panel.
      -

       

      -

      sbsv1 tab

      -

      Figure 2 - SBSv1 Tab

      -
      Table 2 Symbian Build System v1 tab
      - - - - - - - - - - - - - - - - - - - - - -
      ItemExplanation
      Clean level

      Specifies the level of clean to perform on project files. The levels include:

      -
        -
      • Level 0 (abld clean) - removes all the intermediate files created during compilation, and all the executables and import libraries created by the linker
      • -
      • Level 1 (abld reallyclean) - performs a clean operation, but also removes all exported files and makefiles
      • -
      • Level 2 (abld reallyclean, bldmake clean) - performs a reallyclean operation and then removes all files created by bldmake
      • -
      Manage dependency tracking If checked, the Symbian command line build system will not generate dependencies for source and resource files. These will be managed by Carbide. This can reduce build times.
      Show a dialog to modify build actions when modified MMPs are detected

      If checked, you will be asked what action to take before a build if a MMP file has been modified.

      -

      If not checked, the default action is taken for all modified mmp files.

      Default action to take when mmp files are modified Select either None, Link only, or Compile and Link.
      -

       

      -

      sbsv2 tab

      -

      Figure 3 - SBSv2 Tab

      -
      Table 3 Symbian Build System v2 tab (only visible for Projects created with SBSv2 builder)
      - - - - - - - - - - - - - - - - - - - - - -
      ItemExplanation
      Clean level Select the level of clean when cleaning a project. -
        -
      • abld clean erases all files created by a corresponding abld target command (all intermediate files created during compilation and all executables and import libraries created by the linker)
      • -
      • abld reallyclean does what abld clean does, and also removes files exported by abld export and makefiles generated by abld makefile, or the abld test equivalents
      • -
      Keep going

      This build option tells a particular command to keep going even if unrelated build steps report errors or files are missing.

      Debug

      This option generates symbolic debug information for release or debug builds, independent of the compiler optimization level.

      -

      By default, the build system generates symbolic debug information only for the debug builds. With this option, the generation of symbolic debug information is extended to release builds to support debugging of release binaries on ARM ABI compliant platforms.

      Override default make engine Check this box to enable an edit box to specify the make engine to use, for example, eMake from Electric Cloud.
      -

       

      -

      Related tasks

      - - - + + + + + + +Project Settings + + + + +

      Project Settings

      +

      Use the Project Settings window to specify whether all components or selected subcomponents listed in a build information file (bld.inf) should be built for the currently selected project. You can also specify whether to perform a clean or reallyclean command on the project before building a project.

      +

      +

      Figure 1 - Project Settings

      +
      Table 1 Project Settings items
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ItemExplanation
      Bld.inf fileThis is the path to the bld.inf file that lists the makefile and mmp components.
      Bld.infSelect this option to ensure all components are built for the selected project.
      Selected Components

      Select this option to specify which components of the bld.inf file to be built, including makefiles. The equivalent call to abld is abld build <subcomponent>. Use the Exclude extension makefiles and Exclude test components options to manage the items that appear in the list.

      +

      Toggle the state of each component to set its build state to true or not. A checkmark indicates a component is built. Click on a column title to sort the items by that columns contents.

      +
      Exclude extension makefiles Toggles the presense of extension makefiles in the Selected components list.
      Exclude test components Toggles the presense of test components in the Selected components list.
      Enable project specific settings Click to set project specific build settings. By default a project in the workspace uses the global build settings unless this option is enabled. See the Build preference panel for details on these options.
      Configure Workspace Settings... Opens the Build preference panel.
      +

       

      +

      sbsv1 tab

      +

      Figure 2 - SBSv1 Tab

      +
      Table 2 Symbian Build System v1 tab
      + + + + + + + + + + + + + + + + + + + + + +
      ItemExplanation
      Clean level

      Specifies the level of clean to perform on project files. The levels include:

      +
        +
      • Level 0 (abld clean) - removes all the intermediate files created during compilation, and all the executables and import libraries created by the linker
      • +
      • Level 1 (abld reallyclean) - performs a clean operation, but also removes all exported files and makefiles
      • +
      • Level 2 (abld reallyclean, bldmake clean) - performs a reallyclean operation and then removes all files created by bldmake
      • +
      Manage dependency tracking If checked, the Symbian command line build system will not generate dependencies for source and resource files. These will be managed by Carbide. This can reduce build times.
      Show a dialog to modify build actions when modified MMPs are detected

      If checked, you will be asked what action to take before a build if a MMP file has been modified.

      +

      If not checked, the default action is taken for all modified mmp files.

      Default action to take when mmp files are modified Select either None, Link only, or Compile and Link.
      +

       

      +

      sbsv2 tab

      +

      Figure 3 - SBSv2 Tab

      +
      Table 3 Symbian Build System v2 tab (only visible for Projects created with SBSv2 builder)
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ItemExplanation
      Clean level Select the level of clean when cleaning a project. +
        +
      • abld clean erases all files created by a corresponding abld target command (all intermediate files created during compilation and all executables and import libraries created by the linker)
      • +
      • abld reallyclean does what abld clean does, and also removes files exported by abld export and makefiles generated by abld makefile, or the abld test equivalents
      • +
      Keep going

      This build option tells a particular command to keep going even if unrelated build steps report errors or files are missing.

      Debug mode

      This option generates symbolic debug information for release or debug builds, independent of the compiler optimization level.

      +

      By default, the build system generates symbolic debug information only for the debug builds. With this option, the generation of symbolic debug information is extended to release builds to support debugging of release binaries on ARM ABI compliant platforms.

      Additional SBSv2 argumentsEnter any additional arguments to pass to sbs.bat.
      Override default make engine Check this box to enable an edit box to specify the Make engine to use, for example, eMake from Electric Cloud.
      Make engineEnter the name of a different make engine to use when building.
      +

      Related tasks

      + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/wnd_sis_properties.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/wnd_sis_properties.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/build_properties/wnd_sis_properties.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,60 +1,60 @@ - - - - - - -SIS Properties - - - -

      SIS Properties

      -

      Use the SIS Properties dialog to specify SIS file creation and signing options for the selected SIS file included in the project.

      -

      -

      Figure 1 - SIS Properties dialog

      -
      Table 1 SIS Properties window items
      - - - - - - - - - - - - - -
      ItemExplanation
      SIS File Creation Options

      Define the SIS file created:

      -
        -
      • PKG File — name of the PKG file to build. Click Browse to locate or else type in the file path and name.
      • -
      • Output File Name — unsigned file name that is generated from the PKG file selected
      • -
      • Content Search Location — root location where PKG files are specified to search
      • -
      • Generate partial upgrade when appropriate — enable to create package update files that only contain files changed since the last build
      • -
      Signing Options

      Defines the signing options applied to the configuration. The options include:

      -
        -
      • Don't sign sis file — builds sis file without signing it
      • -
      • Self sign sis file — signs the sis file without specifying the certificate/key pair
      • -
      • Sign sis file with certificate/key pair — signs the sis file using the specified certificate/key pair
      • -
      -

      Enter the required information into the enabled fields based on the signing option selected above:

      -
        -
      • Signed SIS File Name —Final output signed file name. Default is input PKG name with ‘sisx’ extension.
      • -
      • Password — Optional password
      • -
      • Additional options — Enter unfiltered options to be passed to the tool
      • -
      • Certificate – Enter or browse to certificate
      • -
      • Key — Enter or browse to key
      • -
      -

      NOTE On Symbian OS 9.x builds, if the key/cert pair are not defined, makekeys will be called and temporary ones will be generated for you to "self-sign" the application. Self-signed applications should be in the - 0xE0000000-0xEFFFFFFF range.

      -

      NOTE All Application TRK build configuration require a PKG file. If none is found in the active project then you will be asked to choose one.

      -
      Related reference
      - - - - + + + + + + +SIS Properties + + + +

      SIS Properties

      +

      Use the SIS Properties dialog to specify SIS file creation and signing options for the selected SIS file included in the project.

      +

      +

      Figure 1 - SIS Properties dialog

      +
      Table 1 SIS Properties window items
      + + + + + + + + + + + + + +
      ItemExplanation
      SIS File Creation Options

      Define the SIS file created:

      +
        +
      • PKG File — name of the PKG file to build. Click Browse to locate or else type in the file path and name.
      • +
      • Output File Name — unsigned file name that is generated from the PKG file selected
      • +
      • Content Search Location — root location where PKG files are specified to search
      • +
      • Generate partial upgrade when appropriate — enable to create package update files that only contain files changed since the last build
      • +
      Signing Options

      Defines the signing options applied to the configuration. The options include:

      +
        +
      • Don't sign sis file — builds sis file without signing it
      • +
      • Self sign sis file — signs the sis file without specifying the certificate/key pair
      • +
      • Sign sis file with certificate/key pair — signs the sis file using the specified certificate/key pair
      • +
      +

      Enter the required information into the enabled fields based on the signing option selected above:

      +
        +
      • Signed SIS File Name —Final output signed file name. Default is input PKG name with ‘sisx’ extension.
      • +
      • Password — Optional password
      • +
      • Additional options — Enter unfiltered options to be passed to the tool
      • +
      • Certificate – Enter or browse to certificate
      • +
      • Key — Enter or browse to key
      • +
      +

      NOTE On Symbian OS 9.x builds, if the key/cert pair are not defined, makekeys will be called and temporary ones will be generated for you to "self-sign" the application. Self-signed applications should be in the + 0xE0000000-0xEFFFFFFF range.

      +

      NOTE All Application TRK build configuration require a PKG file. If none is found in the active project then you will be asked to choose one.

      +
      Related reference
      + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/MMP_wizard.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/MMP_wizard.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/MMP_wizard2.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/MMP_wizard2.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/add_images_from_filesys.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/add_images_from_filesys.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/add_images_from_project.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/add_images_from_project.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/build_all_targets.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/build_all_targets.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/build_pkg_file.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/build_pkg_file.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/build_symbian_comp.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/build_symbian_comp.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_build_config.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_build_config.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_macro_settings.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_macro_settings.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_preferences.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_preferences.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_proj_settings.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_proj_settings.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_proj_settings_sbsv1.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_proj_settings_sbsv1.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_proj_settings_sbsv2.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/carbide_proj_settings_sbsv2.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/clean_symbian_comp.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/clean_symbian_comp.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/codescanner_run.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/codescanner_run.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/context_menu_remote_conn_view.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/context_menu_remote_conn_view.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/icon_install_extensions.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/icon_install_extensions.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/icon_show_overview.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/icon_show_overview.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_03.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_03.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_04.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_04.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_05.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/import_bld_inf_05.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/leavescan_menu.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/leavescan_menu.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/leavescan_pref.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/leavescan_pref.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_abld.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_abld.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_compile_source.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_compile_source.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_freeze_exports.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_freeze_exports.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_freeze_symbian_comp.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_freeze_symbian_comp.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_mem_rendering_options.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_mem_rendering_options.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_memory_rendering_options.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_memory_rendering_options.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_abld.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_abld.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_compile.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_compile.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_compile_source.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_compile_source.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_freeze_comp.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_freeze_comp.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_freeze_exports.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_freeze_exports.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_preprocess.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_symb_preprocess.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_team_commands.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/menu_team_commands.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor_libraries.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor_libraries.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor_mmpfile.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor_mmpfile.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor_options.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor_options.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor_sources.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/mmp_editor_sources.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/pref_indexer.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/pref_indexer.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/pref_indexer_properties.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/pref_indexer_properties.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/pref_launch_config_filter.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/pref_launch_config_filter.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/prefs_carbide_cpp.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/prefs_carbide_cpp.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_carbide_portal.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_carbide_portal.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_install_extensions.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_install_extensions.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_memory.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_memory.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_project_explorer.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_project_explorer.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_remote_connections.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_remote_connections.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_show_overview_popup.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_show_overview_popup.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_sym_proj_nav.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_sym_proj_nav.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/wiz_new_class.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/wiz_new_class.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_edit_mbm_contents.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_edit_mbm_contents.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_new_connection_wizard_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_new_connection_wizard_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_new_connection_wizard_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_new_connection_wizard_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_new_connection_wizard_03.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_new_connection_wizard_03.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_pref_code_styles.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/wnd_pref_code_styles.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/indexer.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/indexer.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/indexer.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,67 +1,67 @@ - -Indexer - - - -

      Indexer

      -

      The C/C++ Indexer uses the parser to create a database of source and header files that provide the basis for C/C++ search, navigation features and content assist. The goal of indexing is to record all named elements in a project's source code and store them with their related data. The indexer parses each source file in your project and updates related indexes. By indexing your files with the indexer, useful features such as code completion and fast file search can be used. It is also possible to specify different indexer settings for each project in your workspace.

      -

      If you choose to perform the Full C/C++ Indexer option the indexer will consume the CPU for some time, but you will gain more benefit from the process after it completes. - However, if you do not require the benefits of indexing your project, select the No Indexer option to speed up the process of building your project.

      -

      The indexer runs on a background thread and reacts to resource change events such as:

      -
        -
      • C/C++ project creation/deletion
      • -
      • Source files creation/deletion
      • -
      • File imports
      • -
      • Source file content changes
      • -
      -

      The global Indexer is accessed by selecting Window > Preferences > C/C++ > Indexer (figure 1). The sections outlined in red appear as part of the project level indexer.

      -

      NOTE You can also rebuild a project's index by selecting a project, then right-click and select the Rebuild Index menu item.

      -

      -

      Figure 1 - Indexer Window in Preferences Panels

      -

      The project indexer is accessed by selecting a project in the Project Explorer or Symbian Project Navigator view and selecting Project > Properties > C/C++ General > Indexer (figure 2).

      -

      -

      Figure 2 - Indexer Window in Project Properties

      - - - - - - - - - - - - - - - - - - -
      NameFunction
      Select indexer

      Dropdown list of available index options.

      -
        -
      • Fast C/C++ Indexer - Source files will be indexed and eat up a lot of CPU time and memory during the first generation of the indexer. This can take some time depending on the size of your project. Afterwards the indexer will only reindex the relevant parts you changed in your code and not the whole source tree.
      • -
      • Full C/C++ Indexer - Performs a complete parse of all source files and takes up the most amount of time to complete.
      • -
      • No Indexer - Project source files are not indexed, therefore search features will not work accurately and code completion will not be available.
      • -
      Apply indexer to all projects now Select this option to apply the Fast C/C++ Indexer option to all projects in your current workspace.
      Rebuild the index when changing to a different build configuration Select this option to rescan and index the source files for the current project when you change the active build configuration. The index will be built based on the active build configuration. All macros and header files used to build the index will be taken from the active build configuration.

      Build the index only for the build configuration specified in the project's indexer settings

      -

       

      -

      Build the index only for the specified build configuration

      The indexer will only be run for the build configuration specified in the Indexer panel in the project's property settings. All macros and header files used to build the index will be taken from the specified configuration.

      -

       

      -

      NOTE This option appears in the project properties indexer panel. A dropdown list is provided to select a build configuration for the currently selected project.

      -

       

      -
      Related concepts
      - -
      Related tasks
      - - - - - + +Indexer + + + +

      Indexer

      +

      The C/C++ Indexer uses the parser to create a database of source and header files that provide the basis for C/C++ search, navigation features and content assist. The goal of indexing is to record all named elements in a project's source code and store them with their related data. The indexer parses each source file in your project and updates related indexes. By indexing your files with the indexer, useful features such as code completion and fast file search can be used. It is also possible to specify different indexer settings for each project in your workspace.

      +

      If you choose to perform the Full C/C++ Indexer option the indexer will consume the CPU for some time, but you will gain more benefit from the process after it completes. + However, if you do not require the benefits of indexing your project, select the No Indexer option to speed up the process of building your project.

      +

      The indexer runs on a background thread and reacts to resource change events such as:

      +
        +
      • C/C++ project creation/deletion
      • +
      • Source files creation/deletion
      • +
      • File imports
      • +
      • Source file content changes
      • +
      +

      The global Indexer is accessed by selecting Window > Preferences > C/C++ > Indexer (figure 1). The sections outlined in red appear as part of the project level indexer.

      +

      NOTE You can also rebuild a project's index by selecting a project, then right-click and select the Rebuild Index menu item.

      +

      Indexer preference panel

      +

      Figure 1 - C/C++ Indexer in Preferences

      +

      The project indexer is accessed by selecting a project in the Project Explorer or Symbian Project Navigator view and selecting Project > Properties > C/C++ General > Indexer (figure 2).

      +

      Indexer properties panel

      +

      Figure 2 - Indexer panel in Properties for project_name

      + + + + + + + + + + + + + + + + + + +
      NameFunction
      Select indexer

      Dropdown list of available index options.

      +
        +
      • Fast C/C++ Indexer - Source files will be indexed and eat up a lot of CPU time and memory during the first generation of the indexer. This can take some time depending on the size of your project. Afterwards the indexer will only reindex the relevant parts you changed in your code and not the whole source tree.
      • +
      • Full C/C++ Indexer - Performs a complete parse of all source files and takes up the most amount of time to complete.
      • +
      • No Indexer - Project source files are not indexed, therefore search features will not work accurately and code completion will not be available.
      • +
      Apply indexer to all projects now Select this option to apply the Fast C/C++ Indexer option to all projects in your current workspace.
      Rebuild the index when changing to a different build configuration Select this option to rescan and index the source files for the current project when you change the active build configuration. The index will be built based on the active build configuration. All macros and header files used to build the index will be taken from the active build configuration.

      Build the index only for the build configuration specified in the project's indexer settings

      +

       

      +

      Build the index only for the specified build configuration

      The indexer will only be run for the build configuration specified in the Indexer panel in the project's property settings. All macros and header files used to build the index will be taken from the specified configuration.

      +

       

      +

      NOTE This option appears in the project properties indexer panel. A dropdown list is provided to select a build configuration for the currently selected project.

      +

       

      +
      Related concepts
      + +
      Related tasks
      + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/launch_configuration_filter.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/launch_configuration_filter.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/launch_configuration_filter.htm Wed Jul 21 12:11:48 2010 -0500 @@ -5,12 +5,13 @@ Launch Configuration Filtering - +

      Launch Configuration Filtering

      -

      Use the Launch Configuration preference panel to filter the launch configurations that appear in the configurations list in the Run or Debug dialog. This allows you to manage which configuration types are shown. For example, enable the Filter checked launch configuration types option and check the configuration types that you do not want to appear in the Run and Debug dialogs. As shown in Figure 1, all the configurations related to TRK have been enabled and won't appear in the configurations list.

      -

      +

      Use the Launch Configuration preference panel to filter the launch configurations that appear in the configurations list in the Run or Debug window. This allows you to manage which configuration types are shown. By default, all launch configurations are shown. To open click the Windows > Preferences > Run/Debug > Launching > Launch Configurations option.

      +

      To hide specific launch configurations, enable the Filter checked launch configuration types option and check the configuration types that should be hidden in the Run and Debug dialogs. As shown in Figure 1, all the configurations checked and won't appear in the configurations list, including Snapshot Albums.

      +

      Launch Configurtion Filter preference panel

      Figure 1 - Launch Configurations preference panel

      Related references
        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/leavescan_pref.html --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/leavescan_pref.html Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - -Leavescan Preferences - - - - -

        Leavescan Preferences

        -

        Use the -Leavescan Preferences page in the Preferences window to define the location where the leavescan.exe program exists on the file system. Symbian OS has a standard convention for functions that may Leave. Therefore, any function that Leaves, or calls a function that Leaves (other than in a TRAP harness), must have a name ending in "L". Leavescan verifies that your code satisfies this convention.

        -

        Leavescan preferences panel

        -

        Figure 1. Leavescan preference page

        -
        Table 1. Leavescan Preferences —items
        -
        - - - - - - - - - - -
        NameFunction
        Leavescan Directory

        Enter or Browse to the directory where leavescan.exe resides. Leavescan.exe is normally found in the ${EPOCROOT}\epoc32\tools directory.

        -

        NOTE The path to the Leavescan directory should not contain space characters.

        Very noisy output

        If enabled, the -N option is passed to leavescan.exe and produces verbose output. If unchecked, minimal output is produced.

        -
        -
        Related Tasks
        - - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/memory_rendering_options.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/memory_rendering_options.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/memory_rendering_options.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,7 @@

        Memory Rendering Options

        -

        You can configure the Memory Rendering pane to display data in the memory location in a variety of ways. The following options are visible on the context menu for the Memory Rendering pane.

        +

        You can configure the Memory Rendering pane to display data in the memory location in a variety of ways. The following options are visible on the context menu for the Memory Rendering pane.

        Right-click to select an option shown in Table 1.

        Table 1. Memory Rendering context menu options
        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/abld.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/abld.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/abld.htm Wed Jul 21 12:11:48 2010 -0500 @@ -10,8 +10,8 @@

        ABLD Actions

        -

        Use the ABLD menu option to invoke an specific abld command on the selected project or file. ABLD is available under Project > ABLD or by right-clicking a project or file in the Project Explorer, Symbian Project Navigator, and Disassembly views and choosing ABLD > command. When executed any arguments specified in the Carbide Build Configurations pane for the command are passed to the selected tool.

        -

        +

        Use the ABLD menu option to invoke an specific abld command on the selected project or file. ABLD is available under Symbian Build > ABLD or by right-clicking a project or file in the Project Explorer, Symbian Project Navigator, and Disassembly views and choosing ABLD > command. When executed any arguments specified in the Carbide Build Configurations pane for the command are passed to the selected tool.

        +

        Figure 1 - Available ABLD actions

        The available commands include:

          diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_all_targets.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_all_targets.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_all_targets.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,9 +9,14 @@

          Build All Configurations

          -

          Select a project in the Project Explorer, C/C++ Projects, or Symbian Project Navigator view and use the Project menu or right-click to display the context menu. Select Build All Configurations (CTRL+ALT+A) to build all target build configurations enabled for the current project.

          -

          -

          Figure 1. Build All Configurations context menu

          +

          Select a project in the Project Explorer or Symbian Project Navigator view, then:

          +
            +
          • Click Project > Build All Configurations (CTRL+ALT+A) , or
          • +
          • Right-click the project name and select Symbian Build > Build All Configurations
          • +
          +

          To build all target build configurations enabled for the current project.

          +

          +

          Figure 1. Build All Configurations menu

          Other references
          • Carbide Menus
          • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_pkg_file.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_pkg_file.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_pkg_file.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,8 +9,8 @@

            Build Package (.pkg) File

            -

            Select a .pkg file in a project′s sis folder in the Project Explorer or C/C++ Projects view and right-click to display the context menu. Select Build PKG File to build the package file and create the .sis installation file. This option is also available from an editor view when the file is open. The makesis tool uses the package file and packs all the required resources together into a SIS installation file. The Console view will display the processing output. The .sis and .sisx files will appear in the sis folder.

            -

            +

            Select a .PKG file in a project′s /sis folder in the Project Explorer view and right-click to display the context menu. Select Symbian Build > Build PKG File to build the package file and create the .sis installation file. This option is also available from an editor view when the file is open. The makesis tool uses the package file and packs all the required resources together into a SIS installation file. The Console view displays the processing output. The .sis and .sisx files will appear in the project's /sis folder.

            +

            Figure 1. Build PKG File context menu

            Other references
              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_symbian_comp.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_symbian_comp.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/build_symbian_comp.htm Wed Jul 21 12:11:48 2010 -0500 @@ -8,8 +8,8 @@

              Build Symbian Component

              -

              Select a .mmp or .mk file in the Project Explorer, C/C++ Projects, or Symbian Project Navigator view, then right-click and select Build Symbian Component (CTRL+ALT+P) to build the selected component file or makefile. You can also right-click the file in an editor view and select Build Symbian Component to also build the file.

              -

              +

              Select a .mmp or .mk file in the Project Explorer or Symbian Project Navigator view, then right-click and select Symbian Build > Build Symbian Component (CTRL+ALT+P) to build the selected component file or makefile. You can also right-click the file in an editor view to use the same option.

              +

              Figure 1. Build Symbian Component menu item

              Other references
              diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/clean_symbian_comp.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/clean_symbian_comp.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/clean_symbian_comp.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,8 +9,8 @@

              Clean Symbian Component

              -

              You can select a MMP or MK file in the Project Explorer, C/C++ Projects, or Symbian Project Navigator view and right-click to display the context menu. Select Clean Symbian Component (CTRL+ALT+X) to clean the selected MMP project file or makefile. You can also right-click the file in an editor view to see the same option. The cleaning process removes the object and make files, and output files. The files that are removed by this command include all the intermediate files created during compilation and all the executables and import libraries created by the linker.

              -

              +

              You can select a MMP or MK file in the Project Explorer or Symbian Project Navigator view and right-click to select Symbian Build > Clean Symbian Component (CTRL+ALT+X) to clean the selected MMP project file or makefile. You can also right-click the file in an editor view to use the same option. The cleaning process removes the object and make files, and output files. The files that are removed by this command include all the intermediate files created during compilation and all the executables and import libraries created by the linker.

              +

              Figure 1. Clean Symbian Component context menu

              Other references
                diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/compile_source.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/compile_source.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/compile_source.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,8 +9,8 @@

                Compile

                -

                Select a .c, .cpp, or .cia source file in the Project Explorer, C/C++ Projects, or Symbian Project Navigator view, right-click the file and choose Compile (CTRL+ALT+C) to compile it. This is also available from within a C/C++ editor view. You can use the shift or control key to select one or more of these file types across the same or different projects. The build progress is displayed in the Console view.

                -

                +

                Select a .c, .cpp, or .cia source file in the Project Explorer or Symbian Project Navigator view, right-click the file and choose Symbian Build > Compile (CTRL+ALT+C) to compile it. This is also available from within a C/C++ editor view. You can use the shift or control key to select one or more of these file types across the same or different projects. The build progress is displayed in the Console view.

                +

                Compile source

                Figure 1 - Right-click to compile a source file

                Other references
                  diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/freeze_exports.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/freeze_exports.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/freeze_exports.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,8 +9,8 @@

                  Freeze Exports

                  -

                  Right click a project in the Project Explorer, or Symbian Project Navigator view, then choose Freeze Exports. This command calls the appropriate abld command and a .def file is generated. This enables released versions of DLLs to freeze their exports, ensuring backward compatibility of a library.

                  -

                  +

                  Right-click a project in the Project Explorer or Symbian Project Navigator view, then choose Symbian Build > Freeze Exports. This command calls the appropriate abld command and a .def file is generated. This enables released versions of DLLs to freeze their exports, ensuring backward compatibility of a library.

                  +

                  Figure 1. Choosing Freeze Exports on a project

                  Other references
                    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/freeze_symbian_comp.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/freeze_symbian_comp.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/freeze_symbian_comp.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,8 +9,8 @@

                    Freeze Symbian Component

                    -

                    Right-click a Symbian OS MMP file in the Project Explorer, or Symbian Project Navigator view, then choose Freeze Symbian Component (CTRL+ALT+F). This command only freezes the selected MMP file and not the entire project.

                    -

                    +

                    Right-click a Symbian OS MMP file in the Project Explorer, or Symbian Project Navigator view, then choose Symbian Build > Freeze Symbian Component (CTRL+ALT+F). You can also right-click the file in an editor view to use the same option. This command only freezes the selected MMP file and not the entire project.

                    +

                    Figure 1. Choosing Freeze Symbian Component on a file

                    Other references
                    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/new_symbian_class.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/new_symbian_class.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - - - -Symbian OS C++ Class - - - -

                    Symbian OS C++ Class

                    -

                    Click File > New > Symbian OS C++ Class to launch the Symbian OS C++ Class wizard.

                    -
                    Other references
                    - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/new_symbian_mmp_file.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/new_symbian_mmp_file.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - - - - - -Symbian OS MMP File - - - -

                    Symbian OS MMP File

                    -

                    Click File > New > Symbian OS MMP File to launch the Symbian OS MMP File wizard.

                    -
                    Other references
                    - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/new_symbian_project.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/new_symbian_project.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - - - -Symbian OS C++ Project - - - -

                    Symbian OS C++ Project

                    -

                    Click File > New > New Symbian OS C++ Project to launch the New Symbian OS C++ Project wizard.

                    -
                    Other references
                    - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/on_device_setup.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/on_device_setup.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - - - - -On-Device Setup menu - - - -

                    On-Device Setup

                    -

                    Use the On-Device Setup menu option to open the On-Device Setup dialog for the downloading and installation of Carbide software to a device.

                    -
                    Other references
                    - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/open_cmd_window.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/open_cmd_window.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/open_cmd_window.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,7 @@

                    Open Command Window

                    -

                    Launches a Microsoft Windows Command Prompt set to the workspace directory.

                    +

                    Launches a Microsoft Windows Command Prompt window set to the chosen project or file's directory.

                    Other references
                    • Carbide Menus
                    • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/open_explorer_window.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/open_explorer_window.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/open_explorer_window.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,7 @@

                      Show in Explorer

                      -

                      Launches a Microsoft Windows Explorer window set to the workspace directory.

                      +

                      Launches a Microsoft Windows Explorer window that shows the chosen project or file directory and its location on the hard disk.

                      Other references
                      • Carbide Menus
                      • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/preprocess_source.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/preprocess_source.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/preprocess_source.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,9 @@

                        Preprocess

                        -

                        Right-click to select a .c, .cpp, or .cia source file in the Project Explorer or Symbian Project Navigator view, and choose Preprocess to preprocess the file. You define the preprocess command in the Preprocess preference panel. This is also available from within a C/C++ editor view. You can use the shift or control key to select one or more of these file types across the same or different projects. The preprocess progress is displayed in the Console view.

                        +

                        Right-click to select a .c, .cpp, or .cia source file in the Project Explorer or Symbian Project Navigator view, and choose Symbian Build > Preprocess to preprocess the file. You define the preprocess command in the Preprocess preference panel. This is also available from within a C/C++ editor view. You can use the shift or control key to select one or more of these file types across the same or different projects. The preprocess progress is displayed in the Console view.

                        +

                        Preprocess menu option

                        +

                        Figure 1. Choosing to Preprocess a file

                        Other references
                        • Carbide Menus
                        • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/run_codescanner.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/run_codescanner.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - - - - -Run CodeScanner - - - -

                          Run CodeScanner

                          -

                          CodeScanner is a static source code analysis tool for Symbian OS™ programs written in C++. Use Run CodeScanner to examine your project code and report any issues.

                          -

                          Static analysis tools delve deep into code, exploring line by line for the sources of defects. CodeScanner is specifically for use with Symbian OS™ code. As well as identifying C++ coding convention deviations, CodeScanner identifies incorrect descriptor usage, cleanup stack errors, UID clashes, and other subtle problems that are hard to track down.

                          -

                          -

                          Figure 1. Invoking Run CodeScanner on a project
                          -

                          -
                          Other references
                          - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/run_leavescan.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/run_leavescan.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ - - - - - - -Leavescan - - - -

                          Run Leavescan

                          -

                          Symbian OS has a standard convention for functions that may Leave. Therefore, any function that Leaves, or calls a function that Leaves (other than in a TRAP harness), must have a name ending in L. Leavescan verifies that your code satisfies this convention. LeaveScan ignores calls in trapped functions, commented out code, ( // and /* and */). It also checks for calls to LD, LC and LX functions as well as normal L functions. It also checks for User::Leave(), ELeave, and User::LeaveIfError().

                          -

                          To start, define where the path to the leavescan.exe program using the Leavescan preference panel.

                          -

                          Next, to run Leavescan:

                          -
                            -
                          • on a source file — right-click a .cpp source file in the C/C++ Projects or Symbian Project Navigator view and select Run Leavescan
                          • -
                          • on all source files in the Active Build Configuration — right-click a .mmp file and select Run Leavescan on Project MMP. The source statements in the .mmp file are scanned to obtain a list of source files to be processed by leavescan.
                          • -
                          • from the command line — scan whole directories and output to a file. For example,
                          • -
                          -
                          -

                          for /R %i in (*.cpp) do leavescan %i >> leavescan.out

                          -

                          This will scan all cpp files in or below the current directory, placing the result in leavescan.out.

                          -
                          -

                          -

                          Figure 1. Invoking Run Leavescan on a single source file

                          -
                          Other references
                          - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/s60_ui_designer.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/s60_ui_designer.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - - - -S60 UI Designer - - - -

                          S60 UI Designer

                          -

                          Click File > New > S60 UI Design to launch the S60 UI Design wizard to add a new design to a project.

                          -
                          Other references
                          - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/perspective_debug.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/perspective_debug.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/perspective_debug.htm Wed Jul 21 12:11:48 2010 -0500 @@ -32,7 +32,7 @@
                        • Modules view - uses the Symbolics Loading option to show modules loaded during a debug session
                        • Registers view - shows general, FPU, or host-specific registers of the host computer or target device
                        -

                        +

                        Figure 1. Debug perspective used by Carbide.c++

                        NOTE Click the icon to show additional options that may not be visible in the perspective view.

                        For more information on perspectives see Workbench User Guide > Concepts > Perspectives, and for views see C/C++ Development User Guide > Reference diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/trk/exporting_remote_conns.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/exporting_remote_conns.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/exporting_remote_conns.htm Wed Jul 21 12:11:48 2010 -0500 @@ -29,7 +29,7 @@

                        Related references
                        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/trk/importing_remote_conns.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/importing_remote_conns.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/importing_remote_conns.htm Wed Jul 21 12:11:48 2010 -0500 @@ -29,7 +29,7 @@
                        Related references
                        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/trk/view_remote_connection.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/view_remote_connection.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/view_remote_connection.htm Wed Jul 21 12:11:48 2010 -0500 @@ -24,9 +24,8 @@
                      • Serial — mainly for boards with a serial interface
                      • Bluetooth — available for debug support
                      • USB — available for both debug and trace support
                      • -
                      • Platform Simulator (PlatSim) — Nokia's device simulator
                      -

                      The columns in the Remote Connections view include:

                      +

                      The columns in the Remote Connections view include:

                      • Connection/Services - connection name defined by you and remote agent type
                      • Type - connection type, i.e. Bluetooth, USB, TCP/IP, etc.
                      • @@ -107,8 +106,8 @@

        Remote Connections view context menu options

        -

        Based on the current selection, one or more of the following commands appear on the context menu when you right-click within the Remote Connections view. For example, if no connections are defined, only the New Connection command is available on the context menu. Right-click on a connection name and the additional Enable Service Testing and Disable Service Testing are available.

        -

        +

        Based on the current selection, one or more of the following commands appear on the context menu when you right-click within the Remote Connections view. For example, if no connections are defined, only the New Connection command is available on the context menu.

        +

        Figure 3 - Remote Connections context menu

        @@ -117,47 +116,42 @@ - + - + - + - + - + - + - + - + - - - - - - +
        Explanation
        New ConnectionNew Connection...
        Select to open the New Connection wizard to add a connection.
        Rename ConnectionRename   Select to rename the currently selected connection.
        Edit Connection SettingsEdit Settings...

        Select to edit the selected remote connection.

        Select to edit the selected remote connection settings.

        Delete ConnectionDelete

        Select to delete the selected connection from the connection list.

        Connection DocumentationHelp for...
        Select to open the Help view with connection information.Select to open the Help view for connection information.
        Disable Service TestingMake Current  Select to disable the connection testing. This releases the port so other connection services can use it.
        Enable Service Testing Select to re-enable testing of the connection.Make the selected connection the current connection.
        Related references
        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_settings_pane.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_settings_pane.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_settings_pane.htm Wed Jul 21 12:11:48 2010 -0500 @@ -11,8 +11,8 @@

        Install Remote Agents pane

        -

        Use the Install remote agents pane to select the latest remote agent version to download and install to the device.

        -

        +

        Use the Install Remote Agents pane to select the latest remote agent version to download and install to the device.

        +

        Figure 2 - New Connection wizard Serial Connection Settings page

        Table 3. Serial Connection Setting page - Install Remote Agents tab

        @@ -21,7 +21,7 @@ - + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_wiz_add.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_wiz_add.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_wiz_add.htm Wed Jul 21 12:11:48 2010 -0500 @@ -19,7 +19,7 @@

        Edit connection name and type

        Use the Edit connection name and type page to assign a name and connection type to the new connection setup.

        -

        +

        Figure 1 - New Connection wizard Edit connection name and type page

        Table 1. Edit connection name and type page - options

        Explanation
        Install remote agentsInstall Remote Agents

        A list of the most current versions of remote agents sorted by SDK and version. Select the version most compatable with the device. For example, a device running S60 3.1.0 needs a version of the TRK software compiled for that SDK, which in the image above is Application TRK 2.8.7.

        Additional information about the selected entry is displayed to the right to help you choose the correct version of TRK for the target device.

        @@ -28,16 +28,16 @@ - + + + + + - - - - - - + +
        Explanation
        Connetion NameConnection TypeSelect the type of connection this setup will use.
        Connection Name

        Enter a name for the connection.

        Conection TypeSelect the type of connection this setup will use.
        Supported Services

        Shows a list of services supported by the connection type chosen.

        Connection Settings

        Select the connection port to use for this connection setting.

        Set Connection Settings pane

        @@ -47,7 +47,7 @@
      • Allow easy serial port selection when connecting to a device
      • Verify that you have the latest remote agent installed on a device
      -

      +

      Figure 2 - New Connection wizard Serial Connection Settings page

      Table 2. Serial Connection Setting page - Set Connection Settings tab

      @@ -56,24 +56,16 @@ - - - - - - - - - - + + - - +
      Explanation
      Serial Port A dropdown list of serial ports with known identifiers for selecting the communication port used by the PC to communicate with the device. A named COM port (COM4 - BthModem0) indicates an active port. Unnamed port numbers have usually not been opened and assigned by the PC.
      Baud Ratea dropdown list of baud rates common to serial connections.
      Device OS

      A dropdown list of device OSes that are supported by the remote agent software. Select the OS used by the device before running a check.

      Device OS (used to determine installer version)Select the OS used on the device.
      Select a service to test Click to select a listed service for testing.
      Test Service Status

      Click Test Service Status to query the remote agent software on the device for its version number. It then compares the version number found with the latest version available for Carbide. A progress bar will appear should the Check TRK version operation requires more than a few seconds.

      +
      Initiate Service Testing

      Click Initiate Service Testing to query the remote agent software on the device for its version number. It then compares the version number found with the latest version available for Carbide. A progress bar will appear should the Check TRK version operation requires more than a few seconds.

      NOTE The PC must have an internet connection to perform a remote agent version check.

      Once the comparison is complete the Status text is updated with the result and further instructions as required.

      @@ -87,7 +79,7 @@

      Install Remote Agents pane

      Use the Install Remote Agents pane to select the latest remote agent version to download and install to the device.

      -

      +

      Figure 2 - New Connection wizard Serial Connection Settings page

      Table 3. Serial Connection Setting page - Install Remote Agents tab

      @@ -96,8 +88,8 @@ - - + @@ -113,7 +105,7 @@

       

      Related references
      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_wiz_edit.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_wiz_edit.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_conn_wiz_edit.htm Wed Jul 21 12:11:48 2010 -0500 @@ -113,7 +113,7 @@

       

      Related references
      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_carbide_portal.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_carbide_portal.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,54 @@ + + + + + + +Carbide Portal view + + + +

      Carbide Portal view

      +

      The Carbide Portal view provides a single point of information on Carbide news, new releases, additional extensions, and support. The Carbide Portal view is shown by clicking Help > Carbide Portal.

      +

      +

      Figure 1. Install Extensions page in the Carbide Portal view

      +

      Click on the Show Overview icon (Show Overview) icon to show an information popup with additional information on the selected plug-in.

      +

      +

      Figure 2. Install Extensions Plug-in Information popup

      +

      Install Extensions page options

      +
      Table 1 Install Actions options
      +
      Explanation
      Install remote agents

      A list of the most current versions of remote agents sorted by SDK and version. Select the version most compatable with the device. For example, a device running S60 3.1.0 needs a version of the TRK software compiled for that SDK, which in the image above is Application TRK 2.8.7.

      +
      Install Remote Agents

      A list of the most current versions of remote agents sorted by SDK and version. Select the version most compatable with the device. For example, a device running S60 5.x needs a version of the TRK software compiled for that SDK, which in the image above is Application TRK 3.2.6.

      Additional information about the selected entry is displayed to the right to help you choose the correct version of TRK for the target device.

      + + + + + + + + + + + + + + + + + + + + + + + + +
      ItemExplanation
      Refresh

      Refreshes the plug-in list.

      Check All ItemsMarks all extensions for installation.
      Uncheck All ItemsUnchecks all extensions to prevent installation.

      Installed Checked Items

      Installs only the checked items in the extension list.
      Advanced Install...Launches the Install New Software wizard.
      +
      Related references
      + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_cpp_projects.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_cpp_projects.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_cpp_projects.htm Wed Jul 21 12:11:48 2010 -0500 @@ -8,10 +8,10 @@ -

      Project Explorer View

      -

      The Project Explorer view (Figure 1) displays relevant C/C++ projects located in the current workspace using a tree structure. Use this view to manage all the projects located in the workspace. The view is customizable and takes advantage of working sets.

      +

      Project Explorer view

      +

      The Project Explorer view (Figure 1) displays relevant C/C++ projects located in the current workspace using a tree structure. Use this view to manage all the projects located in the current workspace. The view is customizable and takes advantage of working sets.

      The content of a project is dependent upon how it was created in the workspace.

      -

      +

      Project Explorer view

      Figure 1 - Project Explorer view showing projects in the current workspace

      The directories that appear in the project include:

        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_disassembly.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_disassembly.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_disassembly.htm Wed Jul 21 12:11:48 2010 -0500 @@ -24,7 +24,7 @@
      • Set breakpoints at the start of any assembler instruction by right-clicking the left hand column to view the context menu options (Figure 2)

      Figure 1 shows the Dissassembly view stopped at a breakpoint.

      -

      +

      Figure 1 - Disassembly view

      Figure 2 shows the context menu that appears when you right-click in the Dissassembly pane. Right-clicking the left border opens the breakpoint context menu in Figure 3.

      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_expressions.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_expressions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_expressions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -21,7 +21,7 @@
    • Value pane (right) — Shows the current value of each corresponding expression. Double-click a value to change it.

    Figure 1 shows the Expressions view.

    -

    +

    Figure 1 - Expressions view

    Table 1. Expressions view —items
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_global_variables.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_global_variables.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ - - - - - - -Global Variables Window - - - -

    Global Variables Window

    -

    The Global Variables window shows all global and static variables for each process that you debug. You can open separate Global Variables windows for each process in the same build target. Use the window to observe changes in variable values as the program executes.

    -

    Figure 1 shows the Global Variables window.

    -

    Figure 1 Global Variables window

    -
    Table 1 Global Variables window—items
    -
    - - - - - - - - - - - - -
    ItemExplanation
    FileLists source files that declare global or static variables. Click a source file to view its static variables. Click Global Variables to view all global variables declared in the program.
    VariablesLists variables according to the file selected in the File pane. Double-click a variable to display it in a separate Variable window.
    -
    -
    Opening the Global Variables Window
    -

    Use the Global Variables window to display global variables declared in a program or static variables declared in source files that comprise the program.

    -
      -
    • To open the Global Variables window, select View > Global Variables or Window > Global Variables Window.
    • -
    -
    -

    -
    -
    Viewing Global Variables for Different Processes
    -

    You can open a separate Global Variables window for each process that the same parent application creates.

    -

    To open the Global Variables window for a particular process, follow these steps:

    -
      -
    1. Click Project > Debug.
    2. -

      A debugging session starts.

      -
    3. In the Thread window toolbar, use the Process list box to specify the process that has the global variables that you want to examine.
    4. -
    5. Click View > Global Variables or Window > Global Variables Window.
    6. -

      Repeat these steps for each process that has global variables that you want to examine.

      -
    -
    - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_install_extensions.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_install_extensions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,72 @@ + + + + + + +Install Extensions view + + + +

    Install Extensions view

    +

    The Install Extensions view enables the user to locate and install Carbide plug-ins into a core Carbide.c++ installation. The Install Extensions view links to an online site that lists available plug-ins for installation. Plug-ins are grouped by type for

    +

    The Install Extensions view appears as part of the C/C++ Perspective. It can be added to a perspective by clicking Window > Show View > Install Extensions.

    +

    +

    Figure 1. Install Extensions view

    +

    Click on the Show Overview icon (Show Overview) icon to show an information popup with additional information on the selected plug-in.

    +

    +

    Figure 2. Install Extensions Plug-in Information popup

    +
    Table 1 Install Extensions view—items
    + + + + + + + + + + + + + +
    ItemExplanation
    Find

    Filters the plug-ins shown in the view to a subset of the complete list.

    Show InstalledToggles the plug-ins shown in the view between those that are currently installed and plug-ins available for installation.
    +

    Install Extensions view toolbar options

    +
    Table 1 Install Extensions view— toolbar options
    + + + + + + + + + + + + + + + + + + + + + +
    Item
    Icon
    Explanation
    Refresh

    Refreshes the plug-in list.

    Install Checked Items
    Click to download and install all plug-ins that are checked in the plug-in list.
    View Menu

    Additional options include:

    +
      +
    • Check All Items
    • +
    • Uncheck All Items
    • +
    • Install Checked Items
    • +
    • Advanced Install... – launches the Install New Software wizard.
    • +
    +
    Related references
    + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_log.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_log.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_log.htm Wed Jul 21 12:11:48 2010 -0500 @@ -8,7 +8,7 @@ -

    Console View

    +

    Console view

    The Console view displays the output of a process and allows you to provide keyboard input to a process. There are numerous consoles available, see the Open Console dropdown list for those available to you. Most are enabled from various project panels in Carbide.

    Figure 1 - Console view showing build console information

    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_mem_array.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_mem_array.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ - - - - - - -ArrayWindow - - - -

    Array Window

    -

    The Array window allows manipulation of a contiguous block of memory, displayed as an array of elements. The window lists array contents sequentially, starting at -element 0.

    -

    The Array window title shows the base address bound to the array. The base address can bind to an address, a variable, or a register. An array bound to a local variable closes after the routine that defines the variable returns to the calling routine.

    -

    For array elements cast as structured types, a hierarchical control appears to the left of each element. Use these hierarchical controls to expand or collapse the display of each element’s contents.

    -

    Figure 1 shows an Array window. Table 1 explains the items in the window.

    -

    Figure 1 Array window

    -

     

    -
    Table 1 Array window—items
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ItemIconExplanation
    Hierarchical control Click to collapse the view of the information pane.
    Bind To Select the base address of the array: Address, Variable, or Register.
    Array size Enter the number of elements to display in the Array window.
    Struct Member Select a specific member to show in each element, or show all members.
    Element Shows the array elements in a hierarchical list.
    Value Shows the value of each array element.
    Location Shows the address in memory of each array element.
    -
    -
    Opening an Array Window
    -

    Use the View Array command to manipulate a memory block in an Array window.

    -
      -
    1. Select the array that you want to view.
    2. -
    3. Select Data > View Array.
    4. -

      A new Array window appears.

      -
    -
    -

    TIP Drag and drop a register or variable name into an Array window to set the base address. Use the View Memory As command to interpret memory displayed in an Array window as a different type.

    -

    Alternatively, use a contextual menu to open an Array window, as explained in Table 2.

    -
    Table 2 Opening an Array window by using a context menu
    - - - - - - - - - - - - - - - - - -
    On this host…Do this…
    WindowsRight-click the array and select View Array.
    SolarisClick and hold on the array, then select View Array.
    LinuxClick and hold on the array, then select View Array.
    -


    -

    - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_memory_wnd.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_memory_wnd.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_memory_wnd.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,93 +1,88 @@ - - - - - - -Memory View - - - -

    Memory View

    -

    Use the Memory view to inspect and change process memory. You can address memory using expressions such as:

    -
      -
    • 0x0847d3c
    • -
    • (&y)+1024
    • -
    • *ptr
    • -
    • FNname + 1
    • -
    -

    You can configure your output to display traditional, hexadecimal, ascii and/or signed/unsigned decimal. You can also set the size of the rendering columns.

    -

    CAUTION Arbitrarily changing memory contents could degrade the stability of the IDE, another program, or the operating system itself. Understand the consequences of manipulating memory.

    -

    Figure 1 shows the Memory view.

    -

    -

    Figure 2 - Memory view showing a memory rendering in traditional format

    -
    Table 1 Memory view—items
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ItemIconExplanation
    New Memory View
    Click to add a new Memory monitor view.
    Pin Memory Monitor
    Pin memory view.
    Refresh Click to refresh the memory display.
    Toggle Memory Monitors Pane
    Toggles the current Memory monitors view between showing only a Memory Monitor pane and a Memory Monitor and Memory Rendering pane.
    Toggle Split Pane
    Alternately shows and hides the Memory Rendering pane.
    Link Memory Monitor Panes
    Enable to synchronize the current selection between the rendering of the same memory monitor .
    Switch Memory Monitor
    If different memory monitor views have been added, select from list of memory monitor views.
    Add Memory Monitor / Add Rendering
    Add a new memory address or variable to the Memory Monitors pane, or add a new rendering to the Memory Rendering pane.
    Remove Memory Monitor / Remove Rendering
    Remove the selected memory address or variable from the Memory Monitors pane, or remove the selected rendering from the Memory Rendering pane.
    Remove All
    Remove all memory monitors or renderings from the associated pane.
    -

    Each memory monitor rendering pane can be configured independently. Right-click in the Renderings pane to see the rendering options available. The options presented in the context menu may differ if you have not chosen the Traditional rendering view (Figure 2).

    -

    -

    Figure 2 - Rendering pane options

    -
    Related tasks
    - - - - - + + + + + + +Memory view + + + +

    Memory view

    +

    Use the Memory view to inspect and change process memory. You can address memory using expressions such as:

    +
      +
    • 0x0847d3c
    • +
    • (&y)+1024
    • +
    • *ptr
    • +
    • FNname + 1
    • +
    +

    You can configure your output to display traditional, hexadecimal, ascii and/or signed/unsigned decimal. You can also set the size of the rendering columns.

    +

    CAUTION Arbitrarily changing memory contents could degrade the stability of the IDE, another program, or the operating system itself. Understand the consequences of manipulating memory.

    +

    Figure 1 shows the Memory view.

    +

    Memory view

    +

    Figure 2 - Memory view showing a memory rendering in traditional format

    +
    Table 1 Memory view—items
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ItemIconExplanation
    New Memory View
    Click to add a new Memory monitor view.
    Pin Memory Monitor
    Pin memory view.
    Toggle Memory Monitors Pane
    Toggles the current Memory monitors view between showing only a Memory Monitor pane and a Memory Monitor and Memory Rendering pane.
    Toggle Split Pane
    Alternately shows and hides the Memory Rendering pane.
    Link Memory Monitor Panes
    Enable to synchronize the current selection between the rendering of the same memory monitor .
    Switch Memory Monitor
    If different memory monitor views have been added, select from list of memory monitor views.
    Add Memory Monitor / Add Rendering
    Add a new memory address or variable to the Memory Monitors pane, or add a new rendering to the Memory Rendering pane.
    Remove Memory Monitor / Remove Rendering
    Remove the selected memory address or variable from the Memory Monitors pane, or remove the selected rendering from the Memory Rendering pane.
    Remove All
    Remove all memory monitors or renderings from the associated pane.
    +

    Each memory monitor rendering pane can be configured independently. Right-click in the Renderings pane to see the rendering options available. The options presented in the context menu may differ if you have not chosen the Traditional rendering view (Figure 2).

    +

    +

    Figure 2 - Rendering pane options

    +
    Related tasks
    + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_mifdef_editor.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_mifdef_editor.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_mifdef_editor.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,106 +1,106 @@ - - -MIF Editor - - - - -

    MBM/MIF Editor

    - -

    The MIF Editor allows you to create or edit the .mif files list of scalable icons (.svg) - included in a S60 v3.0 and later GUI projects as well as standard .bmp files. A .mif file is a MSX Interchange Format (MIF) file that should be built by the project. MIF files replace the functionality of AIF (and MBM) files.

    -

    NOTE This editor is only supported by the S60 3.0 and later SDKs.

    -

    NOTE For resources that are included after creating a project, you should ensure that the output location is set correctly by viewing the file properties. The output location is set to "{EPOCROOT}\epoc32\include" by default, so if an alternate location is required you can set this in the file properties.

    -

    -

    Figure 1 - MIF File in the Symbian Project Navigator view

    -

    The MIF Editor appears when a MIF file is - opened for editing. To open the editor double-click on a .mif file in the Symbian Project Navigator view (figure 1), or select a scalable icon makefile (for example, Icons_scalable_dc.mk), right-click and select the Add MBM/MIF Entry command.

    -

    -

    Figure 2 - MBM/MIF Editor

    -
    Table 1. MBM/MIF Editor —Items
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ItemExplanation
    Target File

    Specifies the EPOCROOT relative path for the compiled images. Click the Default button to set the target file based on the SDK and project name.

    Header File Shows the generated header file. Select the Header option in the Header Generation group to create a default .mbg file. The path cannot be edited in this field.
    Header Generation

    Options include:

    -
      -
    • No header - If selected, no .mbg header will be generated.
    • -
    • Header - If selected, a .mbg header will be generated.
    • -
    UpSelect an image in the list and click Up to move the selection one position up in the list.
    Down

    Select an image in the list and click Down to move the selection one position down in the list.

    Pair Image and Mask Select two adjacent unpaired BMP image entries in the list and click this button to combine the images together into image/mask pairs.
    Split Image and Mask Select a paired BMP image in the list and click this button to split the image into image and mask entries.
    Swap Image and Mask Select a paired BMP image in the list and click this button to swap the image and mask files and format information in paired image entries.
    Add From Project Click this button to open the Add Images from Project dialog to reference available images in the project.
    Add From Filesystem Click this button to open the Add Images From Filesystem dialog to locate and reference existing images in the filesystem or copy images to the project.
    RemoveSelect an image and click Remove to remove image entry from the list. This does not delete file from directory.
    Color depth Select the bit depth used to encode the image at build time.
    Mask depth

    Select the bit depth used to encode the mask at build time. Options include:

    -
      -
    • n/a - Do not apply mask depth to images
    • -
    • 1 - A 1-bit mask treats pixels as "on/off" bits, where black is opaque and white is transparent.
    • -
    • 8 - An 8-bit mask is treated as alpha values, where black is transparent and white is opaque.
    • -
    Color format Select Color to encode the image(s) as color or select Grayscale to encode the image(s) as grayscale.
    Set from image Click this button to auto-detect the image depth, mask depth, and color/grayscale setting from the image contents.
    PreviewA preview of the image as it will appear at runtime.
    -

     

    - - - - + + +MIF Editor + + + + +

    MBM/MIF Editor

    + +

    The MIF Editor allows you to create or edit the .mif files list of scalable icons (.svg) + included in a S60 v3.0 and later GUI projects as well as standard .bmp files. A .mif file is a MSX Interchange Format (MIF) file that should be built by the project.

    +

    NOTE This editor is only supported by the S60 3.0 and later SDKs.

    +

    NOTE For resources that are included after creating a project, you should ensure that the output location is set correctly by viewing the file properties. The output location is set to "{EPOCROOT}\epoc32\include" by default, so if an alternate location is required you can set this in the file properties.

    +

    +

    Figure 1 - MIF File in the Symbian Project Navigator view

    +

    The MIF Editor appears when a MIF file is + opened for editing. To open the editor double-click on a .mif file in the Symbian Project Navigator view (figure 1), or select a scalable icon makefile (for example, Icons_scalable_dc.mk), right-click and select the Add MBM/MIF Entry command.

    +

    +

    Figure 2 - MBM/MIF Editor

    +
    Table 1. MBM/MIF Editor —Items
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ItemExplanation
    Target File

    Specifies the EPOCROOT relative path for the compiled images. Click the Default button to set the target file based on the SDK and project name.

    Header File Shows the generated header file. Select the Header option in the Header Generation group to create a default .mbg file. The path cannot be edited in this field.
    Header Generation

    Options include:

    +
      +
    • No header - If selected, no .mbg header will be generated.
    • +
    • Header - If selected, a .mbg header will be generated.
    • +
    UpSelect an image in the list and click Up to move the selection one position up in the list.
    Down

    Select an image in the list and click Down to move the selection one position down in the list.

    Pair Image and Mask Select two adjacent unpaired BMP image entries in the list and click this button to combine the images together into image/mask pairs.
    Split Image and Mask Select a paired BMP image in the list and click this button to split the image into image and mask entries.
    Swap Image and Mask Select a paired BMP image in the list and click this button to swap the image and mask files and format information in paired image entries.
    Add From Project Click this button to open the Add Images from Project dialog to reference available images in the project.
    Add From Filesystem Click this button to open the Add Images From Filesystem dialog to locate and reference existing images in the filesystem or copy images to the project.
    RemoveSelect an image and click Remove to remove image entry from the list. This does not delete file from directory.
    Color depth Select the bit depth used to encode the image at build time.
    Mask depth

    Select the bit depth used to encode the mask at build time. Options include:

    +
      +
    • n/a - Do not apply mask depth to images
    • +
    • 1 - A 1-bit mask treats pixels as "on/off" bits, where black is opaque and white is transparent.
    • +
    • 8 - An 8-bit mask is treated as alpha values, where black is transparent and white is opaque.
    • +
    Color format Select Color to encode the image(s) as color or select Grayscale to encode the image(s) as grayscale.
    Set from image Click this button to auto-detect the image depth, mask depth, and color/grayscale setting from the image contents.
    PreviewA preview of the image as it will appear at runtime.
    +

     

    + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_reg_details.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_reg_details.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ - - - - - - -Registers Details Window - - - -

    Registers Details Window

    -

    The Register Details window (Windows OS) lets you view detailed information about individual bits of registers from 2 bits to 32 bits in size. This window shows information for both system registers and memory-mapped registers. To open the Register Details window, click View > Register Details or Window > Register Details Window.

    -

    The Register Details window has fields that describe the register, its bitfields, and the values of those bitfields. XML files in the Registers folder of your Carbide installation provide the information that appears in the window. The Registers folder is inside the Support folder. The Support folder is inside the Plugins folder of your Carbide installation.

    -

    Figure 1 shows the Register Details window. Table 1 explains items in the window.

    -

    Figure 1 Register Details window
    -

    -
    Table 1. Register Details window—items
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ItemIconExplanation
    Description File text box Enter the name or full path to the XML file for the register you want to view, or click the Browse button to open a dialog box that you can use to specify the file.
    Register Name Shows the name of the register depicted in the window.
    Address text box 

    Enter the starting address of the register values that you want to see in the Register Display.

    -

    An error message appears if you enter an invalid starting address.

    Format list box 

    Specify the data format for bit values in the Register Display:

    -
      -
    • Binary
    • -
    • Character
    • -
    • Decimal
    • -
    • Unsigned Decimal
    • -
    • Hexadeccimal
    • -
    • Default—have the IDE determine the best format
    • -
    Register Display Shows a depiction of the register that you specify in the Description File text box, including individual register bits and their values.
    Bitfield Name list box 

    Specify a bitfield to highlight in the Register Display. The Description portion of the window reflects available information for the bitfield.

    -

    Select None to have the Description portion of the window reflect information for the entire register and not a bitfield in that register.

    Bit Value text box 

    Shows the current value of the bits in the Bitfield Name list box, according to the format that you specify in the Format list box.

    -

    Click the spin buttons to increment or decrement the current value, or enter a new value in the text box.

    -

    Changing the value changes only the Register Display. You must click the Write button to write the new value to the register itself.

    Bit Value Modifier list box 

    Specify a new value for the selected bitfield, or view a brief explanation of specific bitfield values.

    -

    Changing the value changes only the Register Display. You must click the Write button to write the new value to the register.

    Description 

    Shows a description of the register or a selected bitfield in the register.

    -

    Use the Description File text box to specify the register.

    -

    Use the Text View list box to view specific register information, such as register descriptions, bitfield descriptions, and register details.

    Revert button 

    Click to change a modified value in the Register Display to its original value.

    -

    If you clicked the Write button to write a new value to the register, you cannot revert that value.

    Read button Click to have the Register Display reflect current bit values from the register itself.
    Write button 

    Click to write the bit values in the Register Display to the register.

    -

    After you write new values to the register, you cannot revert them.

    Reset Value button 

    Click to restore the default value for the selected bitfield.

    -

    The IDE disables this button if the selected bitfield does not have a default value.

    Text View list box Use to specify information that appears in the Description portion of the window.
    -

    Description File

    -

    Enter in this text box the name of the register that you want to see in the Register Display of the Register Details window. Alternatively, enter the full path to the register description file on your computer, or click the Browse button to open a dialog box that lets you specify the register description file. The text box is not case sensitive.

    -

    After you enter a name or path, the debugger searches for a matching register description file in the Registers folder of your Carbide installation and the project access paths. If the debugger finds a matching file, the Register Display updates the information in the Register Details window. If the debugger does not find a matching name, an error message appears.

    -

    For example, to view the contents of the Opcode register, you can:

    -
      -
    • type Opcode in the Description File text box and press Enter or Return, or
    • -
    • type the full path to the opcode.xml file in the Registers folder and press Enter or Return.
    • -
    -

    The debugger matches your entry with the opcode.xml file in the Registers folder. The Register Display in the Register Details window updates its information to show Opcode register details.

    -

    The debugger also updates the Register Display to show the current values in the register. If the debugger fails to update the display, an error message appears.

    -

    Register Display

    -

    This display shows the current contents of 32 bits of register data, starting at the address that you specify in the Address text box. The data appears according to the format that you specify in the Format list box.

    -

    The Register Display groups the 32 bits of data into register bitfields. Clicking one of the bits selects its associated bitfield. Additional information about the bitfield, such as its name and permissions, appears in the Description portion of the Register Details window.

    -

    Text View

    -

    Use this list box to change the information that appears in the Description portion of the Register Details window:

    -
      -
    • Auto—select to have the IDE determine which information to display in the window
    • -
    • Register Description—select to show information about the entire register, such as the name of the register itself and the meaning of its contents
    • -
    • Bitfield Description—select to show information about the selected bitfield in the Register Display, such as the name of the bitfield and its access permissions
    • -
    • Register Details—select to show in-depth information about the current register, such as its name, its bit values, and bit-value explanations
      -
    • -
    - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_signals_wnd.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_signals_wnd.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_signals_wnd.htm Wed Jul 21 12:11:48 2010 -0500 @@ -4,14 +4,12 @@ -Signals View +Signals view -

    Signals View

    -

    The Signals view of the Debug perspective lets you view the signals defined on the selected debug target and how the debugger handles each one.

    -

    NOTE Currently Carbide.c++ does not support this CDT feature.

    -

    Figure 1 shows the Signals view.

    +

    Signals view

    +

    The Signals view of the Debug perspective lets you view the signals defined on the selected debug target and how the debugger handles each one. Figure 1 shows the Signals view.

    Figure 1 - Signals view

    Table 1 Signals view—items
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_proj_nav.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_proj_nav.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_proj_nav.htm Wed Jul 21 12:11:48 2010 -0500 @@ -11,12 +11,12 @@

    Symbian Project Navigator view

    The Symbian Project Navigator view shows all files that belong to the -current build configuration. This view lists the Symbian projects in your current workspace and their corresponding *.inf file (typically bld.inf). The *.inf file contains the related MMP project files, which are also listed in a tree structure. You can collapse or expand the list for each MMP to see which sources belong to each MMP.

    +current build configuration. This view lists the Symbian projects in your current workspace and their corresponding *.inf file (typically bld.inf). The *.inf file contains the related MMP project files, which are also listed in a tree structure. You can collapse or expand the list for each MMP to see which sources belong to each MMP.

    To open this view select Window > Show View > Symbian Project Navigator, or select Window > Show View > Other ... and expand the Carbide.c++ folder then choose Symbian Project Navigator.

    Figure 1 shows the Symbian Project Navigator view.

    -

    +

    Figure 1 - Symbian Project Navigator view

    -
    Table 1. Symbian Project Navigator view —shortcut menu
    +
    Table 1. Symbian Project Navigator view — shortcut menu
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_system_browser.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_system_browser.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ - - - - - - -System Browser View - - - -

    System Browser View

    -

    The System Browser view shows system level information about processes executing on various machines, like the host computer or the hardware under debugger control. The view shows this information:

    -
      -
    • running processes
    • -
    • tasks for selected processes
    • -
    • some hidden processes
    • -
    -

    Click on the expand icon for a process to view all tasks assigned to the selected process. Processes under debugger control appear in bold. Double-click a task to open it in a new Thread window, or choose the task name and click the Stack Crawl View button.

    -

    Table 1 explains items in the window.

    -

    NOTE If the System Browser view does not show processes for a specific machine, you will need to start a debugging session for that machine. For example, you might need to debug a project that runs on external hardware in order to see executing processes for that hardware.

    -
    Table 1 System Browser view—items
    -
    Item
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ItemIconExplanation
    Attach to Process Click to have the debugger control the selected process.
    Stack Crawl view Click to open a Thread window for the selected process.
    Refresh This icon indicates that information for selected item is periodically updated. Click this icon to toggle between refresh and no refresh.
    No Refresh This icon indicates that information is not updated for the selected item.
    Expand Click to expand a process and list related tasks.
    -
    Related concepts
    - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/view_variables.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_variables.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_variables.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,7 @@

    Variables View

    -

    The Variables view allows manipulation of the variables or variable hierarchy used in source code. For example, you can change the variable format, change a variables value, add watchpoints, and add global variables.

    +

    The Variables view allows manipulation of the variables or variable hierarchy used in source code. For example, you can change the variable format, change a variables value, add watchpoints, and add global variables. In addition to the standard C/C++, Symbian, and the Qt data types: QString, QByteArray, QSet, QHash, QMap, QVector, QList, QLinkedList and Qvariant.

    Figure 1 shows the Variables view with Show Type Names option enabled.

    Figure 1 - Variables view showing type names

    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_build_prefs.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_build_prefs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_build_prefs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -9,9 +9,7 @@ @@ -21,7 +19,7 @@ page in the Preferences window provides global preferences to control general build options like clean, test components, dependency tracking, concurrent build jobs, build behavior, and emulator options.

    Figure 1 - Build workspace preferences page

    -

    The following options are available in both the global Build preference panel and the project Properties > Carbide.c++ > Carbide Project Settings panel.

    +

    The following options are available in both the global Build preference panel and the project Properties > Carbide.c++ > Project Settings panel.

    Table 1 Build Preferences —items
    @@ -51,7 +49,7 @@

     

    -

    sbsv1 tab

    +

    sbsv1 tab

    Figure 2 - SBSv1 tab

    Table 2 Symbian Build System v1 tab
    @@ -60,35 +58,31 @@ - + + - + +

    If not enabled, the Symbian OS command line build system handles all dependency tracking by generating the dependency information in the makefiles. Because it does this for all project files, regardless of the number of changes, it can result in a performance penalty. A single edit in a MMP file forces a complete regeneration of the makefile dependency information for all project files.

    - - + + - + + @@ -96,7 +90,7 @@
    Explanation
    Clean level

    Clean level

    Specifies the level of clean to perform on project files. The levels include:

    • Level 0 (abld clean) - removes all the intermediate files created during compilation, and all the executables and import libraries created by the linker
    • Level 1 (abld reallyclean) - performs a clean operation, but also removes all exported files and makefiles
    • Level 2 (abld reallyclean, bldmake clean) - performs a reallyclean operation and then removes all files created by bldmake
    • -
    -
    Manage dependency tracking (improves build speed)

    Manage dependency tracking (improves build speed)

    Enable to have Carbide manage the dependency tracking for source and resource files. Carbide does this by separating out the generation of dependency information from the makefile and managing the entire process. All builds now can quickly compare whether new dependency information is required due to changes in a source file and only build those that need updating.

    -

    If not enabled, the Symbian OS command line build system handles all dependency tracking by generating the dependency information in the makefiles. Because it does this for all project files, regardless of the number of changes, it can result in a performance penalty. A single edit in a MMP file forces a complete regeneration of the makefile dependency information for all project files.

    -
    Show a dialog to modify build actions when modified MMPs are detected

    Enable to have Carbide ask before starting a build what action to take when modified files are detected. When disabled, do not show a dialog but use the default action listed below.

    -

    Show a dialog to modify build actions when modified MMPs are detected

    Enable to have Carbide ask before starting a build what action to take when modified files are detected. When disabled, do not show a dialog but use the default action listed below.

    Default action to take when mmp files are modified

    Default action to take when mmp files are modified

    Defines the default action Carbide should execute when it detects modified MMP files and the option above is disabled:

    • None
    • Link Only
    • Compile and Link
    • -
    -
    Do not offer to track dependencies for projects build on command-line

     

    -

    sbsv2 tab

    +

    sbsv2 tab

    Figure 3 - SBSv2 tab

    Table 3 Symbian Build System v2 tab
    @@ -130,7 +124,7 @@
    Related references
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_carbide_pref.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_carbide_pref.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_carbide_pref.htm Wed Jul 21 12:11:48 2010 -0500 @@ -11,8 +11,8 @@

    Carbide.c++ preferences

    The -Carbide.c++ panel in the Preferences window provides an option to keep your projects updated when you add or create files. Figure 1 shows the Carbide.c++ preference panel.

    -

    +Carbide.c++ panel in the Preferences window provides an option to keep your projects updated when you add or create files. Figure 1 shows the Carbide.c++ preference panel.

    +

    Carbide.c++ preference panel

    Figure 1 - Carbide.c++ preferences page

    Table 1 Carbide.c++ Preferences —items
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_pref_code_style.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_pref_code_style.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_pref_code_style.htm Wed Jul 21 12:11:48 2010 -0500 @@ -6,14 +6,15 @@

    Code Styles preferences

    -

    Carbide supports the use of code styles in projects via the C/C++ Code Style preference panel. Use a code style profile to set specific smart typing features, like indentation, tabs or spaces, and many more options. There are several preset code styles like GNU, while Carbide supplies these profiles:

    +

    Carbide supports the use of code styles in projects via the C/C++ Code Style preference panel. Use a code style profile to set specific smart typing features, like indentation, tabs or spaces, and many more options. There are several built-in code styles like GNU, Whitesmith, and others, while Carbide supplies these additional styles:

    -

    Setting a code style sets it for the entire workspace. When a new file is created the currently selected code style rules are applied as you edit the file. You can apply a set of rules to a previously created source file by opening it in an editor view, then right-clicking and choosing Source > Format (CTRL+SHIFT+F).

    -

    -

    Figure 1 - Code Style preference panel

    +

    Setting a code style sets it for the entire workspace. When a new file is created the currently selected code style rules are applied as you edit the file. You can apply a set of rules to a previously created source file by opening it in an editor view, then right-clicking and choosing Source > Format (CTRL+SHIFT+F).

    +

    +

    Figure 1 - Code Style preference panel

    Related references
    • Code Style preferences
    • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/release_notes.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/release_notes.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/release_notes.htm Wed Jul 21 12:11:48 2010 -0500 @@ -31,6 +31,12 @@ changes making the tools unusable!

      What's New in 3.0.0

      The following features for Symbian development are provided within Carbide.c++:

      +

      Milestone 2

      +
        +
      • A new Carbide Portal view provides easier access to Carbide information, an extensions marketplace, and support.
      • +
      • The Variables view and debug hover now supports the following Qt data types: QString, QByteArray, QSet, QHash, QMap, QVector, QList, QLinkedList and Qvariant.
      • +
      +

      Milestone 1

      • Eclipse 3.6 — The Eclipse 3.6 project (Helios) provides the foundation, or integration platform, on which Carbide.c++ is built. See What's New in 3.6 for more information.
      • CDT 7.0 — The final version of CDT is included as part of the Helios release. See the CDT 7.0 News and Noteworthy page for more information.
      • @@ -45,16 +51,19 @@
    -

    2.6.0

    +

    2.7.0

    +
      + +
    • The Leavescan plug-in has been deprecated and is no longer included in Carbide.c++ releases. Use Codescanner to replace the Leavescan functionality.
    • +
    +

    2.6.0

    • GCCE 4.0 supported — required for future SBSv2 releases.
    • Symbian^3 supported — new templates and improvements required for the public Symbian^3 SDK.
    • -
    • Known Issues in v2.6.0: -
        -
      • GCCE4 support requires using a SBSv2 build alias (-c parameter) of armv5_udeb_gcce or armv5_urel_gcce. As of this writing, these aliases were not available in the SDK or SBSv2, but will appear in some future version. Carbide versions prior to 2.6 do not support GCCE4.
      • -
      • Users should consult the SDK documentation for GCCE and SBSv2 issues and installation requirements.
      • -
      • TRK: If you install the TRK app onto your phone's flash memory (Mass Storage) a Remote Connection may not find the TRK-service even though TRK is already connected to your PC. Workaround: Uninstall TRK then reinstall it onto your PHONE memory (C-drive). The TRK service should now be "Available".
      • -
      +
    • Known Issues in v2.6.0: +

      GCCE4 support requires using a SBSv2 build alias (-c parameter) of armv5_udeb_gcce or armv5_urel_gcce. As of this writing, these aliases were not available in the SDK or SBSv2, but will appear in some future version. Carbide versions prior to 2.6 do not support GCCE4.

      +

      Users should consult the SDK documentation for GCCE and SBSv2 issues and installation requirements.

      +

      TRK: If you install the TRK app onto your phone's flash memory (Mass Storage) a Remote Connection may not find the TRK-service even though TRK is already connected to your PC. Workaround: Uninstall TRK then reinstall it onto your PHONE memory (C-drive). The TRK service should now be "Available".

    2.5.0

    @@ -75,10 +84,11 @@

    Workarounds for known issues:

    • Qt issues — If Qt does not seem to be working as expected, be sure to run the \configuration\qt\register_plugins.bat file to properly register the Qt plugins. This is especially important if you installed Carbide using a zip file and not an installer.
    • +
    • USB issues — There are know problems with some USB configurations. We are working to resolve these asap.

    Technical support

    The following support services are available:

    -
    • Visit the Symbian Foundation for Carbide.c++ and Symbian development information
    • + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/AddingClasses.html --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/AddingClasses.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/AddingClasses.html Wed Jul 21 12:11:48 2010 -0500 @@ -69,7 +69,7 @@
      Related tasks
      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/AddinganSDK.html --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/AddinganSDK.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/AddinganSDK.html Wed Jul 21 12:11:48 2010 -0500 @@ -21,7 +21,7 @@
      -

      +

      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/AppInfoFile.html --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/AppInfoFile.html Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ - -Creating an AIF File in Modifying Resources - - - -

      Creating an AIF File

      - -

      - The AIF Definition File wizard creates a file that - specifies an AIF file to be built as part of the project. An AIF file is a - Symbian OS application information file, which describes an application's icons - and properties. For more information, see Concepts >AIF File.

      -

      NOTE AIF files are used only for projects created for Symbian OS versions - before v9.1.

      -
      -

      - To create an AIF file

      -
        -
      1. -

        - Open the MMP file associated with the project in the Symbian Project Navigator (double-click on MMP file or right-click and select Open).

        - -

        -
      2. -

        Figure 1 - MMP File in Symbian Project Navigator

        -
      3. The MMP editor opens.
      4. - -

        -

        Figure 2 - Access to AIF Editor in MMP Editor

        -
      5. - Select the Sources tab and select AIF in the Resources group. -
      6. -
      7. Click Add button to open the AIF editor.
      8. -

        -

        Figure 3 - AIF Editor

        -
      9. - Enter a name for the .aif file or click untitled.aif button to set a default name based on the SDK and project name.
      10. -
      11. Specify a resource file from the dropdown list or browse the filesystem.
      12. -
      13. Click the Add From Project or Add From Filesystem buttons to add image and mask bitmaps.
      14. -
      15. Set the Shared Image Properties (color depth, mask depth, and color format).
      16. -
      17. Select the two images (image and mask) and select Pair Image and Mask button.
      18. -
      19. Click Ok to create AIF file from the information you defined in the editor.
      20. -
      -

      -

      Figure 4- AIF Editor with information defined

      -
      -
      Related concepts
      - -
      Related reference
      - - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/CreatingNewProjects.html --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/CreatingNewProjects.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/CreatingNewProjects.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,101 +1,101 @@ - - - - Creating New Projects - - - -

      Creating New Projects

      -
      -

      New projects are created using the New Project Wizard. Carbide includes a number of templates that make creating projects for different SDKs and executables quick and easy.

      -

      NOTE You must have at least one recognized SDK installed before you can create a project. See the SDK Preferences panel to determine if the installed SDKs are recognized by Carbide.c++ IDE. If the SDK you have is not recognized, you may still be able to add it to the Discovered Symbian OS SDK list.

      -

      NOTE When creating or importing projects the sources and SDK must be on the same drive. This is due to many of the internal SDK tools using an implicit working drive to calculate paths (e.g. \epoc32\tools). Avoid spaces in SDK paths since this will also cause problems.

      -
      -

      Creating New Symbian OS C++ Projects

      -
        -
      1. Select File > New > Symbian OS C++ Project to invoke the New Project wizard.
      2. -

        -
      3. The New Symbian OS C++ Project wizard appears. Select a template related to an installed SDK.
      4. -

        A project template provides the initial source files and project settings appropriate for the chosen project type. A brief description of each template appears below the list. The project type determines the type of program that you are writing.

        -

        NOTE If the selected template requires user input, additional wizard pages will collect data from the user before creating the project.

        -

        Checkmark the Filter templates based on enabled SDKs option to only list SDKs enabled in the SDK Preferences panel. Uncheck this option to list SDKs that can be used with Carbide. Click Next.

        -

        -
      5. Enter a name for your project.
      6. -

        Checkmark the Use default location option to save the project in the current workspace by default or uncheck it to save to another location. Enter the path in the Location field or click Browse button to locate the directory. Click Next.

        -

        new project
        -

        -
      7. Select the SDKs and Build Configurations.
      8. -

        Checkmark the Filter SDKs based on selected template option to only show build configurations based on the selected SDK template, or uncheck to show all enabled SDKs and their related build configurations.

        -

        -

        The Symbian OS SDKs wizard page shows a tree of the SDKs and the type of builds available within that SDK. Select a single SDK - if the program you are developing is for just one version of a platform, - or select multiple SDKs to build the program for multiple build platforms or SDK versions.

        -

        The build configuration allows you to specify the compiler(s) to - do the build, and whether debug and/or release builds are required. For this example we recommend using the Emulator Debug version as the build configuration. Later, you can switch to another build configuration to create the project for a specific device.

        -

        Click Next.

        -
      9. Set the project properties in the Basic Settings page.
      10. -
        -
        -

        NOTE The basic properties for a project may change based on the template selected for a particular project type.

        -

        Fill in the applicable fields, which - may include UID2, UID3, Vendor ID, Author, Support Email, Copyright - notice and Target Type for console EXEs.

        - -

        Application UID (or UID3) is used to uniquely identify the binary (EXE or DLL) within the system. The purpose of UID 3 is to prevent one executable from interfering the operation of another executable.

        -

        A Vendor ID (VID) is a unique identifier for the organization that is supplying the program. In versions of Symbian OS with platform security, a program can read a VID at runtime to check that a binary comes from a particular source. In most cases, the VID should be zero, meaning that source of the executable is not required for any security checks.

        -

        UID 2 is a unique identifier number that identifies the type of interface that the - project implements. The values are defined by Symbian

        - -
          -
        • For GUI applications, it is always 0x100039CE
        • -
        • For static interface DLLs, the UID 2 is always 0x1000008d
        • -
        • For polymorphic DLLs, the UID2 is defined by the framework which is being implemented
        • -
        - Author, Copyright notice, and Text to be shown are used in comments created by the wizard in the source code. -

        For more information on UIDs - and Vendor IDs, see Symbian Signed, - which allocates these values.

        -
        -
      11. - Click Next to move to the Project Directories page.
      12. -
        -


        -

        -

        NOTE The project directories depends on the selected template. That is, the directories required to store project data may - change based on the template used.

        -
        -

        Accept the defaults or enter the names for Include and Source folders to be created under the project root directory. Generated files will be copied to these directories.

        -
      13. Click Finish to create the project.
      14. -

        This generates the necessary files for the project based on the template selected and show them in the Project Explorer view.

        -
      -
      -

      -
      -
      -
      -

      NOTE If the Carbide.c++ perspective is not visible, select the Window -> Open Perspective > Other... command to list all available - perspectives, then select the Carbide.c++ perspective and click OK.

      -
      -
      -
      Concepts
      - -
      Tasks
      - - - - - - + + + + Creating New Symbian OS C++ Projects + + + +

      Creating New Symbian OS C++ Projects

      +
      +

      New projects are created using the New Project Wizard. Carbide includes a number of templates that make creating projects for different SDKs and executables quick and easy.

      +

      NOTE You must have at least one recognized SDK installed before you can create a project. See the SDK Preferences panel to determine if the installed SDKs are recognized by Carbide.c++ IDE. If the SDK you have is not recognized, you may still be able to add it to the Discovered Symbian OS SDK list.

      +

      NOTE When creating or importing projects the sources and SDK must be on the same drive. This is due to many of the internal SDK tools using an implicit working drive to calculate paths (e.g. \epoc32\tools). Avoid spaces in SDK paths since this will also cause problems.

      +
      +

      Creating New Symbian OS C++ Projects

      +
        +
      1. Select File > New > Symbian OS C++ Project to invoke the New Project wizard.
      2. +

        +
      3. The New Symbian OS C++ Project wizard appears. Select a template related to an installed SDK.
      4. +

        A project template provides the initial source files and project settings appropriate for the chosen project type. A brief description of each template appears below the list. The project type determines the type of program that you are writing.

        +

        NOTE If the selected template requires user input, additional wizard pages will collect data from the user before creating the project.

        +

        Checkmark the Filter templates based on enabled SDKs option to only list SDKs enabled in the SDK Preferences panel. Uncheck this option to list SDKs that can be used with Carbide. Click Next.

        +

        +
      5. Enter a name for your project.
      6. +

        Checkmark the Use default location option to save the project in the current workspace by default or uncheck it to save to another location. Enter the path in the Location field or click Browse button to locate the directory. Click Next.

        +

        new project
        +

        +
      7. Select the SDKs and Build Configurations.
      8. +

        Checkmark the Filter SDKs based on selected template option to only show build configurations based on the selected SDK template, or uncheck to show all enabled SDKs and their related build configurations.

        +

        +

        The Symbian OS SDKs wizard page shows a tree of the SDKs and the type of builds available within that SDK. Select a single SDK + if the program you are developing is for just one version of a platform, + or select multiple SDKs to build the program for multiple build platforms or SDK versions.

        +

        The build configuration allows you to specify the compiler(s) to + do the build, and whether debug and/or release builds are required. For this example we recommend using the Emulator Debug version as the build configuration. Later, you can switch to another build configuration to create the project for a specific device.

        +

        Click Next.

        +
      9. Set the project properties in the Basic Settings page.
      10. +
        +
        +

        NOTE The basic properties for a project may change based on the template selected for a particular project type.

        +

        Fill in the applicable fields, which + may include UID2, UID3, Vendor ID, Author, Support Email, Copyright + notice and Target Type for console EXEs.

        + +

        Application UID (or UID3) is used to uniquely identify the binary (EXE or DLL) within the system. The purpose of UID 3 is to prevent one executable from interfering the operation of another executable.

        +

        A Vendor ID (VID) is a unique identifier for the organization that is supplying the program. In versions of Symbian OS with platform security, a program can read a VID at runtime to check that a binary comes from a particular source. In most cases, the VID should be zero, meaning that source of the executable is not required for any security checks.

        +

        UID 2 is a unique identifier number that identifies the type of interface that the + project implements. The values are defined by Symbian

        + +
          +
        • For GUI applications, it is always 0x100039CE
        • +
        • For static interface DLLs, the UID 2 is always 0x1000008d
        • +
        • For polymorphic DLLs, the UID2 is defined by the framework which is being implemented
        • +
        + Author, Copyright notice, and Text to be shown are used in comments created by the wizard in the source code. +

        For more information on UIDs + and Vendor IDs, see Symbian Signed, + which allocates these values.

        +
        +
      11. + Click Next to move to the Project Directories page.
      12. +
        +


        +

        +

        NOTE The project directories depends on the selected template. That is, the directories required to store project data may + change based on the template used.

        +
        +

        Accept the defaults or enter the names for Include and Source folders to be created under the project root directory. Generated files will be copied to these directories.

        +
      13. Click Finish to create the project.
      14. +

        This generates the necessary files for the project based on the template selected and show them in the Project Explorer view.

        +
      +
      +

      +
      +
      +
      +

      NOTE If the Carbide.c++ perspective is not visible, select the Window +> Open Perspective > Other... command to list all available + perspectives, then select the Carbide.c++ perspective and click OK.

      +
      +
      +
      Concepts
      + +
      Tasks
      + + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/ExportingtoMMP_BLDinf.html --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/ExportingtoMMP_BLDinf.html Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,271 +0,0 @@ - - -Exporting project(s) to MMP/Bld.inf files in Tasks - - - - -
      -

      Exporting project(s) to MMP/Bld.inf files

      -

      - The command-line Symbian OS toolchain requires a component description - file (Bld.Inf) and one or more project definition files - (.mmp) to build a project. The export command allows you to create - these files for your projects.

      -

      - To export project(s) to a Bld.Inf and/or MMP - file:

      -
        -
      1. - Click File > Export... to get a list of the - available export wizards: -

        - OR

        -

        - Click Export from the pop-up menus of the - C/C++ Projects and Navigator views to get a - list of the available export wizards:

        -
        - -

        -
        -
      2. -
      3. Select Symbian MMP/Bld.Inf and click - Next to go to the Symbian Projects page: -

        -
        - -

        -
        -
      4. -
      5. - Select the project(s) you intend to export from the list of - Symbian Projects.
      6. -
      7. - Click Next to go to the SDKs and Build Configurations Selection page: -
        - -

        -
        -
      8. -
      9. - Select at least one build configuration for each project in the - left-hand pane from the list of available SDKs and build configurations in the - right-hand pane. By default, all the build configurations chosen during the - last export are selected. If a project is being exported for the first time, no - build configurations are selected. -

        - The build configurations chosen for a project are distinguished using - guard macros in the MMP file. The guard macros are placed around - the MMP file statements containing resources or build setting, - only valid for a subset of the chosen build configurations.

        -

        - There are cases where guard macros may not be able to distinguish - between two build configurations. The export wizard shows a conflict when two - such ambiguous build configurations are selected by the user.

        -

        - The combination of build configurations which results in a conflict - are as follows:

        - -
          -
        • -

          - Any two build configurations that differ only in the build - variant (UDEB/UREL). For example, "UIQ 3.0 Phone (GCCE) Debug" and "UIQ 3.0 - Phone (GCCE) Release" configurations will result in a conflict, as they differ - only in the build variant.

          -
        • -
        • -

          - Any two build configurations, of which one is user-defined based - on the other using the Manage option in the C/C++ - Build properties view of the project.

          -

          - For more information on managing build configurations, - refer to the CDT user guide.

          -
        • -
        - -

        - The wizard will change the build settings in the MMP - file based on the chosen build configuration. If more than one build - configuration which require different build settings are chosen, guard macros - are used to determine the build settings. For example, if you want to change - the SECUREID option for all the EKA2 build - configurations, the wizard will append the following lines into the - MMP file:

        -

        #if def EKA2
          SECUREID 0x00301
        #endif

        -

        - Where EKA2 is the guard macro for all the build - configurations designed for the EKA2 kernel. The above MMP file - statements check whether the EKA2 guard macro is defined, and if - it is, change the SECUREID option accordingly.

        -
      10. -
      11. - Click Next to go to the MMP File and Bld.inf - File page: -
        -
        -
        -
          -
        1. - Type the MMP file location in the MMP - File field, or click Browse to select the - MMP file for each project listed above. -

          - By default, the MMP file is exported to one of the - following locations in the order listed below:

          -
            -
          • The location where the project was exported the last time.
          • -
          • The group folder of the exported project, if it exists.
          • -
          • The exported project's root directory.
          • -
          -
        2. -
        3. - If you select the Export Bld.inf file option, then - type the Bld.Inf file location in the Bld.inf - File field, or click Browse to select the - Bld.Inf file. -

          - If you do not select the Export Bld.inf file option, - then you need not specify the Bld.Inf file location.

          -

          - By default, the Bld.Inf file is exported to one of the - following locations in the order listed below:

          -
            -
          • - The location where the Bld.Inf was created when the - project was last exported to an MMP file.
          • -
          • The MMP file location.
          • -
          -
        4. -
        -
      12. -
      13. Click Next to go to the Other Makefiles page where you can specify extra Makefiles to invoke from bld.inf
      14. - -
        -

        -
        -
      15. Click Next to open the Scalable Icon Makefiles page where you can specify the Makefiles used to generate scalable icon files.
      16. -

        -
      17. Click Next to go to the PRJ_EXPORTS page, to specify the list of files to be copied from the source directories to - the releasables directories while building the project: -
        - -

        -
        -

        - Note that this page is displayed only if you have selected - the Export Bld.inf file option in the previous page.

        -
      18. -
      19. - Type the Source and Target - locations of the file to be copied, and click Add to append - the source-target pair to the PRJ_EXPORTS list. You can use - Browse to specify the source file and its target location. If - the target location for the file is not specified, it will be copied to - epoc32\include directory. -

        - Note that the contents of the PRJ_EXPORTS list is - exactly the same as it appears in the PRJ_EXPORTS section of the - Bld.Inf file.

        -
      20. -
      21. - If you want to modify or delete any entry from the - PRJ_EXPORTS list, select the entry and click - Modify or Delete.
      22. -
      23. - Click Next to go to the MMP Preview - page: -
        - -

        -
        -
      24. -
      25. - Select a project from the list of projects to be exported, to see a - preview of the MMP file in the pane below. You can edit the - contents if required.
      26. -
      27. - Click Finish to complete the export process. The - wizard will create the managed MMP file and Bld.inf - file in their specified locations. -

        - A managed MMP file contains the same content as a - standard MMP file would, but the contents are organised into - following managed sections using special tags:

        - -
          -
        • -

          - Binary Build Information

          -
        • -
        • -

          - Search Path

          -
        • -
        • -

          - Project Content Managed

          -
        • -
        • -

          - Linkage

          -
        • -
        • -

          - Customization

          -
        • -
        - -

        - You will be notified in case of any errors during the updated - process, which results in not creating the MMP or - Bld.Inf files.

        -
      28. -
      -
      -

      - The following MMP file generated by the wizard, shows how - its content is organised using managed sections:

      -

      // HelloCarbide.mmp

      -

      /*& START_BINARY_BUILD &*/
      - // NOTE Content in this section is auto-generated, any changes are overwritten in the next update process.
      - CAPABILITY READUSERDATA
      - TARGET HelloCarbide.exe
      - TARGETTYPE exe
      - UID 0x00000000 0xe4d95f85
      - VENDORID 0x00000000
      - SECUREID 0xE4D95F85
      - /*& END_BINARY_BUILD &*/

      -

      /*& START_SEARCH_PATHS &*/
      - // NOTE Content in this section is auto-generated, any changes are overwritten in the next update process.
      - SYSTEMINCLUDE \epoc32\include \epoc32\include\variant \epoc32\include\oem
      - USERINCLUDE ..\inc ..\data
      - /*& END_SEARCH_PATHS &*/

      -

      /*& START_PROJECT_CONTENT &*/
      - // NOTE Content in this section is auto-generated, any changes are overwritten in the next update process.
      - SOURCEPATH ..\data
      - START RESOURCE HelloCarbide.rss
      - TARGETPATH resource\apps
      - HEADER
      - END
      - START RESOURCE HelloCarbide_reg.rss
      - TARGETPATH private\10003a3f\apps
      - HEADER
      - END
      - SOURCEPATH ..\src
      - SOURCE Waving.cpp HelloCarbideDocument.cpp HelloCarbideApplication.cpp
      - SOURCE HelloCarbideAppView.cpp HelloCarbideAppUi.cpp HelloCarbide.cpp
      - /*& END_PROJECT_CONTENT &*/

      -

      /*& START_LINKAGE_INFORMATION &*/
      - // NOTE Content in this section is auto-generated, any changes are overwritten in the next update process.
      - LIBRARY euser.lib apparc.lib cone.lib eikcore.lib avkon.lib commonengine.lib
      - LIBRARY efsrv.lib estor.lib
      - /*& END_LINKAGE_INFORMATION &*/

      - - -
      - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/ImportingProjects.html --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/ImportingProjects.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/ImportingProjects.html Wed Jul 21 12:11:48 2010 -0500 @@ -49,58 +49,62 @@
      1. Click File > Import... to get a list of available import wizards
      2. -
      3. Select Symbian OS Bld.inf file and click Next to go to the Import Bld.inf page -
        - -

        -
        +
      4. Select Symbian OS > Symbian OS Bld.inf file and click Next to go to the Import Bld.inf page +
      5. -
      6. - Type the location of the bld.inf file to import, or browse to the file using the Browse button.
      7. - -

        file import

        -

        NOTE There will be two builders available in Carbide, one for SBSv1 (current version of Symbian Build System) and one for SBSv2 (newer version). The Builder option will only be displayed when a SBSv2 installation is detected.

        -

        SBSv2 only works with recent versions of Symbian OS9.5. Both SBSv1 and SBSv2 are GNU make based build systems.  SBSv1 uses Perl to generate make files, while SBSv2 uses Python. Select the appropriate builder for your project.

        - When building for SBSv2, the builder will set EPOCROOT to the absolute path (including drive letter) to the kit for the active build configuration.  It will also add the path to the sbs bin directory to the start of the PATH variable.  This is derived from the SBS_HOME environment variable.

        For SBSv2, all build configurations (platform/target), including the built-in platforms (WISNCW, ARMV5), are declared in xml files in the \sbs\lib\config directory. The Build Configurations selection page will display only those kits known to support SBSv2.

        -
      8. Click Next to select the recognized SDKs and Build Configurations to be created for this project -

        The SDKs and Build Configurations shows a tree of - the SDKs that are available to be used, and for each SDK, the type of build configurations - that are available. You can select a single SDK if you are developing the program - for just one version of a platform, or multiple SDKs if your - program is to be built against multiple platforms or operating system - versions.

        -

        NOTE The platforms listed are dependent upon the filter settings in the Platform Filtering Preferences.

        -

        -
        -

        -
        -
      9. -
      10. Click Next to select the mmp and extension make files -
        -

        One MMP file must be selected in order to continue. If the bld.inf file contains more than three MMP files, just select the MMP files you need to import. If there are three or less MMP files, then all are selected for importing.

        -

        -
        -
      11. -
      12. Click Next to enter the Project name and root directory
      13. -

        When creating a project, project files are created in the root directory. Carbide.c++ creates additional files for each project. They consist of:

        -
          -
        • .project - an xml file that provides a project description
        • -
        • .cproject - an xml file that provides additional project information
        • -
        • .settings folder - contains files that provide build configuration and preference settings
        • -
        -

        The root directory is a path to the root of your project. All necessary tool components, developer libraries, and information about the SDK are stored in subdirectories under this root. The whole path leading to the SDK root directory must be declared to the Windows system via the Environment Variables settings. The variable name is EPOCROOT and the variable value is the full path where a Symbian OS SDK is installed in the Windows system.

        -

        The root directory should contain all project related files that you want to work with in Carbide. The default directory is calculated by parsing the bld.inf file and mmp file(s).

        -

        - -
      14. Click Finish to import the project -

        - The - wizard creates the project in the C/C++ Projects view, where it can be built and edited as normal. If the wizard is unable to read the project files, then the page - describes the error that occurred. If an error occurs, you must fix the project file, and then - re-import the bld.inf.

        -
      15. -
      + +
      +

      Select Symbian bld.inf file to import

      +
      +
        +
      1. + Type the location of the bld.inf file to import, or browse to the file using the Browse button.
      2. +

        Select bld.inf file to import

        +

        NOTE Depending upon which SDKs are installed, you may see both SBSv1 and SBSv2 builders available. It is recommended that SBSv2 be the primary choice as SBSv1 has been deprecated for future Symbian OS development.

        +

        SBSv2 works with recent versions of Symbian^3 and Symbian ^4 SDKs. Both SBSv1 and SBSv2 are GNU make based build systems.  SBSv1 uses Perl to generate make files, while SBSv2 uses Python. Select the appropriate builder for your project.

        + When building for SBSv2, the builder will set EPOCROOT to the absolute path (including drive letter) to the kit for the active build configuration.  It will also add the path to the sbs bin directory to the start of the PATH variable.  This is derived from the SBS_HOME environment variable. +

        For SBSv2, all build configurations (platform/target), including the built-in platforms (WINSCW, ARMV5), are declared in xml files in the \sbs\lib\config directory. The Build Configurations selection page displays only kits known to support SBSv2.

        +
      3. Click Next to select the recognized SDKs and Build Configurations to be created for this project +
        +

        The SDKs and Build Configurations shows a tree of + the SDKs that are available to be used, and for each SDK, the type of build configurations + that are available. You can select a single SDK if you are developing the program + for just one version of a platform, or multiple SDKs if your + program is to be built against multiple platforms or operating system + versions.

        +
        +
      4. +
      +
      +

      NOTE The platforms listed are dependent upon the filter settings in the Platform Filtering Preferences.

      +

      Symbian OS SDKs page

      +
      +
        +
      1. Click Next to select the mmp and extension make files +
        +

        One MMP file must be selected in order to continue. If the bld.inf file contains more than three MMP files, just select the MMP files you need to import. If there are three or less MMP files, then all are selected for importing.

        +

        +
        +
      2. +
      3. Click Next to enter the Project name and root directory
      4. +

        When creating a project, project files are created in the root directory. Carbide.c++ creates additional files for each project. They consist of:

        +
          +
        • .project - an xml file that provides a project description
        • +
        • .cproject - an xml file that provides additional project information
        • +
        • .settings folder - contains files that provide build configuration and preference settings
        • +
        +

        The root directory is a path to the root of your project. All necessary tool components, developer libraries, and information about the SDK are stored in subdirectories under this root. The whole path leading to the SDK root directory must be declared to the Windows system via the Environment Variables settings. The variable name is EPOCROOT and the variable value is the full path where a Symbian OS SDK is installed in the Windows system.

        +

        The root directory should contain all project related files that you want to work with in Carbide. The default directory is calculated by parsing the bld.inf file and mmp file(s).

        +

        +
      5. Click Finish to import the project +

        + The + wizard creates the project in the Project Explorer view, where it can be built and edited as normal. If the wizard is unable to read the project files, then the page + describes the error that occurred. If an error occurs, you must fix the project file, and then + re-import the bld.inf.

        +
      6. +
      Related concepts
      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/ModifyingResources.html --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/ModifyingResources.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/ModifyingResources.html Wed Jul 21 12:11:48 2010 -0500 @@ -9,10 +9,8 @@

      - This section describes the steps for adding and modifying resources of an - existing project. The resources may be a bitmap resource (MBM) or an - application information file (AIF) definition file. -

      + This section describes the steps for adding and modifying bitmap resources (MBM) of an + existing project.

      Note that the Symbian OS plug-ins do not provide a graphical editor for the Symbian OS resource (.rss) file format. Files of this type though @@ -20,7 +18,6 @@ resource compiler.

      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/code_style_reformatting_sources.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/code_style_reformatting_sources.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/code_style_reformatting_sources.htm Wed Jul 21 12:11:48 2010 -0500 @@ -14,8 +14,8 @@
    • Open an editor view with the source file you want to reformat
    • Right-click and choose Source > Format (CTRL+SHIFT+F)
    • -

      -

      Figure 1 -Selecting Source > Format from an editor view

      +

      +

      Figure 1 -Selecting Source > Format from within an editor view

      Related references
        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/code_style_workspace.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/code_style_workspace.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/code_style_workspace.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,5 +1,5 @@ -Code Styles preferences +Setting the Workspace Code Style @@ -7,8 +7,8 @@

        You can set the default code style for a workspace using the Code Style preference panel. Once set, the specified code style is applied to all new files and projects created in the workspace. To update a source file already in the workspace, see Reformatting a Source File.

        -

        -

        Figure 1 -Select a profile from the Select a profile list

        +

        +

        Figure 1 -Select a profile from the Select a profile list

        You can also create your own profiles based on the one's included with Carbide. Simply click Edit and change the options presented in the Profile <profile_name> window that appears.

        To set the workspace code style

        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_01.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_01.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_01.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - -Installing PERL - - - -

        Installing PERL

        -

        PERL is required for many Symbian OS utilities and commands.

        -
        -

        Installing PERL

        -
          -
        • Install ActivePERL version 5.6.1 b638
        • -
        -
        -

        Software can be downloaded from: http://www.activestate.com/Products/ActivePerl/.

        -

        NOTE Later releases of Perl are not yet supported by the Symbian utilities and can cause unknown compiling errors.

        -
        -
        -
        Other references
        - - - - - + + + + + + +Installing Perl + + + +

        Installing Perl

        +

        Perl is a high-level, general-purpose, interpreted, dynamic programming language which many Symbian OS build utilities and commands require.

        +
        +

        Installing Perl

        +
          +
        • Download and install ActivePerl version 5.6.1 b638
        • +
        +
        +

        Software can be downloaded from: http://www.activestate.com/Products/ActivePerl/.

        +

        NOTE Later releases of Perl are not yet supported by the Symbian utilities and can cause unknown compiling errors.

        +
        +
        +
        Other references
        + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_02.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_02.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_02.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,61 +1,59 @@ - - - - - - -Installing an SDK - - - -

        Installing an SDK

        -

        To create projects an SDK must be installed. If more than one SDK is installed one must be specified as the default.

        -
        -

        Installing an SDK

        -

        The following SDKs can be downloaded from Nokia at: http://www.forum.nokia.com/.

        -
          -
        1. Install at least one of the following SDKs using the install directions that accompany the SDK: -
            -
          • Series 60 5.0
          • -
          • Qt for S60
          • -
          • Series80
          • -
          • Series 60 cust kits
          • -
          • Techview Development kits
          • -
          -
        2. -
        3. Set the default SDK to use for projects -
            -
          1. In Carbide.c++ -
              -
            1. Click Window > Preferences > Carbide.c++ > SDK Preferences to open the SDK Preferences panel
            2. -
            3. Select the SDK and click SDK Properties to open the SDK Properties dialog
            4. -
            5. Set the Default SDK value to Yes
            6. -
            7. Close all the dialogs
            8. -
            -
          2. -
          3. In a command-line prompt: -
              -
            1. Set the default device devkit by typing on the command line:
              -
              - > devices –setdefault @device id: name
            2. -

              The device id and name can be found in the devices.xml file. For example, for a Techview 9.2 kit you might type
              -
              - > devices –setdefault @ SymbianOS_92_2006_wk40:com.symbian.techview

              -
            3. Now ensure the default device is set by entering:
              -
              - > devices
            4. -
            -
          4. -
          5. Make sure the correct SDK default is set.
          6. -
          -
        4. -
        -
        - -
        Other references
        - - - - + + + + + + +Installing an SDK + + + +

        Installing an SDK

        +

        To create projects an SDK must be installed. If more than one SDK is installed one must be specified as the default.

        +
        +

        Installing an SDK

        +

        The following SDKs can be downloaded from Nokia at: http://www.forum.nokia.com/.

        +
          +
        1. Install at least one of the following SDKs using the install directions that accompany the SDK: +
            +
          • Nokia Symbian^3
          • +
          • Nokia Qt for SDK 1.0
          • +
          • S60 5th Edition v1.0
          • +
          +
        2. +
        3. Set the default SDK to use for projects +
            +
          1. In Carbide.c++ +
              +
            1. Click Window > Preferences > Carbide.c++ > SDK Preferences to open the SDK Preferences panel
            2. +
            3. Select the SDK and click SDK Properties to open the SDK Properties dialog
            4. +
            5. Set the Default SDK value to Yes
            6. +
            7. Close all the dialogs
            8. +
            +
          2. +
          3. In a command-line prompt: +
              +
            1. Set the default device devkit by typing on the command line:
              +
              + > devices –setdefault @device id: name
            2. +

              The device id and name can be found in the devices.xml file. For example, for a Techview 9.2 kit you might type
              +
              + > devices –setdefault @ SymbianOS_92_2006_wk40:com.symbian.techview

              +
            3. Now ensure the default device is set by entering:
              +
              + > devices
            4. +
            +
          4. +
          5. Make sure the correct SDK default is set.
          6. +
          +
        4. +
        +
        + +
        Other references
        + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_03.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_03.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_03.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,49 +1,49 @@ - - - - - - -Configuring Environment Variables - - - -

        Configuring Environment Variables

        -

        To implement run mode on-device debugging the following tasks need to be completed.

        -
        -

        Configuring Environment Variables

        -
          -
        1. Set EPOCROOT variable -
            -
          1. Right click on My Computer and select Properties
          2. -
          3. Select the Advanced tab
          4. -
          5. Select the Environmental Variables button
          6. -
          7. Setup a new System variable called EPOCROOT. The value will depend on the path of the epoc32 folder in the kit, for example:
          8. -

            Variable name: EPOCROOT
            - Variable value: \bin\techview\

            -
          -
        2. -

          NOTE Take note of the location of the epoc32 folder when using multiple kits. Some kits place the epoc32 folder at \bin\techview\ and some kits will place it at the root. If you have multiple installations and switch to a new kit, you will need to change the EPOCROOT path; otherwise build problems may occur. When building the ROM image, scripts may complain about the EPOCROOT path or that it can’t find bldmake.bat if an incorrect EPOCROOT path is set.

          -
        3. Set Path to Tools Directory -
            -
          1. If using an installer the tools path is set up automatically and points to:
          2. - Variable: PATH
            - Value: C:\Program Files\Common Files\Symbian\Tools -
          3. If installing from zip files you will need to setup the tools path manually. Add the path to the beginning of the PATH variable:
          4. - Variable: PATH
            - Variable Value: \epoc32\tools;\epoc32\gcc\bin; -
          5. If using multiple kits that use a mix of installer and zip files then you can set up your PATH variable like this:
          6. - Variable: PATH
            - Value: \epoc32\tools;\epoc32\gcc\bin;C:\Program Files\Common Files\Symbian\Tools -
          -
        4. -
        -
        -
        Other references
        - - - - - + + + + + + +Configuring Environment Variables + + + +

        Configuring Environment Variables

        +

        To implement run mode on-device debugging the following tasks need to be completed.

        +
        +

        Configuring Environment Variables

        +
          +
        1. Set EPOCROOT variable +
            +
          1. Right click on My Computer and select Properties
          2. +
          3. Select the Advanced tab
          4. +
          5. Select the Environmental Variables button
          6. +
          7. Setup a new System variable called EPOCROOT. The value will depend on the path of the epoc32 folder in the kit, for example:
          8. +

            Variable name: EPOCROOT
            + Variable value: \bin\techview\

            +
          +
        2. +

          NOTE Take note of the location of the epoc32 folder when using multiple kits. Some kits place the epoc32 folder at \bin\techview\ and some kits will place it at the root. If you have multiple installations and switch to a new kit, you will need to change the EPOCROOT path; otherwise build problems may occur. When building the ROM image, scripts may complain about the EPOCROOT path or that it can’t find bldmake.bat if an incorrect EPOCROOT path is set.

          +
        3. Set Path to Tools Directory +
            +
          1. If using an installer the tools path is set up automatically and points to:
          2. + Variable: PATH
            + Value: C:\Program Files\Common Files\Symbian\Tools +
          3. If installing from zip files you will need to setup the tools path manually. Add the path to the beginning of the PATH variable:
          4. + Variable: PATH
            + Variable Value: \epoc32\tools;\epoc32\gcc\bin; +
          5. If using multiple kits that use a mix of installer and zip files then you can set up your PATH variable like this:
          6. + Variable: PATH
            + Value: \epoc32\tools;\epoc32\gcc\bin;C:\Program Files\Common Files\Symbian\Tools +
          +
        4. +
        +
        +
        Other references
        + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_04.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_04.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_04.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,35 +1,35 @@ - - - - - - -Setup a Virtual Drive for Techview and Cust Kits - - - -

        Setup a Virtual Drive for Techview and Cust Kits (optional)

        -

        Techview Kits and cust kits have kernel components, kernel extensions and device drivers that are typically built on a virtual drive. So if you want to debug them the debugger will need to load files from the virtual drive that the binaries were built on. If you do not know the virtual drive the kit was built on you should first pick a drive letter randomly.

        -
        -

        Setup a Virtual Drive for Techview and Cust Kits

        -
          -
        1. To subst a drive, type on a command line:
          - > subst drive_letter: path_to_kit
          -
          For example:
          -> subst M: C:\Symbian\S60_3_0_200626
        2. -
        3. On the command line type:
          ->subst
          -

          You should see the new virtual drive pointing to your kit. If the debugger tries to load a file it can’t find, it will look for it on the virtual drive. You can see this in the stack crawl. The stack crawl should give the full path of the file on the virtual drive the file was built on. The debugger will not be able to load the file until the correct virtual drive is specified.

          -

          If this happens you can redo the virtual drive to use the drive specified in the stack crawl or navigate to the file using the existing virtual drive. From that point the IDE will add that path and recursively check folders for files it needs.

          -
        4. -
        5. Make sure when you set up your default SDK in the Carbide IDE that you use the virtual drive.
        6. -
        -
        -
        Other references
        - - - - - + + + + + + +Setup a Virtual Drive + + + +

        Setup a Virtual Drive (optional)

        +

        SDKs have kernel components, kernel extensions and device drivers that are typically built on a virtual drive. So if you want to debug them the debugger will need to load files from the virtual drive that the binaries were built on. If you do not know the virtual drive the kit was built on you should first pick a drive letter randomly.

        +
        +

        Setup a Virtual Drive for SDKs

        +
          +
        1. To subst a drive, type on a command line:
          + > subst drive_letter: path_to_kit
          +
          For example:
          +> subst M: C:\Symbian\S60_5_0_201012
        2. +
        3. On the command line type:
          +>subst
          +

          You should see the new virtual drive pointing to your kit. If the debugger tries to load a file it can’t find, it will look for it on the virtual drive. You can see this in the stack crawl. The stack crawl should give the full path of the file on the virtual drive the file was built on. The debugger will not be able to load the file until the correct virtual drive is specified.

          +

          If this happens you can redo the virtual drive to use the drive specified in the stack crawl or navigate to the file using the existing virtual drive. From that point the IDE will add that path and recursively check folders for files it needs.

          +
        4. +
        5. Make sure when you set up your default SDK in the Carbide IDE that you use the virtual drive.
        6. +
        +
        +
        Other references
        + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/work_debug_act_debug.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/work_debug_act_debug.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/work_debug_act_debug.htm Wed Jul 21 12:11:48 2010 -0500 @@ -18,7 +18,7 @@

        or

      • Select Run > Debug from the menu bar
      • Both of these methods create a new debug launch configuration if none previously existed in the project or uses the last one launched for debugging.

        -
      • To launch using a specific debug launch configuration, right-click the project's EXE file in the C/C++ Projects view and select Debug As > Project_Name from the C/C++ Projects context menu
      • +
      • To launch using a specific debug launch configuration, right-click the project's EXE file in the Project Explorer view and select Debug As > Project_Name from the Project Explorer context menu

        The debugger assumes control of the program execution as the program runs.

        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/images/menu_reformat_source_file.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/images/menu_reformat_source_file.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/index.html --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/index.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/index.html Wed Jul 21 12:11:48 2010 -0500 @@ -36,15 +36,12 @@

        You can then add and build code in the project. This is mostly done using the standard CDT tools and techniques. The plug-ins through also offer special - support for the Symbian OS specific file formats for application information - files (AIF) and multi-bitmap files (MBM), as described in Modifying - Resources. -

        + support for the Symbian OS specific file formats and multi-bitmap files (MBM), as described in Modifying + Resources.

        • Working with SDKs
        • Creating New Projects
        • Importing Projects from a Bld.Inf File
        • -
        • Exporting Project(s) to MMP/Bld.inf Files
        • Adding Classes
        • Modifying Resources
        • Building Projects
        • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/installing_extensions.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/installing_extensions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,31 @@ + +Installing Extensions + + + + +

          Installing Extensions

          + +

          Use the Install Extensions page in the Carbide Portal view to find, select, download, and install Carbide extensions to your work environment.

          +
          +

          Installing one or more extensions

          +
            +
          1. Select one or more extensions to install from the extensions list. +
              +
            • Click to checkmark an extension to mark it for installation, or
            • +
            • Click Check all items to mark all extensions for installation
            • +
            +
          2. + +
          3. Click the Install Checked Items... option.
          4. +
          +

          Carbide then downloads and installs the selected extensions to your work environment. A restart of Carbide may be required to completely load the new features.

          +
          +

          Other references

          + + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/add_build_config_manage_wnd.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/add_build_config_manage_wnd.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/clean.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/clean.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/panel_active_config.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/panel_active_config.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_03.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_03.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_04.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_04.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_05.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_05.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_06.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_06.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_07.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_add_sos_class_07.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_03.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_03.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_04.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_04.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_05.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wiz_new_sos_class_05.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wnd_add_build_config_manager.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/images/wnd_add_build_config_manager.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_adding_symbian_class.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_adding_symbian_class.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_adding_symbian_class.htm Wed Jul 21 12:11:48 2010 -0500 @@ -15,24 +15,24 @@
          1. Right-click the project name and select the New > Symbian OS C++ Class menu item.
          2. The New Symbian OS C++ Class wizard appears showing the Select project page (Figure 1).

            -

            +

            Figure 1 - Symbian OS C++ Class wizard window

          3. Select the project to add the new class to, then click Next.
          4. The Name and Location page appears (Figure 2).

            -

            location

            +

            Figure 2 - Name and Location page

          5. Enter class name and header and source directory information, and optionally enable filenames to be lowercase, then click Next.
          6. The Select a type of class page appears (Figure 3).

            -

            template

            +

            Figure 3 - Select a type of class page

          7. Click a class template to use for the new class, then click Next.
          8. The Other Settings page appears (Figure 4).

            -

            +

            Figure 4 - Other Settings page

          9. Enter Author and Copyright information, then click Finish.
          10. -

            The new defined Symbian-based class titled NewClass, is added to the project and appears in the src folder (Figure 5).

            -

            -

            Figure 5 -New class appears in C/C++ Projects list inside the project

            +

            The new defined Symbian-based class titled SOSClassName is added to the project and appears in the src folder (Figure 5).

            +

            +

            Figure 5 -New class appears in Project Explorer list inside the project

          Related tasks
          diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_build.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_build.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_build.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,83 +1,83 @@ - - - - - - -Building Projects - - - - -

          Building Projects and Symbian Components

          -

          Building projects consists of a new abld-based build system that wraps build functionality around existing SDK build tools that invoke makmake commands (e.g. bldmake bldfiles and abld build).

          -

          The plug-ins provide extra functionality to set up suitable build configurations for Symbian OS C++ projects. The initial selection of a build configuration is done when you create a project, as described in Creating New Projects. You can later change the Active Build Configuration. The Build Configurations also provides a command (Project > Build All Configurations) to build all the selected build configurations in a batch.

          -

          Building Symbian OS C++ projects can involve the use of Symbian OS specific tools, such as the Symbian OS resource compiler. For detailed information on such tools, see the documentation for the SDK that you are using.

          -

          You build projects to process the source files that comprise a program and - generate object code. The compiler flags syntax errors in the source files. Use the Properties for <project_name> window to control how the project is built. The following methods build a project:

          -
          • Build All Configurations—builds all build configurations for a project
          • -
          • Build Working Set—specify which projects to build in a working set
          • -
          • Build Project—(CTRL+B) builds the entire project if it has never been built before or on subsequent builds only those files that have changed since the last build operation
          • -
          -

          -

          Figure 1 - Right-click project name to build a project

          -
          -

          Building a Project

          -
            -
          • Right-click the project name in the Project Explorer view and select Build Project (Figure 1)
          • -
          -
            -

            - or -
          -
            -
          • Select the Project > Build Project menu item
          • -
          -
            -

            - or -
          -
            -
          • Click the Build icon in the tool bar (Figure 2) to build the current build configuration
          • -

            -

            Figure 2 - Build icon

            -

            or -

            -
          -
            -
          • Select a build configuration using the Build icon’s dropdown list in the tool bar (Figure 2)
          • -
          -
            -

            Carbide.c++ builds the project. A build dialog and a task bar appear during a build process. All build output is shown in the Console view while build errors and warnings appear in the Problems view.

            -

            Whether a full build or incremental build is requested, Carbide forwards the request to the SDK make system. The SDK make system determines if anything needs to be - built. Carbide always checks that makefiles are up-to-date and - dependencies present.

            -

            Project is also built if you make a change to it and then click Debug. It may be useful to automatically save modified resources before a manual build process by enabling the Save automatically before build option in the Window > Preferences > General > Workspace preference panel.

            -

            NOTE If you want to turn off building before launching, uncheck the Build (if required) before launching option in the Window > Preferences > Run/Debug > Launching preference panel.

            -
          -

          When performing a build, output is displayed in the Console window. If you do not want to clear the console before each build you need to uncheck the option Always clear console before building in the Build Console panel. This option is enabled by default. You can access this panel by selecting Window > Preferences > C/C++ > Build Console preference panel (figure 2).

          -

          Not clearing the console is useful when you are performing multiple builds, such as a regular project build, building a project package (.pkg) file, and building a ROM image. For example, if you do not clear the console before each build, then a subsequent build will not overwrite information from a previous build.

          -

          -

          Figure 4 - Build Console Preference Panel

          -

           

          -
          -
          Concepts
          - -
          Tasks
          - - - - + + + + + + +Building Projects + + + + +

          Building Projects and Symbian Components

          +

          Building projects consists of a new abld-based build system that wraps build functionality around existing SDK build tools that invoke makmake commands (e.g. bldmake bldfiles and abld build).

          +

          The plug-ins provide extra functionality to set up suitable build configurations for Symbian OS C++ projects. The initial selection of a build configuration is done when you create a project, as described in Creating New Projects. You can later change the Active Build Configuration. The Build Configurations also provides a command (Project > Build All Configurations) to build all the selected build configurations in a batch.

          +

          Building Symbian OS C++ projects can involve the use of Symbian OS specific tools, such as the Symbian OS resource compiler. For detailed information on such tools, see the documentation for the SDK that you are using.

          +

          You build projects to process the source files that comprise a program and + generate object code. The compiler flags syntax errors in the source files. Use the Properties for <project_name> window to control how the project is built. The following methods build a project:

          +
          • Build All Configurations—builds all build configurations for a project
          • +
          • Build Working Set—specify which projects to build in a working set
          • +
          • Build Project—(CTRL+B) builds the entire project if it has never been built before or on subsequent builds only those files that have changed since the last build operation
          • +
          +

          +

          Figure 1 - Right-click project name to build a project

          +
          +

          Building a project

          +
            +
          • Right-click the project name in the Project Explorer view and select Build Project (Figure 1)
          • +
          +
            +

            + or +
          +
            +
          • Select the Project > Build Project menu item
          • +
          +
            +

            + or +
          +
            +
          • Click the Build icon in the tool bar (Figure 2) to build the current build configuration
          • +

            +

            Figure 2 - Build icon

            +

            or +

            +
          +
            +
          • Select a build configuration using the Build icon’s dropdown list in the tool bar (Figure 2)
          • +
          +
            +

            Carbide.c++ builds the project. A build dialog and a task bar appear during a build process. All build output is shown in the Console view while build errors and warnings appear in the Problems view.

            +

            Whether a full build or incremental build is requested, Carbide forwards the request to the SDK make system. The SDK make system determines if anything needs to be + built. Carbide always checks that makefiles are up-to-date and + dependencies present.

            +

            Project is also built if you make a change to it and then click Debug. It may be useful to automatically save modified resources before a manual build process by enabling the Save automatically before build option in the Window > Preferences > General > Workspace preference panel.

            +

            NOTE If you want to turn off building before launching, uncheck the Build (if required) before launching option in the Window > Preferences > Run/Debug > Launching preference panel.

            +
          +

          When performing a build, output is displayed in the Console window. If you do not want to clear the console before each build you need to uncheck the option Always clear console before building in the Build Console panel. This option is enabled by default. You can access this panel by selecting Window > Preferences > C/C++ > Build Console preference panel (figure 2).

          +

          Not clearing the console is useful when you are performing multiple builds, such as a regular project build, building a project package (.pkg) file, and building a ROM image. For example, if you do not clear the console before each build, then a subsequent build will not overwrite information from a previous build.

          +

          +

          Figure 4 - Build Console Preference Panel

          +

           

          +
          +
          Concepts
          + +
          Tasks
          + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_clean.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_clean.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_clean.htm Wed Jul 21 12:11:48 2010 -0500 @@ -4,29 +4,53 @@ -Building Projects +Cleaning Projects

          Cleaning Projects

          -

          In the Project Explorer, C/C++ Projects, or Symbian Project Navigator views you can select a project, right-click and select Clean Project (CTRL+SHIFT+-) to remove the object and make files, and output files. The files that are removed by this command include all the intermediate files created during compilation and all the executables and import libraries created by the linker.

          -

          If you select a project and select the menu option Project > Clean... a Clean dialog will appear (Figure 1). You can clean all projects or select individual projects to clean. This method of cleaning projects performs the same operations as the Clean Project context menu option. If the Start a build immediately option is selected, then the selected project(s) are rebuilt after the clean operation.

          -

          -

          Figure 1 - Clean Project Dialog

          +

          In the Project Explorer or Symbian Project Navigator views you can select a project, right-click and select Clean Project (CTRL+SHIFT+-) to remove the object and make files, and output files. The files that are removed by this command include all the intermediate files created during compilation and all the executables and import libraries created by the linker.

          +

          If you select a project and select the menu option Project > Clean... the Clean dialog appears (Figure 1). You can clean all projects or select individual projects to clean within the workspace. This method of cleaning projects performs the same operations as the Clean Project context menu option. If the Start a build immediately option is selected, then the selected project(s) are rebuilt after the clean operation.

          +

          +

          Figure 1 - Clean project options

          By default, performing a Clean Project complies with the global Clean level settings in the Build preference panel and inherited by the project on creation. You can also assign project specific clean settings in the Carbide Project Settings panel in the Properties for <project> dialog.

          -
          Concepts
          - -
          Tasks
          +
          Table 1. Clean dialog — options
          +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    NameFunction

    Clean all projects

    Enable to clean all the projects in the workspace.

    Clean projects selected below

    Enable to clean only the selected project(s).

    Start a build immediatelyRebuild the selected project(s) immediately after a clean operation.
    Build the entire workspaceBuild the entire workspace once the clean operation is complete.
    Build only the selected projectsBuild only the selected projects once the clean operation is complete.
    +
    Other references
    - + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_creating_sis_file.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_creating_sis_file.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_creating_sis_file.htm Wed Jul 21 12:11:48 2010 -0500 @@ -21,7 +21,7 @@
    • For non-Platform Security SDKs (pre-OS 9.x), makesis is called
    -

    Depending upon which tool is used, you will need to complete some entries in the SIS Builder pane of the Carbide Build Configurations window of the project Properties dialog box. You can access this pane by selecting a project in the C/C++ Projects view and select Project > Properties > Carbide Build Configurations. Fill in the necessary information to add PKG files to the project for downloading.

    +

    Depending upon which tool is used, you will need to complete some entries in the SIS Builder pane of the Carbide Build Configurations window of the project Properties dialog box. You can access this pane by selecting a project in the Project Explorer view and select Project > Properties > Carbide Build Configurations. Fill in the necessary information to add PKG files to the project for downloading.

    @@ -38,7 +38,7 @@ diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_config.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_config.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_config.htm Wed Jul 21 12:11:48 2010 -0500 @@ -42,7 +42,7 @@

    The appropriate Run or Debug launch configuration window appears (Figure 1).

    -

    Undefined launch configuration

    +

    Undefined launch configuration

    Figure 1 - Initial blank Debug launch configuration window

  • Select a type of launch configuration (for example, Symbian OS Emulation), then click the New launch configuration icon to create a new @@ -51,7 +51,7 @@ appropriate section using the project name and target to create the configuration name.

    NOTE Project information is used to fill in the Project and Process to launch text boxes by default when you click New. You should not have to edit these for a normal run/debug project. If a bld.inf has multiple MMP files listed, then the first executable in the list is used to fill in the executable field. Therefore, for projects with multiple MMPs you may need to change the executable field.

  • -

    New launch configuration

    +

    New launch configuration

    Figure 2 - New launch configuration with name and settings filled in (emulator)

  • View the information to define the project and executable diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_new_build_config.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_new_build_config.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_new_build_config.htm Wed Jul 21 12:11:48 2010 -0500 @@ -15,16 +15,16 @@
    1. Open Carbide Build Configuration panel in the project's Properties window

      Select the Project > Properties menu item or right-click the project name in the Project Explorer view, then select Properties. The project Properties for <project_name> window appears. Then select Carbide Build Configurations.

      -

      +

      Figure 1 - Active Configuration group in project Properties window

    2. Click Manage... in the Active Configuration group (Figure 1)

      The Add/Remove Carbide Build Configuration window appears (Figure 2). Use the Add/Remove Carbide Build Configuration window to manage the build configurations that appear on the Build Configurations sub-menu for the current project. You can also click the Manage configurations for the current project icon () on the toolbar to open this dialog.

    3. -
    4. -

      +
    +

    +

    Figure 2 - Window for managing build configurations

    -
  • - +
    Related concepts
      diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_set_build_tgt.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_set_build_tgt.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_set_build_tgt.htm Wed Jul 21 12:11:48 2010 -0500 @@ -16,7 +16,7 @@
    • From the toolbar
        -
      1. Select the project in the Project Explorer or C/C++ Projects view
      2. +
      3. Select the project in the Project Explorer view
      4. In the toolbar click Manage configurations for the current project control () > configuration_name
        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_debugging.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_debugging.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_debugging.htm Wed Jul 21 12:11:48 2010 -0500 @@ -10,28 +10,28 @@

        Debugging a Symbian OS Program

        Use the Carbide.c++ debugger to debug a compiled Symbian OS program in an emulator or on-device. The same process works for other emulators and target devices as well.

        -

        NOTE This example uses the emulator included with the S60 5th Edition SDK. The steps are identical for on-device debugging, although a .sym file is not needed for emulator builds.

        +

        NOTE This example uses the Symbian Emulator included with the Symbian^3 SDK. The steps are identical for on-device debugging, although a .sym file is not needed for emulator builds.

        Debugging a Symbian OS program

        NOTE You can only debug compiled programs. Use the Build Project command to compile project sources into a binary file if you do not already have an executable in the project. A symbolics (.sym) file is also required for debugging on a target device. Ensure that a .sym file has been created. If you are importing an existing application, you may have to rebuild the application and create a related .sym file. Make sure a .sym file has been created in the output directory.

        1. Set a breakpoint in the MyProject program
        2. -

          Open the \src\MyProjectAppUI.cpp file and set a breakpoint in the HandleCommandL routine.

          -

          -

          Figure 1 - Breakpoint set in MyProjectAppUI::HandleCommandL routine.

          -
        3. Launch the Carbide debugger and S60 SDK Emulator
        4. -

          Start the Carbide debugger which launches the S60 SDK Emulator, installs and launches the executable. For on-device debugging, the application is installed on the target device.

          -

          The HelloCarbide application launches (Figure 2).

          -

          -

          Figure 2 - MyProject application running on S60 Emulator

          +

          Open the \src\OortCloudAppUI.cpp file and set a breakpoint in the HandleCommandL routine.

          +

          +

          Figure 1 - Breakpoint set in COortCloudAppUI::HandleCommandL routine.

          +
        5. Launch the Carbide debugger and Symbian Emulator
        6. +

          Start the Carbide debugger which launches the Symbian Emulator, then installs and launches the executable. For on-device debugging, the application is installed on the target device.

          +

          The OortCloud application launches (Figure 2).

          +

          Symbian Emulator

          +

          Figure 2 - OortCloud application running on Symbian Emulator

          NOTE For SDKs prior to the S60 5th Edition it may be necessary to locate the installed application and manually launch it in the emulator or on the target device.

          -
        7. Click the Options soft-key on the S60 Emulator to display the Options menu.
        8. +
        9. Click the Options soft-key on the Symbian Emulator to display the Options menu.
        10. Choose the Message menu item and press the Select soft-key to send a message (Figure 3).
        11. -

          -

          Figure 3 - Send Message to MyProject application

          +

          Menu selection

          +

          Figure 3 - Send Message to OortCloud application

          The HandleCommandL breakpoint is hit in the program and control returns to the Carbide debugger (Figure 4). You can now set additional breakpoints, examine variables, or use the Debug view buttons to control the program.

          -

          -

          Figure 4 - Back in the CMyProjectAppUI::HandleCommandL routine

          +

          Breakpoint hit

          +

          Figure 4 - Back in the COortCloudAppUI::HandleCommandL routine

        That's it for this basic introduction to debugging with Carbide.c++.

        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_deploying.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_deploying.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_deploying.htm Wed Jul 21 12:11:48 2010 -0500 @@ -11,7 +11,7 @@

        Deploying Programs to Devices

        Once you have completed the program and tested it with the emulator, it’s possible to create a new build configuration for your device, build it, then create a .sis file and deploy it to a device.

        To upload a valid .sis file to the target device you need software that communicates with the target device from your PC. Every Symbian phone ships with this connectivity software, which we will refer to generically as Symbian Connect. The actual name for the software is vendor dependent, so refer to your phone’s documentation for the name.

        -

        For example, most phones from Nokia that use Symbian OS come with Nokia PC Suite, which allows you to synchronize and transfer data between your compatible phone and a compatible PC via a compatible data cable or a wireless connection.

        +

        For example, most phones from Nokia that use Symbian OS come with Ovi Suite, which allows you to synchronize and transfer data between your compatible phone and a compatible PC via a compatible data cable or a wireless connection.

        Essentially, the Symbian Connect program provides a method of connecting a PC to the target device via USB, IrDA, Bluetooth, or other serial connection. Once you make a connection, you can upload your .sis file to the target device and install the program.

        NOTE A simple guide is provided to show the basic steps necessary to upload a .sis file to a target device. The actual steps required by the specific Symbian Connect program that ships with the SDK you are using may differ, so always refer to that phone ’s documentation for details.

        diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_example_trk.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_example_trk.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_example_trk.htm Wed Jul 21 12:11:48 2010 -0500 @@ -15,7 +15,7 @@

        Debugging a Run-mode Project using Application TRK

        1. Import the Bld.inf to create a project using the Import wizard
        2. -

          In this example we are importing a project called Music, a complex project that includes several EXEs (MusicPlayer, MusicShop, MusicVisualizer). When we import, we select an ARM target.

          +

          In this example we are importing a project called Music, a complex project that includes several EXEs (MusicPlayer, MusicShop, MusicVisualizer). For the import, we select an ARM target.

        3. Go to the project Properties page and in the Carbide Build Configuration panel specify the PKG file in the SIS Builder tab
        4. Build the project (Ctrl+B)
        5. Verify that all the binaries built by the project appear in the Executables view.
        6. diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_requirements.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_requirements.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_requirements.htm Wed Jul 21 12:11:48 2010 -0500 @@ -4,16 +4,15 @@ -Carbide.c++ Installation +System Requirements

          System Requirements

          -

          You use the Carbide.c++ IDE in conjunction with a recognized SDK to develop Symbian software.

          +

          You use the Carbide.c++ IDE in conjunction with a recognized SDK to develop Symbian OS software.

          In practice, whether you use an SDK, a developer kit (DevKit), or both depends on the edition of Carbide.c++ you have (see Table 1). Further, if you use an OS devkit, - it must be version 9.1b or higher for EKA2 with - Platform Security support.

          + it must use SBSv2.

          Table 1. Support packages used for development with each Carbide.c++ Editions
    ToolSIS Properties

    Complete the PKG File, and Signing Options settings in the SIS Properties dialog. By default, SIS files are output in the directory of the original SIS file.

    -

    +

    Figure 2 - SIS Properties dialog

    @@ -26,12 +25,12 @@ - - @@ -56,21 +55,19 @@ -

    An SDK or OS developer kit (DevKit) including:

    • 9.x or higher for Platform Security

    Targets: S60 5th Ed., Qt

    +

    Targets: Symbian ^3, S60 5th Ed., Qt

    Debugger: Emulators, on-device debugging

    UI Designer: create graphical interfaces quickly using standard UI components

    Targets: S60 5th Ed., Qt

    +

    Targets: Symbian ^3, S60 5th Ed., Qt

    Debugger: Emulators, on-device debugging, device debugging in ROM, kernel debugging

    Performance Investigator: application performance data, memory usage, power usage, button event reporting

    Other Software

    A Symbian OS™ SDK and Perl:

    +

    A Symbian OS SDK and Perl:

    +
      +
    • Symbian, S60 platform, and S60 device SDKs +
  • Symbian Connect software -

    Software that communicates between a PC and a target device. For example, Nokia PC Suite.

  • +

    Software that communicates between a PC and a target device. For example, Ovi Suite.

    +
    Disk Space
    • 800 MB for Carbide.c++
    • -
    • Up to 2.0 GB for each S60 SDK installation
    • +
    • Up to 2.0 GB for each SDK installation
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_updating.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_updating.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_updating.htm Wed Jul 21 12:11:48 2010 -0500 @@ -22,7 +22,7 @@

    NOTE Always run the Help > Check for Updates wizard and install all updates before attempting to install new software. This can prevent the occurrence of any dependency errors.

    1. Select Help > Install New Software... to display the Available Software pane of the Install dialog. -

      +

      Figure 1 - Install dialog - Available Software pane

      1. Select an update site from the Work with drop down, or click Add... to enter a new site URL.
      2. @@ -30,18 +30,14 @@
      3. Click Next
    2. -
    3. In the Install Details pane select the specific items to install from those displayed, then click Next. -

      -

      Figure 2 - Install dialog - Install Details pane

      -
    4. Review the items to install in the second Install Details pane, then click Next. -

      -

      Figure 3 - Install dialog - second Install Details pane

      +

      +

      Figure 2 - Install dialog - Install Details pane

    5. Accept the license terms, then click Finish. -

      -

      Figure 4 - Install dialog -Review Licenses pane

      +

      +

      Figure 3 - Install dialog -Review Licenses pane

    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/debug_set_breakpoint.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/debug_set_breakpoint.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/p2_available_sw.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/p2_available_sw.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/p2_install_details_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/p2_install_details_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/p2_review_licenses.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/p2_review_licenses.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/wnd_symbian_emulator_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/wnd_symbian_emulator_01.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/wnd_symbian_emulator_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/wnd_symbian_emulator_02.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/wnd_symbian_emulator_03.png Binary file core/com.nokia.carbide.cpp.doc.user/html/tasks/start/images/wnd_symbian_emulator_03.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_bluetooth.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_bluetooth.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_bluetooth.htm Wed Jul 21 12:11:48 2010 -0500 @@ -38,7 +38,7 @@
    Related references
    Related tasks
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_pcsuite.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_pcsuite.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_pcsuite.htm Wed Jul 21 12:11:48 2010 -0500 @@ -42,7 +42,7 @@
    Related reference
    Related tasks
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_usb.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_usb.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_install_usb.htm Wed Jul 21 12:11:48 2010 -0500 @@ -40,7 +40,7 @@
    Related reference
    Related tasks
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_overview.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_overview.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_overview.htm Wed Jul 21 12:11:48 2010 -0500 @@ -19,7 +19,7 @@
    Related references
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_preconditions.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_preconditions.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_preconditions.htm Wed Jul 21 12:11:48 2010 -0500 @@ -22,11 +22,11 @@
  • Nokia PC Suite (or equivilent software) for connecting and installing applications to the device
  • -
  • Download and install the current TRK SISX file using the On-Device Setup dialog
  • +
  • Download and install the current TRK SISX file using the On-Device Connections dialog
  • The Application TRK debug agents are stored If not, install it now using the On-Device Connections > New Connection Wizard > Install remote agents pane.

    NOTE The Application TRK versions included with Carbide is for CE versions of devices only. They are not intended for use with RnD devices.

  • Specify the communication method with the on-target device during the debug session
  • -

    Start the Application TRK or System TRK on the device. During startup of TRK on the device you must specify the communication method the on-device agent uses to debug the device. Currently, those methods include Bluetooth and USB or a null serial cable. For Bluetooth, you must pair the device with the PC and a valid serial port assigned. For USB, A USB cable must connect the PC to the device and a valid serial port assigned. Use On-Device Setup dialog to make the identification and connection setup quick and easy.

    +

    Start the Application TRK or System TRK on the device. During startup of TRK on the device you must specify the communication method the on-device agent uses to debug the device. Currently, those methods include Bluetooth and USB or a null serial cable. For Bluetooth, you must pair the device with the PC and a valid serial port assigned. For USB, A USB cable must connect the PC to the device and a valid serial port assigned. Use On-Device Connections dialog to make the identification and connection setup quick and easy.

    Related concepts
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_troubleshooting.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_troubleshooting.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/trk/trk_troubleshooting.htm Wed Jul 21 12:11:48 2010 -0500 @@ -113,7 +113,7 @@

    Check that Carbide.c++ and your USB Virtual COM port or BT Serial Port agree on the port settings.

      -
    • Use the On-Device Setup dialog to quickly determine if you can communicate with the device in the Check TRK version pane
    • +
    • Use the On-Device Connections dialog to quickly determine if you can communicate with the device in the Check TRK version pane
    • Open your Bluetooth or USB cable's connection settings: Start -> Settings -> Control panel -> System -> Hardware -> Device Manager. In the Device Manager dialog, click open the Ports directory, then you will see all the com ports available on the machine. Here you will be able to see the COM port for Bluetooth or USB. Sometimes you will have two COM ports for Bluetooth, so you might have to try specifying either of them.
    • In the Carbide tools, open the launch configuration associated with the target device and verify that you have specified the correct launch configuration for TRK. For example, the launch configuration should be either Symbian OS Application TRK or Symbian OS System TRK configuration.
    • In the Carbide tools, open the launch configuration associated with the target device. In the Connections tab make sure you specify the same COM port number as in the device manager. For Bluetooth, if two ports are listed in the device manager, then you need to try to both, to see which one works. For USB, don't select the COM port assigned to the serial port. Always select the COM port assigned to the virtual COM port ID for the phone that is specified in the Device Manager.
    • diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/index.xml --- a/core/com.nokia.carbide.cpp.doc.user/index.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/index.xml Wed Jul 21 12:11:48 2010 -0500 @@ -8,11 +8,6 @@ - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/intro/tutorialsCarbideExtContent.xml --- a/core/com.nokia.carbide.cpp.doc.user/intro/tutorialsCarbideExtContent.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/intro/tutorialsCarbideExtContent.xml Wed Jul 21 12:11:48 2010 -0500 @@ -12,29 +12,30 @@ - Learn how to create, build, and debug a program for the emulator called HelloCarbide using Carbide project templates. + Learn how to create, build, and debug programs on the emulator using Carbide project templates. - Learn how to create a simple “Test1” DLL project. + Learn how to create and debug DLL projects. - Learn how create and build an application and debug it on a device using the App TRK on-device debug agent. + Learn how debug applications on remote devices using the TRK remote agent. + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/intro/tutorialsCarbideExtContentMisc.xml --- a/core/com.nokia.carbide.cpp.doc.user/intro/tutorialsCarbideExtContentMisc.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/intro/tutorialsCarbideExtContentMisc.xml Wed Jul 21 12:11:48 2010 -0500 @@ -9,6 +9,7 @@ style="carbide.css" path="tutorials/@"> + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/intro/whatsnew_IntroExt.xml --- a/core/com.nokia.carbide.cpp.doc.user/intro/whatsnew_IntroExt.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/intro/whatsnew_IntroExt.xml Wed Jul 21 12:11:48 2010 -0500 @@ -28,25 +28,6 @@ - - - Complete Carbide performance improvements are explained under the notes for Carbide.c++ 2.1. - - - - - - See Symbian API Reference information appear when you hover over a Symbian symbol in C/C++ editors. - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/plugin.xml --- a/core/com.nokia.carbide.cpp.doc.user/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/plugin.xml Wed Jul 21 12:11:48 2010 -0500 @@ -1,263 +1,264 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml --- a/core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml Wed Jul 21 12:11:48 2010 -0500 @@ -12,20 +12,33 @@ + - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -35,41 +48,71 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + - - - + + - - @@ -93,8 +136,8 @@ - - + + @@ -103,10 +146,10 @@ - - + + - + @@ -125,13 +168,9 @@ - - - - - + @@ -193,44 +232,11 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -250,6 +256,7 @@ + @@ -280,7 +289,6 @@ - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.featureTracker/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.cpp.featureTracker/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.featureTracker/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -1,10 +1,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: FeatureTracker Plug-in +Bundle-Name: FeatureTracker Bundle-SymbolicName: com.nokia.carbide.cpp.featureTracker;singleton:=true -Bundle-Version: 1.0.0 +Bundle-Version: 1.0.0.qualifier Bundle-Activator: com.nokia.carbide.cpp.internal.featureTracker.FeatureUseTrackerPlugin -Bundle-Vendor: NOKIA +Bundle-Vendor: Nokia Require-Bundle: org.eclipse.core.runtime Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ActivationPolicy: lazy diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/.classpath --- a/core/com.nokia.carbide.cpp.leavescan/.classpath Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/.project --- a/core/com.nokia.carbide.cpp.leavescan/.project Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ - - - com.nokia.carbide.cpp.internal.leavescan - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.cpp.leavescan/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Leavescan Plug-in -Bundle-SymbolicName: com.nokia.carbide.cpp.leavescan; singleton:=true -Bundle-Version: 1.4.0.qualifier -Bundle-Activator: com.nokia.carbide.cpp.internal.leavescan.LeavescanPlugin -Bundle-Vendor: Nokia -Bundle-Localization: plugin -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.core.resources, - org.eclipse.cdt.core, - com.nokia.carbide.cdt.builder, - com.nokia.carbide.cpp.sdk.core, - com.nokia.cpp.utils.core, - com.nokia.cpp.utils.ui -Bundle-ActivationPolicy: lazy diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/book.css --- a/core/com.nokia.carbide.cpp.leavescan/book.css Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -/* - Nokia DPT Tools CSS - Nokia C++ Development Tools Austin - Date: 2005/11/04 - -*/ - -/* Add whitespace around entire display to avoid crowding edges of view */ -/* 20070523-Removed top margin size to close gap between location breadcrumbs and page title */ -html { - margin: 0px 10px 10px 10px; - } - -/* Set default font to serif style, 12-pt and plain */ -body, p, table { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 12px; - font-weight: normal; -} - -/* Use sans-serif fonts for all title styles */ -h1, h2, h3, h4, h5, h6, strong, em { - font-family: Arial, Helvetica, sans-serif; - color: #000000; - } - -h1 { font-size:20px } -h2 { font-size:18px } -h3 { font-size:16px } -h4 { font-size:14px } -h5 { font-size:12px } -h6 { font-size:10px } - -/* For headlines at the top of a view, add space */ -/* 20070522-added gradiant to background to update visual style of docs */ -h1, h2, h3 { - background-image: url(html/images/green_fade_left_68_165_28.png); - background-repeat: no-repeat; - padding:10px 0px 10px 12px; - } - -li { - margin-bottom:8px; - margin-top:8px; - } - -/* Footer includes space and a gray line above the company logo */ -#footer { - padding-top:10px; - margin-top:20px; - border-top:1px solid #999; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; - color: #03C; - } - -.listing { - font-family: "Courier New", Courier, mono; - color: #009; - background-color: #EEE; - padding: 10px 0px; - margin: 10px 0px; - } - -.code, pre { - font-family: "Courier New", Courier, mono; - font-size: 11px; - color: #333; - } - -.step { - /* background-color: #EEE; */ - /* margin: 10px 0px; */ - color: #333; - border-bottom:2px solid #EEE; - } - -.substep { - background-color: #EEE; - } - - -/* Figure/Listing/Table titles are centered and gray */ -p.table { - color: #999; - font-weight: bold; - padding-top: 5px; - } - -table { - border: solid #999 1px; - table-layout: auto; - font-size: 12px; - } - -td, th { - border: solid #999 1px; - padding: 5px; - vertical-align:top; - } - -/* 20070522-replaced gray with green background to match gradiant color for title */ -th { - background-color:#ACD79B; - /* background-color:#999; - color:#FFF; */ - } - -div.ol.p { - margin-left: 3em; - } - -/* Make all ordered/unordered list items appear in bold gray */ -div ol > li, div ul > li { - font-weight:bold; - color: #333; - } - -div ol > p, div ul > p, div li > p { - font-weight:normal; - } - -/* Make all H4 and H5 items appear in bold gray against a light green background */ -div h5, div h4 { - padding:5px 0px 5px 12px; - background-color:#ECFBEA; - /* background-color: #EEE; */ - font-weight:bold; - color: #333; - } - - -/* Notes stand out using a light top & bottom borders with dark gray text */ -p.note { - /* color: #03C; */ - /* background-color: #FFFF99; */ - color: #333; - padding: 5px; - margin-left: 1em; - margin-right: 1em; - border-top: solid #BBB thin; - border-bottom: solid #BBB thin; - } - - -/* Figure/Listing/Table titles are centered and gray */ -p.figure { - color: #333; - text-align: center; - font-weight: bold; - } - -/* highly visible red background and white text for things that need fixing before release */ -/* SHOULD NOT BE PRESENT IN RELEASED PRODUCTS */ -.fix { - background-color: red; - font-weight: bold; - color: white; - } - -.question { - font-style:italic; - font-weight:bold; - color: #555; - } - -.titleSmall { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; - } - - -.plain { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 12px; - font-style: normal; - line-height: normal; - font-weight: normal; - font-variant: normal; - color: #000000; - text-decoration: none; - } - -a:link { color: #0033CC } -a:visited { color: #555555 } -a:hover { color: #0033CC } - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/build.properties --- a/core/com.nokia.carbide.cpp.leavescan/build.properties Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - html/ diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/cheatsheets/getStarted_tool.xml --- a/core/com.nokia.carbide.cpp.leavescan/html/cheatsheets/getStarted_tool.xml Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - - - - - - Add TOOL NAME introduction message here. - - - - - - Add STEP 1 info here and link to more indepth step information. - - - - - - Add additional STEPs as required and link to more indepth step information. - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/concepts/concepts.htm --- a/core/com.nokia.carbide.cpp.leavescan/html/concepts/concepts.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - - - -Concepts - - - -

      Introduction

      -

      LeaveScan is a useful tool that can be used regularly against your source code. LeaveScan is a command-line utility developed by Symbian Ltd that verifies that your code respects the naming conventions for leaving functions.

      -

      LeaveScan checks that all functions which have the potential to leave are named according to the Symbian OS convention, with a trailing L. Any function that Leaves, or calls a function that Leaves (other than in a TRAP harness), must have a name ending in L. LeaveScan can be used on your source to indicate areas of code where you may have forgotten to use the naming convention. By revealing where leaves may occur but are not indicated by the function name, it highlights potential bugs and gives you an opportunity to fix the problem and ensure that your code handles any leaves correctly.

      -

      Related Topic

      -

      How it Works

      -

      Using Leavescan

      -
      -

      copyright

      -
      - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/images/green_fade_left_68_165_28.png Binary file core/com.nokia.carbide.cpp.leavescan/html/images/green_fade_left_68_165_28.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/images/nokia_copyright.png Binary file core/com.nokia.carbide.cpp.leavescan/html/images/nokia_copyright.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/index.xml --- a/core/com.nokia.carbide.cpp.leavescan/html/index.xml Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/nokia.css --- a/core/com.nokia.carbide.cpp.leavescan/html/nokia.css Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* Nokia DPT Tools CSS - Nokia DPT Austin - Date: 2006/11/02 -*/ - -/* Add whitespace around entire display to avoid crowding edges of view */ -html { - margin: 10px; - /* fixes gray backgrounds when displayed in external browsers */ - background-color:#FFFFFF; - } - -/* Set default font to serif style, 12-pt and plain */ -body { - font-family: Georgia, "Times New Roman", Times, serif; - font-size: 12px; - font-weight: plain; -} - -/* Use sans-serif fonts for all title styles and Nokia blue */ -h1, h2, h3, h4, h5, h6, strong, em { - font-family: Arial, Helvetica, sans-serif; - color: #333; - } - -strong{ - color: #333; - } - -/* For headlines at the top of a view, add space and a gray line underneath */ -h2, h3 { - padding:10px 0px; - border-bottom:1px solid #BBB; - } - -li { - margin-bottom:8px; - margin-top:8px; - } - - -/* Footer includes space and a gray line above the company logo */ -#footer { - padding-top:10px; - margin-top:20px; - border-top:1px solid #999; - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #333; - } - -.listing { - font-family: "Courier New", Courier, mono; - color: #009; - background-color: #EEE; - padding: 10px 0px; - margin: 10px 0px; - } - -.code, pre { - font-family: "Courier New", Courier, mono; - font-size: 12px; - color: #333; - } - -.step { - /* background-color: #EEE; */ - /* margin: 10px 0px; */ - color: #333; - border-bottom:2px solid #EEE; - } - -.substep { - background-color: #EEE; - } - - -/* Figure/Listing/Table titles are centered and gray */ -p.table { - color: #999; - font-weight: bold; - padding-top: 5px; - } - -table { - border: 1px solid #999; - table-layout: auto; - } - -td, th { - border: 1px solid #999; - padding: 5px; - vertical-align:top; - } - -th { - background-color:#999; - color:#FFF; - } - -div.ol.p { - margin-left: 3em; - } - -/* Make all ordered/unordered list items appear in bold gray */ -div ol > li, div ul > li { - font-weight:bold; - color: #333; - } - -/* Make all H4 and H5 items appear in bold gray against a light gray background */ -div h5, div h4 { - padding: 5px; - background-color: #EEE; - font-weight:bold; - color: #333; - } - - -/* Notes stand out using a light top & bottom borders with dark gray text */ -p.note { - /* color: #03C; */ - /* background-color: #FFFF99; */ - color: #333; - padding: 5px; - margin-left: 1em; - margin-right: 1em; - border-top:1px solid #BBB; - border-bottom:1px solid #BBB; -} - - -/* Figure/Listing/Table titles are centered and gray */ -p.figure { - color: #333; - text-align: center; - font-weight: bold; -} - -/* red background and white text for things that need fixing before release */ -.fix { - background-color: red; - font-weight: bold; - color: white; - } - -.question { - font-style:italic; - font-weight:bold; - color: #333; - } - -.titleSmall { - font-family: Arial, Helvetica, sans-serif; - font-size: 10px; - } - -.copyrightStatement { - font-size: 11px; - color: #006699; /* Symbian blue */ - } - -div.Footer table, div.Footer td, div.Footer th { - border: 0px none #000; - } diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/reference/reference.htm --- a/core/com.nokia.carbide.cpp.leavescan/html/reference/reference.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - - - -References - - - -

      How it Works

      -

      LeaveScan works by examining each line of source code and checking that functions which do not terminate in L cannot leave. However, there are a few functions (more accurately, operators) in Symbian OS that may leave but cannot have an L suffix (such as operator<< and operator>> for RWriteStream and RReadStream respectively).

      -

      The naming convention cannot be applied appropriately to operators and, unfortunately, LeaveScan does not have the logic needed to recognize operators that may leave. When you use operators that you know have the potential to leave, you’ll have to remember to check this code by sight yourself.

      -

      LeaveScan also checks functions which do have a trailing L to see if they really can leave. If functions are encountered which do not leave, LeaveScan raises a warning. However, this scenario can be perfectly valid, for example, when implementing an abstract function such as CActive::RunL(), some implementations may leave but others may not.

      -

      LeaveScan ignores calls in trapped functions, commented out code, i.e. // and /* and */. It also checks for calls to LD, LC and LX functions as well as normal L functions. It also checks for User::Leave(), ELeave, User::LeaveIfError().

      -

       

      -
      -

      copyright

      -
      - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/tasks/tasks.htm --- a/core/com.nokia.carbide.cpp.leavescan/html/tasks/tasks.htm Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - - - - -Tasks - - - -

      Using Leavescan

      -

      LeaveScan preferences can be defined in Carbide.c++ by selecting Windows > Preferences... and expanding the Carbide Extensions group and selecting Leavescan preferences. Specify the path to the leavescan command to avoid calling the leavescan stub.

      -

      LeaveScan can also be run from the command line to scan whole directories and output to a file. You can use the for command to scan directories. For example, for /R %i in (*.cpp) do leavescan %i >> leavescan.out. This will scan all cpp files in or below the current directory and places the result in leavescan.out.

      -
      -

      copyright

      -
      - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/tocConcepts.xml --- a/core/com.nokia.carbide.cpp.leavescan/html/tocConcepts.xml Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/tocReference.xml --- a/core/com.nokia.carbide.cpp.leavescan/html/tocReference.xml Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/tocTasks.xml --- a/core/com.nokia.carbide.cpp.leavescan/html/tocTasks.xml Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/html/toolTOC.xml --- a/core/com.nokia.carbide.cpp.leavescan/html/toolTOC.xml Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - href="html/reference/references.htm" > - - - - - href="html/tasks/tasks.htm" > - - - - - - \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/icons/Run_Leavescan.png Binary file core/com.nokia.carbide.cpp.leavescan/icons/Run_Leavescan.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/plugin.xml --- a/core/com.nokia.carbide.cpp.leavescan/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/LeavescanPlugin.java --- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/LeavescanPlugin.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -*/ -package com.nokia.carbide.cpp.internal.leavescan; - -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.IStartup; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class LeavescanPlugin extends AbstractUIPlugin implements IStartup { - - // The plug-in ID - public static final String PLUGIN_ID = "com.nokia.carbide.cpp.leavescan"; - - // The shared instance - private static LeavescanPlugin plugin; - - private static IPreferenceStore prefsStore; - - /** - * The constructor - */ - public LeavescanPlugin() { - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - getLeaveScanPrefsStore(); - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static LeavescanPlugin getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - public static IPreferenceStore getLeaveScanPrefsStore(){ - if (prefsStore == null){ - prefsStore = getDefault().getPreferenceStore(); - } - - return prefsStore; - } - - public void earlyStartup() { - } - -} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/error/parsers/LeaveScanErrorParser.java --- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/error/parsers/LeaveScanErrorParser.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -*/ -package com.nokia.carbide.cpp.internal.leavescan.error.parsers; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.eclipse.cdt.core.ErrorParserManager; -import org.eclipse.cdt.core.IErrorParser; -import org.eclipse.cdt.core.IMarkerGenerator; -import org.eclipse.core.resources.IFile; - -public class LeaveScanErrorParser implements IErrorParser { - - private Pattern leaveScanErrorPattern = Pattern.compile("(.*)?(\\((\\d+)\\))\\s+:\\s+(.*)"); //$NON-NLS-1$; - private Pattern leaveScanWarningPattern = Pattern.compile("(.*)?(\\((\\d+)\\))\\s+:\\s+Warning\\s+(.*)"); //$NON-NLS-1$; - - - - public LeaveScanErrorParser() { - } - - public boolean processLine(String line, ErrorParserManager errorParserManager) { - // Known patterns. - // - // (a) warning - // () : Warning - - // e.g..... - // C:\Symbian\UIQ3SDK\Examples\UIQ\QMyDirectory\Src\MyDirectoryAppUi.cpp(211) : Warning - CMyDirectoryAppUi::DoMergeCategoriesL appears to contain no leavers. - // - // - // (b) error - // () : - // e.g.... - // C:\Symbian\9.1\S60_3rd_MR\Examples\Basics\StaticDLL\CreateStaticDLL.cpp(40) : CMessenger::Construct Calls a function that can leave. QUALIFIED WITH-> // copy given string into own descriptor - - Matcher warningMatcher = leaveScanWarningPattern.matcher(line); - if (warningMatcher.matches()) { - String fileName = warningMatcher.group(1); - IFile file = errorParserManager.findFileName(fileName); - String lineNumberStr = warningMatcher.group(3); - int lineNumber = Integer.parseInt(lineNumberStr); - String msgDescription = warningMatcher.group(4); - msgDescription = msgDescription.trim(); - errorParserManager.generateMarker(file, lineNumber, msgDescription, IMarkerGenerator.SEVERITY_WARNING, null); - return true; - } - - Matcher errorMatcher = leaveScanErrorPattern.matcher(line); - if (errorMatcher.matches()) { - String fileName = errorMatcher.group(1); - IFile file = errorParserManager.findFileName(fileName); - String lineNumberStr = errorMatcher.group(3); - int lineNumber = Integer.parseInt(lineNumberStr); - String msgDescription = errorMatcher.group(4); - msgDescription = msgDescription.trim(); - errorParserManager.generateMarker(file, lineNumber, msgDescription, IMarkerGenerator.SEVERITY_ERROR_RESOURCE, null); - return true; - } - - // check for other process errors - if (line.toLowerCase().contains("the system cannot find the path specified") || - line.toLowerCase().contains("is not supported in this release") || - line.toLowerCase().contains("is not recognized as an internal or external command")){ - errorParserManager.generateMarker(null, -1, "Cannot run leavescan. Check that leavescan is on your PATH or go to the Carbide.c++ > Leavescan Preferences and set the Leavescan Directory. Leavescan.exe can be found at: http://www3.symbiandevnet.com/faq.nsf/0/f3765f69e4fb9baa80256a570051b952?OpenDocument", IMarkerGenerator.SEVERITY_ERROR_BUILD, null); - - } - - return false; - } - -} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/popup/actions/LeavescanAction.java --- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/popup/actions/LeavescanAction.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,309 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -*/ -package com.nokia.carbide.cpp.internal.leavescan.popup.actions; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IActionDelegate; -import org.eclipse.ui.IObjectActionDelegate; -import org.eclipse.ui.IWorkbenchPart; - -import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; -import com.nokia.carbide.cdt.builder.EpocEngineHelper; -import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder; -import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher; -import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; -import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; -import com.nokia.carbide.cpp.internal.leavescan.LeavescanPlugin; -import com.nokia.carbide.cpp.internal.leavescan.ui.LeavescanPreferenceConstants; -import com.nokia.cpp.internal.api.utils.core.HostOS; - -public class LeavescanAction implements IObjectActionDelegate { - - private ISelection selection; - - // id definied from plugin.xml - public static final String LEAVE_SCAN_ACTION_POP_UP_ID = "com.nokia.carbide.cpp.leavescan.leaveScanAction"; - public static final String LEAVE_SCAN_ACTION_MMP_POP_UP_ID = "com.nokia.carbide.cpp.leavescan.leaveScanActionOnMMP"; - - - /** - * Constructor for Action1. - */ - public LeavescanAction() { - super(); - } - - /** - * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) - */ - public void setActivePart(IAction action, IWorkbenchPart targetPart) { - } - - /** - * @see IActionDelegate#run(IAction) - */ - public void run(IAction action) { - if (action.getId().equals(LEAVE_SCAN_ACTION_POP_UP_ID)){ - // scan the selected source file(s) - handleLeaveScanAction(action); - } else if (action.getId().equals(LEAVE_SCAN_ACTION_MMP_POP_UP_ID)){ - // scan the selected source file(s) - handleLeaveScanActionOnMMP(action); - } - } - - /** - * @see IActionDelegate#selectionChanged(IAction, ISelection) - */ - public void selectionChanged(IAction action, ISelection selection) { - this.selection = selection; - } - - /** - * Run leavescan on source file selection(s) - * @param action - */ - private void handleLeaveScanAction(IAction action){ - // get the project each file belongs to... - HashMap> projectSourceMap = new HashMap>(); - if (selection != null && selection instanceof IStructuredSelection) { - Iterator iter = ((IStructuredSelection)selection).iterator(); - while (iter.hasNext()) { - Object selItem = iter.next(); - if (selItem instanceof IFile) { - IProject currProject = ((IResource)selItem).getProject(); - if (projectSourceMap.get(currProject) == null){ - // project is not a key, create a new key/value entry - List pathList = new ArrayList(); - pathList.add(((IResource)selItem).getLocation()); - projectSourceMap.put(currProject, pathList); - - } else { - // this key already exists, update the source list - List pathList = projectSourceMap.get(currProject); - pathList.add(((IResource)selItem).getLocation()); - projectSourceMap.put(currProject, pathList); // 2+ paths exist for this project - } - } - } - } - - // Get the leavescan preferences... - IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore(); - final boolean noisyOutput = store.getBoolean(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT); - final String leaveScanFolder = store.getString(LeavescanPreferenceConstants.LEAVESCAN_FOLDER); - - for (final IProject project : projectSourceMap.keySet()){ - final List finalPathList = projectSourceMap.get(project); - // Run a job on each project. The arguments for leavescan is: - // leavescan [-h|-n|-v|-N] [ ...] - // - // -h: This help. - // -n: Noisy output - provides diagnostics (if available). - // -N: Very noisy output - provides diagnostics (if available). - // -v: Displays version (for build & automation systems). - Job buildJob = new Job("Running Leave Scan on Project: " + project.getName()) { //$NON-NLS-1$ - protected IStatus run(IProgressMonitor monitor){ - - final String[] leaveScanParserIds = new String[] { - "com.nokia.carbide.cpp.leavescan.LeaveScanErrorParser" - }; - - ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project); - try { - CarbideCPPBuilder.removeAllMarkers(project); - } catch (CoreException e){ - e.printStackTrace(); - } - IPath workingDir = cpi.getINFWorkingDirectory(); - CarbideCommandLauncher cmdLauncher = new CarbideCommandLauncher(project, monitor, leaveScanParserIds, workingDir); - cmdLauncher.startTimingStats(); - int fileCount = 1; - int listSize = finalPathList.size(); - for (IPath currPath : finalPathList){ - - //System.out.print("\nProject: " + project.getName() + " | Source File: " + currPath.toOSString()); // Debug - - ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration(); - monitor.beginTask("Running leavescan.", 100); - - double dWorked = ((double)fileCount / (double)listSize) * 100; - monitor.worked((int)dWorked); - String taskName = "Running leavescan on file \"" + currPath.toOSString() + "\" for project \"" + project.getName() + "."; - monitor.setTaskName(taskName); - cmdLauncher.writeToConsole("\n***" + taskName + "\n"); - // Construct the leavescan arguments - List leaveScanArgList = new ArrayList(); - leaveScanArgList.add("/c"); - - if (leaveScanFolder.length() > 0){ - leaveScanArgList.add(leaveScanFolder + "leavescan" + HostOS.EXE_EXT); - } else { - leaveScanArgList.add("leavescan" + HostOS.EXE_EXT); - } - - if (noisyOutput) { - leaveScanArgList.add("-N"); - } else { - leaveScanArgList.add("-n"); - } - - leaveScanArgList.add(currPath.toOSString()); - String[] args = new String[leaveScanArgList.size()]; - leaveScanArgList.toArray(args); - cmdLauncher.showCommand(true); - - // executeCommand, a special extension to the regular execute which will handle - // writing the console output, error parsing, and creating error markers. - cmdLauncher.executeCommand(CarbideCommandLauncher.getCmdExeLocation(), args, CarbideCPPBuilder.getResolvedEnvVars(defaultConfig), workingDir); - - fileCount++; - } - cmdLauncher.writeToConsole(cmdLauncher.getTimingStats()); - return new Status(IStatus.OK, LeavescanPlugin.PLUGIN_ID, IStatus.OK, "LeaveScan Complete", null); - } - }; - - buildJob.setPriority(Job.BUILD); - buildJob.schedule(); - } - } - - /** - * Run leavescan on all the sources in the current project MMP file. - * The sources files will be build configuration specifc (i.e. MMP is preprocessed) to return - * platform specific source list. - * @param action - The IAction interface from the eclipse core - */ - private void handleLeaveScanActionOnMMP(IAction action){ - // get the project each file belongs to... - IProject project = null; - IPath mmpFile = null; - if (selection != null && selection instanceof IStructuredSelection) { - Iterator iter = ((IStructuredSelection)selection).iterator(); - while (iter.hasNext()) { - Object selItem = iter.next(); - if (selItem instanceof IFile) { - project = ((IResource)selItem).getProject(); - mmpFile = ((IResource)selItem).getLocation(); - //System.out.print("\nMMP File Selected: " + ((IResource)selItem).getLocation()); - } - } - } - - if (project == null){ - return; - } - - // Get the leavescan preferences... - IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore(); - final boolean noisyOutput = store.getBoolean(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT); - final String leaveScanFolder = store.getString(LeavescanPreferenceConstants.LEAVESCAN_FOLDER); - - ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project); - if (cpi.getDefaultConfiguration() == null) - return; - - List sourceFileList = new ArrayList(); - // Get the list of source files for the default configuration this MMP is associated with. - sourceFileList = EpocEngineHelper.getSourceFilesForConfiguration(cpi.getDefaultConfiguration(), mmpFile); - - final List finalPathList = new ArrayList(sourceFileList); - final IProject finalProject = project; - final Path finalMMPPath = new Path(mmpFile.toOSString()); - Job buildJob = new Job("Running Leave Scan on MMP: " + mmpFile.toOSString()) { //$NON-NLS-1$ - protected IStatus run(IProgressMonitor monitor){ - - final String[] leaveScanParserIds = new String[] { - "com.nokia.carbide.cpp.leavescan.LeaveScanErrorParser" - }; - - ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(finalProject); - try { - CarbideCPPBuilder.removeAllMarkers(finalProject); - } catch (CoreException e){ - e.printStackTrace(); - } - IPath workingDir = cpi.getINFWorkingDirectory(); - CarbideCommandLauncher cmdLauncher = new CarbideCommandLauncher(finalProject, monitor, leaveScanParserIds, workingDir); - cmdLauncher.startTimingStats(); - int fileCount = 1; - int listSize = finalPathList.size(); - for (IPath currPath : finalPathList){ - - //System.out.print("\nMMP Project: " + finalMMPPath.lastSegment() + " | Source File: " + currPath.toOSString()); // Debug - - ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration(); - monitor.beginTask("Running leavescan.", 100); - - double dWorked = ((double)fileCount / (double)listSize) * 100; - monitor.worked((int)dWorked); - String taskName = "Running leavescan on file \"" + currPath.toOSString() + "\" for MMP \"" + finalMMPPath.lastSegment() + "."; - monitor.setTaskName(taskName); - cmdLauncher.writeToConsole("\n***" + taskName + "\n"); - // Construct the leavescan arguments - List leaveScanArgList = new ArrayList(); - leaveScanArgList.add("/c"); - - if (leaveScanFolder.length() > 0){ - leaveScanArgList.add(leaveScanFolder + "leavescan" + HostOS.EXE_EXT); - } else { - leaveScanArgList.add("leavescan" + HostOS.EXE_EXT); - } - - if (noisyOutput) { - leaveScanArgList.add("-N"); - } else { - leaveScanArgList.add("-n"); - } - - leaveScanArgList.add(currPath.toOSString()); - String[] args = new String[leaveScanArgList.size()]; - leaveScanArgList.toArray(args); - cmdLauncher.showCommand(true); - - // executeCommand, a special extension to the regular execute which will handle - // writing the console output, error parsing, and creating error markers. - cmdLauncher.executeCommand(CarbideCommandLauncher.getCmdExeLocation(), args, CarbideCPPBuilder.getResolvedEnvVars(defaultConfig), workingDir); - - fileCount++; - } - cmdLauncher.writeToConsole(cmdLauncher.getTimingStats()); - return new Status(IStatus.OK, LeavescanPlugin.PLUGIN_ID, IStatus.OK, "LeaveScan Complete", null); - } - }; - - buildJob.setPriority(Job.BUILD); - buildJob.schedule(); - - } - -} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferenceConstants.java --- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferenceConstants.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -*/ -package com.nokia.carbide.cpp.internal.leavescan.ui; - -public class LeavescanPreferenceConstants { - - public final static String LEAVESCAN_NOISY_OUTPUT = "leavescanEnableNoisyOutput"; //$NON-NLS-1$ - public final static String LEAVESCAN_FOLDER = "leavescanFolder"; //$NON-NLS-1$ -} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferenceInitializer.java --- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferenceInitializer.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -*/ -package com.nokia.carbide.cpp.internal.leavescan.ui; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; - -import com.nokia.carbide.cpp.internal.leavescan.LeavescanPlugin; - -/** - * Class used to initialize default preference values. - */ -public class LeavescanPreferenceInitializer extends AbstractPreferenceInitializer { - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() - */ - public void initializeDefaultPreferences() { - IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore(); - store.setDefault(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT, false); - store.setDefault(LeavescanPreferenceConstants.LEAVESCAN_FOLDER, ""); - } - -} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferences.java --- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferences.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -*/ -package com.nokia.carbide.cpp.internal.leavescan.ui; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferencePage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.DirectoryDialog; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.PlatformUI; - -import com.nokia.carbide.cpp.internal.leavescan.LeavescanPlugin; -import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils; - -public class LeavescanPreferences extends PreferencePage implements - IWorkbenchPreferencePage,Listener { - - private Text leaveScanDirEditText; - private Button browseButton; - private Button veryNoisyOuputButton; - public static final String LEAVESCAN_PREF_HELP_ID = LeavescanPlugin.PLUGIN_ID + ".leavescan_prefs_page"; //$NON-NLS-1$ - - /** - * Create the preference page - */ - public LeavescanPreferences() { - super(); - } - - /** - * Create contents of the preference page - * @param parent - */ - @Override - public Control createContents(Composite parent) { - Composite container = new Composite(parent, SWT.NULL); - final GridLayout gridLayout = new GridLayout(); - gridLayout.numColumns = 3; - container.setLayout(gridLayout); - - final Label leavescanDirectoryLabel = new Label(container, SWT.NONE); - leavescanDirectoryLabel.setToolTipText("Choose the directory where leavescan.exe lives."); - leavescanDirectoryLabel.setText("Leavescan Directory:"); - - leaveScanDirEditText = new Text(container, SWT.BORDER); - leaveScanDirEditText.setLayoutData(new GridData(250, SWT.DEFAULT)); - - browseButton = new Button(container, SWT.NONE); - browseButton.setToolTipText("Choose the directory where leavescan.exe lives."); - browseButton.setText("Browse..."); - browseButton.addListener(SWT.Selection, this); - - veryNoisyOuputButton = new Button(container, SWT.CHECK); - veryNoisyOuputButton.setToolTipText("When enabled, -N is passed to leavescan for very verbose output. Otherwise -n is passed for minimal output."); - veryNoisyOuputButton.setText("Very noisy ouput"); - - getPrefsStoreValues(); - - PlatformUI.getWorkbench().getHelpSystem().setHelp(super.getControl(), LEAVESCAN_PREF_HELP_ID); - - return container; - } - - /** - * Initialize the preference page - */ - public void init(IWorkbench workbench) { - // Initialize the preference page - } - - public void handleEvent(Event event) { - if (event.widget == browseButton) { - handleBrowse(); - } - - } - - private void getPrefsStoreValues(){ - IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore(); - boolean noisyOutput = store.getBoolean(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT); - veryNoisyOuputButton.setSelection(noisyOutput); - - String leaveScanFolder = store.getString(LeavescanPreferenceConstants.LEAVESCAN_FOLDER); - leaveScanDirEditText.setText(leaveScanFolder); - } - - @Override - protected void performDefaults() { - veryNoisyOuputButton.setSelection(false); - leaveScanDirEditText.setText(""); - super.performDefaults(); - } - - @Override - public boolean performOk() { - - IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore(); - - String leaveScanDir = leaveScanDirEditText.getText(); - if (leaveScanDir.length() > 0){ - if (!leaveScanDir.endsWith("\\")){ - leaveScanDir += "\\"; - leaveScanDirEditText.setText(leaveScanDir); - } - } - - if (leaveScanDir.length() > 0){ - IPath leaveScanPath = new Path(leaveScanDir); - if (!leaveScanPath.toFile().exists()){ - if (!MessageDialog.openQuestion(getShell(), "Directory does not exist.", "The directory " + leaveScanPath + " does not exist.\n\nDo you want to continue?")){ - return false; - } - } - } - - store.setValue(LeavescanPreferenceConstants.LEAVESCAN_FOLDER, leaveScanDir); - store.setValue(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT, veryNoisyOuputButton.getSelection()); - - return super.performOk(); - } - - private void handleBrowse() { - String selectedDir = showBrowseDialog(); - if (selectedDir != null) { - if (!selectedDir.equals(leaveScanDirEditText.getText())) { - leaveScanDirEditText.setText(selectedDir); - } - } - } - - private String showBrowseDialog() { - DirectoryDialog dialog = new DirectoryDialog(leaveScanDirEditText.getShell(), SWT.OPEN); - dialog.setText("Choose a folder..."); - BrowseDialogUtils.initializeFrom(dialog, leaveScanDirEditText); - return dialog.open(); - } - -} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.sdk.core/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.cpp.sdk.core/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -1,6 +1,6 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: SDK Core Plug-in +Bundle-Name: SDK Core Bundle-SymbolicName: com.nokia.carbide.cpp.sdk.core; singleton:=true Bundle-Version: 2.0.0.qualifier Bundle-Activator: com.nokia.carbide.cpp.sdk.core.SDKCorePlugin diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.sysdoc.hover.dependencies/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.cpp.sysdoc.hover.dependencies/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sysdoc.hover.dependencies/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -1,8 +1,8 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: Developer Library Hover Plug-in Open Source Dependencies +Bundle-Name: Developer Library Hover Open Source Dependencies Bundle-SymbolicName: com.nokia.carbide.cpp.sysdoc.hover.dependencies;singleton:=true -Bundle-Version: 1.0.0 +Bundle-Version: 1.0.0.qualifier Bundle-Vendor: Nokia Bundle-RequiredExecutionEnvironment: J2SE-1.5 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0", diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.sysdoc.hover/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.cpp.sysdoc.hover/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sysdoc.hover/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Nokia Carbide Developer Library Hover Bundle-SymbolicName: com.nokia.carbide.cpp.sysdoc.hover;singleton:=true -Bundle-Version: 1.0.0 +Bundle-Version: 1.0.0.qualifier Bundle-Activator: com.nokia.carbide.cpp.sysdoc.hover.Activator Require-Bundle: org.eclipse.ui;bundle-version="3.4.1", org.eclipse.core.runtime, diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/core/HoverManager.java --- a/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/core/HoverManager.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/core/HoverManager.java Wed Jul 21 12:11:48 2010 -0500 @@ -26,7 +26,6 @@ import com.nokia.carbide.cpp.sysdoc.internal.hover.dal.interX.InterXIndexController; import com.nokia.carbide.cpp.sysdoc.internal.hover.dal.sdk.SDKController; import com.nokia.carbide.cpp.sysdoc.internal.hover.preferences.PreferencesPageController; -import com.nokia.carbide.cpp.sysdoc.internal.hover.uitlis.DialogHelper; import com.nokia.carbide.cpp.sysdoc.internal.hover.uitlis.Logger; import com.nokia.carbide.cpp.sysdoc.internal.hover.webserver.IEmbeddedWebServer; import com.nokia.carbide.cpp.sysdoc.internal.hover.webserver.JettyWebServer; @@ -104,7 +103,9 @@ public void haltHoveringService(final String msg) { HoverManager.getInstance().setEnabled(false); PreferencesPageController.setDeActivateHoverPlugin(true); - DialogHelper.displayErrorDialog(MessagesConstants.DEACTIVATED + msg); + + // don't show error dialog here - fixes bug #10130 + // DialogHelper.displayErrorDialog(MessagesConstants.DEACTIVATED + msg); } /** diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/dal/sdk/SDKController.java --- a/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/dal/sdk/SDKController.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/dal/sdk/SDKController.java Wed Jul 21 12:11:48 2010 -0500 @@ -148,11 +148,13 @@ List sdkList = sdkMgr.getSDKList(); for (ISymbianSDK currSDK : sdkList) { - String epocRootStr = currSDK.getEPOCROOT(); - try { - addDirToSDKDirectoryList(epocRootStr); - } catch (Exception e){ - continue; + if (currSDK.isEnabled()) { + String epocRootStr = currSDK.getEPOCROOT(); + try { + addDirToSDKDirectoryList(epocRootStr); + } catch (Exception e){ + continue; + } } } diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/uitlis/DialogHelper.java --- a/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/uitlis/DialogHelper.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/uitlis/DialogHelper.java Wed Jul 21 12:11:48 2010 -0500 @@ -27,7 +27,7 @@ public class DialogHelper { public static void displayErrorDialog(final String msg) { - displayErrorDialog(msg, "Developer Libary Hover Help Error", + displayErrorDialog(msg, "Developer Library Hover Help Error", MessageDialog.ERROR); } diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.ui/icons/Run_Leavescan.png Binary file core/com.nokia.carbide.cpp.ui/icons/Run_Leavescan.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp.ui/src/com/nokia/carbide/cpp/ui/ICarbideSharedImages.java --- a/core/com.nokia.carbide.cpp.ui/src/com/nokia/carbide/cpp/ui/ICarbideSharedImages.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.ui/src/com/nokia/carbide/cpp/ui/ICarbideSharedImages.java Wed Jul 21 12:11:48 2010 -0500 @@ -251,10 +251,6 @@ */ public static final String IMG_ROM_LOG_16_16 = "ROM_Log.png"; //$NON-NLS-1$ /** - * File path: icons/Run_Leavescan.png - */ - public static final String IMG_LEAVESCAN_16_16 = "Run_Leavescan.png"; //$NON-NLS-1$ - /** * File path: icons/Start_Resource_Block.png */ public static final String IMG_START_RESOURCE_BLOCK_16_16 = "Start_Resource_Block.png"; //$NON-NLS-1$ diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/about.html --- a/core/com.nokia.carbide.cpp/about.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/about.html Wed Jul 21 12:11:48 2010 -0500 @@ -1,26 +1,25 @@ - - - - - - Tips & Hints - - - - -

       

      - - - - - -

      -

       

      -

       

      -

      Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved.
      -License: http://www.eclipse.org/legal/epl-v10.html

      -

      This product includes software developed by Eclipse Project. http://www.eclipse.org

      -
      - + + + + + + Tips & Hints + + + + +

       

      + + + + + +

      +

       

      +

      Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved.
      +License: http://www.eclipse.org/legal/epl-v10.html

      +

      This product includes software developed by Eclipse Project. http://www.eclipse.org

      +
      + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/book.css --- a/core/com.nokia.carbide.cpp/book.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/book.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,5 +1,5 @@ /* - Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: http://www.eclipse.org/legal/epl-v10.html */ @@ -10,9 +10,9 @@ } /* 20091007 added verdana and ariel to list to match SFO website fonts choices */ -body, p, table { +body, p, table, li { font-family: Verdana, Ariel, Helvetica, sans-serif; - font-size: 0.9em; + font-size: 1.0em; font-weight: normal; } @@ -32,11 +32,15 @@ /* For headlines at the top of a view, add space */ /* 20090224-changed green fade to gold header image */ h1, h2, h3 { - background-image: url(icons/gold_header.png); + background-image: url(html/images/gold_header.png); background-repeat: no-repeat; padding:10px 0px 10px 12px; } +/* 20091007 SFO styling added */ +h1.NavTitle { font-size: 1.2em } +h3 .NavListTitle { font-size: 1.1em } + li { margin-bottom:8px; margin-top:8px; @@ -53,7 +57,7 @@ } .listing { - background-color: #ffe869; + background-color: #FFFFCC; font-family: "Courier New", Courier, mono; font-size: 1.1em; color: #000000; @@ -97,7 +101,7 @@ } th { - background-color: #ffd62c; + background-color: #66CC66; } div.ol.p { @@ -116,7 +120,7 @@ div h5, div h4 { padding:5px 0px 5px 12px; - background-color: #ffd62c; + background-color: #D3DAD4; font-weight:bold; color: #000000; } @@ -174,4 +178,4 @@ a:link { color: #026690 } a:visited { color: #555555 } -aa:hover { color: #FFD62C } +a:hover { color: #FFD62C } diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/html/help_home.html --- a/core/com.nokia.carbide.cpp/html/help_home.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/html/help_home.html Wed Jul 21 12:11:48 2010 -0500 @@ -6,12 +6,12 @@ Using the Carbide help system - + - +
      Carbide icon
      Carbide icon
      @@ -22,24 +22,20 @@ -
    • Connecting, updating, and installing remote agents - +
    • Carbide Portal +
    • Carbide examples and tutorials - +
    • Key Shortcuts
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/html/help_keys_carbide.htm --- a/core/com.nokia.carbide.cpp/html/help_keys_carbide.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/html/help_keys_carbide.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,126 +1,126 @@ - - - - - - -Nokia Carbide.c++ Shortcuts - - - - -

    Nokia Carbide.c++ Shortcuts

    -

    Table 1 describes the Nokia Carbide.c++ key shortcuts.

    -

    Keys can be viewed or edited in the - -General > Keys preference panel.

    -
    Table 1. Nokia Carbide.c++ key shortcuts
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Category

    Carbide.c++Shortcut Added
    Project
     Build All Configurations CTRL+ALT+A
     Build Clean CTRL+SHIFT+-
     Build Project CTRL+B
     Build Symbian Component CTRL+ALT+P
     Clean Symbian Component CTRL+ALT+X
     Freeze Symbian Component CTRL+ALT+B
     CompileCTRL+ALT+C
    Run/Debug  
     DebugF11
     RunCTRL+F11
     Step Into F5
     Step Over F6
     Step Return F7
     Build Project CTRL+B
    Search  
     System Search ALT+SHIFT+G
    Help  
     Show Key Assist CTRL+SHIFT+L
    -
    Related references
    - - - - + + + + + + +Nokia Carbide.c++ Shortcuts + + + + +

    Nokia Carbide.c++ Shortcuts

    +

    Table 1 describes the Nokia Carbide.c++ key shortcuts.

    +

    Keys can be viewed or edited in the + +General > Keys preference panel.

    +
    Table 1. Nokia Carbide.c++ key shortcuts
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Category

    Carbide.c++Shortcut Added
    Project
     Build All Configurations CTRL+ALT+A
     Build Clean CTRL+SHIFT+-
     Build Project CTRL+B
     Build Symbian Component CTRL+ALT+P
     Clean Symbian Component CTRL+ALT+X
     Freeze Symbian Component CTRL+ALT+B
     CompileCTRL+ALT+C
    Run/Debug  
     DebugF11
     RunCTRL+F11
     Step Into F5
     Step Over F6
     Step Return F7
     Build Project CTRL+B
    Search  
     System Search ALT+SHIFT+G
    Help  
     Show Key Assist CTRL+SHIFT+L
    +
    Related references
    + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/html/help_keys_cw.htm --- a/core/com.nokia.carbide.cpp/html/help_keys_cw.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/html/help_keys_cw.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,211 +1,211 @@ - - - - - - -Nokia CodeWarrior Shortcuts - - - - - -

    Nokia CodeWarrior Shortcuts

    -

    Table 1 describes the Nokia CodeWarrior key shortcuts supported by Carbide.c++.

    -

    NOTE These shortcuts extend the Default key shortcuts and not every CodeWarror tool shortcut is supported.

    -

    Keys can be viewed or edited in the - -General > Keys preference panel.

    -
    Table 1. Nokia CodeWarrior key shortcuts
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Category

    Nokia CodeWarriorCarbide.c++Shortcut Added
    C/C++ Source
     Find Definition Open Definition CTRL+'
    Edit
     Find Next Find Next F3
     Find Previous Find Previous SHIFT+F3
     ReplaceFind and Replace CTRL+H
     UndoUndoCTRL+Backspace
    Project
     MakeBuild Project F7
      CompileCTRL+F7
      Build Target Only CTRL+SHIFT+F7
     NewNewCTRL+SHIFT+N
     Remove Object Code Build CleanCTRL+-
    Run/Debug
     DebugStartF5
     Goto Line Run to Line CTRL+G
     RunStart without DebuggingCTRL+F5
     Set/Clear Breakpoint Toggle Breakpoint F9
     Step Into Step Into F11
     Step Over Step Over F10
     Step Return Step Return SHIFT+F11
    Search
      Search Backwards CTRL+B
      Search Forwards CTRL+F
      Find Text in Workspace CTRL+F3
     Find in Files SearchCTRL+SHIFT+M
    Text Editing
     Select Word Left Select Next Word CTRL+RIGHT ARROW
     Select Word Right Select Previous Word CTRL+LEFT ARROW
    Windows
     Cycle WindowsNext Editor CTRL+TAB
     Cycle WindowsPrevious Editor CTRL+SHIFT+TAB
    -
    Related references
    - - - - + + + + + + +Nokia CodeWarrior Shortcuts + + + + + +

    Nokia CodeWarrior Shortcuts

    +

    Table 1 describes the Nokia CodeWarrior key shortcuts supported by Carbide.c++.

    +

    NOTE These shortcuts extend the Default key shortcuts and not every CodeWarror tool shortcut is supported.

    +

    Keys can be viewed or edited in the + +General > Keys preference panel.

    +
    Table 1. Nokia CodeWarrior key shortcuts
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Category

    Nokia CodeWarriorCarbide.c++Shortcut Added
    C/C++ Source
     Find Definition Open Definition CTRL+'
    Edit
     Find Next Find Next F3
     Find Previous Find Previous SHIFT+F3
     ReplaceFind and Replace CTRL+H
     UndoUndoCTRL+Backspace
    Project
     MakeBuild Project F7
      CompileCTRL+F7
      Build Target Only CTRL+SHIFT+F7
     NewNewCTRL+SHIFT+N
     Remove Object Code Build CleanCTRL+-
    Run/Debug
     DebugStartF5
     Goto Line Run to Line CTRL+G
     RunStart without DebuggingCTRL+F5
     Set/Clear Breakpoint Toggle Breakpoint F9
     Step Into Step Into F11
     Step Over Step Over F10
     Step Return Step Return SHIFT+F11
    Search
      Search Backwards CTRL+B
      Search Forwards CTRL+F
      Find Text in Workspace CTRL+F3
     Find in Files SearchCTRL+SHIFT+M
    Text Editing
     Select Word Left Select Next Word CTRL+RIGHT ARROW
     Select Word Right Select Previous Word CTRL+LEFT ARROW
    Windows
     Cycle WindowsNext Editor CTRL+TAB
     Cycle WindowsPrevious Editor CTRL+SHIFT+TAB
    +
    Related references
    + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/html/help_keys_vs.htm --- a/core/com.nokia.carbide.cpp/html/help_keys_vs.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/html/help_keys_vs.htm Wed Jul 21 12:11:48 2010 -0500 @@ -1,202 +1,202 @@ - - - - - - -Microsoft Visual Studio Key Shortcuts - - - - - -

    Microsoft Visual Studio Shortcuts

    -

    Table 1 describes the Microsoft Visual Studio key shortcuts supported by Carbide.c++.

    -

    NOTE These shortcuts extend the Default key shortcuts and not every Visual Studio tool shortcut is supported.

    -

    Keys can be viewed or edited in the - -General > Keys preference panel.

    -
    Table 1. Microsoft Visual Studio key shortcuts
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Category

    Visual Studio Carbide.c++Shortcut Added
    C/C++ Source
     Edit.GoToDefinition Open DefinitionF12
    Edit
     Edit.FindNext Find Next F3
      Find at Current Cursor Position CTRL+F3
     Edit.FindPrevious Find Previous SHIFT+F3
    Project
     Build.BuildSolutionBuild Project F7
      CompileCTRL+F7
      Build Target Only CTRL+SHIFT+F7
     File.NewProjectNewCTRL+SHIFT+N
    Navigation
     Add Bookmark Add Bookmark CTRL+F2
     Go to Line Go to Line... CTRL+G
    Run/Debug
     Debug.StartStart / Resume F5
     Debug.StartWithoutDebuggingStart without DebuggingCTRL+F5
     Debug.StepIntoStep Into F11
     Debug.StepOutStep Return SHIFT+F11
     Debug.StepOverStep Over F10
     Debug.ToggleBreakpointToggle Breakpoint F9
     Debug.RunToCursorRun to Line CTRL+F10
     Debug.BreakpointsBreakpointsCTRL+ALT+B
    Search
     Edit.FindinFilesSearchCTRL+SHIFT+F
    Text Editing
     Edit.WordNextSelect Next Word CTRL+RIGHT ARROW
     Edit.WordPreviousSelect Previous Word CTRL+LEFT ARROW
    Windows
     Window.NextDocumentWindowNext Editor CTRL+TAB
     Window.PreviousDocumentWindowPrevious Editor CTRL+SHIFT+TAB
    -
    Related references
    - - - - + + + + + + +Microsoft Visual Studio Key Shortcuts + + + + + +

    Microsoft Visual Studio Shortcuts

    +

    Table 1 describes the Microsoft Visual Studio key shortcuts supported by Carbide.c++.

    +

    NOTE These shortcuts extend the Default key shortcuts and not every Visual Studio tool shortcut is supported.

    +

    Keys can be viewed or edited in the + +General > Keys preference panel.

    +
    Table 1. Microsoft Visual Studio key shortcuts
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Category

    Visual Studio Carbide.c++Shortcut Added
    C/C++ Source
     Edit.GoToDefinition Open DefinitionF12
    Edit
     Edit.FindNext Find Next F3
      Find at Current Cursor Position CTRL+F3
     Edit.FindPrevious Find Previous SHIFT+F3
    Project
     Build.BuildSolutionBuild Project F7
      CompileCTRL+F7
      Build Target Only CTRL+SHIFT+F7
     File.NewProjectNewCTRL+SHIFT+N
    Navigation
     Add Bookmark Add Bookmark CTRL+F2
     Go to Line Go to Line... CTRL+G
    Run/Debug
     Debug.StartStart / Resume F5
     Debug.StartWithoutDebuggingStart without DebuggingCTRL+F5
     Debug.StepIntoStep Into F11
     Debug.StepOutStep Return SHIFT+F11
     Debug.StepOverStep Over F10
     Debug.ToggleBreakpointToggle Breakpoint F9
     Debug.RunToCursorRun to Line CTRL+F10
     Debug.BreakpointsBreakpointsCTRL+ALT+B
    Search
     Edit.FindinFilesSearchCTRL+SHIFT+F
    Text Editing
     Edit.WordNextSelect Next Word CTRL+RIGHT ARROW
     Edit.WordPreviousSelect Previous Word CTRL+LEFT ARROW
    Windows
     Window.NextDocumentWindowNext Editor CTRL+TAB
     Window.PreviousDocumentWindowPrevious Editor CTRL+SHIFT+TAB
    +
    Related references
    + + + + \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/html/online_banner.html --- a/core/com.nokia.carbide.cpp/html/online_banner.html Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/html/online_banner.html Wed Jul 21 12:11:48 2010 -0500 @@ -37,8 +37,8 @@ - - + +
    Carbide icon Carbide Online Help Center v3.0Carbide icon Carbide Online Help Center v3.0
    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/html/welcome_note.htm --- a/core/com.nokia.carbide.cpp/html/welcome_note.htm Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/html/welcome_note.htm Wed Jul 21 12:11:48 2010 -0500 @@ -8,8 +8,15 @@

    Welcome to Carbide.c++ 3.0

    -

    Thank you for installing Carbide.c++ 3.0! It's an improvement over 2.6 with many improvements including support for Eclipse 3.6 and CDT 7.0, as well as numerous bug fixes.

    -

    However, perhaps the best part about Carbide.c++ is the Carbide.c++ Development Kit (CDK) that you can use to build custom extensions for Carbide.c++. Update your installation of Carbide through the Carbide.c++ Update Site to get a copy of the Carbide.c++ Development Kit > Carbide.c++ Plug-in SDK. Take a look, and let us know what you build!

    +

    Thank you for installing Carbide.c++ 3.0! It's an improvement over 2.7 with many improvements including support for Eclipse 3.6 and CDT 7.0, as well as numerous bug fixes.

    +

    For initial help, check out the Welcome pages, a great resource for leearning about Carbide. Click Help > Welcome to open the Welcome screen and choose from the following topics:

    +
      +
    • What's New – learn about new features in this release of Carbide.c++
    • +
    • Tutorials – tutorials on using Carbide and other major features
    • +
    • Web Resources – lots of Symbian and Carbide resources on the web to visit and explore
    • +
    • Migrating – tips on features useful to new Carbide users
    • +
    +

    Want to learn how to add additional features to Carbide? Download the Carbide.c++ Development Kit (CDK) that you can use to build custom extensions for Carbide.c++.

    Finally, if you find bugs, please let us know by submitting it at the new Carbide Bugzilla bug tracking site located at https://xdabug001.ext.nokia.com/bugzilla

    For any other questions, please don't hesitate to contact us.

    Thank you again for choosing Carbide.c++! We hope you like it.

    diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/icons/gold_header.png Binary file core/com.nokia.carbide.cpp/icons/gold_header.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/intro/css/graphics/rootpage/background_carbide.jpg Binary file core/com.nokia.carbide.cpp/intro/css/graphics/rootpage/background_carbide.jpg has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/plugin.properties --- a/core/com.nokia.carbide.cpp/plugin.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/plugin.properties Wed Jul 21 12:11:48 2010 -0500 @@ -7,13 +7,13 @@ CHEAT_SHEETS_MENU = &Cheat Sheets... productBlurb=\nCarbide.c++ Version 3.0.0\n\ -Build {0} {1}\n\n\n\n\n\n\n\ +Build {0} {1}\n\n\n\ Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.\n\ Visit http://developer.symbian.org/\n\ This product includes software developed by Eclipse Project.\n\ Visit http://www.eclipse.org/ -theme.name.carbide = Carbide +theme.name.carbide = slate carbcPreference.common=carbide symbian cpp cplusplus carbcPreference.diagnostics=diagnostic logs @@ -23,5 +23,5 @@ PreferencePages.Capabilities.categoryName = &Capabilities PreferencePages.Capabilities.activityPromptButton = &Prompt when enabling capabilities PreferencePages.Capabilities.activityPromptButtonTooltip = Prompt when a feature is first used that requires enablement of capabilities -PreferencePages.Capabilities.captionMessage = Capabilities allow you to enable or disable various product components. These capabilities are grouped according to a set of predefined categories. +PreferencePages.Capabilities.captionMessage = Capabilities allow you to enable or disable various product components. These capabilities are grouped according to a set of predefined categories. diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/plugin.xml --- a/core/com.nokia.carbide.cpp/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/plugin.xml Wed Jul 21 12:11:48 2010 -0500 @@ -61,18 +61,18 @@ value="Migration information available."/> + value="The following web resources provide information and guidance on creating Symbian OS programs using Carbide.c++"/> + value="0,257,469,10" /> + value="333333" /> + value="24,190,441,15" /> @@ -90,6 +90,7 @@ + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/splash.bmp Binary file core/com.nokia.carbide.cpp/splash.bmp has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/graphics/contentpage/background.jpg Binary file core/com.nokia.carbide.cpp/themes/carbide/graphics/contentpage/background.jpg has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/graphics/icons/obj48/c3_new.png Binary file core/com.nokia.carbide.cpp/themes/carbide/graphics/icons/obj48/c3_new.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/graphics/icons/obj48/c3_new_hover.png Binary file core/com.nokia.carbide.cpp/themes/carbide/graphics/icons/obj48/c3_new_hover.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/graphics/root/background.jpg Binary file core/com.nokia.carbide.cpp/themes/carbide/graphics/root/background.jpg has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/html/firststeps.css --- a/core/com.nokia.carbide.cpp/themes/carbide/html/firststeps.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/themes/carbide/html/firststeps.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -body { - /* background-image : url(../graphics/root/background.jpg); */ -} - -/* show the "selected" image for this page */ -#navigation-links a#firststeps img, -#navigation-links a#firststeps:hover img, -#navigation-links a#firststeps:focus img, -#navigation-links a#firststeps:active img { - background-image : url(../graphics/icons/ctool/firsteps48sel.gif); -} +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +body { + background-image : url(../graphics/root/background.jpg); +} + +/* show the "selected" image for this page */ +#navigation-links a#firststeps img, +#navigation-links a#firststeps:hover img, +#navigation-links a#firststeps:focus img, +#navigation-links a#firststeps:active img { + background-image : url(../graphics/icons/ctool/firsteps48sel.gif); +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/html/migrate.css --- a/core/com.nokia.carbide.cpp/themes/carbide/html/migrate.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/themes/carbide/html/migrate.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -body { - /* background-image : url(../graphics/root/background.jpg); */ -} - -/* show the "selected" image for this page */ -#navigation-links a#migrate img, -#navigation-links a#migrate:hover img, -#navigation-links a#migrate:focus img, -#navigation-links a#migrate:active img { - background-image : url(../graphics/icons/ctool/migrate48sel.gif); -} +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +body { + background-image : url(../graphics/root/background.jpg); +} + +/* show the "selected" image for this page */ +#navigation-links a#migrate img, +#navigation-links a#migrate:hover img, +#navigation-links a#migrate:focus img, +#navigation-links a#migrate:active img { + background-image : url(../graphics/icons/ctool/migrate48sel.gif); +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/html/overview.css --- a/core/com.nokia.carbide.cpp/themes/carbide/html/overview.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/themes/carbide/html/overview.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -body { - /* background-image : url(../graphics/root/background.jpg); */ -} - -/* show the "selected" image for this page */ -#navigation-links a#overview img, -#navigation-links a#overview:hover img, -#navigation-links a#overview:focus img, -#navigation-links a#overview:active img { - background-image : url(../graphics/icons/ctool/overview48sel.gif); -} +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +body { + background-image : url(../graphics/root/background.jpg); +} + +/* show the "selected" image for this page */ +#navigation-links a#overview img, +#navigation-links a#overview:hover img, +#navigation-links a#overview:focus img, +#navigation-links a#overview:active img { + background-image : url(../graphics/icons/ctool/overview48sel.gif); +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/html/root.css --- a/core/com.nokia.carbide.cpp/themes/carbide/html/root.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/themes/carbide/html/root.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,291 +1,292 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -/* - * Set up general font colours, sizes, etc. Some of these will override - * settings from the shared CSS - */ -.intro-header H1 { - font-family: Helvetica, sans-serif; - font-size: 20px; - color: #0A94D6; -} - -#page-links a .link-label, #action-links a .link-label { - font-size : 13pt; - font-weight : 600; - color : #0A94D6; -} -#page-links a p .text, #action-links a p .text { - font-size : 13pt; - font-weight : 500; - color : #333333; -} - -/* - * Turn off shared backround image. - */ - -.page { - background-image: none; -} - -/* - * Set up the content for the root page. - */ -body { - min-width : 770px; - /* since IE doesn't support min-width, use expression */ - width:expression(document.body.clientWidth < 770? "770px": "auto" ); - /* background-image : url(../graphics/root/background.jpg); */ - background-repeat : no-repeat; - background-position : top left; - /* background-color : #7169D1; */ -} -#root { -/* - /* background-image : url(../graphics/root/brandmark.gif); */ -*/ - background-repeat : no-repeat; - background-position : bottom left; - min-height : 450px; - height : 100%; - height : expression(document.body.clientHeight < 450? "450px": "100%" ); -} - -#branding { - position: absolute; - bottom : 10px; - left : 10px; -} - -/* - * We will not use the general-purpose group1 used in - * other pages for a curve image. - */ - -#extra-group1 { - display : none; -} -/* - * Set up the navigation bar. It should be centered in the middle - * of the page - */ -#links-background { - /* background-image : url(../graphics/root/dots.gif); */ - background-repeat : repeat-x; - width : 100%; - height : 177px; - margin-top : 18%; - margin-bottom : auto; - text-align : center; -} -/* specify a width for Moz so we can center. - * **Important** If additional links are added, we will have to increase this width - * to accomodate them, otherwise they will wrap to a new line - */ - -#links-background > #page-links { - width: 33em; - margin: 0 auto; -} - -#page-links { - position : relative; - top : 50px; - text-align: center; -} -#page-links a { - position : relative; - width : 86px; - margin-left : 1em; - margin-right : 1em; - text-align : center; - vertical-align : top; -} -/* float left for Moz so the items all appear inline */ -#page-links > a { - float : left; - position : relative; -} -#page-links a img { - height : 82px; - width : 82px; - vertical-align : middle; -} - -/* remove the hover image from the flow of the document, - so it doesn't take up space and change the position - of the link label and descriptions */ -#page-links a .background-image { - position : absolute; -} -/* properly align the link label and text based on class (left vs. right) */ -#page-links a:hover { - /* This is needed for IE to force the hover pseudo selectors below to work.*/ - padding : 0 em; -} -/* Hide both the label and the description of the link and remove them from static HTML flow, until user hovers over link */ -/* First, set the width of both the label and the description to a max of 15 em. */ -/* This can be changed when translated to different country locals. */ -#page-links a span { - width : 16em; -} - -/* Set up left links orientation first. */ -#page-links a.left:link .link-label, -#page-links a.left:visited .link-label { - display: none; -} -#page-links a.left:hover .link-label, -#page-links a.left:focus .link-label, -#page-links a.left:active .link-label { - text-align: left; - display: block; - position: absolute; - top : 120 %; - left : 0; -} - -/* hide description and remove it from static HTML flow, until user hovers over link */ -#page-links a.left:link .text, -#page-links a.left:visited .text { - display: none; -} -#page-links a.left:hover .text, -#page-links a.left:focus .text, -#page-links a.left:active .text { - text-align: left; - display: block; - position: absolute; - left : 0; - top: 145%; -} -/* Set up right links orientation now. */ -#page-links a.right:link .link-label, -#page-links a.right:visited .link-label { - display: none; -} -#page-links a.right:hover .link-label, -#page-links a.right:focus .link-label, -#page-links a.right:active .link-label { - text-align: right; - display: block; - position: absolute; - top : 120 %; - right : 0; -} -/* hide description and remove it from static HTML flow, until user hovers over link */ -#page-links a.right:link .text, -#page-links a.right:visited .text { - display: none; -} -#page-links a.right:hover .text, -#page-links a.right:focus .text, -#page-links a.right:active .text { - text-align: right; - display: block; - position: absolute; - right : 0; - top: 145%; -} - -/* properties for each of the page-links */ -#page-links a#overview img { background-image : url(../graphics/icons/etool/overview72.gif); } -#page-links a:hover#overview img { background-image : url(../graphics/icons/ctool/overview72.gif); } - -#page-links a#tutorials img { background-image : url(../graphics/icons/etool/tutorials72.gif); } -#page-links a:hover#tutorials img { background-image : url(../graphics/icons/ctool/tutorials72.gif); } - -#page-links a#samples img { background-image : url(../graphics/icons/etool/samples72.gif); } -#page-links a:hover#samples img { background-image : url(../graphics/icons/ctool/samples72.gif); } - -#page-links a#whatsnew img { background-image : url(../graphics/icons/etool/whatsnew72.gif); } -#page-links a:hover#whatsnew img { background-image : url(../graphics/icons/ctool/whatsnew72.gif); } - -#page-links a#firststeps img { background-image : url(../graphics/icons/etool/firsteps72.gif); } -#page-links a:hover#firststeps img { background-image : url(../graphics/icons/ctool/firsteps72.gif); } - -#page-links a#webresources img { background-image : url(../graphics/icons/etool/webrsrc72.gif); } -#page-links a:hover#webresources img { background-image : url(../graphics/icons/ctool/webrsrc72.gif); } - -#page-links a#migrate img { background-image : url(../graphics/icons/etool/migrate72.gif); } -#page-links a:hover#migrate img { background-image : url(../graphics/icons/ctool/migrate72.gif); } - -/* - * Set up the action links - */ -#action-links { - width : 98%; - position : absolute; - left : 0px; - top : 20px; -} -#action-links a#workbench { - position : absolute; - top : -16px; - right : -8px; - text-align : right; -} -#action-links a .background-image, -#action-links a #workbench_img { - height : 53px; - width : 53px; - text-align : center; - vertical-align : top; -} -/* special case for mozilla */ -#action-links a > .background-image, -#action-links a > #workbench_img { - vertical-align : middle; -} -/* remove the hover image from the flow of the document, - so it doesn't take up space and change the position - of the main image */ -#action-links a .background-image { - position : absolute; -} - -#action-links a#workbench .background-image { - background-image : url(../graphics/icons/etool/wb48.gif); -} - -#action-links a#workbench:hover .background-image, -#action-links a#workbench:focus .background-image, -#action-links a#workbench:active .background-image { - background-image : url(../graphics/icons/ctool/wb48.gif); - visibility : visible; - position: absolute; - top: 0px; - right: 0px; -} -/* hide the link and description until users hover over the link */ -#action-links a p .text, #action-links a .link-label { - display : none; -} -#action-links a:hover .link-label, -#action-links a:focus .link-label, -#action-links a:active .link-label { - display : block; - width : 16em; - margin-left : 10px; -} -#action-links a:hover p .text, -#action-links a:focus p .text, -#action-links a:active p .text { - display : block; - width : 16em; -} -#action-links a:hover, -#action-links a:focus, -#action-links a:active { - border : 0px; -} +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +/* + * Set up general font colours, sizes, etc. Some of these will override + * settings from the shared CSS + */ +.intro-header H1 { + font-family: Helvetica, sans-serif; + font-size: 20px; + color: #000000; +} + +#page-links a .link-label, #action-links a .link-label { + font-size : 13pt; + font-weight : 600; + color : #000000; +} +#page-links a p .text, #action-links a p .text { + font-size : 13pt; + font-weight : 500; + color : #333333; +} + +/* + * Turn off shared backround image. + */ + +.page { + background-position:left-10 top-10; + background-image: background.jpg; +} + +/* + * Set up the content for the root page. + */ +body { + min-width : 770px; + /* since IE doesn't support min-width, use expression */ + width:expression(document.body.clientWidth < 770? "770px": "auto" ); + /* background-image : url(../graphics/root/background.jpg); */ + background-repeat : no-repeat; + background-position : top left; + /* background-color : #7169D1; */ +} +#root { +/* + /* background-image : url(../graphics/root/brandmark.gif); */ +*/ + background-repeat : no-repeat; + background-position : bottom left; + min-height : 450px; + height : 100%; + height : expression(document.body.clientHeight < 450? "450px": "100%" ); +} + +#branding { + position: absolute; + bottom : 10px; + left : 10px; +} + +/* + * We will not use the general-purpose group1 used in + * other pages for a curve image. + */ + +#extra-group1 { + display : none; +} +/* + * Set up the navigation bar. It should be centered in the middle + * of the page + */ +#links-background { + /* background-image : url(../graphics/root/dots.gif); */ + background-repeat : repeat-x; + width : 100%; + height : 177px; + margin-top : 18%; + margin-bottom : auto; + text-align : center; +} +/* specify a width for Moz so we can center. + * **Important** If additional links are added, we will have to increase this width + * to accomodate them, otherwise they will wrap to a new line + */ + +#links-background > #page-links { + width: 33em; + margin: 0 auto; +} + +#page-links { + position : relative; + top : 50px; + text-align: center; +} +#page-links a { + position : relative; + width : 86px; + margin-left : 1em; + margin-right : 1em; + text-align : center; + vertical-align : top; +} +/* float left for Moz so the items all appear inline */ +#page-links > a { + float : left; + position : relative; +} +#page-links a img { + height : 82px; + width : 82px; + vertical-align : middle; +} + +/* remove the hover image from the flow of the document, + so it doesn't take up space and change the position + of the link label and descriptions */ +#page-links a .background-image { + position : absolute; +} +/* properly align the link label and text based on class (left vs. right) */ +#page-links a:hover { + /* This is needed for IE to force the hover pseudo selectors below to work.*/ + padding : 0 em; +} +/* Hide both the label and the description of the link and remove them from static HTML flow, until user hovers over link */ +/* First, set the width of both the label and the description to a max of 15 em. */ +/* This can be changed when translated to different country locals. */ +#page-links a span { + width : 16em; +} + +/* Set up left links orientation first. */ +#page-links a.left:link .link-label, +#page-links a.left:visited .link-label { + display: none; +} +#page-links a.left:hover .link-label, +#page-links a.left:focus .link-label, +#page-links a.left:active .link-label { + text-align: left; + display: block; + position: absolute; + top : 120 %; + left : 0; +} + +/* hide description and remove it from static HTML flow, until user hovers over link */ +#page-links a.left:link .text, +#page-links a.left:visited .text { + display: none; +} +#page-links a.left:hover .text, +#page-links a.left:focus .text, +#page-links a.left:active .text { + text-align: left; + display: block; + position: absolute; + left : 0; + top: 145%; +} +/* Set up right links orientation now. */ +#page-links a.right:link .link-label, +#page-links a.right:visited .link-label { + display: none; +} +#page-links a.right:hover .link-label, +#page-links a.right:focus .link-label, +#page-links a.right:active .link-label { + text-align: right; + display: block; + position: absolute; + top : 120 %; + right : 0; +} +/* hide description and remove it from static HTML flow, until user hovers over link */ +#page-links a.right:link .text, +#page-links a.right:visited .text { + display: none; +} +#page-links a.right:hover .text, +#page-links a.right:focus .text, +#page-links a.right:active .text { + text-align: right; + display: block; + position: absolute; + right : 0; + top: 145%; +} + +/* properties for each of the page-links */ +#page-links a#overview img { background-image : url(../graphics/icons/etool/overview72.gif); } +#page-links a:hover#overview img { background-image : url(../graphics/icons/ctool/overview72.gif); } + +#page-links a#tutorials img { background-image : url(../graphics/icons/etool/tutorials72.gif); } +#page-links a:hover#tutorials img { background-image : url(../graphics/icons/ctool/tutorials72.gif); } + +#page-links a#samples img { background-image : url(../graphics/icons/etool/samples72.gif); } +#page-links a:hover#samples img { background-image : url(../graphics/icons/ctool/samples72.gif); } + +#page-links a#whatsnew img { background-image : url(../graphics/icons/etool/whatsnew72.gif); } +#page-links a:hover#whatsnew img { background-image : url(../graphics/icons/ctool/whatsnew72.gif); } + +#page-links a#firststeps img { background-image : url(../graphics/icons/etool/firsteps72.gif); } +#page-links a:hover#firststeps img { background-image : url(../graphics/icons/ctool/firsteps72.gif); } + +#page-links a#webresources img { background-image : url(../graphics/icons/etool/webrsrc72.gif); } +#page-links a:hover#webresources img { background-image : url(../graphics/icons/ctool/webrsrc72.gif); } + +#page-links a#migrate img { background-image : url(../graphics/icons/etool/migrate72.gif); } +#page-links a:hover#migrate img { background-image : url(../graphics/icons/ctool/migrate72.gif); } + +/* + * Set up the action links + */ +#action-links { + width : 98%; + position : absolute; + left : 0px; + top : 20px; +} +#action-links a#workbench { + position : absolute; + top : -16px; + right : -8px; + text-align : right; +} +#action-links a .background-image, +#action-links a #workbench_img { + height : 53px; + width : 53px; + text-align : center; + vertical-align : top; +} +/* special case for mozilla */ +#action-links a > .background-image, +#action-links a > #workbench_img { + vertical-align : middle; +} +/* remove the hover image from the flow of the document, + so it doesn't take up space and change the position + of the main image */ +#action-links a .background-image { + position : absolute; +} + +#action-links a#workbench .background-image { + background-image : url(../graphics/icons/etool/wb48.gif); +} + +#action-links a#workbench:hover .background-image, +#action-links a#workbench:focus .background-image, +#action-links a#workbench:active .background-image { + background-image : url(../graphics/icons/ctool/wb48.gif); + visibility : visible; + position: absolute; + top: 0px; + right: 0px; +} +/* hide the link and description until users hover over the link */ +#action-links a p .text, #action-links a .link-label { + display : none; +} +#action-links a:hover .link-label, +#action-links a:focus .link-label, +#action-links a:active .link-label { + display : block; + width : 16em; + margin-left : 10px; +} +#action-links a:hover p .text, +#action-links a:focus p .text, +#action-links a:active p .text { + display : block; + width : 16em; +} +#action-links a:hover, +#action-links a:focus, +#action-links a:active { + border : 0px; +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/html/shared.css --- a/core/com.nokia.carbide.cpp/themes/carbide/html/shared.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/themes/carbide/html/shared.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,443 +1,443 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -/* - * Set up general fonts, sizes and colors - */ -body { font-family : Verdana, Helvetica, sans-serif; } - -H1, H2, H3, H4, p, a { color : #0A94D6; } - -.intro-header H1 { - font-family: Verdana, Helvetica, sans-serif; - font-size: 20px; - color: #0A94D6; -} - -h2 { - font-size : 13pt; - font-weight : normal; - color : #0A94D6; -} -/* For regular div labels */ -H4 .div-label { - font-size : 10pt; - font-weight : bold; -} - -/* For separators */ -HR { - width: 90%; - align: left; - height : 1px; - color : #0A94D6; -} - -/* For the main page content's title */ -#content-header H4 .div-label { - font-size : 14pt; - font-weight : bold; - color : #0A94D6; - float : none; - clear : both; -} - -.page-description { - font-size : 10pt; - float : none; - clear : both; -} - -a { - font-weight : bold; - text-decoration : none; - color : #4D4D4D; -} - -a .link-label { - font-size : 10pt; - font-weight : normal; -} - -/* Hide the 'special-effect' extra div in links by default. */ -.link-extra-div { - display : none; -} - -#navigation-links a .link-label { - font-size : 9pt; - font-weight : normal; - color : #0A94D6; -} - -a .text { - font-size : 8pt; - font-weight : normal; -} - -p .group-description { - font-size : 10pt; - font-weight : normal; -} - - -/* - * Set up other general properties like padding/margins - */ -html, body { width : 100%; height : 100%; } - -html, body, div, h1, h4, p, a { margin : 0px; padding : 0px; } - -.intro-header H1 { padding-top : 10px; margin-left : 10px; } - -.section { } -.section-body { display: none; padding : 0px; } - -/* For regular div labels */ -#page-content div H4 { - padding : 10px; - padding-bottom : 0px; -} - -/* For the main page content's div label */ -#page-content #content-header H4 { - padding-bottom : 10px; - padding-top : 0px; -} - -/* special case for Mozilla's main content-header label. - Mozilla 1.4 needs more room at the top */ -#page-content > #content-header H4 { padding-top : 10px; } - -/* Needed in IE to get shift+tab to show the active image properly */ -a:active { - border : solid 0px; -} - -a img { - border-width : 0; - background-repeat : no-repeat; -} - -/* - * to get scrollbars working in both IE and Mozilla - */ -html,body { overflow: auto; } -html>body { overflow: visible; } - -/* - * Set up the body, decorative background, and navigation for the content - * pages. - * Note: the root page handles its own background and navigation; these - * settings primarily apply to the content pages - */ -body { - /*background-color : #FFFFFF;*/ - background-repeat : no-repeat; - background-position : bottom right; -} - -/* - * We will use one of the general purpose groups to show - * the curve image - */ -#extra-group1 { - /* width : 100%; - height : 164px; - position : absolute; - top : 0px; - /* background-image : url(../graphics/contentpage/backgroundcurve.gif); */ - background-repeat : no-repeat; - background-position : top center; - margin : 0; - padding : 0; - */ -} - -/* - * Hide the other general-purpose groups - */ - -#extra-group2, -#extra-group3, -#extra-group4, -#extra-group5 { - display : none; -} - -.intro-header { background-color : transparent; z-index : 100;} - -body, .page{ - min-width : 770px; - /* since IE doesn't support min-width, try expression */ - width:expression(document.body.clientWidth < 770? "770px": "auto" ); - min-height : 425px; - height : 100%; - height : expression(document.body.clientHeight < 425? "425px": "100%" ); -} - -.page { - min-height : 475px; - /* background-image : url(../graphics/root/background.jpg); */ - background-repeat : repeat-x; - background-position : top left; -} - -#page-content { - background-repeat : no-repeat; - background-position : bottom right; - height : 70%; -} - -/* - * Lay out the navigation links - * (Root page does something similar for its navigation) - */ -#navigation-links { - position : relative; - left : 10px; - top : 5px; - height : 60px; - width : 98%; -} - -#navigation-links a { - padding-left : 5px; - padding-right : 5px; - float : left; - text-align : center; -} - -#navigation-links #customize { - padding-left : 5px; - padding-right : 5px; - float : left; - text-align : center; -} - -#navigation-links a img { - height : 52px; - width : 52px; - vertical-align : middle; -} - -#navigation-links a .link-label { display : block; margin-top : 5px;} - -#navigation-links a .text { display : none; } - -#navigation-links a:hover, -#navigation-links a:focus -#navigation-links a:active { border-right : 0px;} - -/* properties for each of the navigation-links */ -#navigation-links a#overview img { background-image : url(../graphics/icons/etool/overview48.gif); } -#navigation-links a#overview:hover img, -#navigation-links a#overview:focus img, -#navigation-links a#overview:active img { background-image : url(../graphics/icons/ctool/overview48.gif); } - -#navigation-links a#tutorials img { background-image : url(../graphics/icons/etool/tutorials48.gif); } -#navigation-links a#tutorials:hover img, -#navigation-links a#tutorials:active img, -#navigation-links a#tutorials:focus img { background-image : url(../graphics/icons/ctool/tutorials48.gif); } - -#navigation-links a#samples img { background-image : url(../graphics/icons/etool/samples48.gif); } -#navigation-links a#samples:hover img, -#navigation-links a#samples:active img, -#navigation-links a#samples:focus img { background-image : url(../graphics/icons/ctool/samples48.gif); } - -#navigation-links a#whatsnew img { background-image : url(../graphics/icons/etool/whatsnew48.gif); } -#navigation-links a#whatsnew:hover img, -#navigation-links a#whatsnew:focus img, -#navigation-links a#whatsnew:active img { background-image : url(../graphics/icons/ctool/whatsnew48.gif); } - -#navigation-links a#firststeps img { background-image : url(../graphics/icons/etool/firsteps48.gif); } -#navigation-links a#firststeps:hover img, -#navigation-links a#firststeps:focus img, -#navigation-links a#firststeps:active img { background-image : url(../graphics/icons/ctool/firsteps48.gif); } - -#navigation-links a#webresources img { background-image : url(../graphics/icons/etool/webrsrc48.gif); } -#navigation-links a#webresources:hover img, -#navigation-links a#webresources:focus img, -#navigation-links a#webresources:active img { background-image : url(../graphics/icons/ctool/webrsrc48.gif); } - -#navigation-links a#migrate img { background-image : url(../graphics/icons/etool/migrate48.gif); } -#navigation-links a#migrate:hover img, -#navigation-links a#migrate:focus img, -#navigation-links a#migrate:active img { background-image : url(../graphics/icons/ctool/migrate48.gif); } - - -#navigation-links a#workbench { position : absolute; right : 0px; top : -35px; text-align : right;} -#navigation-links a#workbench .text { display : none; } -#navigation-links a#workbench img { background-image : url(../graphics/icons/etool/wb48.gif); width : 53px; height : 53px;} -#navigation-links a#workbench:hover img, -#navigation-links a#workbench:focus img, -#navigation-links a#workbench:active img { background-image : url(../graphics/icons/ctool/wb48.gif); } - -/* - * Lay out the page title and description - */ -h1, p { margin-left : 10px; } /* required in mozilla so the page description is properly indented */ - -/* position the page content so that the page title overlays the bottom - * of the background image, but make sure the content is always on top - * (using z-index) */ -#page-content { - float : none; - clear : both; - text-align : center; - margin-top : 35px; -} - -.page > #page-content { margin-top : 50px; } - -#page-content p { - padding-bottom : 15px; - text-align : left; - float : none; - clear : both; -} - -/* Page content bins */ - -#page-content #top-left { - border: none; float: left; margin: 0px; padding: 0px; width: 50%; - clear: left; -} -#page-content #top-right { - border: none; float: right; margin: 0px; padding: 0px; width: 50%; - clear: right; -} - -/* top-bottom divider - runs the entire width to ensure - * bottom boxes start at the same y - */ -#page-content #content-divider { - border: none; float: none; margin: 0; padding: 0px; width: 100%; - clear: both; -} - -#page-content #bottom-left { - border: none; float: left; margin: 0px; padding: 0px; width: 50%; - clear: left; -} -#page-content #bottom-right { - border: none; float: right; margin: 0px; padding: 0px; width: 50%; - clear: right; -} - -#page-content #content-header H4, .page-description { - text-align : left; - margin-right : 10px; - float : none; - clear : both; -} - -#page-content #top-left > *, -#page-content #top-right > *, -#page-content #bottom-left > *, -#page-content #bottom-right > * { - display: block; -} - -#page-content * > a { - vertical-align : middle; -} - -#page-content * a img { - height : 57px; - width : 57px; - vertical-align : middle; -} - -/* Controls link titles on welcome page */ -#page-content * a .link-label { - font-weight : bold; - display : block; - position : relative; - top : -50px; - left : 60px; - margin-right: 60px; -} - -#page-content * a > .link-label { left: 65px; } - -/* Controls text description 0n welcome page */ -#page-content * a p .text { - display : block; - position : relative; - top : -45px; - margin-bottom: -25px; - left : 53px; - margin-right: 53px; - color: #000; -} - -#page-content * a p > .text { left: 58px; } - -#page-content * a:hover { border-right : 5px; } - - -/* The following rules are for extensions in all pages. Extensions should be placed in - * groups with the style 'content-group' and contain links with the style 'content-link'. - * Group is important so that importance mixin style can be applied to the group that - * uses block display. We need to see a solid rectangle around the extension, not - * a tight polygon around the link perimeter. - */ - -.content-group { - margin-left: 10px; - margin-right: 10px; - padding-left: 10px; - padding-right: 10px; - float : none; - clear : both; - text-align : left; - /* color: #000000; */ - /* Carbide branding mod - margin-bottom : 0px; - /* background-image : url(../graphics/contentpage/page-link-wide.gif); */ - background-repeat:no-repeat; - background-position : top left; - */ -} - - -.categoryContentnav { - font-size: 9pt; - font-weight: bold; - color: #4A4D4A; -} - -.topicList { - font-size: 8pt; - line-height:1.75; - color: #00507C; -} - -/* .content-link:hover { border-right : 0px; } */ -.content-link:hover { - background-image : url(../graphics/contentpage/page-link-wide.gif); -} - - -iframe { - position:relative; - top:16px; - width:100%; - height:100%; - padding-left:10px; - } - -/* mozilla scrollbar appearing off page fix */ -#page-content > iframe { - width: 98%; - padding-left: 2%; -} +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +/* + * Set up general fonts, sizes and colors + */ +body { font-family : Verdana, Helvetica, sans-serif; } + +H1, H2, H3, H4, p, a { color : #000000; } + +.intro-header H1 { + font-family: Verdana, Helvetica, sans-serif; + font-size: 20px; + color: #000000; +} + +h2 { + font-size : 13pt; + font-weight : normal; + color : #000000; +} +/* For regular div labels */ +H4 .div-label { + font-size : 10pt; + font-weight : bold; +} + +/* For separators */ +HR { + width: 90%; + align: left; + height : 1px; + color : #000000; +} + +/* For the main page content's title */ +#content-header H4 .div-label { + font-size : 14pt; + font-weight : bold; + color : #000000; + float : none; + clear : both; +} + +.page-description { + font-size : 10pt; + float : none; + clear : both; +} + +a { + font-weight : bold; + text-decoration : none; + color : #4D4D4D; +} + +a .link-label { + font-size : 10pt; + font-weight : normal; +} + +/* Hide the 'special-effect' extra div in links by default. */ +.link-extra-div { + display : none; +} + +#navigation-links a .link-label { + font-size : 9pt; + font-weight : normal; + color : #000000; +} + +a .text { + font-size : 8pt; + font-weight : normal; +} + +p .group-description { + font-size : 10pt; + font-weight : normal; +} + + +/* + * Set up other general properties like padding/margins + */ +html, body { width : 100%; height : 100%; } + +html, body, div, h1, h4, p, a { margin : 0px; padding : 0px; } + +.intro-header H1 { padding-top : 10px; margin-left : 10px; } + +.section { } +.section-body { display: none; padding : 0px; } + +/* For regular div labels */ +#page-content div H4 { + padding : 10px; + padding-bottom : 0px; +} + +/* For the main page content's div label */ +#page-content #content-header H4 { + padding-bottom : 10px; + padding-top : 0px; +} + +/* special case for Mozilla's main content-header label. + Mozilla 1.4 needs more room at the top */ +#page-content > #content-header H4 { padding-top : 10px; } + +/* Needed in IE to get shift+tab to show the active image properly */ +a:active { + border : solid 0px; +} + +a img { + border-width : 0; + background-repeat : no-repeat; +} + +/* + * to get scrollbars working in both IE and Mozilla + */ +html,body { overflow: auto; } +html>body { overflow: visible; } + +/* + * Set up the body, decorative background, and navigation for the content + * pages. + * Note: the root page handles its own background and navigation; these + * settings primarily apply to the content pages + */ +body { + /*background-color : #FFFFFF;*/ + background-repeat : no-repeat; + background-position : bottom right; +} + +/* + * We will use one of the general purpose groups to show + * the curve image + */ +#extra-group1 { + /* width : 100%; + height : 164px; + position : absolute; + top : 0px; + /* background-image : url(../graphics/contentpage/backgroundcurve.gif); */ + background-repeat : no-repeat; + background-position : top center; + margin : 0; + padding : 0; + */ +} + +/* + * Hide the other general-purpose groups + */ + +#extra-group2, +#extra-group3, +#extra-group4, +#extra-group5 { + display : none; +} + +.intro-header { background-color : transparent; z-index : 100;} + +body, .page{ + min-width : 770px; + /* since IE doesn't support min-width, try expression */ + width:expression(document.body.clientWidth < 770? "770px": "auto" ); + min-height : 425px; + height : 100%; + height : expression(document.body.clientHeight < 425? "425px": "100%" ); +} + +.page { + min-height : 475px; + background-image : url(../graphics/root/background.jpg); + background-repeat : repeat-x; + background-position : top left; +} + +#page-content { + background-repeat : no-repeat; + background-position : bottom right; + height : 70%; +} + +/* + * Lay out the navigation links + * (Root page does something similar for its navigation) + */ +#navigation-links { + position : relative; + left : 10px; + top : 5px; + height : 60px; + width : 98%; +} + +#navigation-links a { + padding-left : 5px; + padding-right : 5px; + float : left; + text-align : center; +} + +#navigation-links #customize { + padding-left : 5px; + padding-right : 5px; + float : left; + text-align : center; +} + +#navigation-links a img { + height : 52px; + width : 52px; + vertical-align : middle; +} + +#navigation-links a .link-label { display : block; margin-top : 5px;} + +#navigation-links a .text { display : none; } + +#navigation-links a:hover, +#navigation-links a:focus +#navigation-links a:active { border-right : 0px;} + +/* properties for each of the navigation-links */ +#navigation-links a#overview img { background-image : url(../graphics/icons/etool/overview48.gif); } +#navigation-links a#overview:hover img, +#navigation-links a#overview:focus img, +#navigation-links a#overview:active img { background-image : url(../graphics/icons/ctool/overview48.gif); } + +#navigation-links a#tutorials img { background-image : url(../graphics/icons/etool/tutorials48.gif); } +#navigation-links a#tutorials:hover img, +#navigation-links a#tutorials:active img, +#navigation-links a#tutorials:focus img { background-image : url(../graphics/icons/ctool/tutorials48.gif); } + +#navigation-links a#samples img { background-image : url(../graphics/icons/etool/samples48.gif); } +#navigation-links a#samples:hover img, +#navigation-links a#samples:active img, +#navigation-links a#samples:focus img { background-image : url(../graphics/icons/ctool/samples48.gif); } + +#navigation-links a#whatsnew img { background-image : url(../graphics/icons/etool/whatsnew48.gif); } +#navigation-links a#whatsnew:hover img, +#navigation-links a#whatsnew:focus img, +#navigation-links a#whatsnew:active img { background-image : url(../graphics/icons/ctool/whatsnew48.gif); } + +#navigation-links a#firststeps img { background-image : url(../graphics/icons/etool/firsteps48.gif); } +#navigation-links a#firststeps:hover img, +#navigation-links a#firststeps:focus img, +#navigation-links a#firststeps:active img { background-image : url(../graphics/icons/ctool/firsteps48.gif); } + +#navigation-links a#webresources img { background-image : url(../graphics/icons/etool/webrsrc48.gif); } +#navigation-links a#webresources:hover img, +#navigation-links a#webresources:focus img, +#navigation-links a#webresources:active img { background-image : url(../graphics/icons/ctool/webrsrc48.gif); } + +#navigation-links a#migrate img { background-image : url(../graphics/icons/etool/migrate48.gif); } +#navigation-links a#migrate:hover img, +#navigation-links a#migrate:focus img, +#navigation-links a#migrate:active img { background-image : url(../graphics/icons/ctool/migrate48.gif); } + + +#navigation-links a#workbench { position : absolute; right : 0px; top : -35px; text-align : right;} +#navigation-links a#workbench .text { display : none; } +#navigation-links a#workbench img { background-image : url(../graphics/icons/etool/wb48.gif); width : 53px; height : 53px;} +#navigation-links a#workbench:hover img, +#navigation-links a#workbench:focus img, +#navigation-links a#workbench:active img { background-image : url(../graphics/icons/ctool/wb48.gif); } + +/* + * Lay out the page title and description + */ +h1, p { margin-left : 10px; } /* required in mozilla so the page description is properly indented */ + +/* position the page content so that the page title overlays the bottom + * of the background image, but make sure the content is always on top + * (using z-index) */ +#page-content { + float : none; + clear : both; + text-align : center; + margin-top : 35px; +} + +.page > #page-content { margin-top : 50px; } + +#page-content p { + padding-bottom : 15px; + text-align : left; + float : none; + clear : both; +} + +/* Page content bins */ + +#page-content #top-left { + border: none; float: left; margin: 0px; padding: 0px; width: 50%; + clear: left; +} +#page-content #top-right { + border: none; float: right; margin: 0px; padding: 0px; width: 50%; + clear: right; +} + +/* top-bottom divider - runs the entire width to ensure + * bottom boxes start at the same y + */ +#page-content #content-divider { + border: none; float: none; margin: 0; padding: 0px; width: 100%; + clear: both; +} + +#page-content #bottom-left { + border: none; float: left; margin: 0px; padding: 0px; width: 50%; + clear: left; +} +#page-content #bottom-right { + border: none; float: right; margin: 0px; padding: 0px; width: 50%; + clear: right; +} + +#page-content #content-header H4, .page-description { + text-align : left; + margin-right : 10px; + float : none; + clear : both; +} + +#page-content #top-left > *, +#page-content #top-right > *, +#page-content #bottom-left > *, +#page-content #bottom-right > * { + display: block; +} + +#page-content * > a { + vertical-align : middle; +} + +#page-content * a img { + height : 57px; + width : 57px; + vertical-align : middle; +} + +/* Controls link titles on welcome page */ +#page-content * a .link-label { + font-weight : bold; + display : block; + position : relative; + top : -50px; + left : 60px; + margin-right: 60px; +} + +#page-content * a > .link-label { left: 65px; } + +/* Controls text description 0n welcome page */ +#page-content * a p .text { + display : block; + position : relative; + top : -45px; + margin-bottom: -25px; + left : 53px; + margin-right: 53px; + color: #000; +} + +#page-content * a p > .text { left: 58px; } + +#page-content * a:hover { border-right : 5px; } + + +/* The following rules are for extensions in all pages. Extensions should be placed in + * groups with the style 'content-group' and contain links with the style 'content-link'. + * Group is important so that importance mixin style can be applied to the group that + * uses block display. We need to see a solid rectangle around the extension, not + * a tight polygon around the link perimeter. + */ + +.content-group { + margin-left: 10px; + margin-right: 10px; + padding-left: 10px; + padding-right: 10px; + float : none; + clear : both; + text-align : left; + /* color: #000000; */ + /* Carbide branding mod + margin-bottom : 0px; + /* background-image : url(../graphics/contentpage/page-link-wide.gif); */ + background-repeat:no-repeat; + background-position : top left; + */ +} + + +.categoryContentnav { + font-size: 9pt; + font-weight: bold; + color: #4A4D4A; +} + +.topicList { + font-size: 8pt; + line-height:1.75; + color: #00507C; +} + +/* .content-link:hover { border-right : 0px; } */ +.content-link:hover { + background-image : url(../graphics/contentpage/page-link-wide.gif); +} + + +iframe { + position:relative; + top:16px; + width:100%; + height:100%; + padding-left:10px; + } + +/* mozilla scrollbar appearing off page fix */ +#page-content > iframe { + width: 98%; + padding-left: 2%; +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/html/tutorials.css --- a/core/com.nokia.carbide.cpp/themes/carbide/html/tutorials.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/themes/carbide/html/tutorials.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -body { - /* background-image : url(../graphics/root/background.jpg); */ -} - -/* show the "selected" image for this page */ -#navigation-links a#tutorials img, -#navigation-links a#tutorials:hover img, -#navigation-links a#tutorials:focus img, -#navigation-links a#tutorials:active img { - background-image : url(../graphics/icons/ctool/tutorials48sel.gif); -} +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +body { + background-image : url(../graphics/root/background.jpg); +} + +/* show the "selected" image for this page */ +#navigation-links a#tutorials img, +#navigation-links a#tutorials:hover img, +#navigation-links a#tutorials:focus img, +#navigation-links a#tutorials:active img { + background-image : url(../graphics/icons/ctool/tutorials48sel.gif); +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/html/webresources.css --- a/core/com.nokia.carbide.cpp/themes/carbide/html/webresources.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/themes/carbide/html/webresources.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,22 +1,22 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -body { - /* background-image : url(../graphics/root/background.jpg); */ -} - -/* show the "selected" image for this page */ -#navigation-links a#webresources img, -#navigation-links a#webresources:hover img, -#navigation-links a#webresources:focus img, -#navigation-links a#webresources:active img { - background-image : url(../graphics/icons/ctool/webrsrc48sel.gif); -} +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +body { + background-image : url(../graphics/root/background.jpg); +} + +/* show the "selected" image for this page */ +#navigation-links a#webresources img, +#navigation-links a#webresources:hover img, +#navigation-links a#webresources:focus img, +#navigation-links a#webresources:active img { + background-image : url(../graphics/icons/ctool/webrsrc48sel.gif); +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.cpp/themes/carbide/html/whatsnew.css --- a/core/com.nokia.carbide.cpp/themes/carbide/html/whatsnew.css Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp/themes/carbide/html/whatsnew.css Wed Jul 21 12:11:48 2010 -0500 @@ -1,28 +1,28 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -body { - /* background-image : url(../graphics/root/background.jpg); */ -} - -/* show the "selected" image for this page */ -#navigation-links a#whatsnew img, -#navigation-links a#whatsnew:hover img, -#navigation-links a#whatsnew:focus img, -#navigation-links a#whatsnew:active img { - background-image : url(../graphics/icons/ctool/whatsnew48sel.gif); -} - -/* - * Default images for content links in this page. - */ -.content-link img { background-image : url(../graphics/icons/obj48/new_obj.gif); } +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +body { + background-image : url(../graphics/root/background.jpg); +} + +/* show the "selected" image for this page */ +#navigation-links a#whatsnew img, +#navigation-links a#whatsnew:hover img, +#navigation-links a#whatsnew:focus img, +#navigation-links a#whatsnew:active img { + background-image : url(../graphics/icons/ctool/whatsnew48sel.gif); +} + +/* + * Default images for content links in this page. + */ +.content-link img { background-image : url(../graphics/icons/obj48/new_obj.gif); } .content-link:hover img { background-image : url(../graphics/icons/obj48/newhov_obj.gif); } \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.discovery.ui/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -7,6 +7,7 @@ Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, + org.eclipse.core.net;bundle-version="1.2.100", org.eclipse.equinox.p2.discovery;bundle-version="1.0.0", org.eclipse.equinox.p2.discovery.compatibility;bundle-version="1.0.0", org.eclipse.equinox.p2.ui.discovery;bundle-version="1.0.0", @@ -14,7 +15,13 @@ org.eclipse.equinox.p2.operations;bundle-version="2.0.0", org.eclipse.equinox.p2.core;bundle-version="2.0.0", org.eclipse.equinox.p2.metadata;bundle-version="2.0.0", - org.eclipse.equinox.p2.repository;bundle-version="2.0.0" + org.eclipse.equinox.p2.repository;bundle-version="2.0.0", + org.eclipse.equinox.p2.engine;bundle-version="2.0.0", + org.eclipse.jface.text, + org.eclipse.ui.editors, + org.eclipse.ui.forms;bundle-version="3.5.0", + com.nokia.cpp.utils.ui;bundle-version="1.0.0", + com.nokia.cpp.utils.core;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-Vendor: Nokia diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/icons/Carbide_c_icon_16x16.png Binary file core/com.nokia.carbide.discovery.ui/icons/Carbide_c_icon_16x16.png has changed diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/plugin.properties --- a/core/com.nokia.carbide.discovery.ui/plugin.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/plugin.properties Wed Jul 21 12:11:48 2010 -0500 @@ -1,1 +1,3 @@ view.name=Install Extensions +menu.title=Carbide Portal +portal.desc=Install extensions, get support, install SDKs, find latest news \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/plugin.xml --- a/core/com.nokia.carbide.discovery.ui/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/plugin.xml Wed Jul 21 12:11:48 2010 -0500 @@ -1,33 +1,70 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/schema/portalPage.exsd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/schema/portalPage.exsd Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,109 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + relative ordering of pages in the navigation bar (1-100) + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java Wed Jul 21 12:11:48 2010 -0500 @@ -16,12 +16,28 @@ */ package com.nokia.carbide.discovery.ui; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.URL; +import java.text.MessageFormat; +import java.util.Properties; + +import org.eclipse.core.net.proxy.IProxyData; +import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.osgi.service.datalocation.Location; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; +import com.nokia.cpp.internal.api.utils.core.ProxyUtils; + /** * The activator class controls the plug-in life cycle */ @@ -32,6 +48,9 @@ // The shared instance private static Activator plugin; + private static final String PROPERTY_PROXYPORT = "network.proxy_port"; //$NON-NLS-1$ + private static final String PROPERTY_PROXYHOST = "network.proxy_host"; //$NON-NLS-1$ + /** * The constructor */ @@ -44,6 +63,9 @@ */ public void start(BundleContext context) throws Exception { super.start(context); + IProxyData proxyData = ProxyUtils.getProxyData(new URI("http://www.yahoo.com")); + System.setProperty(PROPERTY_PROXYHOST, proxyData.getHost()); + System.setProperty(PROPERTY_PROXYPORT, String.valueOf(proxyData.getPort())); } /* @@ -83,4 +105,29 @@ public static void logError(String message, Throwable t) { getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, message, t)); } + + /** + * Get a value from the server.properties file + * @param key + * @return + */ + public static String getFromServerProperties(String key) { + Location installLocation = Platform.getInstallLocation(); + URL url = installLocation.getURL(); + IPath path = new Path(url.getPath()); + path = path.append("configuration/server.properties"); //$NON-NLS-1$ + File file = path.toFile(); + Properties properties = new Properties(); + try { + InputStream is = new FileInputStream(file); + properties.load(is); + is.close(); + } catch (IOException e) { + String message = + MessageFormat.format("Could not find URL in configuration/server.properties file for key={0}", key); + Activator.logError(message, e); + } + return (String) properties.get(key); + } + } diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java Wed Jul 21 12:11:48 2010 -0500 @@ -6,11 +6,22 @@ private static final String BUNDLE_NAME = "com.nokia.carbide.discovery.ui.messages"; //$NON-NLS-1$ public static String DiscoveryView_AdvancedInstallLabel; public static String DiscoveryView_CheckAllLabel; + public static String DiscoveryView_GatherExtensionsTitle; + public static String DiscoveryView_GatheringInstallInfoTitle; public static String DiscoveryView_InstallLabel; public static String DiscoveryView_MissingDirectoryURLError; public static String DiscoveryView_RefreshLabel; public static String DiscoveryView_StatusLineFmt; public static String DiscoveryView_UncheckAllLabel; + public static String HomePage_Title; + public static String InstallExtensionsPage_ActionBarTitle; + public static String InstallExtensionsPage_BuzillaActionName; + public static String InstallExtensionsPage_LinkBarTitle; + public static String InstallExtensionsPage_Title; + public static String PortalEditor_Name; + public static String PortalEditor_PageLoadError; + public static String PortalEditor_PageOpenError; + public static String SupportPage_Title; static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, Messages.class); diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Wed Jul 21 12:11:48 2010 -0500 @@ -1,7 +1,17 @@ DiscoveryView_AdvancedInstallLabel=Advanced Install... DiscoveryView_CheckAllLabel=Check All Items +DiscoveryView_GatherExtensionsTitle=Gathering Extensions +DiscoveryView_GatheringInstallInfoTitle=Gathering Install Information DiscoveryView_InstallLabel=Install Checked Items... -DiscoveryView_MissingDirectoryURLError=Could not find URL in configuration/server.properties file for key={0} DiscoveryView_RefreshLabel=Refresh DiscoveryView_StatusLineFmt={0} item(s) checked DiscoveryView_UncheckAllLabel=Uncheck All Items +HomePage_Title=Home +InstallExtensionsPage_ActionBarTitle=Install Actions +InstallExtensionsPage_BuzillaActionName=Carbide Bugzilla +InstallExtensionsPage_LinkBarTitle=Links +InstallExtensionsPage_Title=Install Extensions +PortalEditor_Name=Carbide Portal +PortalEditor_PageLoadError=Could not load portal page +PortalEditor_PageOpenError=Could not open portal +SupportPage_Title=Carbide Support diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/view/DiscoveryView.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/view/DiscoveryView.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,274 +0,0 @@ -package com.nokia.carbide.discovery.ui.view; - - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.text.MessageFormat; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.equinox.internal.p2.discovery.Catalog; -import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore; -import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy; -import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy; -import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem; -import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi; -import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration; -import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer; -import org.eclipse.equinox.p2.core.IProvisioningAgent; -import org.eclipse.equinox.p2.operations.ProvisioningSession; -import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; -import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager; -import org.eclipse.equinox.p2.ui.ProvisioningUI; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.dialogs.ProgressMonitorDialog; -import org.eclipse.jface.layout.GridDataFactory; -import org.eclipse.jface.layout.GridLayoutFactory; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.osgi.service.datalocation.Location; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IActionBars; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.BaseSelectionListenerAction; -import org.eclipse.ui.part.ViewPart; - -import com.nokia.carbide.discovery.ui.Activator; -import com.nokia.carbide.discovery.ui.Messages; - -@SuppressWarnings("restriction") -public class DiscoveryView extends ViewPart { - - private static final String DIRECTORY_KEY = "com.nokia.carbide.discovery.directory"; //$NON-NLS-1$ - - private CatalogViewer viewer; - private Action refreshAction; - private BaseSelectionListenerAction checkAllAction; - private BaseSelectionListenerAction checkNoneAction; - private BaseSelectionListenerAction installAction; - private Action showInstallWizardAction; - - private boolean initialized; - - private ISelectionChangedListener selectionListener; - - public DiscoveryView() { - } - - /** - * This is a callback that will allow us - * to create the viewer and initialize it. - */ - public void createPartControl(Composite parent) { - Composite c = new Composite(parent, SWT.NONE); - GridLayoutFactory.fillDefaults().applyTo(c); - viewer = new CatalogViewer(getCatalog(), getSite(), getSite().getWorkbenchWindow(), getConfiguration()); - viewer.createControl(c); - GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl()); - - // Create the help context id for the viewer's control - PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), - "com.nokia.carbide.discovery.ui.view.DiscoveryView.viewer"); //$NON-NLS-1$ - makeActions(); - contributeToActionBars(); - } - - private CatalogConfiguration getConfiguration() { - CatalogConfiguration configuration = new CatalogConfiguration(); - configuration.setShowTagFilter(false); - return configuration; - } - - private Catalog getCatalog() { - Catalog catalog = new Catalog(); - catalog.setEnvironment(DiscoveryCore.createEnvironment()); - catalog.setVerifyUpdateSiteAvailability(false); - - // look for remote descriptor - RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy(); - String url = getFromServerProperties(DIRECTORY_KEY); - if (url != null) { - remoteDiscoveryStrategy.setDirectoryUrl(url); - catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy); - } - else // look for descriptors from installed bundles - catalog.getDiscoveryStrategies().add(new BundleDiscoveryStrategy()); - - return catalog; - } - - public static String getFromServerProperties(String key) { - Location installLocation = Platform.getInstallLocation(); - URL url = installLocation.getURL(); - IPath path = new Path(url.getPath()); - path = path.append("configuration/server.properties"); //$NON-NLS-1$ - File file = path.toFile(); - Properties properties = new Properties(); - try { - InputStream is = new FileInputStream(file); - properties.load(is); - is.close(); - } catch (IOException e) { - String message = - MessageFormat.format(Messages.DiscoveryView_MissingDirectoryURLError, key); - Activator.logError(message, e); - } - return (String) properties.get(key); - } - - private void contributeToActionBars() { - IActionBars bars = getViewSite().getActionBars(); - fillLocalPullDown(bars.getMenuManager()); - fillLocalToolBar(bars.getToolBarManager()); - } - - private void fillLocalPullDown(IMenuManager manager) { - manager.add(checkAllAction); - manager.add(checkNoneAction); - manager.add(new Separator()); - manager.add(showInstallWizardAction); - } - - private void fillLocalToolBar(IToolBarManager manager) { - manager.add(refreshAction); - manager.add(installAction); - } - - private void makeActions() { - refreshAction = new Action() { - public void run() { - viewer.setSelection(StructuredSelection.EMPTY); - viewer.refresh(); - viewer.updateCatalog(); - } - }; - refreshAction.setText(Messages.DiscoveryView_RefreshLabel); - refreshAction.setImageDescriptor(Activator.getImageDescriptor("icons/refresh.gif")); //$NON-NLS-1$ - checkAllAction = new BaseSelectionListenerAction(Messages.DiscoveryView_CheckAllLabel) { - public void run() { - viewer.setSelection(StructuredSelection.EMPTY); - viewer.setSelection(getAllItemsSelection()); - viewer.refresh(); - } - - private IStructuredSelection getAllItemsSelection() { - List catalogItems = viewer.getCatalog().getItems(); - return new StructuredSelection(catalogItems); - } - - protected boolean updateSelection(IStructuredSelection selection) { - return !getAllItemsSelection().equals(selection); - }; - }; - checkNoneAction = new BaseSelectionListenerAction(Messages.DiscoveryView_UncheckAllLabel) { - public void run() { - viewer.setSelection(StructuredSelection.EMPTY); - viewer.refresh(); - }; - - protected boolean updateSelection(IStructuredSelection selection) { - return !selection.isEmpty(); - }; - }; - installAction = new BaseSelectionListenerAction(Messages.DiscoveryView_InstallLabel) { - public void run() { - DiscoveryUi.install(viewer.getCheckedItems(), new ProgressMonitorDialog(DiscoveryView.this.getViewSite().getShell())); - }; - - protected boolean updateSelection(IStructuredSelection selection) { - return !selection.isEmpty(); - }; - }; - installAction.setImageDescriptor(Activator.getImageDescriptor("icons/icon-discovery.png")); //$NON-NLS-1$ - showInstallWizardAction = new Action(Messages.DiscoveryView_AdvancedInstallLabel) { - public void run() { - showInstallWizard(); - } - }; - viewer.addSelectionChangedListener(checkAllAction); - viewer.addSelectionChangedListener(checkNoneAction); - viewer.addSelectionChangedListener(installAction); - selectionListener = new ISelectionChangedListener() { - @Override - public void selectionChanged(SelectionChangedEvent event) { - IStructuredSelection selection = (IStructuredSelection) event.getSelection(); - IActionBars bars = getViewSite().getActionBars(); - bars.getStatusLineManager().setMessage( - selection.isEmpty() ? null : MessageFormat.format( - Messages.DiscoveryView_StatusLineFmt, selection.size())); - } - }; - viewer.addSelectionChangedListener(selectionListener); - } - - @Override - public void dispose() { - viewer.removeSelectionChangedListener(checkAllAction); - viewer.removeSelectionChangedListener(checkNoneAction); - viewer.removeSelectionChangedListener(installAction); - viewer.removeSelectionChangedListener(selectionListener); - - super.dispose(); - } - - /** - * Passing the focus request to the viewer's control. - */ - public void setFocus() { - if (!initialized) { - initialized = true; - Display.getDefault().asyncExec(new Runnable() { - @Override - public void run() { - if (viewer.getViewer().getContentProvider() != null) { - viewer.updateCatalog(); - } - } - }); - } - } - - private void showInstallWizard() { - ProvisioningUI defaultUI = ProvisioningUI.getDefaultUI(); - ProvisioningSession session = defaultUI.getSession(); - IProvisioningAgent agent = session.getProvisioningAgent(); - IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME); - IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME); - for (URI uri : getCatalogURIs()) { - metadataManager.addRepository(uri); - artifactManager.addRepository(uri); - } - defaultUI.openInstallWizard(null, null, null); - } - - private Collection getCatalogURIs() { - Set uris = new HashSet(); - for (CatalogItem catalogItem : viewer.getCatalog().getItems()) { - try { - uris.add(new URI(catalogItem.getSiteUrl())); - } catch (URISyntaxException e) { - // ignore bad URIs - } - } - return uris; - }; - -} \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/command/LaunchHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/command/LaunchHandler.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.command; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +import com.nokia.carbide.internal.discovery.ui.editor.PortalEditor; + +public class LaunchHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + PortalEditor.openPortal(); + return null; + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/ActionUIUpdater.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/ActionUIUpdater.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,50 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.editor; + +import java.util.ArrayList; +import java.util.List; + +import com.nokia.carbide.internal.discovery.ui.extension.IPortalPage.IActionUIUpdater; + +class ActionUIUpdater implements IActionUIUpdater { + + private List taskBars; + + public ActionUIUpdater() { + taskBars = new ArrayList(); + } + + void addTaskBar(TaskBar taskBar) { + taskBars.add(taskBar); + } + + @Override + public void update(String actionId) { + for (TaskBar taskBar : taskBars) { + taskBar.updateActionUI(actionId); + } + } + + @Override + public void updateAll() { + for (TaskBar taskBar : taskBars) { + taskBar.updateAllActionsUI(); + } + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,105 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.editor; + +import java.util.LinkedHashMap; +import java.util.Map; + +import org.eclipse.jface.layout.RowDataFactory; +import org.eclipse.jface.layout.RowLayoutFactory; +import org.eclipse.jface.resource.FontDescriptor; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; + +import com.nokia.carbide.internal.discovery.ui.extension.IPortalPage; + +class NavigationBar extends RoundedCornerComposite { + + private PortalEditor portalEditor; + + + private final class ButtonListener extends SelectionAdapter { + @Override + public void widgetSelected(SelectionEvent e) { + Button button = (Button) e.getSource(); + selectNavButton(button); + } + } + + private Map buttonToPageMap; + private SelectionListener listener; + private Font buttonFont; + private Font selectedButtonFont; + + NavigationBar(PortalEditor portalEditor, Composite parent) { + super(parent, portalEditor.getBackgroundParent(), + parent.getDisplay().getSystemColor(SWT.COLOR_BLACK), + parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); + this.portalEditor = portalEditor; + buttonToPageMap = new LinkedHashMap(); + RowLayoutFactory.swtDefaults().margins(3, 3).wrap(false).applyTo(this); + listener = new ButtonListener(); + selectedButtonFont = JFaceResources.getHeaderFont(); + FontData[] fontData = selectedButtonFont.getFontData(); + for (FontData fd : fontData) { + fd.setStyle(SWT.NORMAL); + } + FontDescriptor desc = FontDescriptor.createFrom(fontData); + buttonFont = portalEditor.createFont(desc); + } + + public void initUI() { + if (buttonToPageMap.isEmpty()) + return; + selectNavButton(buttonToPageMap.keySet().iterator().next()); + } + + public void addNavButton(NavigationBar bar, IPortalPage page) { + Button b = new Button(bar, SWT.TOGGLE | SWT.FLAT); + b.setFont(buttonFont); + b.setText(page.getText()); + b.setImage(portalEditor.createImage(page.getImageDescriptor(), 16, 16)); + b.addSelectionListener(listener); + RowDataFactory.swtDefaults().applyTo(b); + buttonToPageMap.put(b, page); + } + + + public void selectNavButton(Button button) { + for (Button other : buttonToPageMap.keySet()) { + other.setSelection(false); + other.setFont(buttonFont); + } + button.setSelection(true); + portalEditor.showPage(buttonToPageMap.get(button)); + button.setFont(selectedButtonFont); + layout(); + } + + @Override + public void layout() { + super.layout(); + pack(); + } +} \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,322 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.editor; + +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.resource.FontDescriptor; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.ImageData; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.graphics.Resource; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPersistableElement; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.part.EditorPart; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; +import com.nokia.carbide.internal.discovery.ui.extension.IPortalPage; +import com.nokia.carbide.internal.discovery.ui.extension.IPortalPage.IActionBar; +import com.nokia.cpp.internal.api.utils.core.Pair; +import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils; + +public class PortalEditor extends EditorPart { + + private static final String ID = "com.nokia.carbide.discovery.ui.portalEditor"; //$NON-NLS-1$ + private static final String CONTEXT_ID = ID + ".context"; //$NON-NLS-1$ + private static IEditorInput input; + private List uninitializedPages; + private Composite backgroundParent; + private Image oldBGImg; + private List resources; + private StackComposite stackComposite; + + private Map pageToControlMap; + private NavigationBar navigationBar; + + public PortalEditor() { + resources = new ArrayList(); + loadPortalPages(); + pageToControlMap = new HashMap(); + } + + private void loadPortalPages() { + List> pageExtensions = new ArrayList>(); + IConfigurationElement[] elements = + Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.PLUGIN_ID + ".portalPage"); //$NON-NLS-1$ + for (IConfigurationElement element : elements) { + try { + IPortalPage portalPage = (IPortalPage) element.createExecutableExtension("class"); //$NON-NLS-1$ + String rankString = element.getAttribute("rank"); //$NON-NLS-1$ + int rank = Integer.MAX_VALUE; + if (rankString != null) { + try { + rank = Integer.parseInt(rankString); + } + catch (NumberFormatException e) { + Activator.logError(MessageFormat.format("Could not get rank for portal page {0}", + portalPage.getClass().getName()), e); + } + } + pageExtensions.add(new Pair(portalPage, rank)); + } + catch (CoreException e) { + Activator.logError(Messages.PortalEditor_PageLoadError, e); + } + } + Collections.sort(pageExtensions, new Comparator>() { + @Override + public int compare(Pair o1, Pair o2) { + return o1.second.compareTo(o2.second); + } + }); + uninitializedPages = new ArrayList(); + for (Pair pair : pageExtensions) { + uninitializedPages.add(pair.first); + } + } + + @Override + public void doSave(IProgressMonitor monitor) { + } + + @Override + public void doSaveAs() { + } + + @Override + public boolean isDirty() { + return false; + } + + @Override + public boolean isSaveAsAllowed() { + return false; + } + + @Override + public void init(IEditorSite site, IEditorInput input) throws PartInitException { + setSite(site); + setInput(input); + } + + @Override + public void createPartControl(final Composite parent) { + Composite body = createBody(parent); + navigationBar.initUI(); + + PlatformUI.getWorkbench().getHelpSystem().setHelp(body, CONTEXT_ID); + } + + private Composite createBody(final Composite parent) { + // create background + backgroundParent = new Composite(parent, SWT.NONE); + applyBG(backgroundParent); + GridLayoutFactory.fillDefaults().applyTo(backgroundParent); + // create top naviation bar + navigationBar = createNavigationBar(backgroundParent); + GridDataFactory.swtDefaults().grab(true, false).align(SWT.CENTER, SWT.TOP).indent(10, 10).applyTo(navigationBar); + // create stack composite + createStackComposite(backgroundParent, navigationBar); + return backgroundParent; + } + + private void createStackComposite(Composite parent, NavigationBar bar) { + stackComposite = new StackComposite(parent, backgroundParent); + for (IPortalPage page : uninitializedPages) { + Control control = createPage(page); + pageToControlMap.put(page, control); + } + GridDataFactory.fillDefaults().grab(true, true).applyTo(stackComposite); + } + + private Control createPage(IPortalPage page) { + Composite pageComposite = new SharedBackgroundComposite(stackComposite, backgroundParent); + GridLayoutFactory.fillDefaults().numColumns(2).spacing(20, 0).extendedMargins(20, 20, 20, 0).applyTo(pageComposite); + ActionUIUpdater updater = new ActionUIUpdater(); + IActionBar[] commandBars = page.createCommandBars(this, updater); + if (commandBars.length > 0) { + Composite taskComposite = new SharedBackgroundComposite(pageComposite, backgroundParent); + GridLayoutFactory.fillDefaults().applyTo(taskComposite); + GridDataFactory.fillDefaults().grab(false, true).applyTo(taskComposite); + for (IActionBar actionBar : commandBars) { + Control control = createTaskBarControl(taskComposite, actionBar, updater); + GridDataFactory.fillDefaults().minSize(150, SWT.DEFAULT).grab(true, false).indent(0, 0).applyTo(control); + } + } + Composite pageControl = new RoundedCornerComposite(pageComposite, backgroundParent, + null, pageComposite.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); + GridLayoutFactory.fillDefaults().margins(2, 2).applyTo(pageControl); + GridDataFactory.fillDefaults().grab(true, true).applyTo(pageControl); + Control control = page.createControl(pageControl, this); + GridDataFactory.fillDefaults().grab(true, true).applyTo(control); + return pageComposite; + } + + private Control createTaskBarControl(Composite clientArea, IActionBar actionBar, ActionUIUpdater updater) { + TaskBar taskBar = new TaskBar(clientArea, this, actionBar); + updater.addTaskBar(taskBar); + return taskBar; + } + + private NavigationBar createNavigationBar(Composite parent) { + NavigationBar bar = new NavigationBar(this, parent); + for (IPortalPage page : uninitializedPages) { + bar.addNavButton(bar, page); + } + + return bar; + } + + void showPage(IPortalPage page) { + if (uninitializedPages.contains(page)) { + uninitializedPages.remove(page); + page.init(); + } + stackComposite.showControl(pageToControlMap.get(page)); + } + + private void applyBG(final Composite composite) { + composite.addListener(SWT.Resize, new Listener() { + @Override + public void handleEvent(Event event) { + Rectangle rect = composite.getClientArea(); + Image newImage = new Image(composite.getDisplay(), rect.width, rect.height); + GC gc = new GC(newImage); + gc.setForeground(composite.getDisplay().getSystemColor(SWT.COLOR_BLACK)); + gc.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); + gc.fillGradientRectangle(0, 0, rect.width, rect.height, true); + gc.dispose(); + composite.setBackgroundImage(newImage); + + if (oldBGImg != null) + oldBGImg.dispose(); + oldBGImg = newImage; + backgroundParent.layout(); + } + }); + } + + @Override + public void setFocus() { + } + + public static void openPortal() { + try { + WorkbenchUtils.openEditor(getInput(), ID); + } catch (PartInitException e) { + Activator.logError(Messages.PortalEditor_PageOpenError, e); + } + } + + private static IEditorInput getInput() { + if (input == null) { + input = new IEditorInput() { + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class adapter) { + return null; + } + + @Override + public String getToolTipText() { + return getName(); + } + + @Override + public IPersistableElement getPersistable() { + return null; + } + + @Override + public String getName() { + return Messages.PortalEditor_Name; + } + + @Override + public ImageDescriptor getImageDescriptor() { + return null; + } + + @Override + public boolean exists() { + return false; + } + }; + } + + return input; + } + + Image createImage(ImageDescriptor desc, int width, int height) { + Image image; + ImageData data = desc.getImageData(); + if (data.width != width || data.height != height) { + image = new Image(Display.getCurrent(), desc.getImageData().scaledTo(width, height)); + } + else { + image = desc.createImage(); + } + resources.add(image); + return image; + } + + Font createFont(FontDescriptor desc) { + Font font = desc.createFont(Display.getCurrent()); + resources.add(font); + return font; + } + + @Override + public void dispose() { + super.dispose(); + for (Resource resource : resources) { + resource.dispose(); + } + if (oldBGImg != null) + oldBGImg.dispose(); + } + + public Composite getBackgroundParent() { + return backgroundParent; + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/RoundedCornerComposite.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/RoundedCornerComposite.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,46 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.editor; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.widgets.Composite; + +class RoundedCornerComposite extends SharedBackgroundComposite { + + private final Color background; + private final Color outline; + + public RoundedCornerComposite(Composite parent, Composite backgroundParent, Color outline, Color background) { + super(parent, backgroundParent); + this.background = background; + this.outline = outline; + } + + @Override + public void drawBackground(GC gc, int x, int y, int width, int height) { + super.drawBackground(gc, x, y, width, height); + if (background != null) { + gc.setBackground(background); + gc.fillRoundRectangle(0, 0, width, height, 6, 6); + } + if (outline != null) { + gc.setForeground(outline); + gc.drawRoundRectangle(2, 2, width - 4, height - 4, 6, 6); + } + } +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SharedBackgroundComposite.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SharedBackgroundComposite.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,65 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.editor; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; + +class SharedBackgroundComposite extends Canvas { + + private final Composite backgroundParent; + + public SharedBackgroundComposite(Composite parent, Composite backgroundParent) { + super(parent, SWT.NO_BACKGROUND); + this.backgroundParent = backgroundParent; + addPaintListener(new PaintListener() { + @Override + public void paintControl(PaintEvent e) { + Rectangle b = getBounds(); + drawBackground(e.gc, b.x, b.y, b.width, b.height); + } + }); + } + + @Override + public void drawBackground(GC gc, int x, int y, int width, int height) { + Composite relParent = getParent(); + while (relParent != backgroundParent) { + Rectangle relB = relParent.getBounds(); + x += relB.x; + y += relB.y; + relParent = relParent.getParent(); + } + + Image image = backgroundParent.getBackgroundImage(); + Rectangle imageBounds = image.getBounds(); + width = Math.min(width, imageBounds.width - x); + height = Math.min(height, imageBounds.height - y); + if (width > 0 && height > 0) + gc.drawImage(image, x, y, width, height, 0, 0, width, height); +// gc.drawText(getClass().getSimpleName(), 2, 2); +// gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE)); +// gc.drawRectangle(1, 1, width - 2, height - 2); + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/StackComposite.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/StackComposite.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,26 @@ +package com.nokia.carbide.internal.discovery.ui.editor; + +import org.eclipse.swt.custom.StackLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; + +public class StackComposite extends SharedBackgroundComposite { + + private StackLayout stackLayout; + private Control currentControl; + + public StackComposite(Composite parent, Composite backgroundParent) { + super(parent, backgroundParent); + stackLayout = new StackLayout(); + setLayout(stackLayout); + } + + public void showControl(Control control) { + if (control == currentControl) + return; + + stackLayout.topControl = control; + layout(); + } +} + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,116 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.editor; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.layout.RowDataFactory; +import org.eclipse.jface.layout.RowLayoutFactory; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.ui.forms.events.HyperlinkEvent; +import org.eclipse.ui.forms.events.IHyperlinkListener; +import org.eclipse.ui.forms.widgets.Hyperlink; + +import com.nokia.carbide.internal.discovery.ui.extension.IPortalPage.IActionBar; + +class TaskBar extends RoundedCornerComposite { + + private final class ActionListener implements IHyperlinkListener { + @Override + public void linkActivated(HyperlinkEvent e) { + Hyperlink link = (Hyperlink) e.getSource(); + runAction(link); + } + + @Override + public void linkEntered(HyperlinkEvent e) { + Hyperlink link = (Hyperlink) e.getSource(); + link.setUnderlined(true); + } + + @Override + public void linkExited(HyperlinkEvent e) { + Hyperlink link = (Hyperlink) e.getSource(); + link.setUnderlined(false); + } + } + + private Map linkToActionMap; + private ActionListener listener; + + public TaskBar(Composite parent, PortalEditor portalEditor, IActionBar actionBar) { + super(parent, portalEditor.getBackgroundParent(), + parent.getDisplay().getSystemColor(SWT.COLOR_BLACK), + parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); + createTitle(actionBar); + createActions(actionBar); + RowLayoutFactory.swtDefaults().type(SWT.VERTICAL).margins(10, 10).extendedMargins(5, 5, 5, 10).fill(true).wrap(false).applyTo(this); + } + + private void createTitle(IActionBar actionBar) { + Label l = new Label(this, SWT.LEFT); + l.setFont(JFaceResources.getBannerFont()); + l.setBackground(l.getDisplay().getSystemColor(SWT.COLOR_WHITE)); + l.setText(actionBar.getTitle()); + RowDataFactory.swtDefaults().applyTo(l); + l = new Label(this, SWT.HORIZONTAL | SWT.SEPARATOR); + RowDataFactory.swtDefaults().applyTo(l); + } + + private void createActions(IActionBar actionBar) { + listener = new ActionListener(); + linkToActionMap = new HashMap(); + for (IAction action : actionBar.getActions()) { + Hyperlink link = new Hyperlink(this, SWT.NONE); + link.setText(action.getText()); + String toolTipText = action.getToolTipText(); + if (toolTipText != null) + link.setToolTipText(toolTipText); + link.setForeground(link.getDisplay().getSystemColor(SWT.COLOR_DARK_BLUE)); + link.setBackground(link.getDisplay().getSystemColor(SWT.COLOR_WHITE)); + linkToActionMap.put(link, action); + link.addHyperlinkListener(listener); + } + } + + public void runAction(Hyperlink link) { + IAction action = linkToActionMap.get(link); + action.run(); + } + + public void updateActionUI(String actionId) { + for (Entry entry : linkToActionMap.entrySet()) { + IAction action = entry.getValue(); + if (actionId.equals(action.getId())) { + entry.getKey().setEnabled(action.isEnabled()); + } + } + } + + public void updateAllActionsUI() { + for (Entry entry : linkToActionMap.entrySet()) { + entry.getKey().setEnabled(entry.getValue().isEnabled()); + } + } + +} \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPage.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,209 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.extension; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.swt.SWT; +import org.eclipse.swt.SWTError; +import org.eclipse.swt.browser.Browser; +import org.eclipse.swt.browser.LocationAdapter; +import org.eclipse.swt.browser.LocationEvent; +import org.eclipse.swt.browser.ProgressAdapter; +import org.eclipse.swt.browser.ProgressEvent; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IEditorPart; + +import com.nokia.carbide.discovery.ui.Activator; + +public abstract class AbstractBrowserPortalPage implements IPortalPage { + + private final class NavigationActionBar implements IActionBar { + private List actions; + private IActionUIUpdater updater; + private boolean loading; + + private NavigationActionBar(IActionUIUpdater updater) { + this.updater = updater; + makeActions(); + } + + public void hookBrowser() { + browser.addLocationListener(new LocationAdapter() { + @Override + public void changed(LocationEvent event) { + NavigationActionBar.this.updater.updateAll(); + } + }); + browser.addProgressListener(new ProgressAdapter() { + @Override + public void changed(ProgressEvent event) { + if (event.total == 0) + return; + setLoading(event.current != event.total); + NavigationActionBar.this.updater.updateAll(); + } + @Override + public void completed(ProgressEvent event) { + setLoading(false); + NavigationActionBar.this.updater.updateAll(); + } + }); + } + + @Override + public String getTitle() { + return "Navigation"; + } + + @Override + public IAction[] getActions() { + return (IAction[]) actions.toArray(new IAction[actions.size()]); + } + + private void makeActions() { + actions = new ArrayList(); + IAction a = new Action("Back") { + @Override + public void run() { + if (browser != null) { + browser.back(); + } + } + + @Override + public boolean isEnabled() { + return browser != null ? browser.isBackEnabled() : false; + } + }; + actions.add(a); + + a = new Action("Forward") { + @Override + public void run() { + if (browser != null) { + browser.forward(); + } + } + + @Override + public boolean isEnabled() { + return browser != null ? browser.isForwardEnabled() : false; + } + }; + actions.add(a); + + a = new Action("Refresh Page") { + @Override + public void run() { + if (browser != null) { + browser.refresh(); + update(); + } + } + + @Override + public boolean isEnabled() { + return browser != null ? !loading : false; + } + }; + actions.add(a); + + a = new Action("Stop Loading") { + @Override + public void run() { + if (browser != null) { + browser.stop(); + update(); + } + } + + @Override + public boolean isEnabled() { + return browser != null ? loading : false; + } + }; + actions.add(a); + } + + public void update() { + updater.updateAll(); + } + + private void setLoading(boolean loading) { + browser.setCursor(loading ? browser.getDisplay().getSystemCursor(SWT.CURSOR_WAIT) : null); + this.loading = loading; + } + } + + private Browser browser; + private NavigationActionBar actionBar; + + @Override + public Control createControl(Composite parent, IEditorPart part) { + Composite composite = new Composite(parent, SWT.NONE); + composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); + composite.setLayout(new FillLayout()); + try { + browser = new Browser(composite, SWT.MOZILLA); + } catch (SWTError e) { + e.printStackTrace(); + } + + return composite; + } + + protected String getURL() { + try { + URL url = new URL(Activator.getFromServerProperties(getClass().getName())); + return url.toString(); + } catch (MalformedURLException e) { + Activator.logError("Could not load page due to bad URL", e); + } + + return null; + } + + @Override + public void init() { + if (browser != null) { + browser.setUrl(getURL()); + actionBar.hookBrowser(); + } + actionBar.update(); + } + + @Override + public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) { + actionBar = new NavigationActionBar(updater); + return new IActionBar[] { + actionBar + }; + } + + @Override + public void dispose() { + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/IPortalPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/IPortalPage.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,107 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.extension; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IEditorPart; + +/** + * Interface to a portal page extension + */ +public interface IPortalPage { + + /** + * Interface to an action/navigation bar for the portal page + */ + public interface IActionBar { + + /** + * Required title for the action bar + * @return String + */ + String getTitle(); + + /** + * Actions shown in the action bar: + * Required: text and run() methods + * Optional: tool tip text + * Unused: image + * @return IAction + */ + IAction[] getActions(); + + } + + /** + * Interface allowing the UI for provided actions of an IActionBar to be updated (e.g., enabled state) + */ + public interface IActionUIUpdater { + + /** + * Update the UI for a specific action by id + * @param actionId + */ + void update(String actionId); + + /** + * Update the UI for all actions in the IActionBar + */ + void updateAll(); + + } + + /** + * Required title text used by main navigation bar + * @return String + */ + String getText(); + + /** + * Required image descriptor used by main navigation bar + * @return ImageDescriptor + */ + ImageDescriptor getImageDescriptor(); + + /** + * Called to create the control for the page + * @param parent Composite + * @param part IEditorPart + * @return Control + */ + Control createControl(Composite parent, IEditorPart part); + + /** + * Called to initialize the page when shown for the first time + */ + void init(); + + /** + * Return action bars for the page (can't be null) + * @param part IEditorPart + * @param updater IActionUIUpdater + * @return IActionBar[] + */ + IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater); + + /** + * Called to dispose internal resources of the page + */ + void dispose(); +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/DiscoveryView.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/DiscoveryView.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,294 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.view; + + +import java.net.URI; +import java.net.URISyntaxException; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.equinox.internal.p2.discovery.Catalog; +import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore; +import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy; +import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy; +import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem; +import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer; +import org.eclipse.equinox.p2.core.IProvisioningAgent; +import org.eclipse.equinox.p2.operations.ProvisioningSession; +import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; +import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager; +import org.eclipse.equinox.p2.ui.ProvisioningUI; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.actions.BaseSelectionListenerAction; +import org.eclipse.ui.part.ViewPart; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; +import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils; + +@SuppressWarnings("restriction") +public class DiscoveryView extends ViewPart { + + private final class RunnableContextDialog extends ProgressMonitorDialog { + private final String title; + + private RunnableContextDialog(Shell parent, String title) { + super(parent); + this.title = title; + } + + @Override + protected void configureShell(Shell shell) { + super.configureShell(shell); + shell.setText(title); + } + + } + + private static final String DIRECTORY_KEY = "com.nokia.carbide.discovery.directory"; //$NON-NLS-1$ + + private CatalogViewer viewer; + private Action refreshAction; + private BaseSelectionListenerAction checkAllAction; + private BaseSelectionListenerAction checkNoneAction; + private BaseSelectionListenerAction installAction; + private Action showInstallWizardAction; + private ISelectionChangedListener selectionListener; + + /** + * This is a callback that will allow us + * to create the viewer and initialize it. + */ + public void createPartControl(Composite parent) { + Composite c = new Composite(parent, SWT.NONE); + GridLayoutFactory.fillDefaults().applyTo(c); + viewer = new CatalogViewer(getCatalog(), getSite(), + new RunnableContextDialog(DiscoveryView.this.getViewSite().getShell(), + Messages.DiscoveryView_GatherExtensionsTitle), + getConfiguration()); + viewer.createControl(c); + GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl()); + + // Create the help context id for the viewer's control + PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), + "com.nokia.carbide.discovery.ui.view.DiscoveryView.catalogviewer"); //$NON-NLS-1$ + makeActions(); + contributeToActionBars(); + if (!WorkbenchUtils.isJUnitRunning()) { // do not initialize the catalog if JUnit is running + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + viewer.updateCatalog(); + } + }); + } + } + + private CatalogConfiguration getConfiguration() { + CatalogConfiguration configuration = new CatalogConfiguration(); + configuration.setShowTagFilter(false); + return configuration; + } + + private Catalog getCatalog() { + Catalog catalog = new Catalog(); + catalog.setEnvironment(DiscoveryCore.createEnvironment()); + catalog.setVerifyUpdateSiteAvailability(false); + + // look for remote descriptor + RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy(); + String url = Activator.getFromServerProperties(DIRECTORY_KEY); + if (url != null) { + remoteDiscoveryStrategy.setDirectoryUrl(url); + catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy); + } + else // look for descriptors from installed bundles + catalog.getDiscoveryStrategies().add(new BundleDiscoveryStrategy()); + + return catalog; + } + + private void contributeToActionBars() { + IActionBars bars = getViewSite().getActionBars(); + fillLocalPullDown(bars.getMenuManager()); + fillLocalToolBar(bars.getToolBarManager()); + } + + private void fillLocalPullDown(IMenuManager manager) { + manager.add(checkAllAction); + manager.add(checkNoneAction); + manager.add(new Separator()); + manager.add(installAction); + manager.add(showInstallWizardAction); + } + + private void fillLocalToolBar(IToolBarManager manager) { + manager.add(refreshAction); + manager.add(installAction); + } + + private void makeActions() { + refreshAction = new Action() { + public void run() { + viewer.setSelection(StructuredSelection.EMPTY); + viewer.updateCatalog(); + viewer.refresh(); + } + }; + refreshAction.setText(Messages.DiscoveryView_RefreshLabel); + refreshAction.setImageDescriptor(Activator.getImageDescriptor("icons/refresh.gif")); //$NON-NLS-1$ + checkAllAction = new BaseSelectionListenerAction(Messages.DiscoveryView_CheckAllLabel) { + public void run() { + viewer.setSelection(StructuredSelection.EMPTY); + viewer.setSelection(getAllItemsSelection()); + viewer.refresh(); + } + + private IStructuredSelection getAllItemsSelection() { + List catalogItems = new ArrayList(); + for (CatalogItem catalogItem : viewer.getCatalog().getItems()) { + if (!catalogItem.isInstalled()) + catalogItems.add(catalogItem); + } + return new StructuredSelection(catalogItems); + } + + protected boolean updateSelection(IStructuredSelection selection) { + return !getAllItemsSelection().equals(selection); + }; + }; + checkNoneAction = new BaseSelectionListenerAction(Messages.DiscoveryView_UncheckAllLabel) { + public void run() { + viewer.setSelection(StructuredSelection.EMPTY); + viewer.refresh(); + }; + + protected boolean updateSelection(IStructuredSelection selection) { + return !selection.isEmpty(); + }; + }; + installAction = new BaseSelectionListenerAction(Messages.DiscoveryView_InstallLabel) { + public void run() { + DiscoveryUi.install(viewer.getCheckedItems(), + new RunnableContextDialog(DiscoveryView.this.getViewSite().getShell(), + Messages.DiscoveryView_GatheringInstallInfoTitle)); + }; + + protected boolean updateSelection(IStructuredSelection selection) { + return !selection.isEmpty(); + }; + }; + installAction.setImageDescriptor(Activator.getImageDescriptor("icons/icon-discovery.png")); //$NON-NLS-1$ + showInstallWizardAction = new Action(Messages.DiscoveryView_AdvancedInstallLabel) { + public void run() { + showInstallWizard(); + } + }; + viewer.addSelectionChangedListener(checkAllAction); + viewer.addSelectionChangedListener(checkNoneAction); + viewer.addSelectionChangedListener(installAction); + selectionListener = new ISelectionChangedListener() { + @Override + public void selectionChanged(SelectionChangedEvent event) { + IStructuredSelection selection = (IStructuredSelection) event.getSelection(); + IActionBars bars = getViewSite().getActionBars(); + bars.getStatusLineManager().setMessage( + selection.isEmpty() ? null : MessageFormat.format( + Messages.DiscoveryView_StatusLineFmt, selection.size())); + } + }; + viewer.addSelectionChangedListener(selectionListener); + } + + @Override + public void dispose() { + viewer.removeSelectionChangedListener(checkAllAction); + viewer.removeSelectionChangedListener(checkNoneAction); + viewer.removeSelectionChangedListener(installAction); + viewer.removeSelectionChangedListener(selectionListener); + + super.dispose(); + } + + /** + * Passing the focus request to the viewer's control. + */ + public void setFocus() { + } + + private void showInstallWizard() { + ProvisioningUI defaultUI = ProvisioningUI.getDefaultUI(); + ProvisioningSession session = defaultUI.getSession(); + IProvisioningAgent agent = session.getProvisioningAgent(); + IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME); + IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME); + for (URI uri : getCatalogURIs()) { + metadataManager.addRepository(uri); + artifactManager.addRepository(uri); + } + defaultUI.openInstallWizard(null, null, null); + +// String profileId = defaultUI.getProfileId(); +// IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME); +// IProfile profile = profileRegistry.getProfile(profileId); +// IQueryResult queryResult = profile.query(QueryUtil.createIUGroupQuery(), null); +// List list = new ArrayList(); +// for (Iterator iter = queryResult.iterator(); iter.hasNext();) { +// IInstallableUnit iu = iter.next(); +// list.add(iu.getId() + "|" + iu.getVersion()); +// } +// Collections.sort(list); +// for (String s : list) { +// System.out.println(s); +// } + } + + private Collection getCatalogURIs() { + Set uris = new HashSet(); + for (CatalogItem catalogItem : viewer.getCatalog().getItems()) { + try { + uris.add(new URI(catalogItem.getSiteUrl())); + } catch (URISyntaxException e) { + // ignore bad URIs + } + } + return uris; + }; + +} \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/HomePage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/HomePage.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,21 @@ +package com.nokia.carbide.internal.discovery.ui.view; + +import org.eclipse.jface.resource.ImageDescriptor; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; +import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPage; + +public class HomePage extends AbstractBrowserPortalPage { + + @Override + public String getText() { + return Messages.HomePage_Title; + } + + @Override + public ImageDescriptor getImageDescriptor() { + return Activator.getImageDescriptor("icons/Carbide_c_icon_16x16.png"); //$NON-NLS-1$ + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPage.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,326 @@ +package com.nokia.carbide.internal.discovery.ui.view; + +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.equinox.internal.p2.discovery.Catalog; +import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore; +import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy; +import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy; +import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem; +import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer; +import org.eclipse.equinox.p2.core.IProvisioningAgent; +import org.eclipse.equinox.p2.operations.ProvisioningSession; +import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; +import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager; +import org.eclipse.equinox.p2.ui.ProvisioningUI; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.actions.BaseSelectionListenerAction; +import org.eclipse.ui.browser.IWorkbenchBrowserSupport; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; +import com.nokia.carbide.internal.discovery.ui.extension.IPortalPage; +import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils; + +@SuppressWarnings("restriction") +public class InstallExtensionsPage implements IPortalPage { + + private final class RunnableContextDialog extends ProgressMonitorDialog { + private final String title; + + private RunnableContextDialog(Shell parent, String title) { + super(parent); + this.title = title; + } + + @Override + protected void configureShell(Shell shell) { + super.configureShell(shell); + shell.setText(title); + } + + } + + private final class ActionBar implements IActionBar { + private IAction[] actions; + + public ActionBar(IEditorPart part) { + actions = makeActions(part); + } + + @Override + public String getTitle() { + return Messages.InstallExtensionsPage_ActionBarTitle; + } + + @Override + public IAction[] getActions() { + return actions; + } + } + + private final class LinkBar implements IActionBar { + @Override + public String getTitle() { + return Messages.InstallExtensionsPage_LinkBarTitle; + } + + @Override + public IAction[] getActions() { + IAction action = new Action(Messages.InstallExtensionsPage_BuzillaActionName) { + @Override + public void run() { + try { + URL url = new URL("https://xdabug001.ext.nokia.com/bugzilla"); //$NON-NLS-1$ + IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport(); + browserSupport.createBrowser(null).openURL(url); + } catch (MalformedURLException e) { + } catch (PartInitException e) { + } + } + }; + return new IAction[] { action }; + } + } + + private static final String DIRECTORY_KEY = "com.nokia.carbide.discovery.directory"; //$NON-NLS-1$ + + private CatalogViewer viewer; + private List selectionListeners; + private IActionUIUpdater updater; + + public InstallExtensionsPage() { + } + + @Override + public String getText() { + return Messages.InstallExtensionsPage_Title; + } + + @Override + public ImageDescriptor getImageDescriptor() { + return Activator.getImageDescriptor("icons/icon-discovery.png"); //$NON-NLS-1$ + } + + @Override + public Control createControl(Composite parent, IEditorPart part) { + Composite c = new Composite(parent, SWT.NONE); + GridLayoutFactory.swtDefaults().applyTo(c); + viewer = new CatalogViewer(getCatalog(), part.getEditorSite(), + new RunnableContextDialog(part.getEditorSite().getShell(), + Messages.DiscoveryView_GatherExtensionsTitle), + getConfiguration()); + viewer.createControl(c); + GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl()); + + // Create the help context id for the viewer's control + PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), + "com.nokia.carbide.discovery.ui.view.DiscoveryView.catalogviewer"); //$NON-NLS-1$ + return c; + } + + @Override + public void init() { + if (!WorkbenchUtils.isJUnitRunning()) { // do not initialize the catalog if JUnit is running + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + for (ISelectionChangedListener listener : selectionListeners) { + viewer.addSelectionChangedListener(listener); + } + viewer.updateCatalog(); + } + }); + } + } + + @Override + public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) { + this.updater = updater; + return new IActionBar[] { new ActionBar(part), new LinkBar() }; + } + + private CatalogConfiguration getConfiguration() { + CatalogConfiguration configuration = new CatalogConfiguration(); + configuration.setShowTagFilter(false); + return configuration; + } + + private Catalog getCatalog() { + Catalog catalog = new Catalog(); + catalog.setEnvironment(DiscoveryCore.createEnvironment()); + catalog.setVerifyUpdateSiteAvailability(false); + + // look for remote descriptor + RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy(); + String url = Activator.getFromServerProperties(DIRECTORY_KEY); + if (url != null) { + remoteDiscoveryStrategy.setDirectoryUrl(url); + catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy); + } + else // look for descriptors from installed bundles + catalog.getDiscoveryStrategies().add(new BundleDiscoveryStrategy()); + + return catalog; + } + + private IAction[] makeActions(final IEditorPart part) { + selectionListeners = new ArrayList(); + List actions = new ArrayList(); + IAction action = new Action(Messages.DiscoveryView_RefreshLabel) { + public void run() { + viewer.setSelection(StructuredSelection.EMPTY); + viewer.updateCatalog(); + viewer.refresh(); + } + }; + actions.add(action); + + action = new BaseSelectionListenerAction(Messages.DiscoveryView_CheckAllLabel) { + public void run() { + viewer.setSelection(StructuredSelection.EMPTY); + viewer.setSelection(getAllItemsSelection()); + viewer.refresh(); + } + + private IStructuredSelection getAllItemsSelection() { + List catalogItems = new ArrayList(); + for (CatalogItem catalogItem : viewer.getCatalog().getItems()) { + if (!catalogItem.isInstalled()) + catalogItems.add(catalogItem); + } + return new StructuredSelection(catalogItems); + } + + protected boolean updateSelection(IStructuredSelection selection) { + scheduleUpdateAllActionUIs(); + return !getAllItemsSelection().equals(selection); + } + }; + action.setId(getClass().getName() + ".checkAll"); //$NON-NLS-1$ + selectionListeners.add((ISelectionChangedListener) action); + actions.add(action); + + action = new BaseSelectionListenerAction(Messages.DiscoveryView_UncheckAllLabel) { + public void run() { + viewer.setSelection(StructuredSelection.EMPTY); + viewer.refresh(); + }; + + protected boolean updateSelection(IStructuredSelection selection) { + scheduleUpdateAllActionUIs(); + return !selection.isEmpty(); + }; + }; + action.setId(getClass().getName() + ".uncheckAll"); //$NON-NLS-1$ + selectionListeners.add((ISelectionChangedListener) action); + actions.add(action); + + action = new BaseSelectionListenerAction(Messages.DiscoveryView_InstallLabel) { + public void run() { + DiscoveryUi.install(viewer.getCheckedItems(), + new RunnableContextDialog(part.getEditorSite().getShell(), + Messages.DiscoveryView_GatheringInstallInfoTitle)); + }; + + protected boolean updateSelection(IStructuredSelection selection) { + scheduleUpdateAllActionUIs(); + return !selection.isEmpty(); + }; + }; + action.setId(getClass().getName() + ".install"); //$NON-NLS-1$ + selectionListeners.add((ISelectionChangedListener) action); + actions.add(action); + + action = new Action(Messages.DiscoveryView_AdvancedInstallLabel) { + public void run() { + showInstallWizard(); + } + }; + actions.add(action); + + ISelectionChangedListener selectionListener = new ISelectionChangedListener() { + @Override + public void selectionChanged(SelectionChangedEvent event) { + IStructuredSelection selection = (IStructuredSelection) event.getSelection(); + IActionBars bars = part.getEditorSite().getActionBars(); + bars.getStatusLineManager().setMessage( + selection.isEmpty() ? null : MessageFormat.format( + Messages.DiscoveryView_StatusLineFmt, selection.size())); + } + }; + selectionListeners.add(selectionListener); + + return (IAction[]) actions.toArray(new IAction[actions.size()]); + } + + @Override + public void dispose() { + for (ISelectionChangedListener listener : selectionListeners) { + viewer.removeSelectionChangedListener(listener); + } + } + + private void showInstallWizard() { + ProvisioningUI defaultUI = ProvisioningUI.getDefaultUI(); + ProvisioningSession session = defaultUI.getSession(); + IProvisioningAgent agent = session.getProvisioningAgent(); + IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME); + IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME); + for (URI uri : getCatalogURIs()) { + metadataManager.addRepository(uri); + artifactManager.addRepository(uri); + } + defaultUI.openInstallWizard(null, null, null); + } + + private Collection getCatalogURIs() { + Set uris = new HashSet(); + for (CatalogItem catalogItem : viewer.getCatalog().getItems()) { + try { + uris.add(new URI(catalogItem.getSiteUrl())); + } catch (URISyntaxException e) { + // ignore bad URIs + } + } + return uris; + }; + + private void scheduleUpdateAllActionUIs() { + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + updater.updateAll(); + } + }); + }; +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/SupportPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/SupportPage.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,24 @@ +package com.nokia.carbide.internal.discovery.ui.view; + +import org.eclipse.jface.resource.ImageDescriptor; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; +import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPage; + +public class SupportPage extends AbstractBrowserPortalPage { + + public SupportPage() { + } + + @Override + public String getText() { + return Messages.SupportPage_Title; + } + + @Override + public ImageDescriptor getImageDescriptor() { + return Activator.getImageDescriptor("icons/Carbide_c_icon_16x16.png"); //$NON-NLS-1$ + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.search.system-feature/feature.xml --- a/core/com.nokia.carbide.search.system-feature/feature.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.search.system-feature/feature.xml Wed Jul 21 12:11:48 2010 -0500 @@ -4,7 +4,6 @@ label="%featureName" version="3.0.0.qualifier" provider-name="Nokia" - plugin="com.nokia.carbide.cpp" image="Carbide_Image.png"> diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.templatewizard/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.templatewizard/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.templatewizard/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -1,10 +1,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: Carbide.c++ Template Wizard Plug-in +Bundle-Name: Carbide.c++ Template Wizard Bundle-SymbolicName: com.nokia.carbide.templatewizard; singleton:=true Bundle-Version: 2.1.0.qualifier Bundle-Activator: com.nokia.carbide.templatewizard.TemplateWizardPlugin -Bundle-Vendor: NOKIA +Bundle-Vendor: Nokia Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.win32.utils/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.win32.utils/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.win32.utils/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -9,5 +9,6 @@ org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.cdt.core, - org.eclipse.cdt.ui + org.eclipse.cdt.ui, + org.eclipse.core.expressions;bundle-version="3.4.100" Bundle-ActivationPolicy: lazy diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.win32.utils/plugin.xml --- a/core/com.nokia.carbide.win32.utils/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.win32.utils/plugin.xml Wed Jul 21 12:11:48 2010 -0500 @@ -1,23 +1,58 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.win32.utils/src/com/nokia/carbide/internal/win32/utils/actions/OpenInCmdPromptHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.win32.utils/src/com/nokia/carbide/internal/win32/utils/actions/OpenInCmdPromptHandler.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,43 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.win32.utils.actions; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.handlers.HandlerUtil; + +public class OpenInCmdPromptHandler extends AbstractHandler { + + public Object execute(ExecutionEvent event) throws ExecutionException { + ISelection s = HandlerUtil.getActiveMenuSelection(event); + if (s != null && s instanceof IStructuredSelection) { + Object o = ((IStructuredSelection) s).getFirstElement(); + if (o instanceof IAdaptable) { + IResource r = (IResource) ((IAdaptable) o).getAdapter(IResource.class); + if (r != null) + WindowsOpenFileUtils.executeAction(WindowsOpenFileUtils.OPEN_IN_COMMAND_PROMPT, r); + } + } + return null; + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.win32.utils/src/com/nokia/carbide/internal/win32/utils/actions/OpenInExplorerHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.win32.utils/src/com/nokia/carbide/internal/win32/utils/actions/OpenInExplorerHandler.java Wed Jul 21 12:11:48 2010 -0500 @@ -0,0 +1,43 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.win32.utils.actions; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.handlers.HandlerUtil; + +public class OpenInExplorerHandler extends AbstractHandler { + + public Object execute(ExecutionEvent event) throws ExecutionException { + ISelection s = HandlerUtil.getActiveMenuSelection(event); + if (s != null && s instanceof IStructuredSelection) { + Object o = ((IStructuredSelection) s).getFirstElement(); + if (o instanceof IAdaptable) { + IResource r = (IResource) ((IAdaptable) o).getAdapter(IResource.class); + if (r != null) + WindowsOpenFileUtils.executeAction(WindowsOpenFileUtils.OPEN_IN_EXPLORER, r); + } + } + return null; + } + +} diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.carbide.win32.utils/src/com/nokia/carbide/internal/win32/utils/actions/WindowsOpenFileUtils.java --- a/core/com.nokia.carbide.win32.utils/src/com/nokia/carbide/internal/win32/utils/actions/WindowsOpenFileUtils.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.carbide.win32.utils/src/com/nokia/carbide/internal/win32/utils/actions/WindowsOpenFileUtils.java Wed Jul 21 12:11:48 2010 -0500 @@ -22,13 +22,15 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IActionDelegate; import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewPart; public class WindowsOpenFileUtils extends ActionResourceAction implements IViewActionDelegate { + public final static int OPEN_IN_EXPLORER = 1; + public final static int OPEN_IN_COMMAND_PROMPT = 2; + /** * ProcessResourceTree default constructor. */ @@ -50,14 +52,22 @@ // First get the folder name for the selected workspace resource. // Then our simple operations will work on the folder where the resource lives. - Shell shell = new Shell(); - IResource res = (IResource) selection.getFirstElement(); String pathList = ""; //$NON-NLS-1$ pathList = pathList.concat(Messages.getString("WindowsOpenFileUtils.2") + res + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ traceEnabled = false; + int actionType = 0; + if (action.getId().equals("openInWindowsExplorer")) + actionType = OPEN_IN_EXPLORER; + else if (action.getId().equals("openInCmdPrompt")) + actionType = OPEN_IN_COMMAND_PROMPT; + + executeAction(actionType, res); + } + + public static void executeAction(int actionType, IResource res) { String folderFullPath = ""; //$NON-NLS-1$ if (res instanceof IFolder || res instanceof IProject){ folderFullPath = res.getLocation().toOSString(); @@ -66,7 +76,7 @@ } // figure out what action logic to run based on xml id - if (action.getId().equals("openInWindowsExplorer")) //$NON-NLS-1$ + if (actionType == OPEN_IN_EXPLORER) { String exeCmd = "explorer.exe "; //$NON-NLS-1$ exeCmd += "\""; //$NON-NLS-1$ @@ -80,12 +90,12 @@ catch (CoreException e) { MessageDialog.openInformation( - shell, + null, Messages.getString("WindowsOpenFileUtils.10"), //$NON-NLS-1$ ""); //$NON-NLS-1$ } } - else if (action.getId().equals("openInCmdPrompt")) //$NON-NLS-1$ + else if (actionType == OPEN_IN_COMMAND_PROMPT) { String exeCmd = "cmd.exe /c start cd /d "; //$NON-NLS-1$ exeCmd += folderFullPath; @@ -96,7 +106,7 @@ catch (CoreException e) { MessageDialog.openInformation( - shell, + null, Messages.getString("WindowsOpenFileUtils.14"), //$NON-NLS-1$ ""); //$NON-NLS-1$ } diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.cpp.utils.core/src/com/nokia/cpp/internal/api/utils/core/ExternalFileInfoCache.java --- a/core/com.nokia.cpp.utils.core/src/com/nokia/cpp/internal/api/utils/core/ExternalFileInfoCache.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.cpp.utils.core/src/com/nokia/cpp/internal/api/utils/core/ExternalFileInfoCache.java Wed Jul 21 12:11:48 2010 -0500 @@ -167,7 +167,7 @@ // update info info.put(file, newInfo); - return finfo.isChangedFrom(newInfo); + return finfo == null || finfo.isChangedFrom(newInfo); } /** diff -r d1edeecb12af -r 03f5f8bf29b4 core/com.nokia.cpp.utils.ui/src/com/nokia/cpp/internal/api/utils/ui/WorkbenchUtils.java --- a/core/com.nokia.cpp.utils.ui/src/com/nokia/cpp/internal/api/utils/ui/WorkbenchUtils.java Wed Jul 21 11:37:56 2010 -0500 +++ b/core/com.nokia.cpp.utils.ui/src/com/nokia/cpp/internal/api/utils/ui/WorkbenchUtils.java Wed Jul 21 12:11:48 2010 -0500 @@ -195,6 +195,48 @@ } /** + * Open and provide an editor with the given input and id. + * @param input + * @param editorId + * @return IEditorPart + * @throws PartInitException + */ + public static IEditorPart openEditor(final IEditorInput input, final String editorId) throws PartInitException { + final IEditorPart[] parts = { null } ; + final PartInitException ex[] = { null }; + Display.getDefault().syncExec(new Runnable() { + + public void run() { + IWorkbench workbench = PlatformUI.getWorkbench(); + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + if (workbenchWindow == null) { + if (workbench.getWorkbenchWindowCount() == 0) + return; + workbenchWindow = workbench.getWorkbenchWindows()[0]; + } + IWorkbenchPage page = workbenchWindow.getActivePage(); + if (page == null) { + if (workbenchWindow.getPages().length == 0) + return; + page = workbenchWindow.getPages()[0]; + } + IEditorPart editor; + try { + editor = page.openEditor(input, editorId); + } catch (PartInitException e) { + ex[0] = e; + return; + } + parts[0] = editor; + } + + }); + if (ex[0] != null) + throw ex[0]; + return parts[0]; + } + + /** * Open an external browser and go to the given URL. * Note this function must be called in UI thread. * diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.cpp.debug.capabilities/META-INF/MANIFEST.MF --- a/debuggercdi/com.nokia.carbide.cpp.debug.capabilities/META-INF/MANIFEST.MF Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.cpp.debug.capabilities/META-INF/MANIFEST.MF Wed Jul 21 12:11:48 2010 -0500 @@ -1,6 +1,6 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: Capabilities Plug-in +Bundle-Name: Capabilities Bundle-SymbolicName: com.nokia.carbide.cpp.debug.capabilities;singleton:=true Bundle-Version: 1.4.0.qualifier Bundle-Vendor: Nokia diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.cpp.debug.capabilities/plugin.xml --- a/debuggercdi/com.nokia.carbide.cpp.debug.capabilities/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.cpp.debug.capabilities/plugin.xml Wed Jul 21 12:11:48 2010 -0500 @@ -6,34 +6,96 @@ - + + name="CDT - C/C++ Standard Launch Configurations" + description="C/C++ Standard launch configurations provided by CDT" + id="org.eclipse.cdt.standard.category"> + + name="CDT - C/C++ Standard Create Process Type" + description="Start new application optionally under control of the standard debugger" + id="org.eclipse.cdt.standard.launch.activityAppLaunch"> + activityId="org.eclipse.cdt.standard.launch.activityAppLaunch" + categoryId="org.eclipse.cdt.standard.category"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + - - + - - + - - + + id="org.eclipse.cdt.debug.ui.activityDebuggerTypesPref"> + + + + + + id="org.eclipse.cdt.debug.ui.activitySignalsView"> + + + + + + id="org.eclipse.cdt.debug.ui.activityAddBreakpointEvent"> - - - - - - + activityId="org.eclipse.cdt.debug.ui.activityAddBreakpointEvent" + categoryId="org.eclipse.cdt.debug.ui.category"> - - - - - - - - + - + - - + - - + name="CDT - Project Settings Wizards" + description="CDT C/C++ Standard project settings import and export wizards" + id="org.eclipse.cdt.ui.activityProjectSettings"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - - - - + activityId="org.eclipse.cdt.ui.activityNewFolder" + pattern="org\.eclipse\.cdt.*/.*NewFolderDropDown"> + + name="Debugger Terminate/Launch" + description="Relaunch, terminate and relaunch, terminate and remove, terminate all actions" + id="org.eclipse.debug.ui.activityTerminateLaunch"> - - - - - + + + + + - - + + name="Build Automatically Action" + description="Build all projects automatically action" + id="org.eclipse.ui.ide.activityBuildAuto"> - + + + + + - - + diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/plugin.xml --- a/debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/plugin.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/plugin.xml Wed Jul 21 12:11:48 2010 -0500 @@ -9,7 +9,7 @@ id="com.nokia.carbide.cpp"> - - - - - - - - - - + diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/SerialConnectionFactory.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/SerialConnectionFactory.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/SerialConnectionFactory.java Wed Jul 21 12:11:48 2010 -0500 @@ -18,19 +18,26 @@ package com.nokia.carbide.trk.support.connection; -import com.freescale.cdt.debug.cw.core.SerialConnectionSettings; -import com.nokia.carbide.remoteconnections.interfaces.*; -import com.nokia.carbide.trk.support.Messages; +import java.util.HashMap; +import java.util.Map; -import org.eclipse.jface.viewers.*; +import org.eclipse.jface.viewers.ArrayContentProvider; +import org.eclipse.jface.viewers.ComboViewer; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; -import java.util.HashMap; -import java.util.Map; +import com.freescale.cdt.debug.cw.core.SerialConnectionSettings; +import com.nokia.carbide.remoteconnections.interfaces.IConnection; +import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory; +import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; +import com.nokia.carbide.trk.support.Messages; /** * Implementation of IConnectionFactory for serial connections @@ -122,7 +129,8 @@ for (String key : map.keySet()) { ComboViewer viewer = viewers.get(key); if (viewer != null) { - viewer.setSelection(new StructuredSelection(settings.getSettings().get(key))); + String element = map.get(key); + viewer.setSelection(element != null ? new StructuredSelection(element) : StructuredSelection.EMPTY); } } } diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCFConnection.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCFConnection.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -package com.nokia.carbide.trk.support.connection; - -import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; - -import java.util.Map; - -public class TCFConnection extends TCPIPConnection { - - public TCFConnection(IConnectionType connectionType, Map settings) { - super(connectionType, settings); - } - - -} diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCFConnectionFactory.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCFConnectionFactory.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -package com.nokia.carbide.trk.support.connection; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.swt.widgets.Composite; - -import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; -import com.nokia.carbide.remoteconnections.interfaces.IConnection; -import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; -import com.nokia.carbide.remoteconnections.interfaces.IService; -import com.nokia.carbide.remoteconnections.interfaces.IService2; - -public class TCFConnectionFactory extends TCPIPConnectionFactory { - - private static final int MIN_DYN_PORT_NUM = 49152; - private static final int MAX_DYN_PORT_NUM = 65535; - private Map serviceIdToPortMappings; - private TableViewer viewer; - - public TCFConnectionFactory(IConnectionType connectionType) { - super(connectionType); - serviceIdToPortMappings = new HashMap(); - initializePortMappings(); - } - - private void initializePortMappings() { - Collection services = RemoteConnectionsActivator.getConnectionTypeProvider().getCompatibleServices(connectionType); - for (IService service : services) { - IService2 service2 = service instanceof IService2 ? (IService2) service : null; - Integer defaultPort = null; - if (service2 != null) { - try { - String defaultPortString = service2.getDefaults().get(IP_PORT); - defaultPort = Integer.valueOf(defaultPortString); - } catch (NumberFormatException e) { - // if it doesn't parse as an int, we ignore it and provide a dynamic default - } - } - if (defaultPort != null) - serviceIdToPortMappings.put(service.getIdentifier(), defaultPort); - } - for (IService service : services) { - String identifier = service.getIdentifier(); - if (!serviceIdToPortMappings.containsKey(identifier)) - serviceIdToPortMappings.put(identifier, getUnusedDynamicDefault()); - } - - } - - private Integer getUnusedDynamicDefault() { - for (Integer val = MIN_DYN_PORT_NUM; val < MAX_DYN_PORT_NUM; val++) { - if (!serviceIdToPortMappings.containsValue(val)) - return val; - } - return -1; // should never get here!!! - } - - @Override - public IConnection createConnection(Map settings) { - if (settings == null) - settings = getSettingsFromUI(); - return new TCFConnection(connectionType, settings); - } - - @Override - public void createEditingUI(Composite parent, IValidationErrorReporter errorReporter, Map initialSettings) { - super.createEditingUI(parent, errorReporter, initialSettings); -/* updatePortMappings(initialSettings); - Label label = new Label(composite, SWT.NONE); - GridDataFactory.defaultsFor(label).span(2, 1).applyTo(label); - label.setText(Messages.getString("TCPIPPortMappingConnectionFactory.ViewerLabel")); //$NON-NLS-1$ - - viewer = new TableViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION); - viewer.setContentProvider(new ArrayContentProvider()); - - TableViewerColumn serviceColumn = new TableViewerColumn(viewer, SWT.LEFT); - serviceColumn.getColumn().setText(Messages.getString("TCPIPPortMappingConnectionFactory.ServiceHeader")); //$NON-NLS-1$ - - TableViewerColumn portColumn = new TableViewerColumn(viewer, SWT.RIGHT); - portColumn.getColumn().setText(Messages.getString("TCPIPPortMappingConnectionFactory.PortHeader")); //$NON-NLS-1$ - portColumn.setEditingSupport(new PortColumnEditingSupport(viewer)); - - viewer.setLabelProvider(new TableLabelProvider()); - viewer.setInput(serviceIdToPortMappings.keySet()); - - Table table = viewer.getTable(); - table.setHeaderVisible(true); - GridDataFactory.defaultsFor(table).span(2, 1).hint(SWT.DEFAULT, 60).grab(true, false).applyTo(table); - table.setToolTipText(Messages.getString("TCPIPPortMappingConnectionFactory.ViewerTooltip")); //$NON-NLS-1$ - table.setData(UID, "TCPIPPortMappingConnectionFactory.table"); //$NON-NLS-1$ - table.setData("viewer", viewer); //$NON-NLS-1$ - packColumns(); -*/ } - - private Integer getValidValue(String value) { - try { - int intVal = Integer.parseInt(value); - if (intVal < 0) - return new Integer(0); - else if (intVal > MAX_DYN_PORT_NUM) - return new Integer(MAX_DYN_PORT_NUM); - else - return new Integer(intVal); - } catch (Exception e) { - } - return null; - } - - @Override - public Map getSettingsFromUI() { - Map settings = super.getSettingsFromUI(); - addMappings(settings); - return settings; - } - - private void addMappings(Map settings) { - for (String serviceId : serviceIdToPortMappings.keySet()) { - settings.put(serviceId, String.valueOf(serviceIdToPortMappings.get(serviceId).intValue())); - } - settings.remove(IP_PORT); - } - -} diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCFConnectionType.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCFConnectionType.java Wed Jul 21 11:37:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.carbide.trk.support.connection; - -import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory; -import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; -import com.nokia.carbide.trk.support.Messages; - -/** - * Implementation of IConnectionType for TCP/IP connections - */ -public class TCFConnectionType implements IConnectionType { - - public static final String ID = "com.nokia.carbide.connection.TCFConnectionType"; //$NON-NLS-1$ - - public IConnectionFactory getConnectionFactory() { - return new TCFConnectionFactory(this); - } - - public String getDescription() { - return Messages.getString("TCFConnectionType.Desc"); //$NON-NLS-1$ - } - - public String getDisplayName() { - return Messages.getString("TCFConnectionType.Label"); //$NON-NLS-1$ - } - - public String getHelpContext() { - return null; - } - - public String getIdentifier() { - return ID; - } - -} diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties Wed Jul 21 12:11:48 2010 -0500 @@ -60,8 +60,4 @@ TracingService.Label=Tracing USBConnectionType.Desc=USB serial port connection settings USBConnectionType.Label=USB -TCFConnectionType.Desc=TCP/IP settings -TCFConnectionType.Label=TCP/IP -TCFUSBConnectionType.Desc=USB serial port connection settings\n(This is a temporary variant used to target the TCF debug agent on the device.) -TCFUSBConnectionType.Label=USB (TCF) diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/ConnectedServiceFactory.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/ConnectedServiceFactory.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/ConnectedServiceFactory.java Wed Jul 21 12:11:48 2010 -0500 @@ -29,9 +29,6 @@ import com.nokia.carbide.remoteconnections.interfaces.IService; import com.nokia.carbide.trk.support.connection.SerialBTConnectionType; import com.nokia.carbide.trk.support.connection.SerialConnectionType; -import com.nokia.carbide.trk.support.connection.TCFConnection; -import com.nokia.carbide.trk.support.connection.TCFConnectionType; -import com.nokia.carbide.trk.support.connection.TCFUSBConnectionType; import com.nokia.carbide.trk.support.connection.USBConnectionType; import com.nokia.cpp.internal.api.utils.core.HostOS; @@ -52,11 +49,10 @@ } else if (service instanceof TRKService && isCompatibleConnection(getCompatibleTRKConnectionTypeIds(), connection)) { - if (HostOS.IS_UNIX || connection instanceof TCFConnection) + if (HostOS.IS_UNIX) return new RemoteConnectedService(service); // TODO: not ported return new TRKConnectedService(service, (AbstractSynchronizedConnection) connection); } - return null; } @@ -73,20 +69,17 @@ private Collection getCompatibleTracingConnectionTypeIds() { return Arrays.asList(new String[] { USBConnectionType.ID, - TCFUSBConnectionType.ID, }); } private Collection getCompatibleTRKConnectionTypeIds() { return Arrays.asList(new String[] { SerialConnectionType.ID, - TCFConnectionType.ID, SerialBTConnectionType.ID, USBConnectionType.ID, - TCFUSBConnectionType.ID, }); } - + /* (non-Javadoc) * @see com.nokia.carbide.remoteconnections.interfaces.IConnectedServiceFactory#getCompatibleConnectionTypeIds(com.nokia.carbide.remoteconnections.interfaces.IService) */ diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java Wed Jul 21 12:11:48 2010 -0500 @@ -29,10 +29,10 @@ import com.freescale.cdt.debug.cw.core.SerialConnectionSettings; import com.nokia.carbide.remoteconnections.interfaces.AbstractConnectedService2; import com.nokia.carbide.remoteconnections.interfaces.AbstractSynchronizedConnection; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller; import com.nokia.carbide.remoteconnections.interfaces.IService; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller; import com.nokia.carbide.trk.support.Messages; import com.nokia.carbide.trk.support.connection.IUSBConnectionType; import com.nokia.carbide.trk.support.connection.SerialConnectionType; @@ -92,7 +92,7 @@ private static final int REQUIRED_MSG_LEN = SYS_TRK_RESPONSE_STR.length + SYS_TRK_RESPONSE_STR_OFFSET; - private Pair deviceOS; + private Pair deviceOS; private TRKService trkService; static Class startTCFServer = TCFClassFactory.class; // force the tcf plugin to load @@ -365,7 +365,7 @@ return new TestResult(estatus, getShortDescription(estatus), message); } - public void setDeviceOS(String familyName, Version version) { - deviceOS = new Pair(familyName, version); + public void setDeviceOS(String familyName, String version) { + deviceOS = new Pair(familyName, version); } } diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKService.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKService.java Wed Jul 21 12:11:48 2010 -0500 @@ -46,7 +46,6 @@ SerialBTConnectionType.ID, TCPIPConnectionType.ID, USBConnectionType.ID, - TCFUSBConnectionType.ID }); } diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java Wed Jul 21 12:11:48 2010 -0500 @@ -23,14 +23,13 @@ import java.util.Arrays; import org.eclipse.core.runtime.IProgressMonitor; -import org.osgi.framework.Version; import com.freescale.cdt.debug.cw.core.SerialConnectionSettings; import com.nokia.carbide.remoteconnections.interfaces.AbstractConnectedService2; import com.nokia.carbide.remoteconnections.interfaces.AbstractSynchronizedConnection; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; import com.nokia.carbide.remoteconnections.interfaces.IService; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.trk.support.Messages; import com.nokia.carbide.trk.support.connection.IUSBConnectionType; import com.nokia.carbide.trk.support.connection.TCPIPConnectionFactory; @@ -244,7 +243,7 @@ return new TestResult(estatus, getShortDescription(estatus), message); } - public void setDeviceOS(String familyName, Version version) { + public void setDeviceOS(String familyName, String version) { // unimplemented } } \ No newline at end of file diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingInstallerProvider.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingInstallerProvider.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingInstallerProvider.java Wed Jul 21 12:11:48 2010 -0500 @@ -18,40 +18,28 @@ package com.nokia.carbide.trk.support.service; -import com.nokia.carbide.installpackages.InstallPackages.IServerData; -import com.nokia.carbide.remoteconnections.interfaces.*; -import com.nokia.carbide.trk.support.Activator; +import java.util.List; import org.eclipse.jface.operation.IRunnableContext; -import org.osgi.framework.Version; -import java.net.URL; -import java.util.List; +import com.nokia.carbide.installpackages.InstallPackages.IServerData; +import com.nokia.carbide.remoteconnections.interfaces.AbstractPackageInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IService; /** - * + * @deprecated */ public class TracingInstallerProvider extends AbstractPackageInstallerProvider { public class ServerData implements IServerData { - private static final String SERVER = "http://dacvs002.americas.nokia.com/trk"; //$NON-NLS-1$ - private static final String MASTER_FILE_NAME = "TracingPackages.xml"; //$NON-NLS-1$ + private static final String MASTER_FILE_NAME = "TracingPackages.xml"; //$NON-NLS-1$ public String getMasterFileName() { return MASTER_FILE_NAME; } - public URL getRelativePathRoot() { - URL url = null; - try { - url = new URL(SERVER); - } catch (Exception e) { - Activator.log(e); - } - return url; - } - public IRemoteAgentInstallerProvider getRemoteAgentInstallerProvider() { return TracingInstallerProvider.this; } @@ -65,7 +53,7 @@ } @Override - public List getRemoteAgentInstallers(String familyName, Version version) { + public List getRemoteAgentInstallers(String familyName, String version) { return super.getRemoteAgentInstallers(familyName, version); } @@ -75,7 +63,7 @@ } @Override - public List getVersions(String familyName) { + public List getVersions(String familyName) { return super.getVersions(familyName); } diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingService.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingService.java Wed Jul 21 12:11:48 2010 -0500 @@ -18,17 +18,18 @@ package com.nokia.carbide.trk.support.service; -import com.nokia.carbide.remoteconnections.interfaces.*; +import java.util.Arrays; +import java.util.Collection; + +import com.nokia.carbide.remoteconnections.interfaces.AbstractSynchronizedConnection; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnection; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IService; import com.nokia.carbide.trk.support.Messages; -import com.nokia.carbide.trk.support.connection.TCFUSBConnectionType; import com.nokia.carbide.trk.support.connection.TCPIPConnectionType; import com.nokia.carbide.trk.support.connection.USBConnectionType; import com.nokia.cpp.internal.api.utils.core.Check; -import com.nokia.cpp.internal.api.utils.core.HostOS; - - -import java.util.Arrays; -import java.util.Collection; /** * Implementation of IService for Tracing @@ -48,7 +49,6 @@ return Arrays.asList(new String[] { TCPIPConnectionType.ID, USBConnectionType.ID, - TCFUSBConnectionType.ID, }); } @@ -61,9 +61,7 @@ } public IRemoteAgentInstallerProvider getInstallerProvider() { - if (HostOS.IS_UNIX) - return null; // TODO: implement - return new TracingInstallerProvider(this); + return null; } public boolean isTestable() { diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java Wed Jul 21 12:11:48 2010 -0500 @@ -37,7 +37,6 @@ import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus; import com.nokia.carbide.trk.support.Messages; -import com.nokia.carbide.trk.support.connection.TCFUSBConnectionType; import com.nokia.carbide.trk.support.connection.USBConnectionType; import com.nokia.carbide.trk.support.service.TRKConnectedService; import com.nokia.carbide.trk.support.service.TracingConnectedService; @@ -205,8 +204,7 @@ private boolean canBeSetToCurrent(IConnection connection) { // USB connections for now - return USBConnectionType.ID.equals(connection.getConnectionType().getIdentifier()) - || TCFUSBConnectionType.ID.equals(connection.getConnectionType().getIdentifier()); + return USBConnectionType.ID.equals(connection.getConnectionType().getIdentifier()); } private void reconcileStatus(IConnection connection) { diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java --- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Wed Jul 21 12:11:48 2010 -0500 @@ -67,10 +67,12 @@ import com.nokia.carbide.cpp.sdk.core.ISymbianSDKFeatures; import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin; import com.nokia.carbide.remoteconnections.interfaces.IConnection; +import com.nokia.carbide.remoteconnections.internal.registry.Registry; import com.nokia.cpp.internal.api.utils.core.PathUtils; import cwdbg.PreferenceConstants; +@SuppressWarnings("restriction") public class SettingsData { // NOTE: Many of these constants are mirrored in @@ -254,7 +256,7 @@ if (cpi != null) { ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration(); String configName = projectName + " " + buildConfig.getDisplayString(); //$NON-NLS-1$ - configuration.rename(DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(configName)); + setLaunchConfigurationName(configuration, configName); // make sure the selected build configuration of the current project // is an emulator build, otherwise warn them that we can't set default values. @@ -346,6 +348,7 @@ // configuration.setAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, ""); //$NON-NLS-1$ configuration.setAttribute(PreferenceConstants.J_PN_ProgramArguments, ""); //$NON-NLS-1$ + configuration.setAttribute(RemoteConnectionsTRKHelper.CONNECTION_ATTRIBUTE, Registry.CURRENT_CONNECTION_ID); HashSet set = new HashSet(); set.add(ILaunchManager.DEBUG_MODE); @@ -371,7 +374,7 @@ if (cpi != null) { ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration(); String configName = projectName + " " + buildConfig.getDisplayString(); //$NON-NLS-1$ - configuration.rename(DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(configName)); + setLaunchConfigurationName(configuration, configName); // make sure the selected build configuration of the current project is not an emulator build // otherwise warn them that we can't set default values. @@ -406,7 +409,7 @@ if (cpi != null) { ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration(); String configName = projectName + " " + buildConfig.getDisplayString(); //$NON-NLS-1$ - configuration.rename(DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(configName)); + setLaunchConfigurationName(configuration, configName); // make sure the selected build configuration of the current project is not an emulator build // otherwise warn them that we can't set default values. @@ -673,14 +676,13 @@ configuration.setAttribute(DebuggerCommonData.Host_App_Path, ""); //$NON-NLS-1$ configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$ configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, ""); //$NON-NLS-1$ - if (project != null) - { + configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_BUILD_BEFORE_LAUNCH, ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING); + + if (project != null) { configuration.setMappedResources( new IResource[] { project }); ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project); - if (cpi != null) { - configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, cpi.getDefaultBuildConfigName()); - } - + configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, + cpi != null ? cpi.getDefaultBuildConfigName() : ""); //$NON-NLS-1$ } // set rom log file defaults. do this for all launch types since it shouldn't hurt @@ -902,4 +904,20 @@ configuration.setAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, PathUtils.convertPathToWindows(path)); } -} \ No newline at end of file + private static void setLaunchConfigurationName(ILaunchConfigurationWorkingCopy config, String proposedName) { + String name = proposedName; + + // the call to generateLaunchConfigurationName below will replace all \'s with _'s + // the code below just removes any \ or : at the end of the SDK name, if for example + // they gave the SDK a name of "M:" or "M:\". + if (name.endsWith("\\]")) { //$NON-NLS-1$ + name = name.substring(0, name.length() - 2) + "]"; //$NON-NLS-1$ + } + + if (name.endsWith(":]")) { //$NON-NLS-1$ + name = name.substring(0, name.length() - 2) + "]"; //$NON-NLS-1$ + } + + config.rename(DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name)); + } +} diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AbstractSymbianLaunchShortcut.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AbstractSymbianLaunchShortcut.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AbstractSymbianLaunchShortcut.java Wed Jul 21 12:11:48 2010 -0500 @@ -18,6 +18,10 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.window.Window; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; @@ -68,32 +72,36 @@ public void launch(ISelection selection, String mode) { - // launch an existing config if one exists - ILaunchConfiguration[] configs = getLaunchConfigurations(selection); - if (configs != null && configs.length > 0) { - // find all the ones that support the mode and shortcut (#11013) - List matches = new ArrayList(); - for (int i = 0; i < configs.length; i++) { - ILaunchConfiguration config = configs[i]; - try { - if (config.supportsMode(mode) && isSupportedConfiguration(config)) { - matches.add(config); + // if user holds down SHIFT, do not use existing launch (bug 11279) + if (!isShiftKeyPressed()) { + + // launch an existing config if one exists + ILaunchConfiguration[] configs = getLaunchConfigurations(selection); + if (configs != null && configs.length > 0) { + // find all the ones that support the mode and shortcut (#11013) + List matches = new ArrayList(); + for (int i = 0; i < configs.length; i++) { + ILaunchConfiguration config = configs[i]; + try { + if (config.supportsMode(mode) && isSupportedConfiguration(config)) { + matches.add(config); + } + } catch (CoreException e) { + e.printStackTrace(); } - } catch (CoreException e) { - e.printStackTrace(); } - } - // if only one matches, just launch - if (matches.size() > 0) { - if (matches.size() == 1 || WorkbenchUtils.isJUnitRunning()) { - DebugUITools.launch(matches.get(0), mode); - } else { - // else, ask the user - ILaunchConfiguration selected = chooseConfiguration(matches, mode); - if (selected != null) - DebugUITools.launch(selected, mode); + // if only one matches, just launch + if (matches.size() > 0) { + if (matches.size() == 1 || WorkbenchUtils.isJUnitRunning()) { + DebugUITools.launch(matches.get(0), mode); + } else { + // else, ask the user + ILaunchConfiguration selected = chooseConfiguration(matches, mode); + if (selected != null) + DebugUITools.launch(selected, mode); + } + return; } - return; } } @@ -140,6 +148,43 @@ } /** + * Tell whether a shift key is pressed or released in a 1/4 second period. + * @return + */ + private boolean isShiftKeyPressed() { + final boolean[] pressed = { false }; + Display.getDefault().syncExec(new Runnable() { + public void run() { + final boolean[] event = { false }; + Listener listener = new Listener() { + public void handleEvent(Event arg0) { + if ((arg0.stateMask & SWT.SHIFT) != 0 || arg0.keyCode == SWT.SHIFT) + pressed[0] = true; + event[0] = true; + } + }; + Display display = Display.getDefault(); + display.addFilter(SWT.KeyDown, listener); + display.addFilter(SWT.KeyUp, listener); + display.addFilter(SWT.MouseMove, listener); // mouse move carries keyboard state + + try { + long end = System.currentTimeMillis() + 250; + while (System.currentTimeMillis() < end && !pressed[0] && !event[0]) { + if (!display.readAndDispatch()) + display.sleep(); + } + } finally { + display.removeFilter(SWT.MouseMove, listener); + display.removeListener(SWT.KeyDown, listener); + display.removeListener(SWT.KeyUp, listener); + } + } + }); + return pressed[0]; + } + + /** * Show a selection dialog that allows the user to choose one of the specified * launch configurations. Return the chosen config, or null if the * user cancelled the dialog. diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchPlugin.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchPlugin.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchPlugin.java Wed Jul 21 12:11:48 2010 -0500 @@ -222,20 +222,19 @@ } private boolean getExePathsFromProjectAndDetermineIfX86(IProject project, List exePaths) { + // changed logic to allow paths for executables for !isExecutable(path) for non-x86 + // this allows new plug-and-play wizard to create attach configs for imported dlls (see bug 11444) boolean isX86 = false; ICProject cProject = CoreModel.getDefault().create(project); if (cProject != null) { try { for (IBinary bin : cProject.getBinaryContainer().getBinaries()) { - if (bin.isExecutable()) { - IPath path = bin.getResource().getLocation(); - - if (isEmulatorBinaryPath(path)) { - isX86 = true; - } + IPath path = bin.getResource().getLocation(); + + isX86 = isX86 || isEmulatorBinaryPath(path); // only check once + if (!isX86 || bin.isExecutable()) exePaths.add(path); - } } } catch (CModelException e) { log(e); diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java Wed Jul 21 12:11:48 2010 -0500 @@ -76,7 +76,7 @@ } if (data.getExeSelection().equals(EExeSelection.ATTACH_TO_PROCESS)) { - data.setInstallPackage(true); + data.setInstallPackage(false); } else { Boolean detectedSysTrk = data.isSysTRKConnection(); // TRUE, FALSE, or null boolean isSysTrk = detectedSysTrk == Boolean.TRUE || (detectedSysTrk == null && data.isInternalLayout()); diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AttachMainTab.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AttachMainTab.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AttachMainTab.java Wed Jul 21 12:11:48 2010 -0500 @@ -59,7 +59,10 @@ fProjText.setToolTipText(Messages.getString("RunModeMainTab.8")); //$NON-NLS-1$ createVerticalSpacer(comp, 1); - clientSiteUI = RemoteConnectionsActivator.getConnectionsManager().getClientSiteUI2(LaunchPlugin.getTRKService()); + /* TODO: do not filter by service: we need to match either TRK or TCF TRK and the API does not support this yet; + * this isn't a problem, though, since all stock connections support TRK anyway */ + //clientSiteUI = RemoteConnectionsActivator.getConnectionsManager().getClientSiteUI2(LaunchPlugin.getTRKService()); + clientSiteUI = RemoteConnectionsActivator.getConnectionsManager().getClientSiteUI2(null); clientSiteUI.createComposite(comp); clientSiteUI.addListener(new IListener() { public void connectionSelected() { diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java Wed Jul 21 12:11:48 2010 -0500 @@ -417,8 +417,15 @@ // removeLastSegments(2) will strip the filename and 'urel', 'udeb' or 'lib' IPath launchExeTargetPath = new Path(new File(launchExeName).getCanonicalPath()).removeLastSegments(2); for (Executable executable : ExecutablesManager.getExecutablesManager().getExecutables(true)) { - IPath exePath = executable.getPath(); - if (launchExeTargetPath.isPrefixOf(exePath)) + IPath exePath = executable.getPath(); + // remove last two segments here also (ignore urel, udeb, lib on executables) + // this is so we can match down to the compiler but not beyond: + // y:\epoc32\release\armv5.\... (for a variant build in raptor) will match + // y:\epco32\release\armv5\... for a non-variant built executable + IPath exePathShort = exePath.removeLastSegments(2); + String sLaunchExeTargetPath = launchExeTargetPath.toOSString(); + String sExePath = exePathShort.toOSString(); + if (sExePath.startsWith(sLaunchExeTargetPath) || sLaunchExeTargetPath.startsWith(sExePath)) files.add(new ExeFileToDebug(exePath.toOSString(), true)); } } catch (Exception e) { diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FileTransferTab.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FileTransferTab.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FileTransferTab.java Wed Jul 21 12:11:48 2010 -0500 @@ -35,6 +35,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.ui.PlatformUI; +import java.io.File; import java.util.*; public class FileTransferTab extends CLaunchConfigurationTab { @@ -127,11 +128,11 @@ */ public void performApply(ILaunchConfigurationWorkingCopy configuration) { FileToTransfer[] files = fFilesBlock.getFiles(); - String filesString = ""; //$NON-NLS-1$ + StringBuilder filesString = new StringBuilder(); for (int i=0; i> fFileInfoCache = new LinkedHashMap>(); + private static long fFileInfoCacheFlushTime = 0; + private static final int CACHE_CHECK_QUANTUM = 60 * 1000; + /** * Content provider to show a list of files to be transferred */ @@ -149,7 +158,7 @@ // add warning icon for any host files that don't exist FileToTransfer file = (FileToTransfer)element; File hostFile = new Path(file.getHostPath()).toFile(); - if (!hostFile.exists()) { + if (!fileExists(hostFile)) { return LaunchPlugin.getImageDescriptor("icons/Launch/etool16/warning_obj.gif").createImage(); } } @@ -160,6 +169,7 @@ FilesBlock(FileTransferTab launchTab) { fLaunchTab = launchTab; + fFileInfoCacheFlushTime = System.currentTimeMillis(); } /** @@ -541,7 +551,7 @@ private void removeFiles() { IStructuredSelection selection= (IStructuredSelection)fFileList.getSelection(); FileToTransfer[] files = new FileToTransfer[selection.size()]; - Iterator iter = selection.iterator(); + Iterator iter = selection.iterator(); int i = 0; while (iter.hasNext()) { files[i] = (FileToTransfer)iter.next(); @@ -633,4 +643,32 @@ Viewer getViewer() { return fFileList; } + + boolean fileExists(File file) { + Pair entry = fFileInfoCache.get(file); + + // recheck the status occasionally, either after time passes or + // whenever the UI is recreated (as in constructor) + if (System.currentTimeMillis() >= fFileInfoCacheFlushTime) { + // remove entries not checked at all in a while + long deadLine = System.currentTimeMillis() - CACHE_CHECK_QUANTUM; + Iterator> iter = fFileInfoCache.values().iterator(); + while (iter.hasNext()) { + Pair ientry = iter.next(); + if (ientry.first < deadLine) { + iter.remove(); + } + } + fFileInfoCacheFlushTime = System.currentTimeMillis() + CACHE_CHECK_QUANTUM; + } + + if (entry == null) { + //System.out.println("Checking " + file); + entry = new Pair(System.currentTimeMillis(), file.exists()); + fFileInfoCache.put(file, entry); + } else { + //System.out.println("Not checking " + file); + } + return entry.second; + } } diff -r d1edeecb12af -r 03f5f8bf29b4 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeMainTab.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeMainTab.java Wed Jul 21 11:37:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeMainTab.java Wed Jul 21 12:11:48 2010 -0500 @@ -81,7 +81,10 @@ if (wantsConnectionUI) { createVerticalSpacer(comp, 1); - clientSiteUI = RemoteConnectionsActivator.getConnectionsManager().getClientSiteUI2(LaunchPlugin.getTRKService()); + /* TODO: do not filter by service: we need to match either TRK or TCF TRK and the API does not support this yet; + * this isn't a problem, though, since all stock connections support TRK anyway */ + //clientSiteUI = RemoteConnectionsActivator.getConnectionsManager().getClientSiteUI2(LaunchPlugin.getTRKService()); + clientSiteUI = RemoteConnectionsActivator.getConnectionsManager().getClientSiteUI2(null); clientSiteUI.createComposite(comp); clientSiteUI.addListener(new IListener() { public void connectionSelected() { diff -r d1edeecb12af -r 03f5f8bf29b4 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/views/SPNViewContentProvider.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/views/SPNViewContentProvider.java Wed Jul 21 11:37:56 2010 -0500 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/views/SPNViewContentProvider.java Wed Jul 21 12:11:48 2010 -0500 @@ -932,12 +932,24 @@ visitedPaths.add(baseExtensionMakefilePath); IPath extensionMakefilePath = baseExtensionMakefilePath.addFileExtension("mk"); - IPath extensionMetaPath = baseExtensionMakefilePath.addFileExtension("meta"); - - addBldInfExtensionMakefile(objects, project, cpi, view, - extensionMakefilePath); - addBldInfExtensionMakefile(objects, project, cpi, view, - extensionMetaPath); + + if (extensionMakefilePath.toFile().exists()) { + // old-style + IPath extensionMetaPath = baseExtensionMakefilePath.addFileExtension("meta"); + addBldInfExtensionMakefile(objects, project, cpi, view, + extensionMakefilePath); + addBldInfExtensionMakefile(objects, project, cpi, view, + extensionMetaPath); + } else { + // new-style (default for the future) + IPath flmMakefilePath; + if ("export".equals(baseExtensionMakefilePath.getFileExtension())) + flmMakefilePath = baseExtensionMakefilePath.removeFileExtension().addFileExtension("flm"); + else + flmMakefilePath = baseExtensionMakefilePath.addFileExtension("flm"); + addBldInfExtensionMakefile(objects, project, cpi, view, + flmMakefilePath); + } } return null; } diff -r d1edeecb12af -r 03f5f8bf29b4 templates/com.nokia.carbide.cpp.qt.templates/templates/Qt-Console/template.xml --- a/templates/com.nokia.carbide.cpp.qt.templates/templates/Qt-Console/template.xml Wed Jul 21 11:37:56 2010 -0500 +++ b/templates/com.nokia.carbide.cpp.qt.templates/templates/Qt-Console/template.xml Wed Jul 21 12:11:48 2010 -0500 @@ -13,8 +13,7 @@ label="%uid3.label" min="0xe0000000" max="0xefffffff" - mandatory="true" - persist="true"> + mandatory="true"> %uid3.desc + mandatory="true"> %uid3.desc + mandatory="true"> %uid3.desc + mandatory="true"> %uid3.desc - ]>