14#ifndef INTERROGATEFUNCTIONWRAPPER_H
15#define INTERROGATEFUNCTIONWRAPPER_H
28class EXPCL_INTERROGATEDB InterrogateFunctionWrapper :
public InterrogateComponent {
31 INLINE InterrogateFunctionWrapper(
const InterrogateFunctionWrapper ©);
32 INLINE
void operator = (
const InterrogateFunctionWrapper ©);
36 INLINE
bool is_callable_by_name()
const;
41 INLINE
bool has_return_value()
const;
42 INLINE TypeIndex get_return_type()
const;
43 INLINE
bool caller_manages_return_value()
const;
44 INLINE FunctionIndex get_return_value_destructor()
const;
46 INLINE
int number_of_parameters()
const;
47 INLINE TypeIndex parameter_get_type(
int n)
const;
48 INLINE
bool parameter_has_name(
int n)
const;
49 INLINE
const std::string ¶meter_get_name(
int n)
const;
50 INLINE
bool parameter_is_this(
int n)
const;
51 INLINE
bool parameter_is_optional(
int n)
const;
53 INLINE
const std::string &get_unique_name()
const;
55 INLINE
bool has_comment()
const;
56 INLINE
const std::string &get_comment()
const;
58 void output(std::ostream &out)
const;
59 void input(std::istream &in);
65 F_caller_manages = 0x0001,
66 F_has_return = 0x0002,
67 F_callable_by_name = 0x0004,
68 F_copy_constructor = 0x0008,
69 F_coerce_constructor = 0x0010,
76 PF_is_optional = 0x0004,
80 FunctionIndex _function;
81 TypeIndex _return_type;
82 FunctionIndex _return_value_destructor;
83 std::string _unique_name;
92 void output(std::ostream &out)
const;
93 void input(std::istream &in);
101 typedef std::vector<Parameter> Parameters;
102 Parameters _parameters;
104 friend class InterrogateBuilder;
105 friend class FunctionRemap;
111INLINE std::ostream &operator << (std::ostream &out,
const InterrogateFunctionWrapper::Parameter &p);
112INLINE std::istream &operator >> (std::istream &in, InterrogateFunctionWrapper::Parameter &p);
This class manages a mapping of integers to integers.
void input(std::istream &in)
Reads the data file as previously formatted by output().
void output(std::ostream &out) const
Formats the component for output to a data file.
An internal representation of a callable function.
bool is_coerce_constructor() const
FunctionIndex get_function() const
Returns the FunctionIndex of the function that this wrapper corresponds to.
void output(std::ostream &out) const
Formats the InterrogateFunctionWrapper data for output to a data file.
void remap_indices(const IndexRemapper &remap)
Remaps all internal index numbers according to the indicated map.
void input(std::istream &in)
Reads the data file as previously formatted by output().
bool is_copy_constructor() const
bool is_extension() const
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.