30 #include <boost/algorithm/string/split.hpp>
31 #include <boost/algorithm/string/replace.hpp>
33 #include <boost/filesystem.hpp>
183 std::ifstream i_file(i_name.c_str());
184 std::stringstream buffer;
185 buffer << i_file.rdbuf();
191 while(std::getline(buffer, line))
204 else if(line.empty())
211 std::vector<std::string> descriptors;
212 std::string separator =
" ";
213 std::string::size_type last_pos = line.find_first_not_of(separator);
215 std::string::size_type pos = line.find_first_of(separator, last_pos);
216 while(std::string::npos != pos || std::string::npos != last_pos)
218 descriptors.push_back(line.substr(last_pos, pos - last_pos));
219 last_pos = line.find_first_not_of(separator, pos);
220 pos = line.find_first_of(separator, last_pos);
224 unsigned int flag = 0;
225 if(descriptors.size() == 4)
227 std::stringstream val;
228 val << std::dec << descriptors[3];
233 if(descriptors[0] ==
"D")
234 { std::stringstream val, val2;
235 unsigned short group;
236 unsigned short element;
237 val << std::dec << descriptors[1] ;
238 val >> std::hex >> group;
239 val2 << std::dec << descriptors[2];
240 val2 >> std::hex >> element;
244 else if(descriptors[0].find(
"#") != -1)
249 { boost::algorithm::replace_all(descriptors[2],
"_",
" ");
289 LevelDescriptorListType::const_iterator l;
294 LevelDescriptor::AttributeDescriptorListType::const_iterator a;
295 for (a = l->GetAttributeDescriptorList().begin();
296 a!= l->GetAttributeDescriptorList().end();
310 std::string name =
"";
314 LevelDescriptor::AttributeDescriptorListType::const_iterator a = l->GetAttributeDescriptorList().begin();
315 for(;a!= l->GetAttributeDescriptorList().end(); ++a)
317 if (a->GetKey() == i_attr)