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

CPPNamespace Class Reference

#include <cppNamespace.h>

Inheritance diagram for CPPNamespace:

CPPDeclaration 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

 CPPNamespace (CPPIdentifier *ident, CPPScope *scope, const CPPFile &file)
string get_simple_name () const
string get_local_name (CPPScope *scope=NULL) const
string get_fully_scoped_name () const
CPPScope * get_scope () const
virtual void output (ostream &out, int indent_level, CPPScope *scope, bool complete) const
virtual SubType get_subtype () const
virtual CPPNamespace * as_namespace ()
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.

CPPTemplateScope * get_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 CPPInstance * as_instance ()
virtual CPPClassTemplateParameter * as_class_template_parameter ()
virtual CPPTypedef * as_typedef ()
virtual CPPTypeDeclaration * as_type_declaration ()
virtual CPPExpression * as_expression ()
virtual CPPType * as_type ()
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 ()

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.


Private Attributes

CPPIdentifier * _ident
CPPScope * _scope

Member Typedef Documentation

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


Constructor & Destructor Documentation

CPPNamespace::CPPNamespace (  CPPIdentifier *  ident,
CPPScope *  scope,
const CPPFile &  file
) 
 

Definition at line 36 of file cppNamespace.cxx.

References _ident, CPPIdentifier::get_simple_name(), 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 * 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 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, inherited]
 

Reimplemented in CPPInstance.

Definition at line 207 of file cppDeclaration.cxx.

References NULL.

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

CPPNamespace * CPPNamespace::as_namespace (   )  [virtual]
 

Reimplemented from CPPDeclaration.

Definition at line 144 of file cppNamespace.cxx.

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.

string CPPNamespace::get_fully_scoped_name (   )  const
 

Definition at line 80 of file cppNamespace.cxx.

References _scope.

string CPPNamespace::get_local_name (  CPPScope *  scope = NULL  )  const
 

Definition at line 65 of file cppNamespace.cxx.

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

CPPScope * CPPNamespace::get_scope (   )  const
 

Definition at line 95 of file cppNamespace.cxx.

References _ident.

string CPPNamespace::get_simple_name (   )  const
 

Definition at line 50 of file cppNamespace.cxx.

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

CPPDeclaration::SubType CPPNamespace::get_subtype (   )  const [virtual]
 

Implements CPPDeclaration.

Definition at line 132 of file cppNamespace.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 CPPNamespace::output (  ostream &  out,
int  indent_level,
CPPScope *  scope,
bool  complete
)  const [virtual]
 

Implements CPPDeclaration.

Definition at line 107 of file cppNamespace.cxx.

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

CPPIdentifier* CPPNamespace::_ident [private]
 

Definition at line 55 of file cppNamespace.h.

Referenced by CPPNamespace(), get_local_name(), get_scope(), and get_simple_name().

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

CPPScope* CPPNamespace::_scope [private]
 

Definition at line 56 of file cppNamespace.h.

Referenced by get_fully_scoped_name().

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