Panda3D
Public Types | Public Member Functions | Public Attributes | Friends

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)
FunctionWrapperIndex get_c_wrapper (int n) const
TypeIndex get_class () const
 Return the class that owns the method, if is_method() returns true.
const string & get_comment () const
const char * get_library_name () const
 Returns the library name, if it is known, or NULL if it is not.
const char * get_module_name () const
 Returns the module name, if it is known, or NULL if it is not.
const string & get_name () const
const string & get_prototype () const
FunctionWrapperIndex get_python_wrapper (int n) const
const string & get_scoped_name () const
bool has_comment () const
bool has_library_name () const
 Returns true if we have a known library name, false if we do not.
bool has_module_name () const
 Returns true if we have a known module name, false if we do not.
bool has_name () const
bool has_prototype () const
bool has_scoped_name () const
void input (istream &in)
 Reads the data file as previously formatted by output().
bool is_global () const
 Returns true if the function is marked as 'global'.
bool is_method () const
 Returns true if the function is a class method.
bool is_operator_typecast () const
 Returns true if the function is a special typecast operator, like operator bool().
bool is_unary_op () const
 Returns true if the function is flagged as a special unary operator, like operator -() with no parameters.
bool is_virtual () const
 Returns true if the function is virtual, for whatever that's worth.
int number_of_c_wrappers () const
int number_of_python_wrappers () const
void operator= (const InterrogateFunction &copy)
void output (ostream &out) const
 Formats the InterrogateFunction data for output to a data file.
void remap_indices (const IndexRemapper &remap)
 Remaps all internal index numbers according to the indicated map.

Public Attributes

string _expression
Instances * _instances

Friends

class FunctionRemap
class InterfaceMakerC
class InterfaceMakerPythonNative
class InterfaceMakerPythonSimple
class InterrogateBuilder

Detailed Description

An internal representation of a function.

Definition at line 32 of file interrogateFunction.h.


Member Function Documentation

TypeIndex InterrogateFunction::get_class ( ) const [inline]

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

Definition at line 78 of file interrogateFunction.I.

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 73 of file interrogateComponent.I.

Referenced by InterrogateComponent::has_library_name().

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 102 of file interrogateComponent.I.

Referenced by InterrogateComponent::has_module_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 57 of file interrogateComponent.I.

References InterrogateComponent::get_library_name().

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 87 of file interrogateComponent.I.

References InterrogateComponent::get_module_name().

void InterrogateFunction::input ( istream &  in)

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

Reimplemented from InterrogateComponent.

Definition at line 89 of file interrogateFunction.cxx.

References InterrogateDatabase::get_file_minor_version().

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 24 of file interrogateFunction.I.

Referenced by InterrogateDatabase::add_function().

bool InterrogateFunction::is_method ( ) const [inline]

Returns true if the function is a class method.

Definition at line 45 of file interrogateFunction.I.

bool InterrogateFunction::is_operator_typecast ( ) const [inline]

Returns true if the function is a special typecast operator, like operator bool().

Definition at line 67 of file interrogateFunction.I.

bool InterrogateFunction::is_unary_op ( ) const [inline]

Returns true if the function is flagged as a special unary operator, like operator -() with no parameters.

Definition at line 56 of file interrogateFunction.I.

bool InterrogateFunction::is_virtual ( ) const [inline]

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

Definition at line 35 of file interrogateFunction.I.

void InterrogateFunction::output ( ostream &  out) const

Formats the InterrogateFunction data for output to a data file.

Reimplemented from InterrogateComponent.

Definition at line 71 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 110 of file interrogateFunction.cxx.

References IndexRemapper::map_from().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations