epoc32/include/bacline.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __BACLINE_H
    17 #define __BACLINE_H
    18 
    19 #ifndef __E32BASE_H
    20 #include <e32base.h>
    21 #endif
    22 
    23 
    24 class CCommandLineArguments : public CBase
    25 /** Parses command line arguments.
    26 
    27 The class provides functions to access the arguments that are supplied when 
    28 a program is launched as a new process. 
    29 
    30 The program name is returned as argument 0. Other arguments are returned as 
    31 arguments 1, 2 etc. 
    32 
    33 The Count() function indicates how many arguments there are, including the 
    34 program name. Arguments may be quoted to contain blanks and quotes.
    35 
    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 
    40 object.
    41 
    42 The main use of this class is in parsing the arguments of WINC command-line 
    43 utilities.
    44 
    45 This class is not intended for user derivation 
    46 @publishedAll
    47 @released
    48 */
    49 	{
    50 public:
    51 	// construct/destruct
    52 	IMPORT_C static CCommandLineArguments* NewLC();
    53 	IMPORT_C static CCommandLineArguments* NewL();
    54 	IMPORT_C ~CCommandLineArguments();
    55 	// extract
    56 	IMPORT_C TPtrC Arg(TInt aArg) const;
    57 	IMPORT_C TInt Count() const;
    58 private:
    59 	CCommandLineArguments();
    60 	void ConstructL();
    61 private:
    62 	CArrayFixFlat<TPtrC>* iArgs;
    63 	HBufC* iCommandLine;
    64 	TFileName iFileName;
    65 	};
    66 
    67 #endif