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

CPPInstance Class Reference

#include <cppInstance.h>

Inheritance diagram for CPPInstance:

CPPDeclaration CPPTypeDeclaration CPPTypedef List of all members.

Public Types

enum  StorageClass {
  SC_static = 0x001, SC_extern = 0x002, SC_c_binding = 0x004, SC_virtual = 0x008,
  SC_inline = 0x010, SC_explicit = 0x020, SC_register = 0x040, SC_pure_virtual = 0x080,
  SC_volatile = 0x100, SC_mutable = 0x200, SC_inherited_virtual = 0x400
}

Public Member Functions

 CPPInstance (CPPType *type, const string &name, int storage_class=0)
 CPPInstance (CPPType *type, CPPIdentifier *ident, int storage_class=0)
 CPPInstance (CPPType *type, CPPInstanceIdentifier *ii, int storage_class, const CPPFile &file)
 CPPInstance (const CPPInstance &copy)
 ~CPPInstance ()
bool operator== (const CPPInstance &other) const
bool operator!= (const CPPInstance &other) const
bool operator< (const CPPInstance &other) const
void set_initializer (CPPExpression *initializer)
bool is_scoped () const
CPPScopeget_scope (CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const
string get_simple_name () const
string get_local_name (CPPScope *scope=NULL) const
string get_fully_scoped_name () const
void check_for_constructor (CPPScope *current_scope, CPPScope *global_scope)
virtual CPPDeclarationinstantiate (const CPPTemplateParameterList *actual_params, CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) const
virtual bool is_fully_specified () const
virtual CPPDeclarationsubstitute_decl (SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope)
virtual void output (ostream &out, int indent_level, CPPScope *scope, bool complete) const
void output (ostream &out, int indent_level, CPPScope *scope, bool complete, int num_default_parameters) const
virtual SubType get_subtype () const
virtual CPPInstance * as_instance ()

Static Public Member Functions

CPPInstance * make_typecast_function (CPPInstance *inst, CPPIdentifier *ident, CPPParameterList *parameters, int function_flags)

Public Attributes

CPPType_type
CPPIdentifier_ident
CPPExpression_initializer
int _storage_class

Private Types

typedef map< const CPPTemplateParameterList *,
CPPInstance *, CPPTPLCompare
Instantiations

Private Attributes

Instantiations _instantiations

Member Typedef Documentation

typedef map<const CPPTemplateParameterList *, CPPInstance *, CPPTPLCompare> CPPInstance::Instantiations [private]
 

Reimplemented from CPPDeclaration.

Definition at line 111 of file cppInstance.h.


Member Enumeration Documentation

enum CPPInstance::StorageClass
 

Enumeration values:
SC_static 
SC_extern 
SC_c_binding 
SC_virtual 
SC_inline 
SC_explicit 
SC_register 
SC_pure_virtual 
SC_volatile 
SC_mutable 
SC_inherited_virtual 

Definition at line 43 of file cppInstance.h.


Constructor & Destructor Documentation

CPPInstance::CPPInstance CPPType type,
const string &  name,
int  storage_class = 0
 

Definition at line 41 of file cppInstance.cxx.

References _initializer, NULL, and type.

Referenced by instantiate(), make_typecast_function(), CPPTypedef::substitute_decl(), and substitute_decl().

CPPInstance::CPPInstance CPPType type,
CPPIdentifier ident,
int  storage_class = 0
 

Definition at line 56 of file cppInstance.cxx.

References _initializer, NULL, and type.

CPPInstance::CPPInstance CPPType type,
CPPInstanceIdentifier ii,
int  storage_class,
const CPPFile file
 

Definition at line 74 of file cppInstance.cxx.

References CPPInstanceIdentifier::_ident, _ident, _initializer, _storage_class, _type, NULL, type, and CPPInstanceIdentifier::unroll_type().

CPPInstance::CPPInstance const CPPInstance &  copy  ) 
 

Definition at line 92 of file cppInstance.cxx.

References _type, assert, and NULL.

CPPInstance::~CPPInstance  ) 
 

Definition at line 108 of file cppInstance.cxx.


Member Function Documentation

CPPInstance * CPPInstance::as_instance  )  [virtual]
 

Reimplemented from CPPDeclaration.

Definition at line 563 of file cppInstance.cxx.

void CPPInstance::check_for_constructor CPPScope current_scope,
CPPScope global_scope
 

Definition at line 326 of file cppInstance.cxx.

References CPPFunctionType::_flags, CPPFunctionType::_parameters, _type, CPPDeclaration::as_function_type(), current_scope, CPPFunctionType::F_constructor, CPPFunctionType::F_destructor, CPPScope::get_local_name(), get_local_name(), get_scope(), global_scope, CPPType::new_type(), NULL, and CPPSimpleType::T_void.

Referenced by CPPScope::handle_declaration().

string CPPInstance::get_fully_scoped_name  )  const
 

Definition at line 310 of file cppInstance.cxx.

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

string CPPInstance::get_local_name CPPScope scope = NULL  )  const
 

Definition at line 296 of file cppInstance.cxx.

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

Referenced by CPPTemplateScope::add_template_parameter(), check_for_constructor(), CPPTypedef::CPPTypedef(), InterrogateBuilder::define_enum_type(), FunctionRemap::get_call_str(), InterrogateBuilder::get_function(), TypeManager::get_function_name(), TypeManager::get_function_signature(), InterrogateBuilder::get_getter(), InterrogateBuilder::get_setter(), CPPStructType::get_virtual_funcs(), FunctionRemap::make_wrapper_entry(), and InterrogateBuilder::scan_element().

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

Definition at line 267 of file cppInstance.cxx.

References _ident, current_scope, CPPIdentifier::get_scope(), global_scope, and NULL.

Referenced by check_for_constructor(), CPPScope::handle_declaration(), InterrogateBuilder::scan_element(), and InterrogateBuilder::scan_function().

string CPPInstance::get_simple_name  )  const
 

Definition at line 282 of file cppInstance.cxx.

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

Referenced by CPPScope::add_enum_value(), InterrogateBuilder::define_enum_type(), InterrogateBuilder::define_method(), CPPScope::handle_declaration(), FunctionRemap::setup_properties(), and InterfaceMakerPythonObj::write_function_instance().

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

Implements CPPDeclaration.

Reimplemented in CPPTypeDeclaration, and CPPTypedef.

Definition at line 553 of file cppInstance.cxx.

References CPPDeclaration::ST_instance.

CPPDeclaration * CPPInstance::instantiate const CPPTemplateParameterList actual_params,
CPPScope current_scope,
CPPScope global_scope,
CPPPreprocessor error_sink = NULL
const [virtual]
 

Reimplemented from CPPDeclaration.

Definition at line 364 of file cppInstance.cxx.

References _ident, _instantiations, CPPIdentifier::_names, CPPTemplateScope::_parameters, CPPDeclaration::_template_scope, assert, CPPTemplateParameterList::build_subst_decl(), CPPInstance(), current_scope, CPPIdentifier::get_local_name(), CPPDeclaration::get_template_scope(), global_scope, CPPDeclaration::is_template(), NULL, CPPIdentifier::substitute_decl(), and CPPPreprocessor::warning().

bool CPPInstance::is_fully_specified  )  const [virtual]
 

Reimplemented from CPPDeclaration.

Definition at line 421 of file cppInstance.cxx.

References _ident, _initializer, _type, CPPDeclaration::is_fully_specified(), CPPIdentifier::is_fully_specified(), and NULL.

bool CPPInstance::is_scoped  )  const
 

Definition at line 253 of file cppInstance.cxx.

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

Referenced by InterrogateBuilder::scan_element(), and InterrogateBuilder::scan_function().

CPPInstance * CPPInstance::make_typecast_function CPPInstance *  inst,
CPPIdentifier ident,
CPPParameterList parameters,
int  function_flags
[static]
 

Definition at line 122 of file cppInstance.cxx.

References _type, CPPInstance(), CPPFunctionType::F_operator_typecast, CPPType::new_type(), and type.

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

Definition at line 177 of file cppInstance.cxx.

References operator==().

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

Definition at line 187 of file cppInstance.cxx.

References _ident, _initializer, _storage_class, _type, and NULL.

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

Definition at line 141 of file cppInstance.cxx.

References _ident, _initializer, _storage_class, _type, and NULL.

Referenced by operator!=().

void CPPInstance::output ostream out,
int  indent_level,
CPPScope scope,
bool  complete,
int  num_default_parameters
const
 

Definition at line 490 of file cppInstance.cxx.

References _ident, _initializer, CPPTemplateScope::_parameters, _storage_class, _type, CPPDeclaration::as_function_type(), assert, CPPIdentifier::get_local_name(), CPPDeclaration::get_template_scope(), indent(), CPPDeclaration::is_template(), NULL, CPPType::output_instance(), SC_c_binding, SC_explicit, SC_extern, SC_inline, SC_mutable, SC_pure_virtual, SC_register, SC_static, SC_virtual, SC_volatile, and CPPTemplateParameterList::write_formal().

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

Implements CPPDeclaration.

Reimplemented in CPPTypeDeclaration, and CPPTypedef.

Definition at line 478 of file cppInstance.cxx.

Referenced by InterrogateBuilder::get_function(), InterrogateBuilder::get_getter(), InterrogateBuilder::get_setter(), CPPTypedef::output(), and FunctionRemap::write_orig_prototype().

void CPPInstance::set_initializer CPPExpression initializer  ) 
 

Definition at line 233 of file cppInstance.cxx.

References _initializer, _storage_class, _type, CPPDeclaration::as_function_type(), NULL, and SC_pure_virtual.

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

Reimplemented in CPPTypeDeclaration, and CPPTypedef.

Definition at line 438 of file cppInstance.cxx.

References _initializer, _type, CPPDeclaration::as_expression(), CPPDeclaration::as_type(), CPPInstance(), current_scope, global_scope, NULL, CPPExpression::substitute_decl(), and CPPDeclaration::substitute_decl().

Referenced by CPPTypedef::substitute_decl(), and CPPTypeDeclaration::substitute_decl().


Member Data Documentation

CPPIdentifier* CPPInstance::_ident
 

Definition at line 105 of file cppInstance.h.

Referenced by CPPInstance(), InterrogateBuilder::define_enum_type(), get_fully_scoped_name(), InterrogateBuilder::get_function(), InterrogateBuilder::get_getter(), get_local_name(), get_scope(), InterrogateBuilder::get_setter(), get_simple_name(), instantiate(), is_fully_specified(), is_scoped(), operator<(), operator==(), output(), InterrogateBuilder::scan_element(), InterrogateBuilder::scan_function(), and InterrogateBuilder::update_method_comment().

CPPExpression* CPPInstance::_initializer
 

Definition at line 106 of file cppInstance.h.

Referenced by CPPEnumType::add_element(), CPPTemplateParameterList::build_subst_decl(), CPPInstance(), InterrogateBuilder::define_enum_type(), InterrogateBuilder::get_getter(), InterrogateBuilder::get_setter(), is_fully_specified(), operator<(), operator==(), output(), set_initializer(), and substitute_decl().

Instantiations CPPInstance::_instantiations [private]
 

Reimplemented from CPPDeclaration.

Definition at line 112 of file cppInstance.h.

Referenced by instantiate().

int CPPInstance::_storage_class
 

Definition at line 108 of file cppInstance.h.

Referenced by CPPInstance(), InterrogateBuilder::define_method(), InterrogateBuilder::get_getter(), CPPStructType::get_pure_virtual_funcs(), InterrogateBuilder::get_setter(), CPPStructType::get_virtual_funcs(), operator<(), operator==(), output(), InterrogateBuilder::scan_element(), InterrogateBuilder::scan_function(), set_initializer(), and FunctionRemap::setup_properties().

CPPType* CPPInstance::_type
 

Definition at line 104 of file cppInstance.h.

Referenced by InterrogateBuilder::build(), check_for_constructor(), CPPInstance(), CPPTypeDeclaration::CPPTypeDeclaration(), CPPTypedef::CPPTypedef(), InterrogateBuilder::define_method(), InterrogateBuilder::define_struct_type(), FunctionRemap::FunctionRemap(), CPPStructType::get_destructor(), InterrogateBuilder::get_function(), TypeManager::get_function_signature(), TypeManager::get_pointer_type(), CPPStructType::get_virtual_funcs(), CPPScope::handle_declaration(), TypeManager::has_protected_destructor(), is_fully_specified(), make_typecast_function(), operator<(), operator==(), CPPTypeDeclaration::output(), output(), InterfaceMaker::record_function(), CPPParameterList::resolve_type(), InterrogateBuilder::scan_element(), InterrogateBuilder::scan_function(), set_initializer(), CPPTypeDeclaration::substitute_decl(), substitute_decl(), and InterrogateBuilder::update_method_comment().


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