17 INLINE InterrogateFunctionWrapper::
24 _return_value_destructor = 0;
30 INLINE InterrogateFunctionWrapper::
38 INLINE
void InterrogateFunctionWrapper::
40 InterrogateComponent::operator = (copy);
42 _function = copy._function;
43 _return_type = copy._return_type;
44 _return_value_destructor = copy._return_value_destructor;
45 _unique_name = copy._unique_name;
46 _comment = copy._comment;
47 _parameters = copy._parameters;
61 INLINE
bool InterrogateFunctionWrapper::
62 is_callable_by_name()
const {
63 return (_flags & F_callable_by_name) != 0;
69 INLINE
bool InterrogateFunctionWrapper::
70 has_return_value()
const {
71 return (_flags & F_has_return) != 0;
77 INLINE TypeIndex InterrogateFunctionWrapper::
78 get_return_type()
const {
85 INLINE
bool InterrogateFunctionWrapper::
86 caller_manages_return_value()
const {
87 return (_flags & F_caller_manages) != 0;
93 INLINE FunctionIndex InterrogateFunctionWrapper::
94 get_return_value_destructor()
const {
95 return _return_value_destructor;
101 INLINE
int InterrogateFunctionWrapper::
102 number_of_parameters()
const {
103 return _parameters.size();
109 INLINE TypeIndex InterrogateFunctionWrapper::
110 parameter_get_type(
int n)
const {
111 if (n >= 0 && n < (
int)_parameters.size()) {
112 return _parameters[n]._type;
120 INLINE
bool InterrogateFunctionWrapper::
121 parameter_has_name(
int n)
const {
122 if (n >= 0 && n < (
int)_parameters.size()) {
123 return (_parameters[n]._parameter_flags & PF_has_name) != 0;
131 INLINE
const std::string &InterrogateFunctionWrapper::
132 parameter_get_name(
int n)
const {
133 static std::string bogus_string;
134 if (n >= 0 && n < (
int)_parameters.size()) {
135 return _parameters[n]._name;
143 INLINE
bool InterrogateFunctionWrapper::
144 parameter_is_this(
int n)
const {
145 if (n >= 0 && n < (
int)_parameters.size()) {
146 return (_parameters[n]._parameter_flags & PF_is_this) != 0;
154 INLINE
const std::string &InterrogateFunctionWrapper::
155 get_unique_name()
const {
162 INLINE
bool InterrogateFunctionWrapper::
163 has_comment()
const {
164 return !_comment.empty();
170 INLINE
const std::string &InterrogateFunctionWrapper::
171 get_comment()
const {
175 INLINE std::ostream &
181 INLINE std::istream &
187 INLINE std::ostream &
188 operator << (std::ostream &out,
const InterrogateFunctionWrapper::Parameter &p) {
193 INLINE std::istream &
194 operator >> (std::istream &in, InterrogateFunctionWrapper::Parameter &p) {
FunctionIndex get_function() const
Returns the FunctionIndex of the function that this wrapper corresponds to.
An internal representation of a callable function.
void output(std::ostream &out) const
Formats the InterrogateFunctionWrapper data for output to a data file.
The base class for things that are part of the interrogate database.
void input(std::istream &in)
Reads the data file as previously formatted by output().