CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes

fireworks::OptionNode Class Reference

List of all members.

Public Member Functions

const std::string & description () const
bool operator< (const OptionNode &iRHS) const
 OptionNode (const std::string &iDescription, unsigned long iSubstitutionEnd, const Reflex::Type &iType)
 OptionNode (const Reflex::Member &)
const std::vector
< boost::shared_ptr
< OptionNode > > & 
options () const
unsigned long substitutionEnd () const

Static Public Member Functions

static void fillOptionForType (const Reflex::Type &, std::vector< boost::shared_ptr< OptionNode > > &)

Static Private Member Functions

static bool typeHasOptions (const 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
Reflex::Type m_type

Detailed Description

Definition at line 51 of file FWExpressionValidator.cc.


Constructor & Destructor Documentation

fireworks::OptionNode::OptionNode ( const 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 Reflex::Type &  iType 
)

Definition at line 94 of file FWExpressionValidator.cc.

                                                   :
      m_type(iType),
      m_description(iDescription),
      m_endOfName(iSubstitutionEnd),
      m_hasSubOptions(typeHasOptions(iType) )
   {
   }

Member Function Documentation

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 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().

   {
      Reflex::Type type = iType;
      if(type.IsPointer()) {
         type = type.ToType();
      }
      // first look in base scope
      oOptions.reserve(oOptions.size()+type.FunctionMemberSize());
      for(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(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]
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 Reflex::Type &  iType) [static, private]

Definition at line 151 of file FWExpressionValidator.cc.

                                                          {
      return iType.IsClass();
   }

Member Data Documentation

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().

Reflex::Type fireworks::OptionNode::m_type [private]

Definition at line 86 of file FWExpressionValidator.cc.

Referenced by options().