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

InterrogateFunction Class Reference

An internal representation of a function. More...

#include <interrogateFunction.h>

Inheritance diagram for InterrogateFunction:

InterrogateComponent List of all members.

Public Types

typedef map< string, CPPInstance * > Instances

Public Member Functions

 InterrogateFunction (InterrogateModuleDef *def=NULL)
 InterrogateFunction (const InterrogateFunction &copy)
void operator= (const InterrogateFunction &copy)
bool is_global () const
 Returns true if the function is marked as 'global'.

bool is_virtual () const
 Returns true if the function is virtual, for whatever that's worth.

bool is_method () const
 Returns true if the function is a class method.

TypeIndex get_class () const
 Return the class that owns the method, if is_method() returns true.

bool has_scoped_name () const
const string & get_scoped_name () const
bool has_comment () const
const string & get_comment () const
bool has_prototype () const
const string & get_prototype () const
int number_of_c_wrappers () const
FunctionWrapperIndex get_c_wrapper (int n) const
int number_of_python_wrappers () const
FunctionWrapperIndex get_python_wrapper (int n) const
void output (ostream &out) const
 Formats the InterrogateFunction 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

Public Attributes

Instances_instances
string _expression

Private Types

typedef vector< FunctionWrapperIndexWrappers
enum  Flags {
  F_global = 0x0001, F_virtual = 0x0002, F_method = 0x0004, F_typecast = 0x0008,
  F_getter = 0x0010, F_setter = 0x0020
}

Private Attributes

int _flags
string _scoped_name
string _comment
string _prototype
TypeIndex _class
Wrappers _c_wrappers
Wrappers _python_wrappers

Friends

class InterrogateBuilder
class InterfaceMakerC
class InterfaceMakerPythonSimple
class FunctionRemap

Detailed Description

An internal representation of a function.

Definition at line 42 of file interrogateFunction.h.


Member Typedef Documentation

typedef map<string, CPPInstance *> InterrogateFunction::Instances
 

Definition at line 103 of file interrogateFunction.h.

Referenced by InterrogateFunction(), and InterfaceMaker::make_function_remap().

typedef vector<FunctionWrapperIndex> InterrogateFunction::Wrappers [private]
 

Definition at line 89 of file interrogateFunction.h.


Member Enumeration Documentation

enum InterrogateFunction::Flags [private]
 

Enumeration values:
F_global 
F_virtual 
F_method 
F_typecast 
F_getter 
F_setter 

Definition at line 74 of file interrogateFunction.h.


Constructor & Destructor Documentation

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

Definition at line 31 of file interrogateFunction.I.

References _instances, Instances, and NULL.

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

Definition at line 47 of file interrogateFunction.I.

References _flags, F_global, and INLINE.


Member Function Documentation

FunctionWrapperIndex InterrogateFunction::get_c_wrapper int  n  )  const [inline]
 

Definition at line 203 of file interrogateFunction.I.

Referenced by interrogate_function_number_of_c_wrappers().

TypeIndex InterrogateFunction::get_class  )  const [inline]
 

Return the class that owns the method, if is_method() returns true.

Definition at line 107 of file interrogateFunction.I.

References _comment, and INLINE.

Referenced by interrogate_function_is_method().

const string & InterrogateFunction::get_comment  )  const [inline]
 

Definition at line 155 of file interrogateFunction.I.

References _c_wrappers.

Referenced by interrogate_function_has_comment().

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().

const string & InterrogateFunction::get_prototype  )  const [inline]
 

Definition at line 179 of file interrogateFunction.I.

Referenced by interrogate_function_comment().

FunctionWrapperIndex InterrogateFunction::get_python_wrapper int  n  )  const [inline]
 

Definition at line 230 of file interrogateFunction.I.

Referenced by interrogate_function_number_of_python_wrappers().

const string & InterrogateFunction::get_scoped_name  )  const [inline]
 

Definition at line 131 of file interrogateFunction.I.

References _prototype, and INLINE.

Referenced by interrogate_function_name().

bool InterrogateFunction::has_comment  )  const [inline]
 

Definition at line 143 of file interrogateFunction.I.

References _prototype, and INLINE.

Referenced by interrogate_function_scoped_name().

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 InterrogateFunction::has_prototype  )  const [inline]
 

Definition at line 167 of file interrogateFunction.I.

bool InterrogateFunction::has_scoped_name  )  const [inline]
 

Definition at line 119 of file interrogateFunction.I.

References _comment, and INLINE.

void InterrogateFunction::input istream &  in  ) 
 

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

Reimplemented from InterrogateComponent.

Definition at line 82 of file interrogateFunction.cxx.

References _c_wrappers, _class, _python_wrappers, and IndexRemapper::map_from().

bool InterrogateFunction::is_global  )  const [inline]
 

Returns true if the function is marked as 'global'.

This means only that it should appear in the global function list.

Definition at line 64 of file interrogateFunction.I.

References _flags, and F_virtual.

bool InterrogateFunction::is_method  )  const [inline]
 

Returns true if the function is a class method.

Definition at line 92 of file interrogateFunction.I.

References _scoped_name, and INLINE.

Referenced by interrogate_function_prototype().

bool InterrogateFunction::is_virtual  )  const [inline]
 

Returns true if the function is virtual, for whatever that's worth.

Definition at line 79 of file interrogateFunction.I.

References _class, INLINE, and TypeIndex.

Referenced by interrogate_function_module_name().

int InterrogateFunction::number_of_c_wrappers  )  const [inline]
 

Definition at line 191 of file interrogateFunction.I.

Referenced by interrogate_function_is_virtual().

int InterrogateFunction::number_of_python_wrappers  )  const [inline]
 

Definition at line 218 of file interrogateFunction.I.

Referenced by interrogate_function_c_wrapper().

void InterrogateFunction::operator= const InterrogateFunction &  copy  ) 
 

Definition at line 35 of file interrogateFunction.cxx.

void InterrogateFunction::output ostream &  out  )  const
 

Formats the InterrogateFunction data for output to a data file.

Reimplemented from InterrogateComponent.

Definition at line 60 of file interrogateFunction.cxx.

void InterrogateFunction::remap_indices const IndexRemapper remap  ) 
 

Remaps all internal index numbers according to the indicated map.

This called from InterrogateDatabase::remap_indices().

Definition at line 108 of file interrogateFunction.cxx.


Friends And Related Function Documentation

friend class FunctionRemap [friend]
 

Reimplemented from InterrogateComponent.

Definition at line 110 of file interrogateFunction.h.

friend class InterfaceMakerC [friend]
 

Definition at line 108 of file interrogateFunction.h.

friend class InterfaceMakerPythonSimple [friend]
 

Definition at line 109 of file interrogateFunction.h.

friend class InterrogateBuilder [friend]
 

Reimplemented from InterrogateComponent.

Definition at line 107 of file interrogateFunction.h.


Member Data Documentation

Wrappers InterrogateFunction::_c_wrappers [private]
 

Definition at line 90 of file interrogateFunction.h.

Referenced by get_comment(), and input().

TypeIndex InterrogateFunction::_class [private]
 

Definition at line 87 of file interrogateFunction.h.

Referenced by input(), and is_virtual().

string InterrogateFunction::_comment [private]
 

Definition at line 85 of file interrogateFunction.h.

Referenced by get_class(), InterrogateBuilder::get_getter(), and has_scoped_name().

string InterrogateFunction::_expression
 

Definition at line 105 of file interrogateFunction.h.

int InterrogateFunction::_flags [private]
 

Definition at line 83 of file interrogateFunction.h.

Referenced by InterrogateFunction(), and is_global().

Instances* InterrogateFunction::_instances
 

Definition at line 104 of file interrogateFunction.h.

Referenced by InterrogateFunction().

string InterrogateFunction::_prototype [private]
 

Definition at line 86 of file interrogateFunction.h.

Referenced by get_scoped_name(), and has_comment().

Wrappers InterrogateFunction::_python_wrappers [private]
 

Definition at line 91 of file interrogateFunction.h.

Referenced by input(), and InterfaceMakerPythonSimple::synthesize_this_parameter().

string InterrogateFunction::_scoped_name [private]
 

Definition at line 84 of file interrogateFunction.h.

Referenced by is_method().


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