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

CPPIdentifier Class Reference

#include <cppIdentifier.h>

List of all members.

Public Types

typedef vector< CPPNameComponentNames

Public Member Functions

 CPPIdentifier (const string &name, const CPPFile &file=CPPFile())
 CPPIdentifier (const CPPNameComponent &name)
void add_name (const string &name)
void add_name (const CPPNameComponent &name)
bool operator== (const CPPIdentifier &other) const
bool operator!= (const CPPIdentifier &other) const
bool operator< (const CPPIdentifier &other) const
bool is_scoped () const
string get_simple_name () const
string get_local_name (CPPScope *scope=NULL) const
string get_fully_scoped_name () const
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.

bool is_tbd () const
 Returns true if the identifier includes a template parameter list that includes some not-yet-defined type.

CPPScopeget_scope (CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const
CPPScopeget_scope (CPPScope *current_scope, CPPScope *global_scope, CPPDeclaration::SubstDecl &subst, CPPPreprocessor *error_sink=NULL) const
CPPTypefind_type (CPPScope *current_scope, CPPScope *global_scope, bool force_instantiate=false, CPPPreprocessor *error_sink=NULL) const
 Looks up the identifier in the current and/or global scopes, and returns a CPPType pointer if it seems to refer to a type, or NULL if it does not.

CPPTypefind_type (CPPScope *current_scope, CPPScope *global_scope, CPPDeclaration::SubstDecl &subst, CPPPreprocessor *error_sink=NULL) const
 This flavor of find_type() will instantiate any scope names in the identifier.

CPPDeclarationfind_symbol (CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const
CPPDeclarationfind_template (CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const
CPPScopefind_scope (CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const
CPPIdentifier * substitute_decl (CPPDeclaration::SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope)
void output (ostream &out, CPPScope *scope) const
void output_local_name (ostream &out, CPPScope *scope) const
void output_fully_scoped_name (ostream &out) const

Public Attributes

Names _names
CPPScope_native_scope
CPPFile _file


Member Typedef Documentation

typedef vector<CPPNameComponent> CPPIdentifier::Names
 

Definition at line 96 of file cppIdentifier.h.


Constructor & Destructor Documentation

CPPIdentifier::CPPIdentifier const string &  name,
const CPPFile file = CPPFile()
 

Definition at line 40 of file cppIdentifier.cxx.

References _names, _native_scope, and NULL.

Referenced by find_symbol().

CPPIdentifier::CPPIdentifier const CPPNameComponent name  ) 
 

Definition at line 53 of file cppIdentifier.cxx.

References _names.


Member Function Documentation

void CPPIdentifier::add_name const CPPNameComponent name  ) 
 

Definition at line 78 of file cppIdentifier.cxx.

References _names.

void CPPIdentifier::add_name const string &  name  ) 
 

Definition at line 66 of file cppIdentifier.cxx.

References _names.

CPPScope * CPPIdentifier::find_scope CPPScope current_scope,
CPPScope global_scope,
CPPPreprocessor error_sink = NULL
const
 

Definition at line 536 of file cppIdentifier.cxx.

References _names, and NULL.

CPPDeclaration * CPPIdentifier::find_symbol CPPScope current_scope,
CPPScope global_scope,
CPPPreprocessor error_sink = NULL
const
 

Definition at line 483 of file cppIdentifier.cxx.

References _names, CPPIdentifier(), current_scope, and global_scope.

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

CPPDeclaration * CPPIdentifier::find_template CPPScope current_scope,
CPPScope global_scope,
CPPPreprocessor error_sink = NULL
const
 

Definition at line 519 of file cppIdentifier.cxx.

References NULL, output_fully_scoped_name(), and output_local_name().

CPPType * CPPIdentifier::find_type CPPScope current_scope,
CPPScope global_scope,
CPPDeclaration::SubstDecl subst,
CPPPreprocessor error_sink = NULL
const
 

This flavor of find_type() will instantiate any scope names in the identifier.

It's useful for fully defining a type while instantiating a class.

Definition at line 438 of file cppIdentifier.cxx.

References NULL.

CPPType * CPPIdentifier::find_type CPPScope current_scope,
CPPScope global_scope,
bool  force_instantiate = false,
CPPPreprocessor error_sink = NULL
const
 

Looks up the identifier in the current and/or global scopes, and returns a CPPType pointer if it seems to refer to a type, or NULL if it does not.

If force_instantiate is true, the type will be instantiated as fully as possible right now, even if it means instantiating it into an identical template type. Otherwise, the instantiation may be delayed for optimization reasons, and a CPPTBDType placeholder may be returned instead.

Definition at line 387 of file cppIdentifier.cxx.

References NULL.

string CPPIdentifier::get_fully_scoped_name  )  const
 

Definition at line 206 of file cppIdentifier.cxx.

Referenced by CPPNamespace::get_local_name(), CPPExtensionType::get_local_name(), CPPInstance::get_scope(), CPPTBDType::get_simple_name(), is_scoped(), and CPPPointerType::output().

string CPPIdentifier::get_local_name CPPScope scope = NULL  )  const
 

Definition at line 169 of file cppIdentifier.cxx.

References _names.

Referenced by CPPTemplateScope::add_using(), CPPNamespace::get_simple_name(), CPPExtensionType::get_simple_name(), CPPInstance::is_scoped(), and CPPTBDType::is_tbd().

CPPScope * CPPIdentifier::get_scope CPPScope current_scope,
CPPScope global_scope,
CPPDeclaration::SubstDecl subst,
CPPPreprocessor error_sink = NULL
const
 

Definition at line 322 of file cppIdentifier.cxx.

References _names, CPPDeclaration::as_type(), current_scope, find_symbol(), CPPScope::find_type(), get_scope(), get_simple_name(), global_scope, and NULL.

CPPScope * CPPIdentifier::get_scope CPPScope current_scope,
CPPScope global_scope,
CPPPreprocessor error_sink = NULL
const
 

Definition at line 276 of file cppIdentifier.cxx.

References _names, current_scope, CPPPreprocessor::error(), CPPScope::find_scope(), CPPScope::get_fully_scoped_name(), global_scope, CPPScope::instantiate(), and NULL.

Referenced by get_scope().

string CPPIdentifier::get_simple_name  )  const
 

Definition at line 157 of file cppIdentifier.cxx.

References NULL.

Referenced by CPPNamespace::CPPNamespace(), and get_scope().

bool CPPIdentifier::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.

Definition at line 233 of file cppIdentifier.cxx.

References _names, _native_scope, current_scope, CPPScope::find_scope(), global_scope, and NULL.

Referenced by CPPInstance::instantiate().

bool CPPIdentifier::is_scoped  )  const
 

Definition at line 144 of file cppIdentifier.cxx.

References _names, _native_scope, get_fully_scoped_name(), and NULL.

bool CPPIdentifier::is_tbd  )  const
 

Returns true if the identifier includes a template parameter list that includes some not-yet-defined type.

Definition at line 257 of file cppIdentifier.cxx.

References _names, CPPPreprocessor::error(), CPPScope::get_fully_scoped_name(), and NULL.

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

Definition at line 111 of file cppIdentifier.cxx.

References _names.

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

Definition at line 123 of file cppIdentifier.cxx.

References _names.

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

Definition at line 90 of file cppIdentifier.cxx.

void CPPIdentifier::output ostream &  out,
CPPScope scope
const
 

Definition at line 585 of file cppIdentifier.cxx.

Referenced by CPPClassTemplateParameter::is_fully_specified().

void CPPIdentifier::output_fully_scoped_name ostream &  out  )  const
 

Definition at line 630 of file cppIdentifier.cxx.

Referenced by find_template().

void CPPIdentifier::output_local_name ostream &  out,
CPPScope scope
const
 

Definition at line 602 of file cppIdentifier.cxx.

Referenced by find_template().

CPPIdentifier * CPPIdentifier::substitute_decl CPPDeclaration::SubstDecl subst,
CPPScope current_scope,
CPPScope global_scope
 

Definition at line 554 of file cppIdentifier.cxx.

References _names, NULL, and CPPScope::output().

Referenced by CPPEnumType::is_incomplete(), and CPPExtensionType::is_tbd().


Member Data Documentation

CPPFile CPPIdentifier::_file
 

Definition at line 99 of file cppIdentifier.h.

Names CPPIdentifier::_names
 

Definition at line 97 of file cppIdentifier.h.

Referenced by add_name(), CPPIdentifier(), find_scope(), find_symbol(), get_local_name(), get_scope(), is_fully_specified(), is_scoped(), is_tbd(), operator!=(), operator<(), and substitute_decl().

CPPScope* CPPIdentifier::_native_scope
 

Definition at line 98 of file cppIdentifier.h.

Referenced by CPPExtensionType::CPPExtensionType(), CPPIdentifier(), is_fully_specified(), is_scoped(), and CPPScope::write().


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