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

CPPDeclaration Class Reference

#include <cppDeclaration.h>

Inheritance diagram for CPPDeclaration:

CPPExpression CPPFunctionGroup CPPInstance CPPNamespace CPPType CPPUsing CPPTypeDeclaration CPPTypedef CPPArrayType CPPClassTemplateParameter CPPConstType CPPExtensionType CPPFunctionType CPPPointerType CPPReferenceType CPPSimpleType CPPTBDType CPPTypeProxy List of all members.

Public Types

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

 CPPDeclaration (const CPPFile &file)
 CPPDeclaration (const CPPDeclaration &copy)
virtual ~CPPDeclaration ()
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 CPPDeclaration * instantiate (const CPPTemplateParameterList *actual_params, CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const
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=0
virtual SubType get_subtype () const=0
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 CPPFunctionGroupas_function_group ()
virtual CPPExtensionTypeas_extension_type ()
virtual CPPStructTypeas_struct_type ()
virtual CPPEnumTypeas_enum_type ()
virtual CPPTBDTypeas_tbd_type ()
virtual CPPTypeProxyas_type_proxy ()

Public Attributes

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.


Member Typedef Documentation

typedef set<CPPDeclaration *> CPPDeclaration::Instantiations
 

Reimplemented in CPPInstance.

Definition at line 118 of file cppDeclaration.h.

typedef map<CPPDeclaration *, CPPDeclaration *> CPPDeclaration::SubstDecl
 

Definition at line 113 of file cppDeclaration.h.

Referenced by CPPScope::is_fully_specified().


Member Enumeration Documentation

enum CPPDeclaration::SubType
 

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


Constructor & Destructor Documentation

CPPDeclaration::CPPDeclaration const CPPFile file  ) 
 

Definition at line 34 of file cppDeclaration.cxx.

References _leading_comment, and NULL.

CPPDeclaration::CPPDeclaration const CPPDeclaration &  copy  ) 
 

Definition at line 50 of file cppDeclaration.cxx.

CPPDeclaration::~CPPDeclaration  )  [virtual]
 

Definition at line 66 of file cppDeclaration.cxx.

References get_subtype(), and is_equal().


Member Function Documentation

CPPArrayType * CPPDeclaration::as_array_type  )  [virtual]
 

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]
 

Reimplemented in CPPClassTemplateParameter.

Definition at line 219 of file cppDeclaration.cxx.

References NULL.

CPPConstType * CPPDeclaration::as_const_type  )  [virtual]
 

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]
 

Reimplemented in CPPEnumType, and CPPTypeProxy.

Definition at line 411 of file cppDeclaration.cxx.

Referenced by CPPTypeProxy::as_reference_type().

CPPExpression * CPPDeclaration::as_expression  )  [virtual]
 

Reimplemented in CPPExpression.

Definition at line 255 of file cppDeclaration.cxx.

References NULL.

CPPExtensionType * CPPDeclaration::as_extension_type  )  [virtual]
 

Reimplemented in CPPExtensionType, and CPPTypeProxy.

Definition at line 387 of file cppDeclaration.cxx.

Referenced by TypeManager::is_simple().

CPPFunctionGroup * CPPDeclaration::as_function_group  )  [virtual]
 

Reimplemented in CPPFunctionGroup.

Definition at line 375 of file cppDeclaration.cxx.

CPPFunctionType * CPPDeclaration::as_function_type  )  [virtual]
 

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

CPPInstance * CPPDeclaration::as_instance  )  [virtual]
 

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]
 

Reimplemented in CPPNamespace.

Definition at line 279 of file cppDeclaration.cxx.

References NULL.

CPPPointerType * CPPDeclaration::as_pointer_type  )  [virtual]
 

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]
 

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]
 

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]
 

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]
 

Reimplemented in CPPTBDType, and CPPTypeProxy.

Definition at line 423 of file cppDeclaration.cxx.

Referenced by CPPTypeProxy::as_array_type().

CPPType * CPPDeclaration::as_type  )  [virtual]
 

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]
 

Reimplemented in CPPTypeDeclaration.

Definition at line 243 of file cppDeclaration.cxx.

References NULL.

CPPTypeProxy * CPPDeclaration::as_type_proxy  )  [virtual]
 

Reimplemented in CPPTypeProxy.

Definition at line 435 of file cppDeclaration.cxx.

CPPTypedef * CPPDeclaration::as_typedef  )  [virtual]
 

Reimplemented in CPPTypedef.

Definition at line 231 of file cppDeclaration.cxx.

Referenced by CPPTypedef::CPPTypedef().

CPPUsing * CPPDeclaration::as_using  )  [virtual]
 

Reimplemented in CPPUsing.

Definition at line 291 of file cppDeclaration.cxx.

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

Implemented in CPPArrayType, CPPClassTemplateParameter, CPPConstType, CPPEnumType, CPPExpression, CPPExtensionType, CPPFunctionGroup, CPPFunctionType, CPPInstance, CPPNamespace, CPPPointerType, CPPReferenceType, CPPSimpleType, CPPStructType, CPPTBDType, CPPTypeDeclaration, CPPTypedef, CPPTypeProxy, and CPPUsing.

Referenced by CPPType::get_fully_scoped_name(), InterrogateBuilder::insert_param_list(), TypeManager::is_basic_string_char(), TypeManager::is_const(), TypeManager::is_const_basic_string_char(), TypeManager::is_const_enum(), TypeManager::is_const_ref_to_enum(), TypeManager::is_const_ref_to_simple(), TypeManager::is_const_simple(), TypeManager::is_pointable(), TypeManager::is_pointer(), TypeManager::is_reference(), TypeManager::is_struct(), TypeManager::is_void(), TypeManager::wrap_const_reference(), and ~CPPDeclaration().

CPPTemplateScope * CPPDeclaration::get_template_scope  )  const
 

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]
 

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]
 

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

bool CPPDeclaration::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 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]
 

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
 

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
 

Definition at line 92 of file cppDeclaration.cxx.

bool CPPDeclaration::operator< const CPPDeclaration &  other  )  const
 

Definition at line 104 of file cppDeclaration.cxx.

References _template_scope, and NULL.

bool CPPDeclaration::operator== const CPPDeclaration &  other  )  const
 

Definition at line 77 of file cppDeclaration.cxx.

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

Implemented in CPPArrayType, CPPClassTemplateParameter, CPPConstType, CPPEnumType, CPPExpression, CPPExtensionType, CPPFunctionGroup, CPPFunctionType, CPPInstance, CPPNamespace, CPPPointerType, CPPReferenceType, CPPSimpleType, CPPStructType, CPPTBDType, CPPTypeDeclaration, CPPTypedef, CPPTypeProxy, and CPPUsing.

Referenced by CPPType::get_preferred_name(), CPPType::get_typedef_name(), CPPClassTemplateParameter::is_fully_specified(), CPPFunctionType::is_tbd(), and CPPConstType::is_tbd().

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

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
 

Definition at line 149 of file cppDeclaration.h.

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

Instantiations CPPDeclaration::_instantiations
 

Reimplemented in CPPInstance.

Definition at line 119 of file cppDeclaration.h.

CPPCommentBlock* CPPDeclaration::_leading_comment
 

Definition at line 150 of file cppDeclaration.h.

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

CPPTemplateScope* CPPDeclaration::_template_scope
 

Definition at line 148 of file cppDeclaration.h.

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

CPPVisibility CPPDeclaration::_vis
 

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