routeur done

Dependencies:   mbed

Fork of APP4 by Évan Laverdure

readfile.cpp

Committer:
joGenie
Date:
2014-02-24
Revision:
3:350f07072089
Parent:
2:7515831bb5f5
Child:
4:aac38b016952

File content as of revision 3:350f07072089:

#include "readfile.hpp"

ReadFile::ReadFile()
{}

bool ReadFile::setConfigCoord(Coordinateur *coord, const string filename)
{
    string line;
    ifstream myfile(filename.c_str());
    if (myfile.is_open())
    {
        while (getline(myfile,line))
        {
            if (line[0] != "#")
            {
                if (line.find("PANID") != string::npos)
                    ://coord->setPanID(line.substr(
            }
        }
        
        myfile.close(); 
        
        return true;
    }  
    
    return false;  
}

bool ReadFile::setConfigRouteur(Routeur *rout, const string filename)
{
    string line;
    ifstream myfile(filename.c_str());
    if (myfile.is_open())
    {
        while (getline(myfile,line))
        {
        }
        
        myfile.close(); 
        
        return true;
    } 
    
    return false;
}