17INLINE InterrogateFunctionWrapper::
24 _return_value_destructor = 0;
30INLINE InterrogateFunctionWrapper::
38INLINE
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;
61INLINE
bool InterrogateFunctionWrapper::
62is_callable_by_name()
const {
63 return (_flags & F_callable_by_name) != 0;
71 return (_flags & F_copy_constructor) != 0;
79 return (_flags & F_coerce_constructor) != 0;
87 return (_flags & F_extension) != 0;
93INLINE
bool InterrogateFunctionWrapper::
94has_return_value()
const {
95 return (_flags & F_has_return) != 0;
101INLINE TypeIndex InterrogateFunctionWrapper::
102get_return_type()
const {
109INLINE
bool InterrogateFunctionWrapper::
110caller_manages_return_value()
const {
111 return (_flags & F_caller_manages) != 0;
117INLINE FunctionIndex InterrogateFunctionWrapper::
118get_return_value_destructor()
const {
119 return _return_value_destructor;
125INLINE
int InterrogateFunctionWrapper::
126number_of_parameters()
const {
127 return _parameters.size();
133INLINE TypeIndex InterrogateFunctionWrapper::
134parameter_get_type(
int n)
const {
135 if (n >= 0 && n < (
int)_parameters.size()) {
136 return _parameters[n]._type;
144INLINE
bool InterrogateFunctionWrapper::
145parameter_has_name(
int n)
const {
146 if (n >= 0 && n < (
int)_parameters.size()) {
147 return (_parameters[n]._parameter_flags & PF_has_name) != 0;
155INLINE
const std::string &InterrogateFunctionWrapper::
156parameter_get_name(
int n)
const {
157 static std::string bogus_string;
158 if (n >= 0 && n < (
int)_parameters.size()) {
159 return _parameters[n]._name;
167INLINE
bool InterrogateFunctionWrapper::
168parameter_is_this(
int n)
const {
169 if (n >= 0 && n < (
int)_parameters.size()) {
170 return (_parameters[n]._parameter_flags & PF_is_this) != 0;
178INLINE
bool InterrogateFunctionWrapper::
179parameter_is_optional(
int n)
const {
180 if (n >= 0 && n < (
int)_parameters.size()) {
181 return (_parameters[n]._parameter_flags & PF_is_optional) != 0;
189INLINE
const std::string &InterrogateFunctionWrapper::
190get_unique_name()
const {
197INLINE
bool InterrogateFunctionWrapper::
199 return !_comment.empty();
205INLINE
const std::string &InterrogateFunctionWrapper::
223operator << (std::ostream &out,
const InterrogateFunctionWrapper::Parameter &p) {
229operator >> (std::istream &in, InterrogateFunctionWrapper::Parameter &p) {
The base class for things that are part of the interrogate database.
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 input(std::istream &in)
Reads the data file as previously formatted by output().
bool is_copy_constructor() const
bool is_extension() const