34 lines
608 B
C++
34 lines
608 B
C++
#ifndef _IMPORT_BASE_HPP_
|
|
#define _IMPORT_BASE_HPP_
|
|
|
|
#include <string>
|
|
#include <fstream>
|
|
|
|
#include "system/parts.hpp"
|
|
#include "system/signals.hpp"
|
|
|
|
class ImportBase
|
|
{
|
|
protected:
|
|
Parts *prts;
|
|
Signals *sigs;
|
|
std::fstream file_lines;
|
|
public:
|
|
ImportBase(std::string file_name) : file_lines(std::fstream(file_name))
|
|
{
|
|
prts = new Parts();
|
|
sigs = new Signals();
|
|
};
|
|
virtual void parse() = 0;
|
|
Parts * parts()
|
|
{
|
|
return prts;
|
|
}
|
|
Signals * signals()
|
|
{
|
|
return sigs;
|
|
}
|
|
virtual ~ImportBase() = default;
|
|
};
|
|
|
|
#endif // _IMPORT_BASE_HPP_
|