Classes | |
struct | Material |
Public Member Functions | |
virtual void | fillOptions (const char *iBegin, const char *iEnd, std::vector< std::pair< boost::shared_ptr< std::string >, std::string > > &oOptions) const |
FWGeoMaterialValidator (FWGeometryTableManager *t) | |
bool | isStringValid (std::string &exp) |
virtual | ~FWGeoMaterialValidator () |
Public Attributes | |
std::vector< Material > | m_list |
FWGeometryTableManager * | m_table |
Definition at line 58 of file FWGeometryTableView.cc.
FWGeoMaterialValidator::FWGeoMaterialValidator | ( | FWGeometryTableManager * | t | ) | [inline] |
Definition at line 71 of file FWGeometryTableView.cc.
References m_table, and matplotRender::t.
virtual FWGeoMaterialValidator::~FWGeoMaterialValidator | ( | ) | [inline, virtual] |
Definition at line 72 of file FWGeometryTableView.cc.
{}
virtual void FWGeoMaterialValidator::fillOptions | ( | const char * | iBegin, |
const char * | iEnd, | ||
std::vector< std::pair< boost::shared_ptr< std::string >, std::string > > & | oOptions | ||
) | const [inline, virtual] |
Implements FWValidatorBase.
Definition at line 75 of file FWGeometryTableView.cc.
References g, h, i, j, m_list, m_table, FWGeometryTableManager::refSelected(), and python::multivaluedict::sort().
{ oOptions.clear(); std::string part(iBegin,iEnd); unsigned int part_size = part.size(); m_list.clear(); m_list.push_back(0); FWGeometryTableManager::Entries_i it = m_table->refSelected(); int nLevel = it->m_level; it++; while (it->m_level > nLevel) { TGeoMaterial* g = it->m_node->GetVolume()->GetMaterial(); bool duplicate = false; for (std::vector<Material>::iterator j = m_list.begin(); j!=m_list.end(); ++j) { if (j->g == g) { duplicate = true; break; } } if (!duplicate) m_list.push_back(g); ++it; } std::vector<Material>::iterator startIt = m_list.begin(); startIt++; std::sort(startIt, m_list.end()); std::string h = ""; oOptions.push_back(std::make_pair(boost::shared_ptr<std::string>(new std::string(m_list.begin()->n)), h)); for (std::vector<Material>::iterator i = startIt; i!=m_list.end(); ++i) { if(part == (*i).n.substr(0,part_size) ) { // std::cout << i->n <<std::endl; oOptions.push_back(std::make_pair(boost::shared_ptr<std::string>(new std::string((*i).n)), (*i).n.substr(part_size, (*i).n.size()-part_size))); } } }
bool FWGeoMaterialValidator::isStringValid | ( | std::string & | exp | ) | [inline] |
Definition at line 118 of file FWGeometryTableView.cc.
Referenced by FWGeometryTableView::filterTextEntryCallback().
std::vector<Material> FWGeoMaterialValidator::m_list [mutable] |
Definition at line 69 of file FWGeometryTableView.cc.
Referenced by fillOptions(), FWGeometryTableView::filterListCallback(), isStringValid(), and FWGeometryTableView::updateFilter().
Definition at line 68 of file FWGeometryTableView.cc.
Referenced by fillOptions(), and FWGeoMaterialValidator().