#include <cppTypedef.h>
Inheritance diagram for CPPTypedef:
Public Types | |
enum | StorageClass { SC_static = 0x001, SC_extern = 0x002, SC_c_binding = 0x004, SC_virtual = 0x008, SC_inline = 0x010, SC_explicit = 0x020, SC_register = 0x040, SC_pure_virtual = 0x080, SC_volatile = 0x100, SC_mutable = 0x200, SC_inherited_virtual = 0x400 } |
typedef map< CPPDeclaration *, CPPDeclaration * > | SubstDecl |
enum | SubType { ST_instance, ST_typedef, ST_type_declaration, ST_expression, ST_type, ST_namespace, ST_using, ST_simple, ST_pointer, ST_reference, ST_array, ST_const, ST_function, ST_function_group, ST_extension, ST_struct, ST_enum, ST_class_template_parameter, ST_tbd, ST_type_proxy } |
Public Member Functions | |
CPPTypedef (CPPInstance *instance, bool global) | |
Constructs a new CPPTypedef object based on the indicated CPPInstance object. | |
virtual CPPDeclaration * | substitute_decl (SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) |
virtual void | output (ostream &out, int indent_level, CPPScope *scope, bool complete) const |
virtual SubType | get_subtype () const |
virtual CPPTypedef * | as_typedef () |
bool | operator== (const CPPInstance &other) const |
bool | operator== (const CPPDeclaration &other) const |
bool | operator!= (const CPPInstance &other) const |
bool | operator!= (const CPPDeclaration &other) const |
bool | operator< (const CPPInstance &other) const |
bool | operator< (const CPPDeclaration &other) const |
void | set_initializer (CPPExpression *initializer) |
Sets the value of the expression that is used to initialize the variable, or the default value for a parameter. | |
bool | is_scoped () const |
CPPScope * | get_scope (CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const |
string | get_simple_name () const |
string | get_local_name (CPPScope *scope=NULL) const |
string | get_fully_scoped_name () const |
void | check_for_constructor (CPPScope *current_scope, CPPScope *global_scope) |
If this is a function type instance, checks whether the function name matches the class name (or ~name), and if so, flags it as a constructor (or destructor). | |
virtual CPPDeclaration * | instantiate (const CPPTemplateParameterList *actual_params, CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const |
virtual bool | is_fully_specified () const |
Returns true if this declaration is an actual, factual declaration, or false if some part of the declaration depends on a template parameter which has not yet been instantiated. | |
virtual CPPDeclaration * | substitute_decl (SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) |
void | output (ostream &out, int indent_level, CPPScope *scope, bool complete, int num_default_parameters) const |
The extra parameter comes into play only when we happen to be outputting a function prototype. | |
virtual CPPInstance * | as_instance () |
bool | is_template () const |
Returns true if this is a template declaration of some kind: a template function or a template class, typically. | |
CPPTemplateScope * | get_template_scope () const |
If is_template(), above, returns true, this returns the CPPTemplateScope in which this particular template declaration is defined. | |
virtual CPPClassTemplateParameter * | as_class_template_parameter () |
virtual CPPTypeDeclaration * | as_type_declaration () |
virtual CPPExpression * | as_expression () |
virtual CPPType * | as_type () |
virtual CPPNamespace * | as_namespace () |
virtual CPPUsing * | as_using () |
virtual CPPSimpleType * | as_simple_type () |
virtual CPPPointerType * | as_pointer_type () |
virtual CPPReferenceType * | as_reference_type () |
virtual CPPArrayType * | as_array_type () |
virtual CPPConstType * | as_const_type () |
virtual CPPFunctionType * | as_function_type () |
virtual CPPFunctionGroup * | as_function_group () |
virtual CPPExtensionType * | as_extension_type () |
virtual CPPStructType * | as_struct_type () |
virtual CPPEnumType * | as_enum_type () |
virtual CPPTBDType * | as_tbd_type () |
virtual CPPTypeProxy * | as_type_proxy () |
Static Public Member Functions | |
CPPInstance * | make_typecast_function (CPPInstance *inst, CPPIdentifier *ident, CPPParameterList *parameters, int function_flags) |
Constructs and returns a new CPPInstance object that corresponds to a function prototype declaration for a typecast method, whose return type is implicit in the identifier type. | |
Public Attributes | |
CPPType * | _type |
CPPIdentifier * | _ident |
CPPExpression * | _initializer |
int | _storage_class |
CPPVisibility | _vis |
CPPTemplateScope * | _template_scope |
CPPFile | _file |
CPPCommentBlock * | _leading_comment |
Protected Member Functions | |
virtual bool | is_equal (const CPPDeclaration *other) const |
Called by CPPDeclaration to determine whether this type is equivalent to another type of the same type. | |
virtual bool | is_less (const CPPDeclaration *other) const |
Called by CPPDeclaration to determine whether this type should be ordered before another type of the same type, in an arbitrary but fixed ordering. |
|
Definition at line 113 of file cppDeclaration.h. Referenced by CPPScope::is_fully_specified(). |
|
Definition at line 48 of file cppInstance.h. |
|
Definition at line 71 of file cppDeclaration.h. Referenced by CPPUsing::output(), CPPFunctionGroup::output(), CPPClassTemplateParameter::output(), and CPPFunctionType::output_instance(). |
|
Constructs a new CPPTypedef object based on the indicated CPPInstance object. The CPPInstance is deallocated. If global is true, the typedef is defined at the global scope, and hence it's worth telling the type itself about. Otherwise, it's just a locally-scoped typedef. Definition at line 48 of file cppTypedef.cxx. References CPPDeclaration::as_instance(), CPPDeclaration::as_typedef(), CPPInstance::CPPInstance(), current_scope, global_scope, NULL, and CPPInstance::substitute_decl(). |
|
Reimplemented in CPPArrayType, and CPPTypeProxy. Definition at line 339 of file cppDeclaration.cxx. References NULL. Referenced by InterrogateBuilder::insert_param_list(). |
|
Reimplemented in CPPClassTemplateParameter. Definition at line 219 of file cppDeclaration.cxx. References NULL. |
|
|
Reimplemented in CPPEnumType, and CPPTypeProxy. Definition at line 411 of file cppDeclaration.cxx. Referenced by CPPTypeProxy::as_reference_type(). |
|
Reimplemented in CPPExpression. Definition at line 255 of file cppDeclaration.cxx. References NULL. |
|
Reimplemented in CPPExtensionType, and CPPTypeProxy. Definition at line 387 of file cppDeclaration.cxx. Referenced by TypeManager::is_simple(). |
|
Reimplemented in CPPFunctionGroup. Definition at line 375 of file cppDeclaration.cxx. |
|
Reimplemented in CPPFunctionType, and CPPTypeProxy. Definition at line 363 of file cppDeclaration.cxx. Referenced by CPPStructType::check_virtual(), CPPInstanceIdentifier::get_scope(), CPPInstance::get_simple_name(), InterrogateBuilder::in_noinclude(), TypeManager::is_const_pointer_to_base(), CPPPointerType::output(), TypeManager::unwrap(), TypeManager::wrap_const_reference(), and CPPFunctionGroup::~CPPFunctionGroup(). |
|
Reimplemented from CPPDeclaration. Definition at line 635 of file cppInstance.cxx. |
|
Reimplemented in CPPNamespace. Definition at line 279 of file cppDeclaration.cxx. References NULL. |
|
Reimplemented in CPPPointerType, and CPPTypeProxy. Definition at line 315 of file cppDeclaration.cxx. References NULL. Referenced by InterrogateBuilder::insert_param_list(), TypeManager::is_const_ref_to_simple(), and CPPTypeProxy::output_instance(). |
|
Reimplemented in CPPReferenceType, and CPPTypeProxy. Definition at line 327 of file cppDeclaration.cxx. References NULL. Referenced by InterrogateBuilder::insert_param_list(), TypeManager::involves_unpublished(), TypeManager::is_const_ref_to_enum(), TypeManager::is_reference_count(), and CPPTypeProxy::output(). |
|
Reimplemented in CPPSimpleType, and CPPTypeProxy. Definition at line 303 of file cppDeclaration.cxx. References NULL. Referenced by TypeManager::is_basic_string_char(), TypeManager::is_char_pointer(), TypeManager::is_const_basic_string_char(), and TypeManager::is_const_simple(). |
|
Reimplemented in CPPStructType, and CPPTypeProxy. Definition at line 399 of file cppDeclaration.cxx. Referenced by CPPTypeProxy::as_pointer_type(), CPPScope::find_scope(), InterrogateBuilder::get_getter(), and TypeManager::wrap_const_pointer(). |
|
Reimplemented in CPPTBDType, and CPPTypeProxy. Definition at line 423 of file cppDeclaration.cxx. Referenced by CPPTypeProxy::as_array_type(). |
|
Reimplemented in CPPType, and CPPTypeProxy. Definition at line 267 of file cppDeclaration.cxx. References NULL. Referenced by CPPIdentifier::get_scope(), CPPTemplateParameterList::get_string(), CPPReferenceType::is_fully_specified(), CPPPointerType::is_fully_specified(), CPPConstType::is_fully_specified(), CPPArrayType::is_tbd(), and CPPScope::write(). |
|
Reimplemented in CPPTypeDeclaration. Definition at line 243 of file cppDeclaration.cxx. References NULL. |
|
Reimplemented in CPPTypeProxy. Definition at line 435 of file cppDeclaration.cxx. |
|
Reimplemented from CPPDeclaration. Definition at line 114 of file cppTypedef.cxx. |
|
Reimplemented in CPPUsing. Definition at line 291 of file cppDeclaration.cxx. |
|
If this is a function type instance, checks whether the function name matches the class name (or ~name), and if so, flags it as a constructor (or destructor).
Definition at line 377 of file cppInstance.cxx. References CPPInstance::_instantiations. |
|
Definition at line 356 of file cppInstance.cxx. |
|
Definition at line 340 of file cppInstance.cxx. References CPPInstance::_type, and CPPType::new_type(). Referenced by CPPInstance::get_simple_name(), and TypeManager::wrap_pointer(). |
|
Definition at line 307 of file cppInstance.cxx. References CPPInstance::_ident, CPPIdentifier::get_fully_scoped_name(), and NULL. Referenced by CPPInstance::get_simple_name(), and InterrogateBuilder::in_noinclude(). |
|
Definition at line 324 of file cppInstance.cxx. References CPPInstance::_type, CPPDeclaration::as_function_type(), current_scope, CPPScope::get_local_name(), CPPInstance::get_local_name(), CPPInstance::get_scope(), global_scope, CPPType::new_type(), and NULL. Referenced by InterfaceMakerPythonObj::write_function_for(). |
|
Reimplemented from CPPInstance. Definition at line 102 of file cppTypedef.cxx. |
|
If is_template(), above, returns true, this returns the CPPTemplateScope in which this particular template declaration is defined. This scope includes the information about the template parameters. Definition at line 143 of file cppDeclaration.cxx. References NULL, and CPPPreprocessor::warning(). |
|
Reimplemented from CPPDeclaration. Definition at line 417 of file cppInstance.cxx. References CPPInstance::_ident, CPPInstance::_initializer, CPPInstance::_type, CPPDeclaration::is_fully_specified(), CPPIdentifier::is_fully_specified(), and NULL. |
|
Called by CPPDeclaration to determine whether this type is equivalent to another type of the same type.
Reimplemented in CPPArrayType, CPPClassTemplateParameter, CPPConstType, CPPExpression, CPPFunctionType, CPPPointerType, CPPReferenceType, CPPSimpleType, CPPStructType, and CPPTBDType. Definition at line 451 of file cppDeclaration.cxx. Referenced by CPPType::get_fully_scoped_name(), and CPPDeclaration::~CPPDeclaration(). |
|
Returns true if this declaration is an actual, factual declaration, or false if some part of the declaration depends on a template parameter which has not yet been instantiated.
Reimplemented from CPPDeclaration. Definition at line 480 of file cppInstance.cxx. |
|
Called by CPPDeclaration to determine whether this type should be ordered before another type of the same type, in an arbitrary but fixed ordering.
Reimplemented in CPPArrayType, CPPClassTemplateParameter, CPPConstType, CPPExpression, CPPFunctionType, CPPPointerType, CPPReferenceType, CPPSimpleType, CPPStructType, and CPPTBDType. Definition at line 468 of file cppDeclaration.cxx. |
|
Definition at line 291 of file cppInstance.cxx. References CPPInstance::_ident, CPPIdentifier::get_local_name(), and NULL. Referenced by InterrogateBuilder::in_noinclude(). |
|
Returns true if this is a template declaration of some kind: a template function or a template class, typically.
Definition at line 124 of file cppDeclaration.cxx. Referenced by InterrogateBuilder::remap_indices(), and InterrogateBuilder::scan_function(). |
|
Constructs and returns a new CPPInstance object that corresponds to a function prototype declaration for a typecast method, whose return type is implicit in the identifier type.
Definition at line 145 of file cppInstance.cxx. References CPPInstance::_storage_class. |
|
Definition at line 92 of file cppDeclaration.cxx. |
|
Definition at line 204 of file cppInstance.cxx. |
|
Definition at line 104 of file cppDeclaration.cxx. References CPPDeclaration::_template_scope, and NULL. |
|
Definition at line 216 of file cppInstance.cxx. |
|
Definition at line 77 of file cppDeclaration.cxx. |
|
Definition at line 166 of file cppInstance.cxx. |
|
The extra parameter comes into play only when we happen to be outputting a function prototype. See CPPFunctionType::output(). Definition at line 558 of file cppInstance.cxx. |
|
Reimplemented from CPPInstance. Definition at line 89 of file cppTypedef.cxx. |
|
Sets the value of the expression that is used to initialize the variable, or the default value for a parameter. If a non-null expression is set on a function declaration, it implies that the function is pure virtual. Definition at line 269 of file cppInstance.cxx. References CPPInstance::_ident, current_scope, and NULL. |
|
Definition at line 191 of file cppDeclaration.cxx. Referenced by CPPReferenceType::is_fully_specified(), CPPPointerType::is_fully_specified(), CPPConstType::is_fully_specified(), CPPArrayType::is_tbd(), and CPPScope::write(). |
|
Reimplemented from CPPInstance. Definition at line 69 of file cppTypedef.cxx. References CPPInstance::output(). |
|
Definition at line 149 of file cppDeclaration.h. Referenced by InterrogateBuilder::remap_indices(), InterrogateBuilder::scan_function(), and CPPScope::write(). |
|
Definition at line 110 of file cppInstance.h. Referenced by CPPInstance::get_scope(), CPPInstance::instantiate(), CPPInstance::is_scoped(), and CPPInstance::set_initializer(). |
|
Definition at line 111 of file cppInstance.h. Referenced by CPPEnumType::CPPEnumType(), CPPInstance::CPPInstance(), CPPInstance::instantiate(), and CPPInstance::output(). |
|
Definition at line 150 of file cppDeclaration.h. Referenced by CPPDeclaration::CPPDeclaration(), and CPPScope::set_current_vis(). |
|
Definition at line 113 of file cppInstance.h. Referenced by CPPInstance::make_typecast_function(), and CPPInstance::substitute_decl(). |
|
Definition at line 148 of file cppDeclaration.h. Referenced by CPPTemplateScope::add_declaration(), CPPTemplateScope::add_enum_value(), CPPTemplateScope::CPPTemplateScope(), and CPPDeclaration::operator<(). |
|
|
Definition at line 147 of file cppDeclaration.h. Referenced by CPPScope::get_local_name(), TypeManager::is_pointer_to_base(), InterrogateBuilder::remap_indices(), InterrogateBuilder::scan_function(), and TypeManager::wrap_const_reference(). |