Panda3D

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
InterrogateFunction Class Reference

An internal representation of a function. More...

`#include "interrogateFunction.h"`

Inheritance diagram for InterrogateFunction:

## Public Types
typedef std::map< std::string, CPPInstance * > | Instances

## Public Member Functions
| InterrogateFunction (const InterrogateFunction &copy)
| InterrogateFunction (InterrogateModuleDef *def=nullptr)
FunctionWrapperIndex | get_c_wrapper (int n) const
TypeIndex | get_class () const
| Return the class that owns the method, if is_method() returns true.
const std::string & | get_comment () const
const std::string & | get_prototype () const
FunctionWrapperIndex | get_python_wrapper (int n) const
const std::string & | get_scoped_name () const
bool | has_comment () const
bool | has_prototype () const
bool | has_scoped_name () const
void | input (std::istream &in)
| Reads the data file as previously formatted by output().
bool | is_constructor () const
| Returns true if the function is a constructor.
bool | is_destructor () const
| Returns true if the function is a destructor.
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 (std::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 Member Functions inherited from InterrogateComponent
| InterrogateComponent (const InterrogateComponent &copy)
| InterrogateComponent (InterrogateModuleDef *def=nullptr)
const std::string & | get_alt_name (int n) 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 std::string & | get_name () const
int | get_num_alt_names () 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
void | input (std::istream &in)
| Reads the data file as previously formatted by output().
void | operator= (const InterrogateComponent &copy)
void | output (std::ostream &out) const
| Formats the component for output to a data file.

## Public Attributes
std::string | _expression
Instances * | _instances

## Friends
class | FunctionRemap
class | InterfaceMakerC
class | InterfaceMakerPythonNative
class | InterfaceMakerPythonSimple
class | InterrogateBuilder
class | InterrogateDatabase

## Detailed Description

An internal representation of a function.

Definition at line 30 of file interrogateFunction.h.

## Member Typedef Documentation

## ◆ Instances

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

Definition at line 99 of file interrogateFunction.h.

## Constructor & Destructor Documentation

## ◆ InterrogateFunction() [1/2]

InterrogateFunction::InterrogateFunction | ( | InterrogateModuleDef * | def = nullptr | ) |

Definition at line 22 of file interrogateFunction.cxx.

## ◆ InterrogateFunction() [2/2]

InterrogateFunction::InterrogateFunction | ( | const InterrogateFunction & | copy | ) |

Definition at line 34 of file interrogateFunction.cxx.

## Member Function Documentation

## ◆ get_c_wrapper()

FunctionWrapperIndex InterrogateFunction::get_c_wrapper | ( | int | n | ) | const
| inline

Definition at line 140 of file interrogateFunction.I.

## ◆ get_class()

TypeIndex InterrogateFunction::get_class | ( |  | ) | const
| inline

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

Definition at line 76 of file interrogateFunction.I.

## ◆ get_comment()

const std::string & InterrogateFunction::get_comment | ( |  | ) | const
| inline

Definition at line 108 of file interrogateFunction.I.

## ◆ get_prototype()

const std::string & InterrogateFunction::get_prototype | ( |  | ) | const
| inline

Definition at line 124 of file interrogateFunction.I.

## ◆ get_python_wrapper()

FunctionWrapperIndex InterrogateFunction::get_python_wrapper | ( | int | n | ) | const
| inline

Definition at line 159 of file interrogateFunction.I.

## ◆ get_scoped_name()

const std::string & InterrogateFunction::get_scoped_name | ( |  | ) | const
| inline

Definition at line 92 of file interrogateFunction.I.

## ◆ has_comment()

bool InterrogateFunction::has_comment | ( |  | ) | const
| inline

Definition at line 100 of file interrogateFunction.I.

## ◆ has_prototype()

bool InterrogateFunction::has_prototype | ( |  | ) | const
| inline

Definition at line 116 of file interrogateFunction.I.

## ◆ has_scoped_name()

bool InterrogateFunction::has_scoped_name | ( |  | ) | const
| inline

Definition at line 84 of file interrogateFunction.I.

## ◆ input()

void InterrogateFunction::input | ( | std::istream & | in | ) |

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

Definition at line 75 of file interrogateFunction.cxx.

References idf_input_string(), idf_input_vector(), and InterrogateComponent::input().

## ◆ is_constructor()

bool InterrogateFunction::is_constructor | ( |  | ) | const
| inline

Returns true if the function is a constructor.

Definition at line 60 of file interrogateFunction.I.

## ◆ is_destructor()

bool InterrogateFunction::is_destructor | ( |  | ) | const
| inline

Returns true if the function is a destructor.

Definition at line 68 of file interrogateFunction.I.

## ◆ is_global()

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

Referenced by InterrogateDatabase::add_function().

## ◆ is_method()

bool InterrogateFunction::is_method | ( |  | ) | const
| inline

Returns true if the function is a class method.

Definition at line 34 of file interrogateFunction.I.

## ◆ is_operator_typecast()

bool InterrogateFunction::is_operator_typecast | ( |  | ) | const
| inline

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

Definition at line 52 of file interrogateFunction.I.

## ◆ is_unary_op()

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

## ◆ is_virtual()

bool InterrogateFunction::is_virtual | ( |  | ) | const
| inline

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

Definition at line 26 of file interrogateFunction.I.

## ◆ number_of_c_wrappers()

int InterrogateFunction::number_of_c_wrappers | ( |  | ) | const
| inline

Definition at line 132 of file interrogateFunction.I.

## ◆ number_of_python_wrappers()

int InterrogateFunction::number_of_python_wrappers | ( |  | ) | const
| inline

Definition at line 151 of file interrogateFunction.I.

## ◆ operator=()

void InterrogateFunction::operator= | ( | const InterrogateFunction & | copy | ) |

Definition at line 42 of file interrogateFunction.cxx.

## ◆ output()

void InterrogateFunction::output | ( | std::ostream & | out | ) | const

Formats the InterrogateFunction data for output to a data file.

Definition at line 60 of file interrogateFunction.cxx.

References idf_output_string(), idf_output_vector(), and InterrogateComponent::output().

## ◆ remap_indices()

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 90 of file interrogateFunction.cxx.

References IndexRemapper::map_from().

## Friends And Related Symbol Documentation

## ◆ FunctionRemap

friend class FunctionRemap
| friend

Definition at line 108 of file interrogateFunction.h.

## ◆ InterfaceMakerC

friend class InterfaceMakerC
| friend

Definition at line 105 of file interrogateFunction.h.

## ◆ InterfaceMakerPythonNative

friend class InterfaceMakerPythonNative
| friend

Definition at line 107 of file interrogateFunction.h.

## ◆ InterfaceMakerPythonSimple

friend class InterfaceMakerPythonSimple
| friend

Definition at line 106 of file interrogateFunction.h.

## ◆ InterrogateBuilder

friend class InterrogateBuilder
| friend

Definition at line 103 of file interrogateFunction.h.

## ◆ InterrogateDatabase

friend class InterrogateDatabase
| friend

Definition at line 104 of file interrogateFunction.h.

## Member Data Documentation

## ◆ _expression

std::string InterrogateFunction::_expression

Definition at line 101 of file interrogateFunction.h.

## ◆ _instances

Instances* InterrogateFunction::_instances

Definition at line 100 of file interrogateFunction.h.

The documentation for this class was generated from the following files:

- dtool/src/interrogatedb/interrogateFunction.h
- dtool/src/interrogatedb/interrogateFunction.cxx
- dtool/src/interrogatedb/interrogateFunction.I