#include <cfg_library.h>


Definition at line 45 of file cfg_library.h.
Public Member Functions | |
| cfg_LibraryFile () | |
| cfg_LibraryFile (const pf_File &a_parsedFile) | |
| virtual | ~cfg_LibraryFile () |
| void | Refresh (const pf_File &a_parsedFile) |
| virtual void | ConvertGroup (const string &a_productID, const pf_Group &a_group) |
| const cfg_Library * | FindLibrary (const string &a_vendor, const string &a_product) const |
Private Attributes | |
| log_CLASSID_m | |
| vector< cfg_Library > | m_libraries |
| cfg_LibraryFile::cfg_LibraryFile | ( | ) |
| cfg_LibraryFile::cfg_LibraryFile | ( | const pf_File & | a_parsedFile | ) |
Definition at line 63 of file cfg_library.cpp.
References log_FUNC_m, and Refresh().
00063 { 00064 log_FUNC_m(cfg_LibraryFile); 00065 Refresh(a_parsedFile); 00066 }

| cfg_LibraryFile::~cfg_LibraryFile | ( | ) | [virtual] |
Definition at line 70 of file cfg_library.cpp.
References log_FUNC_m.
00070 { 00071 log_FUNC_m(~cfg_LibraryFile); 00072 }
| void cfg_LibraryFile::Refresh | ( | const pf_File & | a_parsedFile | ) |
Definition at line 76 of file cfg_library.cpp.
References cfg_Base::Convert(), cfg_Base::ConvertFileHeader(), dbg_NORM, log_DBG_m, log_FUNC_m, pf_File::m_common, and m_libraries.
Referenced by cfg_LibraryFile().
00076 { 00077 log_FUNC_m(Refresh); 00078 00079 ConvertFileHeader(a_parsedFile); 00080 val_RuleVec rules; 00081 00082 Convert(a_parsedFile.m_common, rules); 00083 00084 log_DBG_m(dbg_NORM, "Parsed " << m_libraries.size() << " entries."); 00085 }


| void cfg_LibraryFile::ConvertGroup | ( | const string & | a_productID, | |
| const pf_Group & | a_group | |||
| ) | [virtual] |
Reimplemented from cfg_Base.
Definition at line 89 of file cfg_library.cpp.
References log_FUNC_m, and m_libraries.
00090 { 00091 log_FUNC_m(ConvertGroup); 00092 00093 cfg_Library lib(a_productID, a_group); 00094 m_libraries.push_back(lib); 00095 }
| const cfg_Library * cfg_LibraryFile::FindLibrary | ( | const string & | a_vendor, | |
| const string & | a_product | |||
| ) | const |
Definition at line 99 of file cfg_library.cpp.
References dbg_LOW, dbg_NORM, log_DBG_m, log_FUNC_m, m_libraries, and NULL.
Referenced by la_SCSILibrary::Open().
00100 { 00101 log_FUNC_m(FindLibrary); 00102 00103 vector<cfg_Library>::const_iterator lib_i; 00104 for (lib_i = m_libraries.begin(); lib_i != m_libraries.end(); ++lib_i) { 00105 00106 const string& tblVendor((*lib_i).m_vendorID); 00107 const string& tblProduct((*lib_i).m_productID); 00108 00109 // 00110 // Compare only strings up to the length of the string in the 00111 // config file. 00112 // 00113 string subVendor(a_vendor.substr(0, tblVendor.size()) ); 00114 string subProduct(a_product.substr(0, tblProduct.size()) ); 00115 00116 if (tblVendor == subVendor && tblProduct == subProduct) { 00117 00118 log_DBG_m(dbg_NORM, 00119 "Found properties for \'" << a_vendor << "\', \'" << a_product << "\'" << 00120 "(cfg \'" << tblVendor << "\', \'" << tblProduct << "\')" ); 00121 00122 return &(*lib_i); 00123 }; 00124 } 00125 00126 log_DBG_m(dbg_LOW, 00127 "No properties for \'" << a_vendor << "\', \'" << a_product << "\'"); 00128 00129 return NULL; 00130 00131 }

cfg_LibraryFile::log_CLASSID_m [private] |
vector<cfg_Library> cfg_LibraryFile::m_libraries [private] |
Definition at line 60 of file cfg_library.h.
Referenced by ConvertGroup(), FindLibrary(), and Refresh().
1.5.6