Panda3D
Loading...
Searching...
No Matches
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 (const InterrogateType &copy)
 
 InterrogateType (InterrogateModuleDef *def=nullptr)
 
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.
 
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().
 
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'.
 
bool is_long () const
 
bool is_longlong () const
 
bool is_nested () const
 Returns true if this type is nested within some class definition.
 
bool is_pointer () const
 
bool is_scoped_enum () const
 Returns true if enum values are only available under a scope.
 
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.
 
bool is_unsigned () const
 
bool is_wrapped () const
 
void merge_with (const InterrogateType &other)
 Combines type with the other similar definition.
 
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.
 
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

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 Typedef Documentation

◆ Elements

typedef std::vector<ElementIndex> InterrogateType::Elements

Definition at line 161 of file interrogateType.h.

◆ Functions

typedef std::vector<FunctionIndex> InterrogateType::Functions

Definition at line 157 of file interrogateType.h.

◆ MakeSeqs

typedef std::vector<MakeSeqIndex> InterrogateType::MakeSeqs

Definition at line 166 of file interrogateType.h.

Member Enumeration Documentation

◆ DerivationFlags

enum InterrogateType::DerivationFlags

Definition at line 169 of file interrogateType.h.

Constructor & Destructor Documentation

◆ InterrogateType() [1/2]

InterrogateType::InterrogateType ( InterrogateModuleDef * def = nullptr)

Definition at line 27 of file interrogateType.cxx.

◆ InterrogateType() [2/2]

InterrogateType::InterrogateType ( const InterrogateType & copy)

Definition at line 45 of file interrogateType.cxx.

Member Function Documentation

◆ derivation_downcast_is_impossible()

bool InterrogateType::derivation_downcast_is_impossible ( int n) const
inline

Definition at line 497 of file interrogateType.I.

◆ derivation_get_downcast()

TypeIndex InterrogateType::derivation_get_downcast ( int n) const
inline

Definition at line 521 of file interrogateType.I.

◆ derivation_get_upcast()

TypeIndex InterrogateType::derivation_get_upcast ( int n) const
inline

Definition at line 485 of file interrogateType.I.

◆ derivation_has_downcast()

bool InterrogateType::derivation_has_downcast ( int n) const
inline

Definition at line 509 of file interrogateType.I.

◆ derivation_has_upcast()

bool InterrogateType::derivation_has_upcast ( int n) const
inline

Definition at line 473 of file interrogateType.I.

◆ destructor_is_implicit()

bool InterrogateType::destructor_is_implicit ( ) const
inline

Definition at line 357 of file interrogateType.I.

◆ destructor_is_inherited()

bool InterrogateType::destructor_is_inherited ( ) const
inline

Definition at line 349 of file interrogateType.I.

◆ get_array_size()

int InterrogateType::get_array_size ( ) const
inline

Definition at line 195 of file interrogateType.I.

◆ get_atomic_token()

AtomicToken InterrogateType::get_atomic_token ( ) const
inline

Definition at line 99 of file interrogateType.I.

◆ get_cast()

FunctionIndex InterrogateType::get_cast ( int n) const
inline

Definition at line 441 of file interrogateType.I.

◆ get_comment()

const std::string & InterrogateType::get_comment ( ) const
inline

Definition at line 66 of file interrogateType.I.

◆ get_constructor()

FunctionIndex InterrogateType::get_constructor ( int n) const
inline

Definition at line 329 of file interrogateType.I.

◆ get_derivation()

TypeIndex InterrogateType::get_derivation ( int n) const
inline

Definition at line 461 of file interrogateType.I.

◆ get_destructor()

FunctionIndex InterrogateType::get_destructor ( ) const
inline

Definition at line 365 of file interrogateType.I.

◆ get_element()

ElementIndex InterrogateType::get_element ( int n) const
inline

Definition at line 381 of file interrogateType.I.

◆ get_enum_value()

int InterrogateType::get_enum_value ( int n) const
inline

Definition at line 260 of file interrogateType.I.

◆ get_enum_value_comment()

const std::string & InterrogateType::get_enum_value_comment ( int n) const
inline

Definition at line 249 of file interrogateType.I.

◆ get_enum_value_name()

const std::string & InterrogateType::get_enum_value_name ( int n) const
inline

Definition at line 227 of file interrogateType.I.

◆ get_enum_value_scoped_name()

const std::string & InterrogateType::get_enum_value_scoped_name ( int n) const
inline

Definition at line 238 of file interrogateType.I.

◆ get_make_seq()

MakeSeqIndex InterrogateType::get_make_seq ( int n) const
inline

Definition at line 421 of file interrogateType.I.

◆ get_method()

FunctionIndex InterrogateType::get_method ( int n) const
inline

Definition at line 401 of file interrogateType.I.

◆ get_nested_type()

TypeIndex InterrogateType::get_nested_type ( int n) const
inline

Definition at line 541 of file interrogateType.I.

◆ 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 83 of file interrogateType.I.

◆ get_scoped_name()

const std::string & InterrogateType::get_scoped_name ( ) const
inline

Definition at line 34 of file interrogateType.I.

◆ get_true_name()

const std::string & InterrogateType::get_true_name ( ) const
inline

Definition at line 50 of file interrogateType.I.

◆ get_wrapped_type()

TypeIndex InterrogateType::get_wrapped_type ( ) const
inline

Definition at line 179 of file interrogateType.I.

◆ has_comment()

bool InterrogateType::has_comment ( ) const
inline

Definition at line 58 of file interrogateType.I.

◆ has_destructor()

bool InterrogateType::has_destructor ( ) const
inline

Definition at line 341 of file interrogateType.I.

◆ has_scoped_name()

bool InterrogateType::has_scoped_name ( ) const
inline

Definition at line 26 of file interrogateType.I.

◆ has_true_name()

bool InterrogateType::has_true_name ( ) const
inline

Definition at line 42 of file interrogateType.I.

◆ input()

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

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

Definition at line 172 of file interrogateType.cxx.

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

◆ is_array()

bool InterrogateType::is_array ( ) const
inline

Definition at line 187 of file interrogateType.I.

◆ is_atomic()

bool InterrogateType::is_atomic ( ) const
inline

Definition at line 91 of file interrogateType.I.

◆ is_class()

bool InterrogateType::is_class ( ) const
inline

Definition at line 279 of file interrogateType.I.

◆ is_const()

bool InterrogateType::is_const ( ) const
inline

Definition at line 163 of file interrogateType.I.

◆ is_enum()

bool InterrogateType::is_enum ( ) const
inline

Definition at line 203 of file interrogateType.I.

◆ is_final()

bool InterrogateType::is_final ( ) const
inline

Definition at line 295 of file interrogateType.I.

◆ is_fully_defined()

bool InterrogateType::is_fully_defined ( ) const
inline

Definition at line 303 of file interrogateType.I.

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

Referenced by InterrogateDatabase::add_type().

◆ is_long()

bool InterrogateType::is_long ( ) const
inline

Definition at line 123 of file interrogateType.I.

◆ is_longlong()

bool InterrogateType::is_longlong ( ) const
inline

Definition at line 131 of file interrogateType.I.

◆ is_nested()

bool InterrogateType::is_nested ( ) const
inline

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

Definition at line 74 of file interrogateType.I.

◆ is_pointer()

bool InterrogateType::is_pointer ( ) const
inline

Definition at line 155 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 211 of file interrogateType.I.

◆ is_short()

bool InterrogateType::is_short ( ) const
inline

Definition at line 139 of file interrogateType.I.

◆ is_signed()

bool InterrogateType::is_signed ( ) const
inline

Definition at line 115 of file interrogateType.I.

◆ is_struct()

bool InterrogateType::is_struct ( ) const
inline

Definition at line 271 of file interrogateType.I.

◆ is_typedef()

bool InterrogateType::is_typedef ( ) const
inline

Definition at line 171 of file interrogateType.I.

◆ is_union()

bool InterrogateType::is_union ( ) const
inline

Definition at line 287 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 313 of file interrogateType.I.

◆ is_unsigned()

bool InterrogateType::is_unsigned ( ) const
inline

Definition at line 107 of file interrogateType.I.

◆ is_wrapped()

bool InterrogateType::is_wrapped ( ) const
inline

Definition at line 147 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 121 of file interrogateType.cxx.

Referenced by InterrogateDatabase::add_type().

◆ number_of_casts()

int InterrogateType::number_of_casts ( ) const
inline

Definition at line 433 of file interrogateType.I.

◆ number_of_constructors()

int InterrogateType::number_of_constructors ( ) const
inline

Definition at line 321 of file interrogateType.I.

◆ number_of_derivations()

int InterrogateType::number_of_derivations ( ) const
inline

Definition at line 453 of file interrogateType.I.

◆ number_of_elements()

int InterrogateType::number_of_elements ( ) const
inline

Definition at line 373 of file interrogateType.I.

◆ number_of_enum_values()

int InterrogateType::number_of_enum_values ( ) const
inline

Definition at line 219 of file interrogateType.I.

◆ number_of_make_seqs()

int InterrogateType::number_of_make_seqs ( ) const
inline

Definition at line 413 of file interrogateType.I.

◆ number_of_methods()

int InterrogateType::number_of_methods ( ) const
inline

Definition at line 393 of file interrogateType.I.

◆ number_of_nested_types()

int InterrogateType::number_of_nested_types ( ) const
inline

Definition at line 533 of file interrogateType.I.

◆ operator=()

void InterrogateType::operator= ( const InterrogateType & copy)

Definition at line 91 of file interrogateType.cxx.

◆ output()

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

Formats the InterrogateType data for output to a data file.

Definition at line 142 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 207 of file interrogateType.cxx.

References IndexRemapper::map_from().

Friends And Related Symbol Documentation

◆ InterrogateBuilder

friend class InterrogateBuilder
friend

Definition at line 223 of file interrogateType.h.

Member Data Documentation

◆ _array_size

int InterrogateType::_array_size

Definition at line 155 of file interrogateType.h.

◆ _atomic_token

AtomicToken InterrogateType::_atomic_token

Definition at line 153 of file interrogateType.h.

◆ _casts

Functions InterrogateType::_casts

Definition at line 164 of file interrogateType.h.

◆ _comment

std::string InterrogateType::_comment

Definition at line 151 of file interrogateType.h.

◆ _constructors

Functions InterrogateType::_constructors

Definition at line 158 of file interrogateType.h.

◆ _cppscope

CPPScope* InterrogateType::_cppscope

Definition at line 221 of file interrogateType.h.

◆ _cpptype

CPPType* InterrogateType::_cpptype

Definition at line 220 of file interrogateType.h.

◆ _destructor

FunctionIndex InterrogateType::_destructor

Definition at line 159 of file interrogateType.h.

◆ _elements

Elements InterrogateType::_elements

Definition at line 162 of file interrogateType.h.

◆ _flags

int InterrogateType::_flags

Definition at line 147 of file interrogateType.h.

◆ _make_seqs

MakeSeqs InterrogateType::_make_seqs

Definition at line 167 of file interrogateType.h.

◆ _methods

Functions InterrogateType::_methods

Definition at line 163 of file interrogateType.h.

◆ _outer_class

TypeIndex InterrogateType::_outer_class

Definition at line 152 of file interrogateType.h.

◆ _scoped_name

std::string InterrogateType::_scoped_name

Definition at line 149 of file interrogateType.h.

◆ _true_name

std::string InterrogateType::_true_name

Definition at line 150 of file interrogateType.h.

◆ _wrapped_type

TypeIndex InterrogateType::_wrapped_type

Definition at line 154 of file interrogateType.h.


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