#include <typeManager.h>
Static Public Member Functions | |
CPPType * | resolve_type (CPPType *type, CPPScope *scope=(CPPScope *) NULL) |
A horrible hack around a CPPParser bug. | |
bool | is_assignable (CPPType *type) |
Returns true if the indicated type is something we can legitimately assign a value to, or false otherwise. | |
bool | is_reference (CPPType *type) |
Returns true if the indicated type is some kind of a reference or const reference type to something useful, false otherwise. | |
bool | is_ref_to_anything (CPPType *type) |
Returns true if the indicated type is some kind of a reference or const reference type at all, false otherwise. | |
bool | is_const_ref_to_anything (CPPType *type) |
Returns true if the indicated type is a const reference to something, false otherwise. | |
bool | is_pointer (CPPType *type) |
Returns true if the indicated type is some kind of a pointer or const pointer type, false otherwise. | |
bool | is_const (CPPType *type) |
Returns true if the indicated type is some kind of a const type, false otherwise. | |
bool | is_struct (CPPType *type) |
Returns true if the indicated type is a concrete struct, class, or union type, or false otherwise. | |
bool | is_enum (CPPType *type) |
Returns true if the indicated type is some kind of enumerated type, const or otherwise. | |
bool | is_const_enum (CPPType *type) |
Returns true if the indicated type is a const enumerated type. | |
bool | is_const_ref_to_enum (CPPType *type) |
Returns true if the indicated type is a const reference to an enumerated type. | |
bool | is_simple (CPPType *type) |
Returns true if the indicated type is something that a scripting language can handle directly as a concrete, like an int or float, either const or non-const. | |
bool | is_const_simple (CPPType *type) |
Returns true if the indicated type is a const wrapper around some simple type like int. | |
bool | is_const_ref_to_simple (CPPType *type) |
Returns true if the indicated type is a const reference to something that a scripting language can handle directly as a concrete. | |
bool | is_pointable (CPPType *type) |
Returns true if the indicated type is something ordinary that a scripting language can handle a pointer to, e.g. | |
bool | is_char (CPPType *type) |
Returns true if the indicated type is char or const char, but not signed or unsigned char. | |
bool | is_char_pointer (CPPType *type) |
Returns true if the indicated type is char * or const char * or some such. | |
bool | is_basic_string_char (CPPType *type) |
Returns true if the type is basic_string<char>. | |
bool | is_const_basic_string_char (CPPType *type) |
Returns true if the indicated type is a const wrapper around basic_string<char>. | |
bool | is_const_ref_to_basic_string_char (CPPType *type) |
Returns true if the indicated type is a const reference to basic_string<char>. | |
bool | is_bool (CPPType *type) |
Returns true if the indicated type is bool, or some trivial variant. | |
bool | is_integer (CPPType *type) |
Returns true if the indicated type is one of the basic integer types: bool, char, short, int, or long, signed or unsigned, as well as enumerated types. | |
bool | is_float (CPPType *type) |
Returns true if the indicated type is one of the basic floating-point types: float, double, or some similar variant. | |
bool | is_void (CPPType *type) |
Returns true if the indicated type is void. | |
bool | is_reference_count (CPPType *type) |
Returns true if the indicated type is some class that derives from ReferenceCount, or false otherwise. | |
bool | is_reference_count_pointer (CPPType *type) |
Returns true if the indicated type is a pointer to a class that derives from ReferenceCount. | |
bool | is_pointer_to_base (CPPType *type) |
Returns true if the indicated type is some class that derives from PointerToBase, or false otherwise. | |
bool | is_const_pointer_to_base (CPPType *type) |
Returns true if the indicated type is a const PointerToBase or some derivative. | |
bool | is_const_ref_to_pointer_to_base (CPPType *type) |
Returns true if the indicated type is a const reference to a class that derives from PointerToBase. | |
bool | involves_unpublished (CPPType *type) |
Returns true if the type is an unpublished type, e.g. | |
bool | involves_protected (CPPType *type) |
Returns true if the type is an protected type, e.g. | |
CPPType * | unwrap_pointer (CPPType *type) |
Returns the type this pointer type points to. | |
CPPType * | unwrap_reference (CPPType *type) |
Returns the type this reference type points to. | |
CPPType * | unwrap_const (CPPType *type) |
Removes the const declaration from the outside of the type. | |
CPPType * | unwrap_const_reference (CPPType *type) |
Removes a reference or a const reference from the type. | |
CPPType * | unwrap (CPPType *type) |
Removes all const, pointer, and reference wrappers, to get to the thing we're talking about. | |
CPPType * | get_pointer_type (CPPStructType *pt_type) |
Returns the type of pointer the given PointerTo class emulates. | |
CPPType * | wrap_pointer (CPPType *type) |
Returns the type corresponding to a pointer to the given type. | |
CPPType * | wrap_const_pointer (CPPType *type) |
Returns the type corresponding to a const pointer to the given type. | |
CPPType * | wrap_const_reference (CPPType *type) |
Returns the type corresponding to a const reference to the given type. | |
CPPType * | get_basic_string_char_type () |
Returns a CPPType that represents basic_string<char>, or NULL if the type is unknown. | |
CPPType * | get_reference_count_type () |
Returns a CPPType that represents ReferenceCount, or NULL if the type is unknown. | |
CPPType * | get_void_type () |
Returns a CPPType that represents void. | |
CPPType * | get_int_type () |
Returns a CPPType that represents int. | |
string | get_function_signature (CPPInstance *function, int num_default_parameters=0) |
Returns a string corresponding to the given function signature. | |
string | get_function_name (CPPInstance *function) |
Returns a string corresponding to the given function name. | |
bool | has_protected_destructor (CPPType *type) |
Returns true if the destructor for the given class or struct is protected or private, or false if the destructor is public or absent. |
The class is really just a namespace that groups these functions together.
Definition at line 55 of file typeManager.h.
|
Returns a CPPType that represents basic_string<char>, or NULL if the type is unknown.
Definition at line 1217 of file typeManager.cxx. Referenced by is_pointable(). |
|
Returns a string corresponding to the given function name. This is not necessarily unique to the particular overloaded function instance, but is common among all overloaded functions of the same name. Definition at line 1385 of file typeManager.cxx. |
|
Returns a string corresponding to the given function signature. This is a unique string per each uniquely-callable C++ function or method. Basically it's the function prototype, sans the return type. If num_default_parameters is nonzero, it is the number of parameters to omit from the end of the parameter list. This in effect gets the function signature for an equivalent function with n parameters assuming default values. Definition at line 1313 of file typeManager.cxx. |
|
Returns a CPPType that represents int.
Definition at line 1276 of file typeManager.cxx. |
|
Returns the type of pointer the given PointerTo class emulates. Essentially this just checks the return type of the method called 'p()'. Returns NULL if the PointerTo class has no method p(). Definition at line 1120 of file typeManager.cxx. |
|
Returns a CPPType that represents ReferenceCount, or NULL if the type is unknown.
Definition at line 1238 of file typeManager.cxx. |
|
Returns a CPPType that represents void.
Definition at line 1257 of file typeManager.cxx. |
|
Returns true if the destructor for the given class or struct is protected or private, or false if the destructor is public or absent.
Definition at line 1402 of file typeManager.cxx. |
|
Returns true if the type is an protected type, e.g. a protected or private nested class, or if the type is a pointer or reference to such a protected type, or even if the type is a function type that includes a parameter of such a protected type. Definition at line 953 of file typeManager.cxx. Referenced by is_const_pointer_to_base(). |
|
Returns true if the type is an unpublished type, e.g. a protected or private nested class, or simply a type not marked as 'published', or if the type is a pointer or reference to such an unpublished type, or even if the type is a function type that includes a parameter of such an unpublished type. Definition at line 868 of file typeManager.cxx. References CPPReferenceType::_pointing_at, CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::as_reference_type(), CPPDeclaration::ST_const, CPPDeclaration::ST_reference, and unwrap_reference(). |
|
Returns true if the indicated type is something we can legitimately assign a value to, or false otherwise.
Definition at line 88 of file typeManager.cxx. |
|
Returns true if the type is basic_string<char>. This is the standard C++ string class. Definition at line 506 of file typeManager.cxx. References CPPSimpleType::_type, CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::as_simple_type(), CPPDeclaration::get_subtype(), is_integer(), NULL, CPPDeclaration::ST_const, CPPDeclaration::ST_enum, CPPDeclaration::ST_simple, CPPSimpleType::T_bool, CPPSimpleType::T_char, and CPPSimpleType::T_int. Referenced by is_pointable(), and InterfaceMaker::write_functions(). |
|
Returns true if the indicated type is bool, or some trivial variant.
Definition at line 577 of file typeManager.cxx. |
|
Returns true if the indicated type is char or const char, but not signed or unsigned char.
Definition at line 449 of file typeManager.cxx. Referenced by is_const_ref_to_simple(), is_const_simple(), and is_simple(). |
|
Returns true if the indicated type is char * or const char * or some such.
Definition at line 482 of file typeManager.cxx. References CPPSimpleType::_type, CPPDeclaration::as_simple_type(), NULL, CPPDeclaration::ST_simple, and CPPSimpleType::T_bool. Referenced by is_const_ref_to_simple(), InterfaceMakerPythonObj::write_function_for(), and InterfaceMaker::write_prototypes(). |
|
Returns true if the indicated type is some kind of a const type, false otherwise.
Definition at line 230 of file typeManager.cxx. References CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::get_subtype(), is_enum(), CPPDeclaration::ST_const, and CPPDeclaration::ST_enum. |
|
Returns true if the indicated type is a const wrapper around basic_string<char>.
Definition at line 535 of file typeManager.cxx. References CPPSimpleType::_type, CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::as_simple_type(), CPPDeclaration::get_subtype(), is_float(), NULL, CPPDeclaration::ST_const, CPPDeclaration::ST_simple, CPPSimpleType::T_double, and CPPSimpleType::T_float. |
|
Returns true if the indicated type is a const enumerated type.
Definition at line 300 of file typeManager.cxx. References CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::get_subtype(), is_simple(), and CPPDeclaration::ST_const. |
|
Returns true if the indicated type is a const PointerToBase or some derivative.
Definition at line 815 of file typeManager.cxx. References CPPParameterList::_parameters, CPPFunctionType::_parameters, CPPFunctionType::_return_type, CPPDeclaration::as_function_type(), involves_protected(), and CPPDeclaration::ST_function. Referenced by is_reference_count(). |
|
Returns true if the indicated type is a const reference to something, false otherwise.
Definition at line 182 of file typeManager.cxx. |
|
Returns true if the indicated type is a const reference to basic_string<char>.
Definition at line 556 of file typeManager.cxx. Referenced by InterfaceMaker::write_functions(). |
|
Returns true if the indicated type is a const reference to an enumerated type.
Definition at line 321 of file typeManager.cxx. References CPPReferenceType::_pointing_at, CPPDeclaration::as_reference_type(), CPPDeclaration::get_subtype(), is_const_simple(), and CPPDeclaration::ST_reference. |
|
Returns true if the indicated type is a const reference to a class that derives from PointerToBase.
Definition at line 836 of file typeManager.cxx. References V_public. |
|
Returns true if the indicated type is a const reference to something that a scripting language can handle directly as a concrete.
Definition at line 394 of file typeManager.cxx. References CPPPointerType::_pointing_at, CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::as_pointer_type(), CPPDeclaration::get_subtype(), is_char(), is_char_pointer(), CPPDeclaration::ST_const, and CPPDeclaration::ST_pointer. |
|
Returns true if the indicated type is a const wrapper around some simple type like int.
Definition at line 371 of file typeManager.cxx. References CPPSimpleType::_flags, CPPSimpleType::_type, CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::as_simple_type(), CPPDeclaration::get_subtype(), is_char(), NULL, CPPDeclaration::ST_const, CPPDeclaration::ST_simple, and CPPSimpleType::T_char. Referenced by is_const_ref_to_enum(). |
|
Returns true if the indicated type is some kind of enumerated type, const or otherwise.
Definition at line 276 of file typeManager.cxx. Referenced by is_const(), and is_struct(). |
|
Returns true if the indicated type is one of the basic floating-point types: float, double, or some similar variant.
Definition at line 650 of file typeManager.cxx. Referenced by is_const_basic_string_char(). |
|
Returns true if the indicated type is one of the basic integer types: bool, char, short, int, or long, signed or unsigned, as well as enumerated types.
Definition at line 611 of file typeManager.cxx. Referenced by is_basic_string_char(). |
|
Returns true if the indicated type is something ordinary that a scripting language can handle a pointer to, e.g. a class or a structure, but not an int or a function. Definition at line 419 of file typeManager.cxx. References CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), get_basic_string_char_type(), CPPType::get_local_name(), CPPDeclaration::get_subtype(), is_basic_string_char(), NULL, parser, and CPPDeclaration::ST_const. Referenced by is_simple(). |
|
Returns true if the indicated type is some kind of a pointer or const pointer type, false otherwise.
Definition at line 206 of file typeManager.cxx. References CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::get_subtype(), is_struct(), CPPDeclaration::ST_const, CPPDeclaration::ST_extension, and CPPDeclaration::ST_struct. |
|
Returns true if the indicated type is some class that derives from PointerToBase, or false otherwise.
Definition at line 769 of file typeManager.cxx. References CPPType::_declaration, CPPDeclaration::_vis, min_vis, and NULL. Referenced by is_void(). |
|
Returns true if the indicated type is some kind of a reference or const reference type at all, false otherwise.
Definition at line 158 of file typeManager.cxx. References CPPDeclaration::ST_reference. Referenced by is_reference(). |
|
Returns true if the indicated type is some kind of a reference or const reference type to something useful, false otherwise.
Definition at line 132 of file typeManager.cxx. References CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::get_subtype(), is_ref_to_anything(), CPPDeclaration::ST_const, and CPPDeclaration::ST_reference. Referenced by is_reference_count(). |
|
Returns true if the indicated type is some class that derives from ReferenceCount, or false otherwise.
Definition at line 705 of file typeManager.cxx. References CPPReferenceType::_pointing_at, CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::as_reference_type(), is_const_pointer_to_base(), is_reference(), CPPDeclaration::ST_const, and CPPDeclaration::ST_reference. Referenced by FunctionRemap::get_parameter_name(). |
|
Returns true if the indicated type is a pointer to a class that derives from ReferenceCount.
Definition at line 745 of file typeManager.cxx. |
|
Returns true if the indicated type is something that a scripting language can handle directly as a concrete, like an int or float, either const or non-const.
Definition at line 346 of file typeManager.cxx. References CPPExtensionType::_type, CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::as_extension_type(), is_char(), is_pointable(), CPPDeclaration::ST_const, CPPDeclaration::ST_extension, CPPDeclaration::ST_simple, CPPDeclaration::ST_struct, and CPPExtensionType::T_enum. Referenced by is_const_enum(). |
|
Returns true if the indicated type is a concrete struct, class, or union type, or false otherwise.
Definition at line 251 of file typeManager.cxx. References CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::get_subtype(), is_enum(), and CPPDeclaration::ST_const. Referenced by is_pointer(). |
|
Returns true if the indicated type is void. (Not void *, just void.) Definition at line 683 of file typeManager.cxx. References CPPConstType::_wrapped_around, CPPDeclaration::as_const_type(), CPPDeclaration::get_subtype(), is_pointer_to_base(), and CPPDeclaration::ST_const. |
|
A horrible hack around a CPPParser bug. We don't trust the CPPType pointer we were given; instead, we ask CPPParser to parse a new type of the same name. This has a better chance of fully resolving templates. Definition at line 53 of file typeManager.cxx. |
|
Removes all const, pointer, and reference wrappers, to get to the thing we're talking about.
Definition at line 1089 of file typeManager.cxx. References CPPInstance::_type, CPPDeclaration::as_function_type(), and NULL. |
|
Removes the const declaration from the outside of the type.
Definition at line 1044 of file typeManager.cxx. References NULL, CPPParser::parse_type(), and parser. |
|
Removes a reference or a const reference from the type.
Definition at line 1065 of file typeManager.cxx. References CPPType::new_type(), NULL, and CPPSimpleType::T_void. |
|
Returns the type this pointer type points to.
Definition at line 998 of file typeManager.cxx. |
|
Returns the type this reference type points to.
Definition at line 1020 of file typeManager.cxx. Referenced by involves_unpublished(). |
|
Returns the type corresponding to a const pointer to the given type.
Definition at line 1173 of file typeManager.cxx. References CPPScope::_declarations, CPPDeclaration::as_struct_type(), CPPStructType::get_scope(), and NULL. |
|
Returns the type corresponding to a const reference to the given type.
Definition at line 1195 of file typeManager.cxx. References CPPFunctionType::_flags, CPPInstance::_type, CPPDeclaration::_vis, CPPDeclaration::as_function_type(), CPPFunctionType::F_destructor, CPPDeclaration::get_subtype(), NULL, CPPDeclaration::ST_function, CPPDeclaration::ST_instance, and V_public. |
|
Returns the type corresponding to a pointer to the given type.
Definition at line 1158 of file typeManager.cxx. References CPPInstance::get_local_name(), and parser. |