toolsandutils/e32tools/elf2e32/source/pl_symbol.h
changeset 0 83f4b4db085c
child 1 d4b442d23379
equal deleted inserted replaced
-1:000000000000 0:83f4b4db085c
       
     1 // Copyright (c) 2004-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 // Implementation of the Class Symbol for the elf2e32 tool
       
    15 // @internalComponent
       
    16 // @released
       
    17 // 
       
    18 //
       
    19 
       
    20 
       
    21 #if !defined(_PL_SYMBOL_H_)
       
    22 #define _PL_SYMBOL_H_
       
    23 
       
    24 #include "pl_common.h"
       
    25 #include "pl_sym_type.h"
       
    26 #include <string>
       
    27 
       
    28 #define UnAssignedOrdNum -1;
       
    29 
       
    30 enum SymbolStatus {Matching,Missing,New};
       
    31 /**
       
    32  * This class is shared among all that use the symbol information. To name  them,
       
    33  * DefFileHandler, UseCaseController, DSOHandler. To be finaslized  by
       
    34  * DefFileHandler.
       
    35  */
       
    36 class Symbol
       
    37 {
       
    38 
       
    39 public:
       
    40 	Symbol(char* aName,SymbolType aCodeDataType, char* aExportName=NULL, PLUINT32 aOrd = -1,\
       
    41 		char* aComment=NULL, bool aR3Unused=false, bool aAbsent=false, PLUINT32 aSymbolSz = 0);
       
    42 
       
    43 	Symbol(int symbolStatus,char *name,char *exportName,int ordinalNo,bool r3unused,bool absent,int symbolType,char *comment, PLUINT32 aSymbolSz = 0);
       
    44 
       
    45 	Symbol(Symbol& aSymbol, SymbolType aCodeDataType, bool aAbsent);
       
    46 
       
    47 	Symbol(Symbol& aSymbol);
       
    48 	/*Symbol(char* aName,CDType aCodeDataType, PLUINT32	aOrd = UnAssignedOrdNum,\
       
    49 		char* aComment = NULL, bool aAbsent = false);*/
       
    50 	virtual ~Symbol();
       
    51 
       
    52 	bool operator==(const Symbol* aSym) const;
       
    53 	const char* SymbolName() const;
       
    54 	const char* ExportName();
       
    55 	PLUINT32 OrdNum() const;
       
    56 	SymbolType CodeDataType();
       
    57 
       
    58 	bool R3unused();
       
    59 	bool Absent();
       
    60 	void SetAbsent(bool aAbsent);
       
    61 	char* Comment();
       
    62 	int GetSymbolStatus();
       
    63 	void SetOrdinal(PLUINT32 aOrdinalNum);
       
    64 	void SetSymbolStatus(SymbolStatus aSymbolStatus);
       
    65 	void SetSymbolName(char *aSymbolName);
       
    66 	
       
    67 	void SymbolName(char *aSymbolName);
       
    68 	void Comment(char *aComment);
       
    69 	void CodeDataType(SymbolType aType);
       
    70 	void R3Unused(bool aR3Unused);
       
    71 	void ExportName(char *aExportName);
       
    72 	void SetSymbolSize(PLUINT32 aSz);
       
    73 	PLUINT32 SymbolSize();
       
    74 
       
    75 private:
       
    76 	SymbolStatus iSymbolStatus;
       
    77 	char*		iSymbolName;
       
    78 	char*		iExportName;
       
    79 	SymbolType	iSymbolType;
       
    80 	PLUINT32	iOrdinalNumber;
       
    81 	char*		iComment;
       
    82 	bool		iAbsent;
       
    83 	bool		iR3Unused;
       
    84 	PLUINT32	iSize;
       
    85 	
       
    86 };
       
    87 
       
    88 
       
    89 
       
    90 
       
    91 #endif // !defined(_PL_SYMBOL_H_)