diff -r fa7a3cc6effd -r 6d08f4a05d93 imgtools/romtools/rofsbuild/symbolgenerator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imgtools/romtools/rofsbuild/symbolgenerator.h Fri Jun 25 18:11:34 2010 +0800 @@ -0,0 +1,43 @@ +#ifndef __SYMBOLGENERATOR_H__ +#define __SYMBOLGENERATOR_H__ +#include +#include +#include +using namespace std; +#include +#include + + +struct TPlacedEntry{ + string iFileName; + bool iExecutable; + TPlacedEntry(const string& aName, bool aExecutable) { + iFileName = aName; + iExecutable = aExecutable; + } +}; +class SymbolGenerator : public boost::thread { + public: + static SymbolGenerator* GetInstance(); + static void Release(); + void SetSymbolFileName( const string& fileName ); + void AddFile( const string& fileName, bool isExecutable ); + private: + SymbolGenerator(); + ~SymbolGenerator(); + void ProcessExecutable( const string& fileName ); + void ProcessDatafile( const string& fileName ); + void ProcessArmv5File( const string& fileName, ifstream& aMap ); + void ProcessGcceOrArm4File( const string& fileName, ifstream& aMap ); + int GetSizeFromBinFile( const string& fileName ); + static void thrd_func(); + + queue iQueueFiles; + boost::mutex iMutex; + static boost::mutex iMutexSingleton; + static SymbolGenerator* iInst; + boost::condition_variable iCond; + + ofstream iSymFile; +}; +#endif