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

CPPFunctionGroup Class Reference

This class is simply a container for one or more CPPInstances for functions of the same name. More...

#include <cppFunctionGroup.h>

Inheritance diagram for CPPFunctionGroup:

CPPDeclaration List of all members.

Public Types

typedef vector< CPPInstance * > Instances
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

 CPPFunctionGroup (const string &name)
 ~CPPFunctionGroup ()
CPPTypeget_return_type () const
 If all the functions that share this name have the same return type, returns that type.

virtual void output (ostream &out, int indent_level, CPPScope *scope, bool complete) const
virtual SubType get_subtype () const
virtual CPPFunctionGroup * as_function_group ()
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 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 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 CPPInstanceas_instance ()
virtual CPPClassTemplateParameteras_class_template_parameter ()
virtual CPPTypedefas_typedef ()
virtual CPPTypeDeclarationas_type_declaration ()
virtual CPPExpressionas_expression ()
virtual CPPTypeas_type ()
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 CPPExtensionTypeas_extension_type ()
virtual CPPStructTypeas_struct_type ()
virtual CPPEnumTypeas_enum_type ()
virtual CPPTBDTypeas_tbd_type ()
virtual CPPTypeProxyas_type_proxy ()

Public Attributes

Instances _instances
string _name
Instantiations _instantiations
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.


Detailed Description

This class is simply a container for one or more CPPInstances for functions of the same name.

It's handy for storing in the CPPScope, so that CPPScope::find_symbol() can return a single pointer to indicate all of the functions that may share a given name.

Definition at line 48 of file cppFunctionGroup.h.


Member Typedef Documentation

typedef vector<CPPInstance *> CPPFunctionGroup::Instances
 

Definition at line 61 of file cppFunctionGroup.h.

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

Reimplemented in CPPInstance.

Definition at line 118 of file cppDeclaration.h.

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

Definition at line 113 of file cppDeclaration.h.

Referenced by CPPScope::is_fully_specified().


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(), output(), CPPClassTemplateParameter::output(), and CPPFunctionType::output_instance().


Constructor & Destructor Documentation

CPPFunctionGroup::CPPFunctionGroup const string &  name  ) 
 

Definition at line 36 of file cppFunctionGroup.cxx.

CPPFunctionGroup::~CPPFunctionGroup  ) 
 

Definition at line 50 of file cppFunctionGroup.cxx.

References _instances, CPPFunctionType::_return_type, CPPDeclaration::as_function_type(), and NULL.


Member Function Documentation

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 * CPPDeclaration::as_extension_type  )  [virtual, inherited]
 

Reimplemented in CPPExtensionType, and CPPTypeProxy.

Definition at line 387 of file cppDeclaration.cxx.

Referenced by TypeManager::is_simple().

CPPFunctionGroup * CPPFunctionGroup::as_function_group  )  [virtual]
 

Reimplemented from CPPDeclaration.

Definition at line 128 of file cppFunctionGroup.cxx.

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

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

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 * CPPDeclaration::as_struct_type  )  [virtual, inherited]
 

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

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 * CPPDeclaration::as_type  )  [virtual, inherited]
 

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

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.

CPPType * CPPFunctionGroup::get_return_type  )  const
 

If all the functions that share this name have the same return type, returns that type.

Otherwise, if some functions have different return types, returns NULL.

Definition at line 68 of file cppFunctionGroup.cxx.

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

Implements CPPDeclaration.

Definition at line 116 of file cppFunctionGroup.cxx.

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

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

Reimplemented in CPPInstance, and CPPStructType.

Definition at line 174 of file cppDeclaration.cxx.

References NULL.

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

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

bool CPPDeclaration::is_fully_specified  )  const [virtual, inherited]
 

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 in CPPArrayType, CPPClassTemplateParameter, CPPConstType, CPPFunctionType, CPPInstance, CPPPointerType, CPPReferenceType, and CPPStructType.

Definition at line 162 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPConstType::CPPConstType(), CPPPointerType::CPPPointerType(), CPPReferenceType::CPPReferenceType(), CPPInstance::instantiate(), and CPPFunctionType::operator=().

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

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.

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

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.

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

Definition at line 77 of file cppDeclaration.cxx.

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

Implements CPPDeclaration.

Definition at line 94 of file cppFunctionGroup.cxx.

References CPPDeclaration::ST_function_group, and CPPDeclaration::SubType.

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


Member Data Documentation

CPPFile CPPDeclaration::_file [inherited]
 

Definition at line 149 of file cppDeclaration.h.

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

Instances CPPFunctionGroup::_instances
 

Definition at line 62 of file cppFunctionGroup.h.

Referenced by CPPStructType::check_virtual(), InterrogateBuilder::in_ignoremember(), and ~CPPFunctionGroup().

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

string CPPFunctionGroup::_name
 

Definition at line 63 of file cppFunctionGroup.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<().

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:20 2003 for DTool by doxygen1.3