Commit 72874c03 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - renamed WProjectFileParser to WProjectFileIO

parent 18484d14
......@@ -78,7 +78,7 @@ void WProjectFile::save()
}
// allow each parser to handle save request
for ( std::vector< WProjectFileParser* >::const_iterator iter = m_parsers.begin(); iter != m_parsers.end(); ++iter )
for ( std::vector< WProjectFileIO* >::const_iterator iter = m_parsers.begin(); iter != m_parsers.end(); ++iter )
{
( *iter )->save( output );
}
......@@ -115,7 +115,7 @@ void WProjectFile::threadMain()
match = false;
// allow each parser to handle the line.
for ( std::vector< WProjectFileParser* >::const_iterator iter = m_parsers.begin(); iter != m_parsers.end(); ++iter )
for ( std::vector< WProjectFileIO* >::const_iterator iter = m_parsers.begin(); iter != m_parsers.end(); ++iter )
{
if ( ( *iter )->parse( line, i ) )
{
......@@ -136,7 +136,7 @@ void WProjectFile::threadMain()
input.close();
// finally, let every one know that we have finished
for ( std::vector< WProjectFileParser* >::const_iterator iter = m_parsers.begin(); iter != m_parsers.end(); ++iter )
for ( std::vector< WProjectFileIO* >::const_iterator iter = m_parsers.begin(); iter != m_parsers.end(); ++iter )
{
( *iter )->done();
}
......
......@@ -31,11 +31,11 @@
#include <boost/shared_ptr.hpp>
#include <boost/filesystem.hpp>
#include "WProjectFileParser.h"
#include "WProjectFileIO.h"
/**
* Class loading project files. This class opens an file and reads it line by line. It delegates the actual parsing to each of the known
* WProjectFileParser instances which then do their job.
* WProjectFileIO instances which then do their job.
*/
class WProjectFile: public WThreadedRunner,
public boost::enable_shared_from_this< WProjectFile >
......@@ -80,7 +80,7 @@ protected:
/**
* The parser instances. They are used to parse the file.
*/
std::vector< WProjectFileParser* > m_parsers;
std::vector< WProjectFileIO* > m_parsers;
private:
};
......
......@@ -22,19 +22,19 @@
//
//---------------------------------------------------------------------------
#include "WProjectFileParser.h"
#include "WProjectFileIO.h"
WProjectFileParser::WProjectFileParser()
WProjectFileIO::WProjectFileIO()
{
// initialize
}
WProjectFileParser::~WProjectFileParser()
WProjectFileIO::~WProjectFileIO()
{
// cleanup!
}
void WProjectFileParser::done()
void WProjectFileIO::done()
{
// do nothing here. Overwrite this method if your specific parser needs to do some post processing.
}
......
......@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WPROJECTFILEPARSER_H
#define WPROJECTFILEPARSER_H
#ifndef WPROJECTFILEIO_H
#define WPROJECTFILEIO_H
#include <ostream>
#include <string>
......@@ -32,19 +32,19 @@
* A base class for all parts of OpenWalnut which can be serialized to a project file. It is used by WProjectFile to actually parse the file line
* by line. Derive from this class if you write your own parser and use it to fill your internal data structures.
*/
class WProjectFileParser
class WProjectFileIO
{
public:
/**
* Default constructor.
*/
WProjectFileParser();
WProjectFileIO();
/**
* Destructor.
*/
virtual ~WProjectFileParser();
virtual ~WProjectFileIO();
/**
* This method parses the specified line and interprets it. It gets called line by line by WProjectFile.
......@@ -74,5 +74,5 @@ protected:
private:
};
#endif // WPROJECTFILEPARSER_H
#endif // WPROJECTFILEIO_H
......@@ -52,13 +52,13 @@
WModuleProjectFileCombiner::WModuleProjectFileCombiner( boost::shared_ptr< WModuleContainer > target ):
WModuleCombiner( target ),
WProjectFileParser()
WProjectFileIO()
{
}
WModuleProjectFileCombiner::WModuleProjectFileCombiner():
WModuleCombiner( WKernel::getRunningKernel()->getRootContainer() ),
WProjectFileParser()
WProjectFileIO()
{
}
......
......@@ -33,16 +33,16 @@
#include <boost/shared_ptr.hpp>
#include "../WProjectFileParser.h"
#include "../WProjectFileIO.h"
#include "../WModuleCombiner.h"
/**
* This class is able to parse project files and create the appropriate module graph inside a specified container. It is also derived from
* WProjectFileParser to allow WProjectFile to fill this combiner.
* WProjectFileIO to allow WProjectFile to fill this combiner.
*/
class WModuleProjectFileCombiner: public WModuleCombiner,
public WProjectFileParser
public WProjectFileIO
{
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment