Panda3D
Classes | Public Types | Public Member Functions | Public Attributes | Friends | List of all members
InterrogateType Class Reference

An internal representation of a type. More...

#include "interrogateType.h"

Inheritance diagram for InterrogateType:
InterrogateComponent

Classes

class  Derivation
 
class  EnumValue
 

Public Types

enum  DerivationFlags { DF_upcast = 0x01, DF_downcast = 0x02, DF_downcast_impossible = 0x04 }
 
typedef std::vector< ElementIndex > Elements
 
typedef std::vector< FunctionIndex > Functions
 
typedef std::vector< MakeSeqIndex > MakeSeqs
 

Public Member Functions

 InterrogateType (InterrogateModuleDef *def=nullptr)
 
 InterrogateType (const InterrogateType &copy)
 
bool derivation_downcast_is_impossible (int n) const
 
FunctionIndex derivation_get_downcast (int n) const
 
FunctionIndex derivation_get_upcast (int n) const
 
bool derivation_has_downcast (int n) const
 
bool derivation_has_upcast (int n) const
 
bool destructor_is_implicit () const
 
bool destructor_is_inherited () const
 
int get_array_size () const
 
AtomicToken get_atomic_token () const
 
FunctionIndex get_cast (int n) const
 
const std::string & get_comment () const
 
FunctionIndex get_constructor (int n) const
 
TypeIndex get_derivation (int n) const
 
FunctionIndex get_destructor () const
 
ElementIndex get_element (int n) const
 
int get_enum_value (int n) const
 
const std::string & get_enum_value_comment (int n) const
 
const std::string & get_enum_value_name (int n) const
 
const std::string & get_enum_value_scoped_name (int n) const
 
MakeSeqIndex get_make_seq (int n) const
 
FunctionIndex get_method (int n) const
 
TypeIndex get_nested_type (int n) const
 
TypeIndex get_outer_class () const
 If is_nested() returns true, this is the class within which this type is defined. More...
 
const std::string & get_scoped_name () const
 
const std::string & get_true_name () const
 
TypeIndex get_wrapped_type () const
 
bool has_comment () const
 
bool has_destructor () const
 
bool has_scoped_name () const
 
bool has_true_name () const
 
void input (std::istream &in)
 Reads the data file as previously formatted by output(). More...
 
bool is_array () const
 
bool is_atomic () const
 
bool is_class () const
 
bool is_const () const
 
bool is_enum () const
 
bool is_final () const
 
bool is_fully_defined () const
 
bool is_global () const
 Returns true if the type is marked as 'global'. More...
 
bool is_long () const
 
bool is_longlong () const
 
bool is_nested () const
 Returns true if this type is nested within some class definition. More...
 
bool is_pointer () const
 
bool is_scoped_enum () const
 Returns true if enum values are only available under a scope. More...
 
bool is_short () const
 
bool is_signed () const
 
bool is_struct () const
 
bool is_typedef () const
 
bool is_union () const
 
bool is_unpublished () const
 Returns true if the type is an unpublished type. More...
 
bool is_unsigned () const
 
bool is_wrapped () const
 
void merge_with (const InterrogateType &other)
 Combines type with the other similar definition. More...
 
int number_of_casts () const
 
int number_of_constructors () const
 
int number_of_derivations () const
 
int number_of_elements () const
 
int number_of_enum_values () const
 
int number_of_make_seqs () const
 
int number_of_methods () const
 
int number_of_nested_types () const
 
void operator= (const InterrogateType &copy)
 
void output (std::ostream &out) const
 Formats the InterrogateType data for output to a data file. More...
 
void remap_indices (const IndexRemapper &remap)
 Remaps all internal index numbers according to the indicated map. More...
 
- Public Member Functions inherited from InterrogateComponent
 InterrogateComponent (InterrogateModuleDef *def=nullptr)
 
 InterrogateComponent (const InterrogateComponent &copy)
 
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. More...
 
const char * get_module_name () const
 Returns the module name, if it is known, or NULL if it is not. More...
 
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. More...
 
bool has_module_name () const
 Returns true if we have a known module name, false if we do not. More...
 
bool has_name () const
 
void input (std::istream &in)
 Reads the data file as previously formatted by output(). More...
 
void operator= (const InterrogateComponent &copy)
 
void output (std::ostream &out) const
 Formats the component for output to a data file. More...
 

Public Attributes

int _array_size
 
AtomicToken _atomic_token
 
Functions _casts
 
std::string _comment
 
Functions _constructors
 
CPPScope * _cppscope
 
CPPType * _cpptype
 
FunctionIndex _destructor
 
Elements _elements
 
int _flags
 
MakeSeqs _make_seqs
 
Functions _methods
 
TypeIndex _outer_class
 
std::string _scoped_name
 
std::string _true_name
 
TypeIndex _wrapped_type
 

Friends

class InterrogateBuilder
 

Detailed Description

An internal representation of a type.

Definition at line 30 of file interrogateType.h.

Member Function Documentation

◆ get_outer_class()

TypeIndex InterrogateType::get_outer_class ( ) const
inline

If is_nested() returns true, this is the class within which this type is defined.

Definition at line 84 of file interrogateType.I.

◆ input()

void InterrogateType::input ( std::istream &  in)

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

Definition at line 173 of file interrogateType.cxx.

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

◆ is_global()

bool InterrogateType::is_global ( ) const
inline

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

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

Definition at line 19 of file interrogateType.I.

Referenced by InterrogateDatabase::add_type().

◆ is_nested()

bool InterrogateType::is_nested ( ) const
inline

Returns true if this type is nested within some class definition.

Definition at line 75 of file interrogateType.I.

◆ is_scoped_enum()

bool InterrogateType::is_scoped_enum ( ) const
inline

Returns true if enum values are only available under a scope.

Definition at line 212 of file interrogateType.I.

◆ is_unpublished()

bool InterrogateType::is_unpublished ( ) const
inline

Returns true if the type is an unpublished type.

This either means the type is a nested type, and it is protected or private within its scope, or that its definition is simply not marked as 'published'.

Definition at line 314 of file interrogateType.I.

◆ merge_with()

void InterrogateType::merge_with ( const InterrogateType other)

Combines type with the other similar definition.

If one type is "fully defined" and the other one isn't, the fully-defined type wins. If both types are fully defined, whichever type is marked "global" wins.

Definition at line 122 of file interrogateType.cxx.

Referenced by InterrogateDatabase::add_type().

◆ output()

void InterrogateType::output ( std::ostream &  out) const

Formats the InterrogateType data for output to a data file.

Definition at line 143 of file interrogateType.cxx.

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

◆ remap_indices()

void InterrogateType::remap_indices ( const IndexRemapper remap)

Remaps all internal index numbers according to the indicated map.

This called from InterrogateDatabase::remap_indices().

Definition at line 208 of file interrogateType.cxx.

References IndexRemapper::map_from().


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