configBitstreamParser: add map to store file header
This commit is contained in:
parent
d210d2c67e
commit
232b189286
|
|
@ -10,7 +10,7 @@ ConfigBitstreamParser::ConfigBitstreamParser(string filename, int mode,
|
||||||
bool verbose):
|
bool verbose):
|
||||||
_filename(filename), _bit_length(0),
|
_filename(filename), _bit_length(0),
|
||||||
_file_size(0), _verbose(verbose), _fd(filename,
|
_file_size(0), _verbose(verbose), _fd(filename,
|
||||||
ifstream::in | (ios_base::openmode)mode), _bit_data()
|
ifstream::in | (ios_base::openmode)mode), _bit_data(), _hdr()
|
||||||
{
|
{
|
||||||
if (!_fd.is_open()) {
|
if (!_fd.is_open()) {
|
||||||
cerr << "Error: fail to open " << _filename << endl;
|
cerr << "Error: fail to open " << _filename << endl;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
class ConfigBitstreamParser {
|
class ConfigBitstreamParser {
|
||||||
public:
|
public:
|
||||||
|
|
@ -28,6 +29,7 @@ class ConfigBitstreamParser {
|
||||||
bool _verbose;
|
bool _verbose;
|
||||||
std::ifstream _fd;
|
std::ifstream _fd;
|
||||||
std::string _bit_data;
|
std::string _bit_data;
|
||||||
|
std::map<std::string, std::string> _hdr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue