Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

CPPStructType Class Reference

#include <cppStructType.h>

Inheritance diagram for CPPStructType:

CPPExtensionType CPPType CPPDeclaration List of all members.

Public Types

typedef vector< BaseDerivation
typedef list< CPPInstance * > VFunctions
enum  Type { T_enum, T_class, T_struct, T_union }
typedef vector< CPPTypedef * > Typedefs
typedef map< CPPDeclaration *,
CPPDeclaration * > 
SubstDecl
typedef set< CPPDeclaration * > Instantiations
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

 CPPStructType (Type type, CPPIdentifier *ident, CPPScope *current_scope, CPPScope *scope, const CPPFile &file)
 CPPStructType (const CPPStructType &copy)
void operator= (const CPPStructType &copy)
void append_derivation (CPPType *base, CPPVisibility vis, bool is_virtual)
 A handy function used while parsing to add a new base class to the list of classes (or structs) this class derives from.

CPPScopeget_scope () const
bool is_abstract () const
 Returns true if this struct declaration is abstract, e.g.

void check_virtual ()
 Ensures all functions are correctly marked with the "virtual" flag if they are truly virtual by virtue of inheritance, rather than simply being labeled virtual.

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 bool is_incomplete () const
 Returns true if the type has not yet been fully specified, false if it has.

CPPInstanceget_destructor () const
 Returns the destructor defined for the struct type, if any, or NULL if no destructor is found.

virtual CPPDeclarationinstantiate (const CPPTemplateParameterList *actual_params, CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const
virtual CPPDeclarationsubstitute_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 CPPStructType * as_struct_type ()
void get_virtual_funcs (VFunctions &funcs) const
 Fills funcs up with a list of all the virtual function declarations (pure-virtual or otherwise) defined at or above this class.

void get_pure_virtual_funcs (VFunctions &funcs) const
 Fills funcs up with a list of all the pure virtual function declarations defined at or above this class that have not been given definitions.

virtual string get_simple_name () const
 Returns a fundametal one-word name for the type.

virtual string get_local_name (CPPScope *scope=NULL) const
 Returns the compilable, correct name for this type within the indicated scope.

virtual string get_fully_scoped_name () const
 Returns the compilable, correct name for the type, with completely explicit scoping.

virtual bool is_tbd () const
 Returns true if the type, or any nested type within the type, is a CPPTBDType and thus isn't fully determined right now.

virtual CPPDeclarationsubstitute_decl (SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope)
virtual bool is_equivalent (const CPPType &other) const
 This is a little more forgiving than is_equal(): it returns true if the types appear to be referring to the same thing, even if they may have different pointers or somewhat different definitions.

virtual CPPExtensionTypeas_extension_type ()
virtual CPPTyperesolve_type (CPPScope *current_scope, CPPScope *global_scope)
 If this CPPType object is a forward reference or other nonspecified reference to a type that might now be known a real type, returns the real type.

bool has_typedef_name () const
 Returns true if the type has even been typedef'ed and therefore has a simple name available to stand for it.

string get_typedef_name (CPPScope *scope=NULL) const
 Returns a string that can be used to name the type, if has_typedef_name() returned true.

virtual string get_preferred_name () const
 Returns the best name to use for the type from a programmer's point of view.

void output_instance (ostream &out, const string &name, CPPScope *scope) const
 Formats a C++-looking line that defines an instance of the given type, with the indicated name.

virtual void output_instance (ostream &out, int indent_level, CPPScope *scope, bool complete, const string &prename, const string &name) const
 Formats a C++-looking line that defines an instance of the given type, with the indicated name.

virtual CPPTypeas_type ()
bool operator== (const CPPDeclaration &other) const
bool operator!= (const CPPDeclaration &other) const
bool operator< (const CPPDeclaration &other) const
bool is_template () const
 Returns true if this is a template declaration of some kind: a template function or a template class, typically.

CPPTemplateScopeget_template_scope () const
 If is_template(), above, returns true, this returns the CPPTemplateScope in which this particular template declaration is defined.

virtual CPPInstanceas_instance ()
virtual CPPClassTemplateParameteras_class_template_parameter ()
virtual CPPTypedefas_typedef ()
virtual CPPTypeDeclarationas_type_declaration ()
virtual CPPExpressionas_expression ()
virtual CPPNamespaceas_namespace ()
virtual CPPUsingas_using ()
virtual CPPSimpleTypeas_simple_type ()
virtual CPPPointerTypeas_pointer_type ()
virtual CPPReferenceTypeas_reference_type ()
virtual CPPArrayTypeas_array_type ()
virtual CPPConstTypeas_const_type ()
virtual CPPFunctionTypeas_function_type ()
virtual CPPFunctionGroupas_function_group ()
virtual CPPEnumTypeas_enum_type ()
virtual CPPTBDTypeas_tbd_type ()
virtual CPPTypeProxyas_type_proxy ()

Static Public Member Functions

CPPTypenew_type (CPPType *type)
 This should be called whenever a new CPPType object is created.

void record_preferred_name_for (const CPPType *type, const string &name)
 Records a global typedef name associated with the indicated Type.

string get_preferred_name_for (const CPPType *type)
 Returns the previously-stored "preferred" name associated with the type, if any, or empty string if no name is associated.


Public Attributes

CPPScope_scope
bool _incomplete
Derivation _derivation
Type _type
CPPIdentifier_ident
Typedefs _typedefs
CPPTypeDeclaration_declaration
Instantiations _instantiations
CPPVisibility _vis
CPPTemplateScope_template_scope
CPPFile _file
CPPCommentBlock_leading_comment

Protected Types

typedef vector< CPPTypeProxy * > Proxies
typedef set< CPPType *, CPPTypeCompareTypes
typedef map< string, string > PreferredNames

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.


Protected Attributes

bool _subst_decl_recursive_protect
Proxies _proxies

Static Protected Attributes

Types _types
PreferredNames _preferred_names

Member Typedef Documentation

typedef vector<Base> CPPStructType::Derivation
 

Definition at line 89 of file cppStructType.h.

typedef set<CPPDeclaration *> CPPDeclaration::Instantiations [inherited]
 

Reimplemented in CPPInstance.

Definition at line 118 of file cppDeclaration.h.

typedef map<string, string> CPPType::PreferredNames [protected, inherited]
 

Definition at line 93 of file cppType.h.

typedef vector<CPPTypeProxy *> CPPStructType::Proxies [protected]
 

Definition at line 101 of file cppStructType.h.

typedef map<CPPDeclaration *, CPPDeclaration *> CPPDeclaration::SubstDecl [inherited]
 

Definition at line 113 of file cppDeclaration.h.

Referenced by CPPScope::is_fully_specified().

typedef vector<CPPTypedef *> CPPType::Typedefs [inherited]
 

Definition at line 51 of file cppType.h.

typedef set<CPPType *, CPPTypeCompare> CPPType::Types [protected, inherited]
 

Definition at line 90 of file cppType.h.

typedef list<CPPInstance *> CPPStructType::VFunctions
 

Definition at line 92 of file cppStructType.h.

Referenced by is_abstract().


Member Enumeration Documentation

enum CPPDeclaration::SubType [inherited]
 

Enumeration values:
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 

Definition at line 71 of file cppDeclaration.h.

Referenced by CPPUsing::output(), CPPFunctionGroup::output(), CPPClassTemplateParameter::output(), and CPPFunctionType::output_instance().

enum CPPExtensionType::Type [inherited]
 

Enumeration values:
T_enum 
T_class 
T_struct 
T_union 

Definition at line 41 of file cppExtensionType.h.


Constructor & Destructor Documentation

CPPStructType::CPPStructType CPPStructType::Type  type,
CPPIdentifier ident,
CPPScope current_scope,
CPPScope scope,
const CPPFile file
 

Definition at line 57 of file cppStructType.cxx.

CPPStructType::CPPStructType const CPPStructType &  copy  ) 
 

Definition at line 75 of file cppStructType.cxx.

References _derivation, _incomplete, and _scope.


Member Function Documentation

void CPPStructType::append_derivation CPPType base,
CPPVisibility  vis,
bool  is_virtual
 

A handy function used while parsing to add a new base class to the list of classes (or structs) this class derives from.

Definition at line 112 of file cppStructType.cxx.

References _scope.

CPPArrayType * CPPDeclaration::as_array_type  )  [virtual, inherited]
 

Reimplemented in CPPArrayType, and CPPTypeProxy.

Definition at line 339 of file cppDeclaration.cxx.

References NULL.

Referenced by InterrogateBuilder::insert_param_list().

CPPClassTemplateParameter * CPPDeclaration::as_class_template_parameter  )  [virtual, inherited]
 

Reimplemented in CPPClassTemplateParameter.

Definition at line 219 of file cppDeclaration.cxx.

References NULL.

CPPConstType * CPPDeclaration::as_const_type  )  [virtual, inherited]
 

Reimplemented in CPPConstType, and CPPTypeProxy.

Definition at line 351 of file cppDeclaration.cxx.

Referenced by InterrogateBuilder::insert_param_list(), TypeManager::involves_unpublished(), TypeManager::is_basic_string_char(), TypeManager::is_const(), TypeManager::is_const_basic_string_char(), TypeManager::is_const_enum(), TypeManager::is_const_ref_to_simple(), TypeManager::is_const_simple(), TypeManager::is_pointable(), TypeManager::is_pointer(), TypeManager::is_reference(), TypeManager::is_reference_count(), TypeManager::is_simple(), TypeManager::is_struct(), and TypeManager::is_void().

CPPEnumType * CPPDeclaration::as_enum_type  )  [virtual, inherited]
 

Reimplemented in CPPEnumType, and CPPTypeProxy.

Definition at line 411 of file cppDeclaration.cxx.

Referenced by CPPTypeProxy::as_reference_type().

CPPExpression * CPPDeclaration::as_expression  )  [virtual, inherited]
 

Reimplemented in CPPExpression.

Definition at line 255 of file cppDeclaration.cxx.

References NULL.

CPPExtensionType * CPPExtensionType::as_extension_type  )  [virtual, inherited]
 

Reimplemented from CPPDeclaration.

Definition at line 235 of file cppExtensionType.cxx.

Referenced by CPPExtensionType::substitute_decl().

CPPFunctionGroup * CPPDeclaration::as_function_group  )  [virtual, inherited]
 

Reimplemented in CPPFunctionGroup.

Definition at line 375 of file cppDeclaration.cxx.

CPPFunctionType * CPPDeclaration::as_function_type  )  [virtual, inherited]
 

Reimplemented in CPPFunctionType, and CPPTypeProxy.

Definition at line 363 of file cppDeclaration.cxx.

Referenced by 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().

CPPInstance * CPPDeclaration::as_instance  )  [virtual, inherited]
 

Reimplemented in CPPInstance.

Definition at line 207 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPExpression::CPPExpression(), and CPPTypedef::CPPTypedef().

CPPNamespace * CPPDeclaration::as_namespace  )  [virtual, inherited]
 

Reimplemented in CPPNamespace.

Definition at line 279 of file cppDeclaration.cxx.

References NULL.

CPPPointerType * CPPDeclaration::as_pointer_type  )  [virtual, inherited]
 

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().

CPPReferenceType * CPPDeclaration::as_reference_type  )  [virtual, inherited]
 

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().

CPPSimpleType * CPPDeclaration::as_simple_type  )  [virtual, inherited]
 

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().

CPPStructType * CPPStructType::as_struct_type  )  [virtual]
 

Reimplemented from CPPDeclaration.

Definition at line 493 of file cppStructType.cxx.

References CPPInstance::SC_inherited_virtual, and CPPInstance::SC_virtual.

CPPTBDType * CPPDeclaration::as_tbd_type  )  [virtual, inherited]
 

Reimplemented in CPPTBDType, and CPPTypeProxy.

Definition at line 423 of file cppDeclaration.cxx.

Referenced by CPPTypeProxy::as_array_type().

CPPType * CPPType::as_type  )  [virtual, inherited]
 

Reimplemented from CPPDeclaration.

Reimplemented in CPPTypeProxy.

Definition at line 297 of file cppType.cxx.

CPPTypeDeclaration * CPPDeclaration::as_type_declaration  )  [virtual, inherited]
 

Reimplemented in CPPTypeDeclaration.

Definition at line 243 of file cppDeclaration.cxx.

References NULL.

CPPTypeProxy * CPPDeclaration::as_type_proxy  )  [virtual, inherited]
 

Reimplemented in CPPTypeProxy.

Definition at line 435 of file cppDeclaration.cxx.

CPPTypedef * CPPDeclaration::as_typedef  )  [virtual, inherited]
 

Reimplemented in CPPTypedef.

Definition at line 231 of file cppDeclaration.cxx.

Referenced by CPPTypedef::CPPTypedef().

CPPUsing * CPPDeclaration::as_using  )  [virtual, inherited]
 

Reimplemented in CPPUsing.

Definition at line 291 of file cppDeclaration.cxx.

void CPPStructType::check_virtual  ) 
 

Ensures all functions are correctly marked with the "virtual" flag if they are truly virtual by virtue of inheritance, rather than simply being labeled virtual.

This also sets the CPPInstance::SC_inherited_virtual flags on those virtual methods that override a virtual method defined in a parent class (as opposed to those that appear for this first time in this class). It is sometimes useful to know whether a given virtual method represents the first time that particular method appears.

Definition at line 186 of file cppStructType.cxx.

References CPPScope::_functions, CPPFunctionGroup::_instances, _scope, CPPInstance::_type, CPPDeclaration::as_function_type(), and NULL.

CPPInstance * CPPStructType::get_destructor  )  const
 

Returns the destructor defined for the struct type, if any, or NULL if no destructor is found.

Definition at line 239 of file cppStructType.cxx.

References _scope.

string CPPExtensionType::get_fully_scoped_name  )  const [virtual, inherited]
 

Returns the compilable, correct name for the type, with completely explicit scoping.

Reimplemented from CPPType.

Definition at line 86 of file cppExtensionType.cxx.

string CPPExtensionType::get_local_name CPPScope scope = NULL  )  const [virtual, inherited]
 

Returns the compilable, correct name for this type within the indicated scope.

If the scope is NULL, within the scope the type is declared in.

Reimplemented from CPPType.

Definition at line 71 of file cppExtensionType.cxx.

References CPPExtensionType::_ident, CPPIdentifier::get_fully_scoped_name(), and NULL.

Referenced by is_incomplete().

string CPPType::get_preferred_name  )  const [virtual, inherited]
 

Returns the best name to use for the type from a programmer's point of view.

This will typically be a typedef name if one is available, or the full C++ name if it is not. The typedef may or may not be visible within the current scope, so this type name may not be compilable.

Reimplemented in CPPSimpleType, and CPPTypeProxy.

Definition at line 198 of file cppType.cxx.

References CPPDeclaration::output().

string CPPType::get_preferred_name_for const CPPType type  )  [static, inherited]
 

Returns the previously-stored "preferred" name associated with the type, if any, or empty string if no name is associated.

Definition at line 377 of file cppType.cxx.

Referenced by CPPType::get_simple_name().

void CPPStructType::get_pure_virtual_funcs VFunctions funcs  )  const
 

Fills funcs up with a list of all the pure virtual function declarations defined at or above this class that have not been given definitions.

Definition at line 629 of file cppStructType.cxx.

CPPScope * CPPStructType::get_scope  )  const
 

Definition at line 131 of file cppStructType.cxx.

Referenced by InterrogateBuilder::get_getter(), and TypeManager::wrap_const_pointer().

string CPPExtensionType::get_simple_name  )  const [virtual, inherited]
 

Returns a fundametal one-word name for the type.

This name will not include any scoping operators or template parameters, so it may not be a compilable reference to the type.

Reimplemented from CPPType.

Definition at line 56 of file cppExtensionType.cxx.

References CPPExtensionType::_ident, CPPIdentifier::get_local_name(), and NULL.

CPPDeclaration::SubType CPPStructType::get_subtype  )  const [virtual]
 

Reimplemented from CPPExtensionType.

Definition at line 481 of file cppStructType.cxx.

References CPPInstance::SC_inherited_virtual, and CPPInstance::SC_virtual.

CPPTemplateScope * CPPDeclaration::get_template_scope  )  const [inherited]
 

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().

string CPPType::get_typedef_name CPPScope scope = NULL  )  const [inherited]
 

Returns a string that can be used to name the type, if has_typedef_name() returned true.

This will be the first typedef name applied to the type.

Reimplemented in CPPTypeProxy.

Definition at line 118 of file cppType.cxx.

References CPPDeclaration::output(), and ostringstream::str().

void CPPStructType::get_virtual_funcs VFunctions funcs  )  const
 

Fills funcs up with a list of all the virtual function declarations (pure-virtual or otherwise) defined at or above this class.

This is used to determine which functions in a given class are actually virtual, since a function is virtual whose parent class holds a virtual function by the same name, whether or not it is actually declared virtual in the derived class.

Definition at line 521 of file cppStructType.cxx.

Referenced by is_abstract().

bool CPPType::has_typedef_name  )  const [inherited]
 

Returns true if the type has even been typedef'ed and therefore has a simple name available to stand for it.

Extension types are all implicitly typedef'ed on declaration.

Reimplemented in CPPTypeProxy.

Definition at line 101 of file cppType.cxx.

References CPPType::get_local_name().

CPPDeclaration * CPPStructType::instantiate const CPPTemplateParameterList actual_params,
CPPScope current_scope,
CPPScope global_scope,
CPPPreprocessor error_sink = NULL
const [virtual]
 

Reimplemented from CPPDeclaration.

Definition at line 277 of file cppStructType.cxx.

bool CPPStructType::is_abstract  )  const
 

Returns true if this struct declaration is abstract, e.g.

it contains or inherits at least one method that is pure virtual.

Definition at line 149 of file cppStructType.cxx.

References get_virtual_funcs(), and VFunctions.

bool CPPStructType::is_equal const CPPDeclaration other  )  const [protected, virtual]
 

Called by CPPDeclaration to determine whether this type is equivalent to another type of the same type.

Reimplemented from CPPDeclaration.

Definition at line 656 of file cppStructType.cxx.

bool CPPExtensionType::is_equivalent const CPPType other  )  const [virtual, inherited]
 

This is a little more forgiving than is_equal(): it returns true if the types appear to be referring to the same thing, even if they may have different pointers or somewhat different definitions.

It's useful for parameter matching, etc.

Reimplemented from CPPType.

Definition at line 178 of file cppExtensionType.cxx.

bool CPPStructType::is_fully_specified  )  const [virtual]
 

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 206 of file cppStructType.cxx.

References CPPFunctionType::F_destructor.

bool CPPStructType::is_incomplete  )  const [virtual]
 

Returns true if the type has not yet been fully specified, false if it has.

Reimplemented from CPPExtensionType.

Definition at line 224 of file cppStructType.cxx.

References _scope, CPPExtensionType::get_local_name(), NULL, and CPPPreprocessor::warning().

bool CPPStructType::is_less const CPPDeclaration other  )  const [protected, virtual]
 

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 from CPPDeclaration.

Definition at line 680 of file cppStructType.cxx.

bool CPPExtensionType::is_tbd  )  const [virtual, inherited]
 

Returns true if the type, or any nested type within the type, is a CPPTBDType and thus isn't fully determined right now.

In this case, calling resolve_type() may or may not resolve the type.

Reimplemented from CPPType.

Definition at line 123 of file cppExtensionType.cxx.

References CPPExtensionType::_ident, current_scope, global_scope, NULL, and CPPIdentifier::substitute_decl().

bool CPPDeclaration::is_template  )  const [inherited]
 

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().

CPPType * CPPType::new_type CPPType type  )  [static, inherited]
 

This should be called whenever a new CPPType object is created.

It will uniquify the type pointers by checking to see if some equivalent CPPType object has previously been created; if it has, it returns the old object and deletes the new one. Otherwise, it stores the new one and returns it.

Definition at line 321 of file cppType.cxx.

Referenced by CPPInstanceIdentifier::add_array_modifier(), CPPEnumType::CPPEnumType(), InterrogateBuilder::get_getter(), CPPInstance::get_local_name(), CPPInstance::get_simple_name(), CPPArrayType::is_fully_specified(), CPPPreprocessor::should_ignore_manifest(), and TypeManager::unwrap_const_reference().

bool CPPDeclaration::operator!= const CPPDeclaration other  )  const [inherited]
 

Definition at line 92 of file cppDeclaration.cxx.

bool CPPDeclaration::operator< const CPPDeclaration other  )  const [inherited]
 

Definition at line 104 of file cppDeclaration.cxx.

References CPPDeclaration::_template_scope, and NULL.

void CPPStructType::operator= const CPPStructType &  copy  ) 
 

Definition at line 92 of file cppStructType.cxx.

References CPPStructType::Base::_base, _derivation, CPPStructType::Base::_is_virtual, CPPStructType::Base::_vis, and NULL.

bool CPPDeclaration::operator== const CPPDeclaration other  )  const [inherited]
 

Definition at line 77 of file cppDeclaration.cxx.

void CPPStructType::output ostream &  out,
int  indent_level,
CPPScope scope,
bool  complete
const [virtual]
 

Reimplemented from CPPExtensionType.

Definition at line 426 of file cppStructType.cxx.

void CPPType::output_instance ostream &  out,
int  indent_level,
CPPScope scope,
bool  complete,
const string &  prename,
const string &  name
const [virtual, inherited]
 

Formats a C++-looking line that defines an instance of the given type, with the indicated name.

In most cases this will be "type name", but some types have special exceptions.

Reimplemented in CPPArrayType, CPPConstType, CPPFunctionType, CPPPointerType, CPPReferenceType, and CPPTypeProxy.

Definition at line 281 of file cppType.cxx.

References CPPType::_preferred_names, and CPPType::get_fully_scoped_name().

void CPPType::output_instance ostream &  out,
const string &  name,
CPPScope scope
const [inherited]
 

Formats a C++-looking line that defines an instance of the given type, with the indicated name.

In most cases this will be "type name", but some types have special exceptions.

Definition at line 262 of file cppType.cxx.

References CPPType::_preferred_names, and CPPType::get_fully_scoped_name().

Referenced by CPPTypeProxy::get_fully_scoped_name(), CPPReferenceType::is_equivalent(), CPPPointerType::output(), CPPFunctionType::output(), FunctionWriterPtrToPython::write_prototype(), FunctionWriterPtrFromPython::write_prototype(), FunctionWriterPtrFromPython::~FunctionWriterPtrFromPython(), and FunctionWriterPtrToPython::~FunctionWriterPtrToPython().

void CPPType::record_preferred_name_for const CPPType type,
const string &  name
[static, inherited]
 

Records a global typedef name associated with the indicated Type.

This will be taken as the "preferred" name for this class, should anyone ask.

Definition at line 355 of file cppType.cxx.

CPPType * CPPType::resolve_type CPPScope current_scope,
CPPScope global_scope
[virtual, inherited]
 

If this CPPType object is a forward reference or other nonspecified reference to a type that might now be known a real type, returns the real type.

Otherwise returns the type itself.

Reimplemented in CPPArrayType, CPPConstType, CPPFunctionType, CPPPointerType, CPPReferenceType, CPPTBDType, and CPPTypeProxy.

Definition at line 63 of file cppType.cxx.

Referenced by CPPTemplateParameterList::get_string(), InterrogateBuilder::in_noinclude(), CPPArrayType::is_fully_specified(), and CPPParameterList::substitute_decl().

CPPDeclaration * CPPDeclaration::substitute_decl SubstDecl subst,
CPPScope current_scope,
CPPScope global_scope
[virtual, inherited]
 

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().

CPPDeclaration * CPPStructType::substitute_decl CPPDeclaration::SubstDecl subst,
CPPScope current_scope,
CPPScope global_scope
[virtual]
 

Reimplemented from CPPExtensionType.

Definition at line 325 of file cppStructType.cxx.


Member Data Documentation

CPPTypeDeclaration* CPPType::_declaration [inherited]
 

Definition at line 87 of file cppType.h.

Referenced by TypeManager::is_pointer_to_base().

Derivation CPPStructType::_derivation
 

Definition at line 90 of file cppStructType.h.

Referenced by CPPStructType(), operator=(), CPPScope::substitute_decl(), and CPPScope::write().

CPPFile CPPDeclaration::_file [inherited]
 

Definition at line 149 of file cppDeclaration.h.

Referenced by InterrogateBuilder::remap_indices(), InterrogateBuilder::scan_function(), and CPPScope::write().

CPPIdentifier* CPPExtensionType::_ident [inherited]
 

Definition at line 73 of file cppExtensionType.h.

Referenced by CPPExtensionType::CPPExtensionType(), CPPExtensionType::get_local_name(), CPPExtensionType::get_simple_name(), CPPExtensionType::is_incomplete(), CPPEnumType::is_incomplete(), CPPExtensionType::is_tbd(), CPPEnumType::output(), CPPExtensionType::substitute_decl(), CPPEnumType::substitute_decl(), and CPPScope::write().

bool CPPStructType::_incomplete
 

Definition at line 78 of file cppStructType.h.

Referenced by CPPStructType(), and CPPScope::write().

Instantiations CPPDeclaration::_instantiations [inherited]
 

Reimplemented in CPPInstance.

Definition at line 119 of file cppDeclaration.h.

CPPCommentBlock* CPPDeclaration::_leading_comment [inherited]
 

Definition at line 150 of file cppDeclaration.h.

Referenced by CPPDeclaration::CPPDeclaration(), and CPPScope::set_current_vis().

CPPType::PreferredNames CPPType::_preferred_names [static, protected, inherited]
 

Definition at line 27 of file cppType.cxx.

Referenced by CPPType::output_instance().

Proxies CPPStructType::_proxies [protected]
 

Definition at line 102 of file cppStructType.h.

CPPScope* CPPStructType::_scope
 

Definition at line 77 of file cppStructType.h.

Referenced by append_derivation(), check_virtual(), CPPStructType(), CPPScope::find_scope(), get_destructor(), is_incomplete(), InterrogateBuilder::remap_indices(), and CPPScope::substitute_decl().

bool CPPStructType::_subst_decl_recursive_protect [protected]
 

Definition at line 100 of file cppStructType.h.

CPPTemplateScope* CPPDeclaration::_template_scope [inherited]
 

Definition at line 148 of file cppDeclaration.h.

Referenced by CPPTemplateScope::add_declaration(), CPPTemplateScope::add_enum_value(), CPPTemplateScope::CPPTemplateScope(), and CPPDeclaration::operator<().

Type CPPExtensionType::_type [inherited]
 

Definition at line 72 of file cppExtensionType.h.

Referenced by TypeManager::is_simple(), and CPPScope::write().

Typedefs CPPType::_typedefs [inherited]
 

Definition at line 52 of file cppType.h.

Referenced by CPPType::is_tbd().

CPPType::Types CPPType::_types [static, protected, inherited]
 

Definition at line 26 of file cppType.cxx.

CPPVisibility CPPDeclaration::_vis [inherited]
 

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().


The documentation for this class was generated from the following files:
Generated on Thu May 1 22:13:27 2003 for DTool by doxygen1.3