CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FunctionWithDict.cc
Go to the documentation of this file.
1 
2 #include "Reflex/Object.h"
3 #include "Reflex/Type.h"
4 
8 
9 namespace edm {
10 
11  FunctionWithDict::FunctionWithDict(Reflex::Member const& function) : function_(function) {}
12 
15  return function_.Name();
16  }
17 
19  FunctionWithDict::typeName() const {return function_.TypeOf().Name();}
20 
23  return (TypeWithDict(function_.TypeOf()));
24  }
25 
28  return (TypeWithDict(function_.TypeOf().ReturnType()));
29  }
30 
33  return (TypeWithDict(function_.TypeOf().ReturnType().FinalType()));
34  }
35 
38  return (TypeWithDict(function_.DeclaringType()));
39  }
40 
41  bool
43  return function_.IsConst();
44  }
45 
46  bool
48  return function_.IsConstructor();
49  }
50 
51  bool
53  return function_.IsDestructor();
54  }
55 
56  bool
58  return function_.IsOperator();
59  }
60 
61  bool
63  return function_.IsPublic();
64  }
65 
67  return function_.IsStatic();
68  }
69 
70  size_t
72  return function_.FunctionParameterSize(required);
73  }
74 
75  void
76  FunctionWithDict::invoke(ObjectWithDict const& obj, ObjectWithDict* ret, std::vector<void*> const& values) const {
77  Reflex::Object reflexReturn(ret->typeOf().type_, ret->address());
78  function_.Invoke(Reflex::Object(obj.typeOf().type_, obj.address()), &reflexReturn, values);
79  }
80 
81  Reflex::Type_Iterator
83  return function_.TypeOf().FunctionParameter_Begin();
84  }
85 
86  Reflex::Type_Iterator
88  return function_.TypeOf().FunctionParameter_End();
89  }
90 
92  return bool(function_);
93  }
94 
95 }
Definition: vlib.h:256
void invoke(ObjectWithDict const &obj, ObjectWithDict *ret, std::vector< void * > const &values=std::vector< void * >()) const
Reflex::Member function_
void * address() const
bool isConstructor() const
TypeWithDict declaringType() const
std::string name() const
Reflex::Type_Iterator begin() const
std::string typeName() const
TypeWithDict returnType() const
TypeWithDict const & typeOf() const
TypeWithDict typeOf() const
TypeWithDict finalReturnType() const
Reflex::Type type_
Definition: TypeWithDict.h:171
Reflex::Type_Iterator end() const
size_t functionParameterSize(bool required=false) const
bool isDestructor() const