pppc/Config.cc
2009-08-19 17:08:38 +00:00

34 lines
589 B
C++

#include "Config.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
Config::Entry::Entry(const string & name)
{
this->name = name;
pin = -1;
on_start = NONE;
on_exit = NONE;
on_lock = NONE;
on_unlock = NONE;
}
void Config::read(const char * file)
{
ifstream ifs(file);
if (ifs.is_open())
{
string line;
while (!ifs.eof())
{
getline(ifs, line);
}
}
else
{
cerr << "Warning: Could not open '" << file << "'" << endl;
}
}