29 typedef std::vector<boost::shared_ptr<fireworks::OptionNode> >
Options;
46 return iLHS->description() == iRHS->description();
55 unsigned long iSubstitutionEnd,
64 const std::vector<boost::shared_ptr<OptionNode> >&
options()
const {
69 std::vector<boost::shared_ptr<OptionNode> >::iterator it=
84 std::vector<boost::shared_ptr<OptionNode> >& );
95 unsigned long iSubstitutionEnd,
98 m_description(iDescription),
99 m_endOfName(iSubstitutionEnd),
100 m_hasSubOptions(typeHasOptions(iType) )
109 if(index == std::string::npos) {
110 return iMember.
name()+
":"+typeString;
112 return iMember.
name()+typeString.substr(index,std::string::npos)+
":"+
113 typeString.substr(0,index);
120 m_description(descriptionFromMember(iMember)),
122 m_hasSubOptions(typeHasOptions(m_type))
128 std::vector<boost::shared_ptr<OptionNode> >& oOptions)
136 oOptions.reserve(oOptions.size()+functions.
size());
137 for(
auto const&
function : functions) {
144 m.
name().substr(0,2)==
"__") {
continue;}
145 oOptions.push_back(boost::shared_ptr<OptionNode>(
new OptionNode(m)));
149 for(
auto const&
base : bases) {
167 #define FUN1(_fun_) \
168 m_builtins.push_back(boost::shared_ptr<OptionNode>( new OptionNode( # _fun_ "(float):float", strlen( # _fun_ )+1,s_float)))
170 #define FUN2(_fun_) \
171 m_builtins.push_back(boost::shared_ptr<OptionNode>( new OptionNode( # _fun_ "(float,float):float", strlen( # _fun_ )+1,s_float)))
232 OptionNode::fillOptionForType(iType,
m_options);
235 std::vector<boost::shared_ptr<OptionNode> >::iterator it=
245 void dummyDelete(
void*) {
248 void findTypeDelimiters(
const char*& ioBegin,
250 std::vector<const char*>& oDelimeters)
253 if(ioBegin==iEnd) {
return; }
254 const char* it = iEnd-1;
255 const char* itEnd = ioBegin-1;
256 for(; it != itEnd; --it) {
257 if(isalnum(*it)) {
continue;}
258 bool shouldStop=
false;
262 oDelimeters.push_back(it);
267 if(shouldStop) {
break;}
270 std::reverse(oDelimeters.begin(),oDelimeters.end());
276 std::vector<std::pair<boost::shared_ptr<std::string>,
std::string> >& oOptions)
const
280 std::vector<const char*> delimeters;
281 findTypeDelimiters(iBegin, iEnd, delimeters);
284 const char*
begin = iBegin;
285 for(std::vector<const char*>::iterator it = delimeters.begin(), itEnd = delimeters.end();
291 boost::shared_ptr<OptionNode>
comp(&temp, dummyDelete);
292 Options::const_iterator itFind =std::lower_bound(nodes->begin(),
297 if(itFind == nodes->end() || *comp < *(*itFind) ) {
301 nodes = &((*itFind)->options());
307 unsigned int part_size = part.size();
308 for(Options::const_iterator it = nodes->begin(), itEnd = nodes->end();
311 if(part == (*it)->description().substr(0,part_size) ) {
312 oOptions.push_back(std::make_pair(boost::shared_ptr<std::string>(const_cast<std::string*>(&((*it)->description())), dummyDelete),
313 (*it)->description().substr(part_size,(*it)->substitutionEnd()-part_size)));
OptionNode(const edm::FunctionWithDict &)
void setType(const edm::TypeWithDict &)
std::string::size_type m_endOfName
bool isConstructor() const
Sin< T >::type sin(const T &t)
bool operator<(const OptionNode &iRHS) const
edm::TypeWithDict returnType(const edm::FunctionWithDict &mem)
std::vector< boost::shared_ptr< fireworks::OptionNode > > m_options
TypeWithDict toType() const
virtual void fillOptions(const char *iBegin, const char *iEnd, std::vector< std::pair< boost::shared_ptr< std::string >, std::string > > &oOptions) const
std::string typeName() const
const T & max(const T &a, const T &b)
const std::string & description() const
Cos< T >::type cos(const T &t)
unsigned long substitutionEnd() const
Tan< T >::type tan(const T &t)
std::string m_description
const std::vector< boost::shared_ptr< OptionNode > > & options() const
std::vector< boost::shared_ptr< OptionNode > > m_subOptions
static bool typeHasOptions(const edm::TypeWithDict &iType)
bool operator()(const T &iLHS, const T &iRHS) const
static void fillOptionForType(const edm::TypeWithDict &, std::vector< boost::shared_ptr< OptionNode > > &)
virtual ~FWExpressionValidator()
std::vector< boost::shared_ptr< fireworks::OptionNode > > Options
std::vector< boost::shared_ptr< fireworks::OptionNode > > m_builtins
bool isDestructor() const
bool operator()(const T &iLHS, const T &iRHS) const
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)