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

CPPInstanceIdentifier Class Reference

This class is used in parser.y to build up a variable instance definition. More...

#include <cppInstanceIdentifier.h>

List of all members.

Public Types

typedef vector< Modifier > Modifiers

Public Member Functions

 CPPInstanceIdentifier (CPPIdentifier *ident)
CPPType * unroll_type (CPPType *start_type)
 Unrolls the list of type punctuation on either side of the identifier to determine the actual type represented by the identifier, given the indicated starting type (that is, the type name written to the left of the identifier).

void add_modifier (CPPInstanceIdentifierType type)
void add_func_modifier (CPPParameterList *params, int flags)
void add_scoped_pointer_modifier (CPPIdentifier *scoping)
void add_array_modifier (CPPExpression *expr)
CPPScope * get_scope (CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const

Public Attributes

CPPIdentifier * _ident
Modifiers _modifiers

Private Member Functions

CPPType * r_unroll_type (CPPType *start_type, Modifiers::const_iterator mi)
 The recursive implementation of unroll_type().


Detailed Description

This class is used in parser.y to build up a variable instance definition.

An instance is something like 'int *&a'; the InstanceIdentifier stores everything to the right of the typename. Later this can be passed to make_instance() to construct a CPPInstance.

Definition at line 64 of file cppInstanceIdentifier.h.


Member Typedef Documentation

typedef vector<Modifier> CPPInstanceIdentifier::Modifiers
 

Definition at line 93 of file cppInstanceIdentifier.h.


Constructor & Destructor Documentation

CPPInstanceIdentifier::CPPInstanceIdentifier (  CPPIdentifier *  ident  ) 
 

Definition at line 100 of file cppInstanceIdentifier.cxx.

References _modifiers, and r_unroll_type().


Member Function Documentation

void CPPInstanceIdentifier::add_array_modifier (  CPPExpression *  expr  ) 
 

Definition at line 163 of file cppInstanceIdentifier.cxx.

References _modifiers, CPPType::new_type(), and NULL.

void CPPInstanceIdentifier::add_func_modifier (  CPPParameterList *  params,
int  flags
) 
 

Definition at line 146 of file cppInstanceIdentifier.cxx.

References _ident, current_scope, and NULL.

void CPPInstanceIdentifier::add_modifier (  CPPInstanceIdentifierType  type  ) 
 

Definition at line 134 of file cppInstanceIdentifier.cxx.

References _modifiers.

void CPPInstanceIdentifier::add_scoped_pointer_modifier (  CPPIdentifier *  scoping  ) 
 

Definition at line 151 of file cppInstanceIdentifier.cxx.

CPPScope * CPPInstanceIdentifier::get_scope (  CPPScope *  current_scope,
CPPScope *  global_scope,
CPPPreprocessor *  error_sink = NULL
)  const
 

Definition at line 175 of file cppInstanceIdentifier.cxx.

References CPPFunctionType::_class_owner, CPPFunctionType::_flags, CPPInstanceIdentifier::Modifier::_scoping, CPPDeclaration::as_function_type(), CPPFunctionType::F_method_pointer, IIT_pointer, IIT_reference, IIT_scoped_pointer, NULL, and r_unroll_type().

CPPType * CPPInstanceIdentifier::r_unroll_type (  CPPType *  start_type,
Modifiers::const_iterator  mi
)  [private]
 

The recursive implementation of unroll_type().

Definition at line 193 of file cppInstanceIdentifier.cxx.

Referenced by CPPInstanceIdentifier(), and get_scope().

CPPType * CPPInstanceIdentifier::unroll_type (  CPPType *  start_type  ) 
 

Unrolls the list of type punctuation on either side of the identifier to determine the actual type represented by the identifier, given the indicated starting type (that is, the type name written to the left of the identifier).

Definition at line 120 of file cppInstanceIdentifier.cxx.

References _modifiers.


Member Data Documentation

CPPIdentifier* CPPInstanceIdentifier::_ident
 

Definition at line 78 of file cppInstanceIdentifier.h.

Referenced by add_func_modifier(), and CPPInstanceIdentifier::Modifier::scoped_pointer_type().

Modifiers CPPInstanceIdentifier::_modifiers
 

Definition at line 94 of file cppInstanceIdentifier.h.

Referenced by add_array_modifier(), add_modifier(), CPPInstanceIdentifier(), and unroll_type().


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