CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FunctionWithDict.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_FunctionWithDict_h
2 #define FWCore_Utilities_FunctionWithDict_h
3 
4 /*----------------------------------------------------------------------
5 
6 FunctionWithDict: A holder for a class member function
7 
8 ----------------------------------------------------------------------*/
9 
11 
12 #include "TMethod.h"
13 #include "TMethodArg.h"
14 
15 #include <cassert>
16 #include <cstdlib>
17 #include <cstdio>
18 #include <string>
19 #include <vector>
20 
21 namespace edm {
22 
23 class ObjectWithDict;
24 class TypeWithDict;
25 
27 private:
28  TMethod* function_;
29 public:
31  explicit FunctionWithDict(TMethod*);
32  explicit operator bool() const;
33  std::string name() const;
34  std::string typeName() const;
36  bool isConst() const;
37  bool isConstructor() const;
38  bool isDestructor() const;
39  bool isOperator() const;
40  bool isPublic() const;
41  bool isStatic() const;
43  size_t functionParameterSize(bool required = false) const;
44  size_t size() const;
45  void invoke(ObjectWithDict const& obj, ObjectWithDict* ret = nullptr, std::vector<void*> const& values = std::vector<void*>()) const;
46  void invoke(ObjectWithDict* ret = nullptr, std::vector<void*> const& values = std::vector<void*>()) const;
49 };
50 
51 } // namespace edm
52 
53 #endif // FWCore_Utilities_FunctionWithDict_h
bool isConstructor() const
TypeWithDict declaringType() const
IterWithDict< TMethodArg > end() const
std::string name() const
IterWithDict< TMethodArg > begin() const
std::string typeName() const
void invoke(ObjectWithDict const &obj, ObjectWithDict *ret=nullptr, std::vector< void * > const &values=std::vector< void * >()) const
Call a member function.
TypeWithDict finalReturnType() const
size_t functionParameterSize(bool required=false) const
bool isDestructor() const