root/trunk/libffado/src/bebob/bebob_configparser.cpp

Revision 529, 0.7 kB (checked in by wagi, 15 years ago)

- saveCache and loadFromCache interface added to IAvDevice
- current implenetation of saveCache and loadFromCache moved to bebob
- config parser added for loading vendor and model ids from a file instead hardcoded (not finished yet)

Line 
1 #include "bebob_configparser.h"
2
3 #include <fstream>
4 #include <istream>
5 #include <iostream>
6
7 BeBoB::ConfigParser::ConfigParser( const char* filename )
8 {
9     using namespace std;
10
11     cout << "XXX BeBoB::ConfigParser::ConfigParser" << endl;
12
13     ifstream in ( filename );
14
15     if ( !in ) {
16         perror( filename );
17         return;
18     }
19
20     string line;
21     while ( !getline( in,  line ).eof() ) {
22
23
24     }
25 }
26
27 BeBoB::ConfigParser::~ConfigParser()
28 {
29     for ( VendorModelEntryVector::iterator it = m_vendorModelEntries.begin();
30           it != m_vendorModelEntries.end();
31           ++it )
32     {
33         delete *it;
34     }
35 }
36
37 const BeBoB::VendorModelEntryVector&
38 BeBoB::ConfigParser::getVendorModelEntries() const
39 {
40     return m_vendorModelEntries;
41 }
42
Note: See TracBrowser for help on using the browser.