e32tools/elf2e32/source/parametermanager.h
changeset 589 851206cea67b
parent 0 044383f39525
equal deleted inserted replaced
586:bfc226f3f18c 589:851206cea67b
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
       
    12 // Mike Kinghan, mikek@symbian.org, for Symbian Foundation, 2010
    12 //
    13 //
    13 // Description:
    14 // Description:
    14 // Implementation of the Header file for Class ParameterManager of the elf2e32 tool
    15 // Implementation of the Header file for Class ParameterManager of the elf2e32 tool
    15 // @internalComponent
    16 // @internalComponent
    16 // @released
    17 // @released
    79 	typedef std::string string;
    80 	typedef std::string string;
    80 	typedef std::less<string> OptionCompare;
    81 	typedef std::less<string> OptionCompare;
    81 	typedef std::map<string, const OptionDesc *, OptionCompare> OptionMap;
    82 	typedef std::map<string, const OptionDesc *, OptionCompare> OptionMap;
    82 	typedef vector<char *> LibSearchPaths;
    83 	typedef vector<char *> LibSearchPaths;
    83 
    84 
    84 	typedef void (*ParserFn)(ParameterManager *, char *, char *, const OptionDesc *);
    85 	typedef void (*ParserFn)(ParameterManager *, char const *, char const *, const OptionDesc *);
    85 
    86 
    86 
    87 
    87 	#define DECLARE_PARAM_PARSER(name) \
    88 	#define DECLARE_PARAM_PARSER(name) \
    88 		static void name(ParameterManager* aPM, char* aOption, char* aValue, void* aDesc)
    89 		static void name(ParameterManager* aPM, char* aOption, char* aValue, void* aDesc)
    89 	
    90 	
   142 	DECLARE_PARAM_PARSER(ParseExcludeUnwantedExports);
   143 	DECLARE_PARAM_PARSER(ParseExcludeUnwantedExports);
   143 	DECLARE_PARAM_PARSER(ParseIsCustomDllTarget);
   144 	DECLARE_PARAM_PARSER(ParseIsCustomDllTarget);
   144 	DECLARE_PARAM_PARSER(ParseSymNamedLookup);
   145 	DECLARE_PARAM_PARSER(ParseSymNamedLookup);
   145 	DECLARE_PARAM_PARSER(ParseDebuggable);
   146 	DECLARE_PARAM_PARSER(ParseDebuggable);
   146 	DECLARE_PARAM_PARSER(ParseSmpSafe);
   147 	DECLARE_PARAM_PARSER(ParseSmpSafe);
       
   148 	DECLARE_PARAM_PARSER(ParseAsmDialect);
   147 
   149 
   148 	ParameterManager(int aArgc, char** aArgv);
   150 	ParameterManager(int aArgc, char** aArgv);
   149 	virtual ~ParameterManager();
   151 	virtual ~ParameterManager();
   150 	void ParameterAnalyser();
   152 	void ParameterAnalyser();
   151 	void SetDefInput(char * aDefInputVal);
   153 	void SetDefInput(char * aDefInputVal);
   193 	void SetExcludeUnwantedExports(bool aVal);
   195 	void SetExcludeUnwantedExports(bool aVal);
   194 	void SetCustomDllTarget(bool aVal);
   196 	void SetCustomDllTarget(bool aVal);
   195 	void SetSymNamedLookup(bool aVal);
   197 	void SetSymNamedLookup(bool aVal);
   196 	void SetDebuggable(bool aVal);
   198 	void SetDebuggable(bool aVal);
   197 	void SetSmpSafe(bool aVal);
   199 	void SetSmpSafe(bool aVal);
       
   200 	void SetAsmDialect(EAsmDialect aAsmDialect);
   198 
   201 
   199 	int NumOptions();
   202 	int NumOptions();
   200 	int NumShortOptions();
   203 	int NumShortOptions();
   201 	void InitParamParser();
   204 	void InitParamParser();
   202 	void ParseCommandLine();
   205 	void ParseCommandLine();
   277 	bool ExcludeUnwantedExports();
   280 	bool ExcludeUnwantedExports();
   278 	bool IsCustomDllTarget();
   281 	bool IsCustomDllTarget();
   279 	bool SymNamedLookup();
   282 	bool SymNamedLookup();
   280 	bool IsDebuggable();
   283 	bool IsDebuggable();
   281 	bool IsSmpSafe();
   284 	bool IsSmpSafe();
       
   285 	EAsmDialect AsmDialect();
   282 
   286 
   283 private:
   287 private:
   284 	/** The number of command line arguments passed into the program */
   288 	/** The number of command line arguments passed into the program */
   285 	int iArgc;
   289 	int iArgc;
   286 
   290 
   443 	bool iExcludeUnwantedExports;
   447 	bool iExcludeUnwantedExports;
   444 	bool iCustomDllTarget;
   448 	bool iCustomDllTarget;
   445 	bool iSymNamedLookup;
   449 	bool iSymNamedLookup;
   446 	bool iDebuggable;
   450 	bool iDebuggable;
   447 	bool iSmpSafe;
   451 	bool iSmpSafe;
       
   452 	EAsmDialect iAsmDialect;
   448 };
   453 };
   449 
   454 
   450 
   455 
   451 #endif // !defined(SYMBIAN_PARAMETERMANAGER_H_)
   456 #endif // !defined(SYMBIAN_PARAMETERMANAGER_H_)