--- a/imgtools/romtools/rofsbuild/symbolgenerator.h Mon Oct 25 11:53:21 2010 +0800
+++ b/imgtools/romtools/rofsbuild/symbolgenerator.h Tue Oct 26 11:12:31 2010 +0800
@@ -1,3 +1,20 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
#ifndef __SYMBOLGENERATOR_H__
#define __SYMBOLGENERATOR_H__
#include <queue>
@@ -6,6 +23,7 @@
using namespace std;
#include <boost/thread/thread.hpp>
#include <boost/thread/condition.hpp>
+#include "symbolprocessunit.h"
struct TPlacedEntry{
@@ -22,22 +40,33 @@
static void Release();
void SetSymbolFileName( const string& fileName );
void AddFile( const string& fileName, bool isExecutable );
+ bool HasFinished() { return iFinished; }
+ void SetFinished();
+ bool IsEmpty() { return iQueueFiles.empty(); }
+ void LockOutput() { iOutputMutex.lock(); }
+ void UnlockOutput() { iOutputMutex.unlock(); }
+ TPlacedEntry GetNextPlacedEntry();
+ ofstream& GetOutputFileStream() { return iSymFile; };
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<TPlacedEntry> iQueueFiles;
boost::mutex iMutex;
+ boost::mutex iOutputMutex;
static boost::mutex iMutexSingleton;
static SymbolGenerator* iInst;
boost::condition_variable iCond;
+ bool iFinished;
ofstream iSymFile;
};
+class SymbolWorker{
+public:
+ SymbolWorker();
+ ~SymbolWorker();
+ void operator()();
+private:
+};
#endif