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
CPPTemplateScopeget_template_scope () const
virtual bool is_fully_specified () const
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
virtual bool is_less (const CPPDeclaration *other) const

Member Typedef Documentation

typedef set<CPPDeclaration *> CPPDeclaration::Instantiations
 

Reimplemented in CPPInstance.

Definition at line 113 of file cppDeclaration.h.

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

Definition at line 108 of file cppDeclaration.h.


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 66 of file cppDeclaration.h.


Constructor & Destructor Documentation

CPPDeclaration::CPPDeclaration const CPPFile file  ) 
 

Definition at line 29 of file cppDeclaration.cxx.

References _leading_comment, _template_scope, _vis, NULL, and V_unknown.

CPPDeclaration::CPPDeclaration const CPPDeclaration &  copy  ) 
 

Definition at line 43 of file cppDeclaration.cxx.

CPPDeclaration::~CPPDeclaration  )  [virtual]
 

Definition at line 57 of file cppDeclaration.cxx.


Member Function Documentation

CPPArrayType * CPPDeclaration::as_array_type  )  [virtual]
 

Reimplemented in CPPArrayType, and CPPTypeProxy.

Definition at line 279 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_array_type(), CPPExpression::determine_type(), and CPPArrayType::substitute_decl().

CPPClassTemplateParameter * CPPDeclaration::as_class_template_parameter  )  [virtual]
 

Reimplemented in CPPClassTemplateParameter.

Definition at line 179 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTemplateParameterList::build_subst_decl(), and CPPScope::instantiate().

CPPConstType * CPPDeclaration::as_const_type  )  [virtual]
 

Reimplemented in CPPConstType, and CPPTypeProxy.

Definition at line 289 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_const_type(), InterrogateBuilder::get_getter(), CPPConstType::substitute_decl(), TypeManager::unwrap(), TypeManager::unwrap_const(), TypeManager::unwrap_const_reference(), TypeManager::unwrap_pointer(), TypeManager::unwrap_reference(), ParameterRemapEnumToInt::unwrap_type(), TypeManager::wrap_const_pointer(), and TypeManager::wrap_const_reference().

CPPEnumType * CPPDeclaration::as_enum_type  )  [virtual]
 

Reimplemented in CPPEnumType, and CPPTypeProxy.

Definition at line 339 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_enum_type(), and CPPEnumType::substitute_decl().

CPPExpression * CPPDeclaration::as_expression  )  [virtual]
 

Reimplemented in CPPExpression.

Definition at line 209 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTemplateParameterList::is_tbd(), CPPInstance::substitute_decl(), CPPExpression::substitute_decl(), and CPPArrayType::substitute_decl().

CPPExtensionType * CPPDeclaration::as_extension_type  )  [virtual]
 

Reimplemented in CPPExtensionType, and CPPTypeProxy.

Definition at line 319 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_extension_type(), CPPScope::handle_declaration(), and CPPExtensionType::substitute_decl().

CPPFunctionGroup * CPPDeclaration::as_function_group  )  [virtual]
 

Reimplemented in CPPFunctionGroup.

Definition at line 309 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPExpression::CPPExpression().

CPPFunctionType * CPPDeclaration::as_function_type  )  [virtual]
 

Reimplemented in CPPFunctionType, and CPPTypeProxy.

Definition at line 299 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_function_type(), CPPInstance::check_for_constructor(), InterrogateBuilder::define_method(), CPPExpression::determine_type(), FunctionRemap::FunctionRemap(), CPPStructType::get_destructor(), InterrogateBuilder::get_function(), TypeManager::get_function_signature(), TypeManager::get_pointer_type(), CPPFunctionGroup::get_return_type(), CPPStructType::get_virtual_funcs(), CPPScope::handle_declaration(), TypeManager::has_protected_destructor(), CPPInstance::output(), CPPPointerType::output_instance(), InterfaceMaker::record_function(), InterrogateBuilder::scan_function(), CPPInstance::set_initializer(), CPPFunctionType::substitute_decl(), and InterrogateBuilder::update_method_comment().

CPPInstance * CPPDeclaration::as_instance  )  [virtual]
 

Reimplemented in CPPInstance.

Definition at line 169 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTemplateParameterList::build_subst_decl(), CPPExpression::CPPExpression(), CPPScope::handle_declaration(), CPPTypedef::substitute_decl(), CPPTypeDeclaration::substitute_decl(), and CPPExpression::substitute_decl().

CPPNamespace * CPPDeclaration::as_namespace  )  [virtual]
 

Reimplemented in CPPNamespace.

Definition at line 229 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPScope::write().

CPPPointerType * CPPDeclaration::as_pointer_type  )  [virtual]
 

Reimplemented in CPPPointerType, and CPPTypeProxy.

Definition at line 259 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_pointer_type(), CPPExpression::determine_type(), CPPPointerType::substitute_decl(), TypeManager::unwrap(), TypeManager::unwrap_pointer(), and ParameterRemapEnumToInt::unwrap_type().

CPPReferenceType * CPPDeclaration::as_reference_type  )  [virtual]
 

Reimplemented in CPPReferenceType, and CPPTypeProxy.

Definition at line 269 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_reference_type(), CPPReferenceType::substitute_decl(), TypeManager::unwrap(), TypeManager::unwrap_const_reference(), TypeManager::unwrap_reference(), and ParameterRemapEnumToInt::unwrap_type().

CPPSimpleType * CPPDeclaration::as_simple_type  )  [virtual]
 

Reimplemented in CPPSimpleType, and CPPTypeProxy.

Definition at line 249 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_simple_type(), and CPPExpression::elevate_type().

CPPStructType * CPPDeclaration::as_struct_type  )  [virtual]
 

Reimplemented in CPPStructType, and CPPTypeProxy.

Definition at line 329 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_struct_type(), InterrogateBuilder::build(), InterrogateBuilder::define_struct_type(), InterrogateBuilder::get_cast_function(), ParameterRemapPTToPointer::ParameterRemapPTToPointer(), InterrogateBuilder::scan_element(), and CPPStructType::substitute_decl().

CPPTBDType * CPPDeclaration::as_tbd_type  )  [virtual]
 

Reimplemented in CPPTBDType, and CPPTypeProxy.

Definition at line 349 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTypeProxy::as_tbd_type(), and CPPTBDType::substitute_decl().

CPPType * CPPDeclaration::as_type  )  [virtual]
 

Reimplemented in CPPType, and CPPTypeProxy.

Definition at line 219 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPTemplateParameterList::build_subst_decl(), CPPScope::copy_substitute_decl(), CPPScope::define_extension_type(), CPPIdentifier::find_symbol(), CPPIdentifier::find_type(), CPPPreprocessor::nested_parse_template_instantiation(), CPPReferenceType::substitute_decl(), CPPPointerType::substitute_decl(), CPPInstance::substitute_decl(), CPPFunctionType::substitute_decl(), CPPConstType::substitute_decl(), CPPArrayType::substitute_decl(), and CPPScope::write().

CPPTypeDeclaration * CPPDeclaration::as_type_declaration  )  [virtual]
 

Reimplemented in CPPTypeDeclaration.

Definition at line 199 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPScope::handle_declaration(), and CPPTypeDeclaration::substitute_decl().

CPPTypeProxy * CPPDeclaration::as_type_proxy  )  [virtual]
 

Reimplemented in CPPTypeProxy.

Definition at line 359 of file cppDeclaration.cxx.

References NULL.

CPPTypedef * CPPDeclaration::as_typedef  )  [virtual]
 

Reimplemented in CPPTypedef.

Definition at line 189 of file cppDeclaration.cxx.

References NULL.

Referenced by CPPScope::handle_declaration(), CPPTypedef::substitute_decl(), and CPPScope::write().

CPPUsing * CPPDeclaration::as_using  )  [virtual]
 

Reimplemented in CPPUsing.

Definition at line 239 of file cppDeclaration.cxx.

References NULL.

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 InterrogateBuilder::build(), CPPScope::define_extension_type(), InterrogateBuilder::define_struct_type(), TypeManager::has_protected_destructor(), CPPType::is_equivalent(), operator<(), operator==(), TypeManager::unwrap(), TypeManager::unwrap_const(), TypeManager::unwrap_const_reference(), TypeManager::unwrap_pointer(), TypeManager::unwrap_reference(), and ParameterRemapEnumToInt::unwrap_type().

CPPTemplateScope * CPPDeclaration::get_template_scope  )  const
 

Definition at line 117 of file cppDeclaration.cxx.

References _template_scope.

Referenced by CPPInstance::instantiate(), CPPStructType::output(), and CPPInstance::output().

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 140 of file cppDeclaration.cxx.

References NULL, and CPPPreprocessor::warning().

Referenced by CPPIdentifier::find_symbol().

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

Reimplemented in CPPArrayType, CPPClassTemplateParameter, CPPConstType, CPPExpression, CPPFunctionType, CPPPointerType, CPPReferenceType, CPPSimpleType, CPPStructType, and CPPTBDType.

Definition at line 371 of file cppDeclaration.cxx.

Referenced by CPPStructType::is_equal(), CPPType::is_equivalent(), and operator==().

bool CPPDeclaration::is_fully_specified  )  const [virtual]
 

Reimplemented in CPPArrayType, CPPClassTemplateParameter, CPPConstType, CPPFunctionType, CPPInstance, CPPPointerType, CPPReferenceType, and CPPStructType.

Definition at line 130 of file cppDeclaration.cxx.

References is_template().

Referenced by CPPStructType::is_fully_specified(), CPPReferenceType::is_fully_specified(), CPPPointerType::is_fully_specified(), CPPInstance::is_fully_specified(), CPPFunctionType::is_fully_specified(), CPPConstType::is_fully_specified(), and CPPArrayType::is_fully_specified().

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

Reimplemented in CPPArrayType, CPPClassTemplateParameter, CPPConstType, CPPExpression, CPPFunctionType, CPPPointerType, CPPReferenceType, CPPSimpleType, CPPStructType, and CPPTBDType.

Definition at line 383 of file cppDeclaration.cxx.

Referenced by CPPStructType::is_less(), and operator<().

bool CPPDeclaration::is_template  )  const
 

Definition at line 104 of file cppDeclaration.cxx.

References _template_scope, and NULL.

Referenced by CPPScope::define_extension_type(), InterrogateBuilder::define_method(), CPPScope::handle_declaration(), CPPInstance::instantiate(), is_fully_specified(), CPPStructType::output(), CPPInstance::output(), InterrogateBuilder::scan_element(), InterrogateBuilder::scan_function(), and CPPStructType::substitute_decl().

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

Definition at line 79 of file cppDeclaration.cxx.

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

Definition at line 89 of file cppDeclaration.cxx.

References get_subtype(), and is_less().

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

Definition at line 66 of file cppDeclaration.cxx.

References get_subtype(), and is_equal().

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_local_name(), operator<<(), CPPTypeProxy::output(), CPPTypeDeclaration::output(), CPPFunctionType::output(), CPPConstType::output(), CPPClassTemplateParameter::output(), CPPType::output_instance(), and CPPScope::write().

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

Definition at line 155 of file cppDeclaration.cxx.

Referenced by CPPTemplateParameterList::build_subst_decl(), CPPScope::copy_substitute_decl(), CPPTBDType::substitute_decl(), CPPReferenceType::substitute_decl(), CPPPointerType::substitute_decl(), CPPInstance::substitute_decl(), CPPFunctionType::substitute_decl(), CPPExpression::substitute_decl(), CPPConstType::substitute_decl(), and CPPArrayType::substitute_decl().


Member Data Documentation

CPPFile CPPDeclaration::_file
 

Definition at line 144 of file cppDeclaration.h.

Referenced by CPPScope::copy_substitute_decl(), InterrogateBuilder::define_struct_type(), InterrogateBuilder::scan_element(), and InterrogateBuilder::scan_function().

Instantiations CPPDeclaration::_instantiations
 

Reimplemented in CPPInstance.

Definition at line 114 of file cppDeclaration.h.

Referenced by CPPStructType::substitute_decl().

CPPCommentBlock* CPPDeclaration::_leading_comment
 

Definition at line 145 of file cppDeclaration.h.

Referenced by CPPScope::add_declaration(), CPPDeclaration(), InterrogateBuilder::get_function(), InterrogateBuilder::get_type(), and InterrogateBuilder::update_method_comment().

CPPTemplateScope* CPPDeclaration::_template_scope
 

Definition at line 143 of file cppDeclaration.h.

Referenced by CPPTemplateScope::add_declaration(), CPPTemplateScope::add_enum_value(), CPPDeclaration(), get_template_scope(), CPPInstance::instantiate(), is_template(), and CPPStructType::substitute_decl().

CPPVisibility CPPDeclaration::_vis
 

Definition at line 142 of file cppDeclaration.h.

Referenced by CPPScope::add_declaration(), CPPScope::add_enum_value(), CPPDeclaration(), InterrogateBuilder::define_method(), TypeManager::has_protected_destructor(), InterrogateBuilder::scan_element(), InterrogateBuilder::scan_function(), and CPPScope::write().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:34:47 2003 for DTool by doxygen1.3