git-svn-id: http://apu.dw.local/svnusers/JoshHoltrop/pppc/trunk@51 8131a0b2-b21c-1c47-bd6a-f003126495bd
34 lines
589 B
C++
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;
|
|
}
|
|
}
|