Public Member Functions | |
const std::string & | description () const |
bool | operator< (const OptionNode &iRHS) const |
OptionNode (const std::string &iDescription, unsigned long iSubstitutionEnd, const ROOT::Reflex::Type &iType) | |
OptionNode (const ROOT::Reflex::Member &) | |
const std::vector < boost::shared_ptr < OptionNode > > & | options () const |
unsigned long | substitutionEnd () const |
Static Public Member Functions | |
static void | fillOptionForType (const ROOT::Reflex::Type &, std::vector< boost::shared_ptr< OptionNode > > &) |
Static Private Member Functions | |
static bool | typeHasOptions (const ROOT::Reflex::Type &iType) |
Private Attributes | |
std::string | m_description |
std::string::size_type | m_endOfName |
bool | m_hasSubOptions |
std::vector< boost::shared_ptr < OptionNode > > | m_subOptions |
ROOT::Reflex::Type | m_type |
Definition at line 51 of file FWExpressionValidator.cc.
fireworks::OptionNode::OptionNode | ( | const ROOT::Reflex::Member & | iMember | ) |
Definition at line 118 of file FWExpressionValidator.cc.
Referenced by fillOptionForType().
: m_type(reco::returnType(iMember)), m_description(descriptionFromMember(iMember)), m_endOfName(iMember.Name().size()), m_hasSubOptions(typeHasOptions(m_type)) { }
fireworks::OptionNode::OptionNode | ( | const std::string & | iDescription, |
unsigned long | iSubstitutionEnd, | ||
const ROOT::Reflex::Type & | iType | ||
) |
Definition at line 94 of file FWExpressionValidator.cc.
: m_type(iType), m_description(iDescription), m_endOfName(iSubstitutionEnd), m_hasSubOptions(typeHasOptions(iType) ) { }
const std::string& fireworks::OptionNode::description | ( | ) | const [inline] |
Definition at line 58 of file FWExpressionValidator.cc.
References m_description.
{ return m_description; }
void fireworks::OptionNode::fillOptionForType | ( | const ROOT::Reflex::Type & | iType, |
std::vector< boost::shared_ptr< OptionNode > > & | oOptions | ||
) | [static] |
Definition at line 127 of file FWExpressionValidator.cc.
References b, m, and OptionNode().
Referenced by options().
{ ROOT::Reflex::Type type = iType; if(type.IsPointer()) { type = type.ToType(); } // first look in base scope oOptions.reserve(oOptions.size()+type.FunctionMemberSize()); for(ROOT::Reflex::Member_Iterator m = type.FunctionMember_Begin(); m != type.FunctionMember_End(); ++m ) { if(!m->TypeOf().IsConst() || m->IsConstructor() || m->IsDestructor() || m->IsOperator() || !m->IsPublic() || m->Name().substr(0,2)=="__") {continue;} oOptions.push_back(boost::shared_ptr<OptionNode>(new OptionNode(*m))); } for(ROOT::Reflex::Base_Iterator b = type.Base_Begin(); b != type.Base_End(); ++b) { fillOptionForType(b->ToType(),oOptions); } }
bool fireworks::OptionNode::operator< | ( | const OptionNode & | iRHS | ) | const [inline] |
Definition at line 79 of file FWExpressionValidator.cc.
References m_description, and m_endOfName.
{ return m_description.substr(0,m_endOfName) < iRHS.m_description.substr(0,iRHS.m_endOfName); }
const std::vector<boost::shared_ptr<OptionNode> >& fireworks::OptionNode::options | ( | ) | const [inline] |
Definition at line 64 of file FWExpressionValidator.cc.
References fillOptionForType(), m_hasSubOptions, m_subOptions, m_type, and python::multivaluedict::sort().
{ if(m_hasSubOptions && m_subOptions.empty()) { fillOptionForType(m_type, m_subOptions); std::sort(m_subOptions.begin(),m_subOptions.end(), fireworks::OptionNodePtrCompare<boost::shared_ptr<OptionNode> >()); std::vector<boost::shared_ptr<OptionNode> >::iterator it= std::unique(m_subOptions.begin(),m_subOptions.end(), fireworks::OptionNodePtrEqual<boost::shared_ptr<OptionNode> >()); m_subOptions.erase(it, m_subOptions.end()); m_hasSubOptions = !m_subOptions.empty(); } return m_subOptions; }
unsigned long fireworks::OptionNode::substitutionEnd | ( | ) | const [inline] |
Definition at line 61 of file FWExpressionValidator.cc.
References m_endOfName.
{ return m_endOfName; }
bool fireworks::OptionNode::typeHasOptions | ( | const ROOT::Reflex::Type & | iType | ) | [static, private] |
Definition at line 151 of file FWExpressionValidator.cc.
{
return iType.IsClass();
}
std::string fireworks::OptionNode::m_description [mutable, private] |
Definition at line 87 of file FWExpressionValidator.cc.
Referenced by description(), and operator<().
std::string::size_type fireworks::OptionNode::m_endOfName [mutable, private] |
Definition at line 88 of file FWExpressionValidator.cc.
Referenced by operator<(), and substitutionEnd().
bool fireworks::OptionNode::m_hasSubOptions [mutable, private] |
Definition at line 90 of file FWExpressionValidator.cc.
Referenced by options().
std::vector<boost::shared_ptr<OptionNode> > fireworks::OptionNode::m_subOptions [mutable, private] |
Definition at line 89 of file FWExpressionValidator.cc.
Referenced by options().
ROOT::Reflex::Type fireworks::OptionNode::m_type [private] |
Definition at line 86 of file FWExpressionValidator.cc.
Referenced by options().