imgtools/romtools/rofsbuild/src/logging/logparser.cpp
changeset 700 c22eff170fac
parent 699 9ca650050cf0
parent 698 e3ee96a3961c
child 701 170c8b305768
--- a/imgtools/romtools/rofsbuild/src/logging/logparser.cpp	Mon Nov 22 10:41:57 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 1995-2009 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:
-*
-*/
-
-
-#include <new>
-#include <iostream>
-#include <fstream>
-#include <string>
-using namespace std;
-
-#include "logging/loggingexception.hpp"
-#include "logging/logparser.hpp"
-#include "symbolgenerator.h"
-
-
-LogParser* LogParser::Only = (LogParser*)0;
-
-
-LogParser* LogParser::GetInstance(void) throw (LoggingException)
-{
-	if(! LogParser::Only)
-	{
-		LogParser::Only = new (std::nothrow) LogParser();
-		if(! LogParser::Only)
-			throw LoggingException(LoggingException::RESOURCE_ALLOCATION_FAILURE);
-	}
-
-	return LogParser::Only;
-}
-
-
-void LogParser::ParseSymbol(const char* LogFilename) throw (LoggingException)
-{
-	string linebuf;
-	SymbolGenerator* symgen = SymbolGenerator::GetInstance();
-	symgen->SetSymbolFileName(string(LogFilename));
-
-	ifstream logfd(LogFilename);
-	if(logfd.is_open())
-	{
-		while(! logfd.eof())
-		{
-			getline(logfd, linebuf);
-			if(linebuf.compare(0,4,"File") == 0)
-			{
-				if(linebuf.find("size:", 4) != string::npos)
-				{
-					size_t startpos = linebuf.find('\'') ;
-					size_t endpos   = linebuf.rfind('\'');
-					if((startpos!=string::npos) && (endpos!=string::npos))
-					{
-						symgen->AddFile(linebuf.substr(startpos+1,endpos-startpos-1), false);
-					}
-				}
-			}
-			else if(linebuf.compare(0,15,"Executable File") == 0)
-			{
-				if(linebuf.find("size:", 26) != string::npos)
-				{
-					size_t startpos = linebuf.find('\'') ;
-					size_t endpos   = linebuf.rfind('\'');
-					if((startpos!=string::npos) && (endpos!=string::npos))
-					{
-						symgen->AddFile(linebuf.substr(startpos+1,endpos-startpos-1), true);
-					}
-				}
-			}
-			else if(linebuf.compare(0,26,"Compressed executable File") == 0)
-			{
-				if(linebuf.find("size:", 26) != string::npos)
-				{
-					size_t startpos = linebuf.find('\'') ;
-					size_t endpos   = linebuf.rfind('\'');
-					if((startpos!=string::npos) && (endpos!=string::npos))
-					{
-						symgen->AddFile(linebuf.substr(startpos+1,endpos-startpos-1), true);
-					}
-				}
-			}
-		}
-		symgen->SetFinished();
-		symgen->Release();
-	}
-	else
-	{
-		throw LoggingException(LoggingException::INVALID_LOG_FILENAME);
-	}
-
-	return;
-}
-
-
-void LogParser::Cleanup(void)
-{
-	return;
-}
-
-
-LogParser::LogParser(void)
-{
-	return;
-}