Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

InterrogateFunctionWrapper Class Reference

An internal representation of a callable function. More...

#include <interrogateFunctionWrapper.h>

Inheritance diagram for InterrogateFunctionWrapper:

InterrogateComponent List of all members.

Public Member Functions

 InterrogateFunctionWrapper (InterrogateModuleDef *def=NULL)
 InterrogateFunctionWrapper (const InterrogateFunctionWrapper &copy)
void operator= (const InterrogateFunctionWrapper &copy)
FunctionIndex get_function () const
 Returns the FunctionIndex of the function that this wrapper corresponds to.

bool is_callable_by_name () const
bool has_return_value () const
TypeIndex get_return_type () const
bool caller_manages_return_value () const
FunctionIndex get_return_value_destructor () const
int number_of_parameters () const
TypeIndex parameter_get_type (int n) const
bool parameter_has_name (int n) const
const string & parameter_get_name (int n) const
bool parameter_is_this (int n) const
const string & get_unique_name () const
void output (ostream &out) const
 Formats the InterrogateFunctionWrapper data for output to a data file.

void input (istream &in)
 Reads the data file as previously formatted by output().

void remap_indices (const IndexRemapper &remap)
 Remaps all internal index numbers according to the indicated map.

bool has_library_name () const
 Returns true if we have a known library name, false if we do not.

const char * get_library_name () const
 Returns the library name, if it is known, or NULL if it is not.

bool has_module_name () const
 Returns true if we have a known module name, false if we do not.

const char * get_module_name () const
 Returns the module name, if it is known, or NULL if it is not.

bool has_name () const
const string & get_name () const

Private Types

typedef vector< ParameterParameters
enum  Flags { F_caller_manages = 0x0001, F_has_return = 0x0002, F_callable_by_name = 0x0004 }
enum  ParameterFlags { PF_has_name = 0x0001, PF_is_this = 0x0002 }

Private Attributes

int _flags
FunctionIndex _function
TypeIndex _return_type
FunctionIndex _return_value_destructor
string _unique_name
Parameters _parameters

Friends

class InterrogateBuilder
class FunctionRemap

Detailed Description

An internal representation of a callable function.

Definition at line 40 of file interrogateFunctionWrapper.h.


Member Typedef Documentation

typedef vector<Parameter> InterrogateFunctionWrapper::Parameters [private]
 

Definition at line 101 of file interrogateFunctionWrapper.h.


Member Enumeration Documentation

enum InterrogateFunctionWrapper::Flags [private]
 

Enumeration values:
F_caller_manages 
F_has_return 
F_callable_by_name 

Definition at line 69 of file interrogateFunctionWrapper.h.

enum InterrogateFunctionWrapper::ParameterFlags [private]
 

Enumeration values:
PF_has_name 
PF_is_this 

Definition at line 75 of file interrogateFunctionWrapper.h.


Constructor & Destructor Documentation

InterrogateFunctionWrapper::InterrogateFunctionWrapper InterrogateModuleDef def = NULL  )  [inline]
 

Definition at line 31 of file interrogateFunctionWrapper.I.

References _return_type, and _return_value_destructor.

InterrogateFunctionWrapper::InterrogateFunctionWrapper const InterrogateFunctionWrapper &  copy  )  [inline]
 

Definition at line 48 of file interrogateFunctionWrapper.I.

References _flags, _function, _parameters, _return_type, _return_value_destructor, _unique_name, INLINE, and InterrogateComponent::operator=().


Member Function Documentation

bool InterrogateFunctionWrapper::caller_manages_return_value  )  const [inline]
 

Definition at line 129 of file interrogateFunctionWrapper.I.

References _parameters.

Referenced by interrogate_wrapper_return_type().

FunctionIndex InterrogateFunctionWrapper::get_function  )  const [inline]
 

Returns the FunctionIndex of the function that this wrapper corresponds to.

Definition at line 81 of file interrogateFunctionWrapper.I.

References _flags, F_has_return, and INLINE.

const char * InterrogateComponent::get_library_name  )  const [inline, inherited]
 

Returns the library name, if it is known, or NULL if it is not.

This is the name of the library that this particular component was built into. Typically this will be a one-to-one correspondance with an invocation of the interrogate command. Typical examples are "libutil" and "liblinmath".

Definition at line 98 of file interrogateComponent.I.

References InterrogateComponent::_def, INLINE, InterrogateModuleDef::module_name, and NULL.

Referenced by InterrogateComponent::operator=().

const char * InterrogateComponent::get_module_name  )  const [inline, inherited]
 

Returns the module name, if it is known, or NULL if it is not.

This is the name of the module that this particular component is associated with. This is a higher grouping than library. Typical examples are "panda" and "pandaegg".

Definition at line 138 of file interrogateComponent.I.

Referenced by interrogate_function_has_module_name(), and interrogate_type_has_module_name().

const string & InterrogateComponent::get_name  )  const [inline, inherited]
 

Definition at line 165 of file interrogateComponent.I.

Referenced by interrogate_function_python_wrapper(), interrogate_get_function(), interrogate_get_manifest_by_name(), interrogate_get_type_by_true_name(), and interrogate_manifest_get_int_value().

TypeIndex InterrogateFunctionWrapper::get_return_type  )  const [inline]
 

Definition at line 117 of file interrogateFunctionWrapper.I.

References _return_value_destructor, FunctionIndex, and INLINE.

Referenced by interrogate_wrapper_has_return_value().

FunctionIndex InterrogateFunctionWrapper::get_return_value_destructor  )  const [inline]
 

Definition at line 141 of file interrogateFunctionWrapper.I.

Referenced by interrogate_wrapper_caller_manages_return_value().

const string & InterrogateFunctionWrapper::get_unique_name  )  const [inline]
 

Definition at line 226 of file interrogateFunctionWrapper.I.

Referenced by interrogate_wrapper_pointer().

bool InterrogateComponent::has_library_name  )  const [inline, inherited]
 

Returns true if we have a known library name, false if we do not.

See get_library_name().

Definition at line 74 of file interrogateComponent.I.

References InterrogateComponent::_def, INLINE, InterrogateModuleDef::library_name, and NULL.

bool InterrogateComponent::has_module_name  )  const [inline, inherited]
 

Returns true if we have a known module name, false if we do not.

See get_module_name().

Definition at line 116 of file interrogateComponent.I.

References InterrogateComponent::_name, and INLINE.

Referenced by interrogate_function_class(), and interrogate_type_comment().

bool InterrogateComponent::has_name  )  const [inline, inherited]
 

Definition at line 153 of file interrogateComponent.I.

bool InterrogateFunctionWrapper::has_return_value  )  const [inline]
 

Definition at line 105 of file interrogateFunctionWrapper.I.

References _flags, F_caller_manages, and INLINE.

Referenced by interrogate_wrapper_is_callable_by_name().

void InterrogateFunctionWrapper::input istream &  in  ) 
 

Reads the data file as previously formatted by output().

Reimplemented from InterrogateComponent.

Definition at line 86 of file interrogateFunctionWrapper.cxx.

References _parameters, _return_type, _return_value_destructor, and IndexRemapper::map_from().

bool InterrogateFunctionWrapper::is_callable_by_name  )  const [inline]
 

Definition at line 93 of file interrogateFunctionWrapper.I.

References _return_type, INLINE, and TypeIndex.

int InterrogateFunctionWrapper::number_of_parameters  )  const [inline]
 

Definition at line 153 of file interrogateFunctionWrapper.I.

References _parameters, and PF_has_name.

Referenced by interrogate_wrapper_return_value_destructor().

void InterrogateFunctionWrapper::operator= const InterrogateFunctionWrapper &  copy  )  [inline]
 

Definition at line 60 of file interrogateFunctionWrapper.I.

References _function, FunctionIndex, and INLINE.

void InterrogateFunctionWrapper::output ostream &  out  )  const
 

Formats the InterrogateFunctionWrapper data for output to a data file.

Reimplemented from InterrogateComponent.

Definition at line 65 of file interrogateFunctionWrapper.cxx.

References _flags, _function, _parameters, _return_type, _return_value_destructor, _unique_name, idf_input_string(), idf_input_vector(), and InterrogateComponent::input().

Referenced by parameter_get_name().

const string & InterrogateFunctionWrapper::parameter_get_name int  n  )  const [inline]
 

Definition at line 195 of file interrogateFunctionWrapper.I.

References INLINE, and output().

Referenced by interrogate_wrapper_parameter_has_name().

TypeIndex InterrogateFunctionWrapper::parameter_get_type int  n  )  const [inline]
 

Definition at line 165 of file interrogateFunctionWrapper.I.

References _parameters.

Referenced by interrogate_wrapper_number_of_parameters().

bool InterrogateFunctionWrapper::parameter_has_name int  n  )  const [inline]
 

Definition at line 180 of file interrogateFunctionWrapper.I.

References _parameters, and PF_is_this.

Referenced by interrogate_wrapper_parameter_type().

bool InterrogateFunctionWrapper::parameter_is_this int  n  )  const [inline]
 

Definition at line 211 of file interrogateFunctionWrapper.I.

Referenced by interrogate_wrapper_parameter_name().

void InterrogateFunctionWrapper::remap_indices const IndexRemapper remap  ) 
 

Remaps all internal index numbers according to the indicated map.

This called from InterrogateDatabase::remap_indices().

Definition at line 109 of file interrogateFunctionWrapper.cxx.


Friends And Related Function Documentation

friend class FunctionRemap [friend]
 

Reimplemented from InterrogateComponent.

Definition at line 105 of file interrogateFunctionWrapper.h.

friend class InterrogateBuilder [friend]
 

Reimplemented from InterrogateComponent.

Definition at line 104 of file interrogateFunctionWrapper.h.


Member Data Documentation

int InterrogateFunctionWrapper::_flags [private]
 

Definition at line 80 of file interrogateFunctionWrapper.h.

Referenced by get_function(), has_return_value(), InterrogateFunctionWrapper(), and output().

FunctionIndex InterrogateFunctionWrapper::_function [private]
 

Definition at line 81 of file interrogateFunctionWrapper.h.

Referenced by InterrogateFunctionWrapper(), operator=(), and output().

Parameters InterrogateFunctionWrapper::_parameters [private]
 

Definition at line 102 of file interrogateFunctionWrapper.h.

Referenced by caller_manages_return_value(), input(), InterrogateFunctionWrapper(), number_of_parameters(), output(), parameter_get_type(), and parameter_has_name().

TypeIndex InterrogateFunctionWrapper::_return_type [private]
 

Definition at line 82 of file interrogateFunctionWrapper.h.

Referenced by input(), InterrogateFunctionWrapper(), is_callable_by_name(), and output().

FunctionIndex InterrogateFunctionWrapper::_return_value_destructor [private]
 

Definition at line 83 of file interrogateFunctionWrapper.h.

Referenced by get_return_type(), input(), InterrogateFunctionWrapper(), and output().

string InterrogateFunctionWrapper::_unique_name [private]
 

Definition at line 84 of file interrogateFunctionWrapper.h.

Referenced by InterrogateFunctionWrapper(), and output().


The documentation for this class was generated from the following files:
Generated on Thu May 1 22:13:38 2003 for DTool by doxygen1.3