1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 class CCommandLineArguments : public CBase
25 /** Parses command line arguments.
27 The class provides functions to access the arguments that are supplied when
28 a program is launched as a new process.
30 The program name is returned as argument 0. Other arguments are returned as
33 The Count() function indicates how many arguments there are, including the
34 program name. Arguments may be quoted to contain blanks and quotes.
36 The command line arguments and process name occupy 256 characters each. In
37 order to minimise the space used throughout the lifetime of a program, it
38 is recommended that the program parse the arguments shortly after initialisation,
39 save the argument values appropriately, and then destroy the CCommandLineArguments
42 The main use of this class is in parsing the arguments of WINC command-line
45 This class is not intended for user derivation
52 IMPORT_C static CCommandLineArguments* NewLC();
53 IMPORT_C static CCommandLineArguments* NewL();
54 IMPORT_C ~CCommandLineArguments();
56 IMPORT_C TPtrC Arg(TInt aArg) const;
57 IMPORT_C TInt Count() const;
59 CCommandLineArguments();
62 CArrayFixFlat<TPtrC>* iArgs;