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 edm::TypeWithDict &iType)
 OptionNode (const edm::FunctionWithDict &)
const std::vector
< boost::shared_ptr
< OptionNode > > & 
options () const
unsigned long substitutionEnd () const

Static Public Member Functions

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

Static Private Member Functions

static bool typeHasOptions (const edm::TypeWithDict &iType)

Private Attributes

std::string m_description
std::string::size_type m_endOfName
bool m_hasSubOptions
std::vector< boost::shared_ptr
< OptionNode > > 
m_subOptions
edm::TypeWithDict m_type

Detailed Description

Definition at line 51 of file FWExpressionValidator.cc.


Constructor & Destructor Documentation

fireworks::OptionNode::OptionNode ( const edm::FunctionWithDict 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 edm::TypeWithDict 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 edm::TypeWithDict iType,
std::vector< boost::shared_ptr< OptionNode > > &  oOptions 
) [static]

Definition at line 127 of file FWExpressionValidator.cc.

References edm::FunctionWithDict::isConst(), edm::FunctionWithDict::isConstructor(), edm::FunctionWithDict::isDestructor(), edm::FunctionWithDict::isOperator(), edm::TypeWithDict::isPointer(), edm::FunctionWithDict::isPublic(), m, edm::FunctionWithDict::name(), OptionNode(), edm::TypeFunctionMembers::size(), and edm::TypeWithDict::toType().

Referenced by options().

   {
      edm::TypeWithDict type = iType;
      if(type.isPointer()) {
         type = type.toType(); // for Pointers, I get the real type this way
      }
      // first look in base scope
      edm::TypeFunctionMembers functions(type);
      oOptions.reserve(oOptions.size()+functions.size());
      for(auto const& function : functions) {
         edm::FunctionWithDict m(function); 
         if(!m.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)));
      }

      edm::TypeBases bases(type);
      for(auto const& base : bases) {
         fillOptionForType(edm::BaseWithDict(base).typeOf(),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 edm::TypeWithDict iType) [static, private]

Definition at line 154 of file FWExpressionValidator.cc.

References edm::TypeWithDict::isClass().

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

Definition at line 86 of file FWExpressionValidator.cc.

Referenced by options().