- /* The TYPE_CODE_XMETHOD value corresponding to this worker.
- Always use value_of_xmethod to access it. */
- struct value *value;
+ /* Return the type of the result of the xmethod encapsulated in this worker.
+ OBJECT and ARGS are the same as for invoke. */
+
+ type *get_result_type (value *object, gdb::array_view<value *> args);
+
+private:
+
+ /* Return the types of the arguments the method takes. The types
+ are returned in TYPE_ARGS, one per argument. */
+
+ virtual enum ext_lang_rc do_get_arg_types
+ (std::vector<type *> *type_args) = 0;
+
+ /* Fetch the type of the result of the method implemented by this
+ worker. OBJECT and ARGS are the same as for the invoked method.
+ The result type is stored in *RESULT_TYPE. */
+
+ virtual enum ext_lang_rc do_get_result_type
+ (struct value *obj, gdb::array_view<value *> args,
+ struct type **result_type_ptr) = 0;
+
+ /* The language the xmethod worker is implemented in. */
+
+ const extension_language_defn *m_extlang;