File indexing completed on 2024-04-06 12:13:01
0001 #ifndef FWCore_Reflection_FunctionWithDict_h
0002 #define FWCore_Reflection_FunctionWithDict_h
0003
0004
0005
0006
0007
0008
0009
0010 #include "FWCore/Reflection/interface/IterWithDict.h"
0011
0012 #include "TMethod.h"
0013 #include "TMethodArg.h"
0014 #include "TInterpreter.h"
0015
0016 #include <cassert>
0017 #include <cstdlib>
0018 #include <cstdio>
0019 #include <string>
0020 #include <vector>
0021
0022 namespace edm {
0023
0024 class ObjectWithDict;
0025 class TypeWithDict;
0026
0027 class FunctionWithDict {
0028 private:
0029 TMethod* function_;
0030 TInterpreter::CallFuncIFacePtr_t funcptr_;
0031
0032 public:
0033 FunctionWithDict();
0034 explicit FunctionWithDict(TMethod*);
0035 explicit operator bool() const;
0036 std::string name() const;
0037 std::string typeName() const;
0038 TypeWithDict finalReturnType() const;
0039 bool isConst() const;
0040 bool isConstructor() const;
0041 bool isDestructor() const;
0042 bool isOperator() const;
0043 bool isPublic() const;
0044 bool isStatic() const;
0045 TypeWithDict declaringType() const;
0046 size_t functionParameterSize(bool required = false) const;
0047 size_t size() const;
0048 void invoke(ObjectWithDict const& obj,
0049 ObjectWithDict* ret = nullptr,
0050 std::vector<void*> const& values = std::vector<void*>()) const;
0051 void invoke(ObjectWithDict* ret = nullptr, std::vector<void*> const& values = std::vector<void*>()) const;
0052 IterWithDict<TMethodArg> begin() const;
0053 IterWithDict<TMethodArg> end() const;
0054 };
0055
0056 }
0057
0058 #endif