lestes::lang::cplus::sem::ss_function_declaration Class Reference

Class for function definition. More...

#include <ss_declaration.g.hh>

Inheritance diagram for lestes::lang::cplus::sem::ss_function_declaration:

Inheritance graph
[legend]
List of all members.

Public Member Functions

ptr< ss_decl_seqparameters_get () const
 The method parameters_get returns the value of the field ss_function_declaration::parameters.
void parameters_set (const ptr< ss_decl_seq > &)
 The method parameters_set sets the field ss_function_declaration::parameters to the given value.
ptr< ss_compound_stmtbody_get () const
 The method body_get returns the value of the field ss_function_declaration::body.
void body_set (const ptr< ss_compound_stmt > &)
 The method body_set sets the field ss_function_declaration::body to the given value.
ptr< ::lestes::std::map< srp<
ss_id_label >, srp< ss_statement > > > 
labels_get () const
 The method labels_get returns the value of the field ss_function_declaration::labels.
void labels_set (const ptr< ::lestes::std::map< srp< ss_id_label >, srp< ss_statement > > > &)
 The method labels_set sets the field ss_function_declaration::labels to the given value.
ptr< ::lestes::std::list<
srp< ss_decl_seq > > > 
historical_parameters_get () const
 The method historical_parameters_get returns the value of the field ss_function_declaration::historical_parameters.
void historical_parameters_set (const ptr< ::lestes::std::list< srp< ss_decl_seq > > > &)
 The method historical_parameters_set sets the field ss_function_declaration::historical_parameters to the given value.
bool is_entry_point ()
 Whether is the current function entry point of the whole translation unit.
virtual void accept_ss_declaration_visitor (ptr< ss_declaration_visitor > v)
virtual ulint accept_ss_decl2ulint_base (ptr< ss_decl2ulint_base > v)
virtual lstring accept_ss_decl2lstring_base (ptr< ss_decl2lstring_base > v)
virtual ptr< reflection_listreflection_get () const
 for purposes of dumping
virtual ptr< field_list_listfield_values_get () const
 for purposes of dumping

Static Public Member Functions

static ptr< ss_function_declarationcreate (ptr< ::lestes::std::source_location > a__ss_base_with_location__location, ptr< ss_declaration_time > a__ss_declaration__visible_since, ptr< ss_declaration_time > a__ss_declaration__decl_time, ptr< ss_decl_name > a__ss_declaration__name, ptr< ss_decl_seq > a__ss_declaration__contained_in, ptr< ss_type > a__ss_declaration__type, ptr< ss_linkage > a__ss_declaration__linkage, ss_access_specifier::type a__ss_declaration_with_access_specifier__access_specifier, ss_storage_class::type a__ss_declaration_with_access_specifier__storage_class, ptr< ::lestes::std::set< srp< ss_struct_base > > > a__ss_befriendable_declaration__friend_of, ptr< ss_decl_seq > a__ss_function_declaration__parameters, ptr< ss_compound_stmt > a__ss_function_declaration__body, ptr< ::lestes::std::map< srp< ss_id_label >, srp< ss_statement > > > a__ss_function_declaration__labels, ptr< ::lestes::std::list< srp< ss_decl_seq > > > a__ss_function_declaration__historical_parameters)
 First generated factory method for class ss_function_declaration.
static ptr< ss_function_declarationcreate (ptr< ::lestes::std::source_location > a__ss_base_with_location__location, ptr< ss_declaration_time > a__ss_declaration__visible_since, ptr< ss_declaration_time > a__ss_declaration__decl_time, ptr< ss_decl_name > a__ss_declaration__name, ptr< ss_decl_seq > a__ss_declaration__contained_in, ptr< ss_type > a__ss_declaration__type, ptr< ss_linkage > a__ss_declaration__linkage, ptr< ss_decl_seq > a__ss_function_declaration__parameters, ptr< ss_compound_stmt > a__ss_function_declaration__body)
 Second generated factory method for class ss_function_declaration.

Protected Member Functions

 ss_function_declaration (ptr< ::lestes::std::source_location > a__ss_base_with_location__location, ptr< ss_declaration_time > a__ss_declaration__visible_since, ptr< ss_declaration_time > a__ss_declaration__decl_time, ptr< ss_decl_name > a__ss_declaration__name, ptr< ss_decl_seq > a__ss_declaration__contained_in, ptr< ss_type > a__ss_declaration__type, ptr< ss_linkage > a__ss_declaration__linkage, ss_access_specifier::type a__ss_declaration_with_access_specifier__access_specifier, ss_storage_class::type a__ss_declaration_with_access_specifier__storage_class, ptr< ::lestes::std::set< srp< ss_struct_base > > > a__ss_befriendable_declaration__friend_of, ptr< ss_decl_seq > a__ss_function_declaration__parameters, ptr< ss_compound_stmt > a__ss_function_declaration__body, ptr< ::lestes::std::map< srp< ss_id_label >, srp< ss_statement > > > a__ss_function_declaration__labels, ptr< ::lestes::std::list< srp< ss_decl_seq > > > a__ss_function_declaration__historical_parameters)
 Generated constructor for class ss_function_declaration.
virtual void gc_mark ()
 Marking routine for class ss_function_declaration.

Private Attributes

srp< ss_decl_seqparameters
srp< ss_compound_stmtbody
 Compound statement of the function.
srp< ::lestes::std::map< srp<
ss_id_label >, srp< ss_statement > > > 
labels
 Labels used inside function body. Used for goto statement.
srp< ::lestes::std::list<
srp< ss_decl_seq > > > 
historical_parameters
 Historical parameters.

Static Private Attributes

static ptr< reflection_listreflection = reflection

Detailed Description

Class for function definition.


Constructor & Destructor Documentation

lestes::lang::cplus::sem::ss_function_declaration::ss_function_declaration ( ptr< ::lestes::std::source_location a__ss_base_with_location__location,
ptr< ss_declaration_time a__ss_declaration__visible_since,
ptr< ss_declaration_time a__ss_declaration__decl_time,
ptr< ss_decl_name a__ss_declaration__name,
ptr< ss_decl_seq a__ss_declaration__contained_in,
ptr< ss_type a__ss_declaration__type,
ptr< ss_linkage a__ss_declaration__linkage,
ss_access_specifier::type  a__ss_declaration_with_access_specifier__access_specifier,
ss_storage_class::type  a__ss_declaration_with_access_specifier__storage_class,
ptr< ::lestes::std::set< srp< ss_struct_base > > >  a__ss_befriendable_declaration__friend_of,
ptr< ss_decl_seq a__ss_function_declaration__parameters,
ptr< ss_compound_stmt a__ss_function_declaration__body,
ptr< ::lestes::std::map< srp< ss_id_label >, srp< ss_statement > > >  a__ss_function_declaration__labels,
ptr< ::lestes::std::list< srp< ss_decl_seq > > >  a__ss_function_declaration__historical_parameters 
) [protected]

Generated constructor for class ss_function_declaration.

Generated constructor for class ss_function_declaration.

Author:
lsg


Member Function Documentation

ptr< ss_decl_seq > lestes::lang::cplus::sem::ss_function_declaration::parameters_get (  )  const

The method parameters_get returns the value of the field ss_function_declaration::parameters.

Returns:
The value of ss_function_declaration::parameters.
Author:
lsg

void lestes::lang::cplus::sem::ss_function_declaration::parameters_set ( const ptr< ss_decl_seq > &  x  ) 

The method parameters_set sets the field ss_function_declaration::parameters to the given value.

Parameters:
[in] x The new value to set ss_function_declaration::parameters to.
Author:
lsg

ptr< ss_compound_stmt > lestes::lang::cplus::sem::ss_function_declaration::body_get (  )  const

The method body_get returns the value of the field ss_function_declaration::body.

Returns:
The value of ss_function_declaration::body.
Author:
lsg

void lestes::lang::cplus::sem::ss_function_declaration::body_set ( const ptr< ss_compound_stmt > &  x  ) 

The method body_set sets the field ss_function_declaration::body to the given value.

Parameters:
[in] x The new value to set ss_function_declaration::body to.
Author:
lsg

ptr<::lestes::std::map< srp< ss_id_label >, srp< ss_statement > > > lestes::lang::cplus::sem::ss_function_declaration::labels_get (  )  const

The method labels_get returns the value of the field ss_function_declaration::labels.

Returns:
The value of ss_function_declaration::labels.
Author:
lsg

void lestes::lang::cplus::sem::ss_function_declaration::labels_set ( const ptr< ::lestes::std::map< srp< ss_id_label >, srp< ss_statement > > > &  x  ) 

The method labels_set sets the field ss_function_declaration::labels to the given value.

Parameters:
[in] x The new value to set ss_function_declaration::labels to.
Author:
lsg

ptr<::lestes::std::list< srp< ss_decl_seq > > > lestes::lang::cplus::sem::ss_function_declaration::historical_parameters_get (  )  const

The method historical_parameters_get returns the value of the field ss_function_declaration::historical_parameters.

Returns:
The value of ss_function_declaration::historical_parameters.
Author:
lsg

void lestes::lang::cplus::sem::ss_function_declaration::historical_parameters_set ( const ptr< ::lestes::std::list< srp< ss_decl_seq > > > &  x  ) 

The method historical_parameters_set sets the field ss_function_declaration::historical_parameters to the given value.

Parameters:
[in] x The new value to set ss_function_declaration::historical_parameters to.
Author:
lsg

bool lestes::lang::cplus::sem::ss_function_declaration::is_entry_point (  ) 

Whether is the current function entry point of the whole translation unit.

Check whether the current function is entry point of the translation unit.

This function has to be maintained by semantic part, because backend should be independet on current language, which defines entry point(main)[].

void lestes::lang::cplus::sem::ss_function_declaration::accept_ss_declaration_visitor ( ptr< ss_declaration_visitor v  )  [virtual]

Implements lestes::lang::cplus::sem::ss_befriendable_declaration.

Reimplemented in lestes::lang::cplus::sem::ss_method_declaration, and lestes::lang::cplus::sem::ss_builtin_operator_declaration.

ulint lestes::lang::cplus::sem::ss_function_declaration::accept_ss_decl2ulint_base ( ptr< ss_decl2ulint_base v  )  [virtual]

Implements lestes::lang::cplus::sem::ss_befriendable_declaration.

Reimplemented in lestes::lang::cplus::sem::ss_method_declaration, and lestes::lang::cplus::sem::ss_builtin_operator_declaration.

lstring lestes::lang::cplus::sem::ss_function_declaration::accept_ss_decl2lstring_base ( ptr< ss_decl2lstring_base v  )  [virtual]

Implements lestes::lang::cplus::sem::ss_befriendable_declaration.

Reimplemented in lestes::lang::cplus::sem::ss_method_declaration, and lestes::lang::cplus::sem::ss_builtin_operator_declaration.

ptr< ss_function_declaration > lestes::lang::cplus::sem::ss_function_declaration::create ( ptr< ::lestes::std::source_location a__ss_base_with_location__location,
ptr< ss_declaration_time a__ss_declaration__visible_since,
ptr< ss_declaration_time a__ss_declaration__decl_time,
ptr< ss_decl_name a__ss_declaration__name,
ptr< ss_decl_seq a__ss_declaration__contained_in,
ptr< ss_type a__ss_declaration__type,
ptr< ss_linkage a__ss_declaration__linkage,
ss_access_specifier::type  a__ss_declaration_with_access_specifier__access_specifier,
ss_storage_class::type  a__ss_declaration_with_access_specifier__storage_class,
ptr< ::lestes::std::set< srp< ss_struct_base > > >  a__ss_befriendable_declaration__friend_of,
ptr< ss_decl_seq a__ss_function_declaration__parameters,
ptr< ss_compound_stmt a__ss_function_declaration__body,
ptr< ::lestes::std::map< srp< ss_id_label >, srp< ss_statement > > >  a__ss_function_declaration__labels,
ptr< ::lestes::std::list< srp< ss_decl_seq > > >  a__ss_function_declaration__historical_parameters 
) [static]

First generated factory method for class ss_function_declaration.

This factory method for class ss_function_declaration takes values of all fields as arguments.

Author:
lsg

Reimplemented in lestes::lang::cplus::sem::ss_builtin_operator_declaration.

ptr< ss_function_declaration > lestes::lang::cplus::sem::ss_function_declaration::create ( ptr< ::lestes::std::source_location a__ss_base_with_location__location,
ptr< ss_declaration_time a__ss_declaration__visible_since,
ptr< ss_declaration_time a__ss_declaration__decl_time,
ptr< ss_decl_name a__ss_declaration__name,
ptr< ss_decl_seq a__ss_declaration__contained_in,
ptr< ss_type a__ss_declaration__type,
ptr< ss_linkage a__ss_declaration__linkage,
ptr< ss_decl_seq a__ss_function_declaration__parameters,
ptr< ss_compound_stmt a__ss_function_declaration__body 
) [static]

Second generated factory method for class ss_function_declaration.

This factory method for class ss_function_declaration uses initializers.

Author:
lsg

Reimplemented in lestes::lang::cplus::sem::ss_builtin_operator_declaration.

ptr< object::reflection_list > lestes::lang::cplus::sem::ss_function_declaration::reflection_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::lang::cplus::sem::ss_befriendable_declaration.

Reimplemented in lestes::lang::cplus::sem::ss_method_declaration, and lestes::lang::cplus::sem::ss_builtin_operator_declaration.

ptr< object::field_list_list > lestes::lang::cplus::sem::ss_function_declaration::field_values_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::lang::cplus::sem::ss_befriendable_declaration.

Reimplemented in lestes::lang::cplus::sem::ss_method_declaration, and lestes::lang::cplus::sem::ss_builtin_operator_declaration.

void lestes::lang::cplus::sem::ss_function_declaration::gc_mark ( void   )  [protected, virtual]

Marking routine for class ss_function_declaration.

Marking routine is used for garbage collection.

Author:
lsg

Reimplemented from lestes::lang::cplus::sem::ss_befriendable_declaration.

Reimplemented in lestes::lang::cplus::sem::ss_method_declaration, and lestes::lang::cplus::sem::ss_builtin_operator_declaration.


Member Data Documentation

srp< ss_decl_seq > lestes::lang::cplus::sem::ss_function_declaration::parameters [private]

srp< ss_compound_stmt > lestes::lang::cplus::sem::ss_function_declaration::body [private]

Compound statement of the function.

When the declaration is not a definition (ie. there was no function body), null value is used.

Parent of ss_decl_seq in the body should be set to parameters_get()->parent_get(), not to parameters_get().

srp< ::lestes::std::map< srp< ss_id_label >, srp< ss_statement > > > lestes::lang::cplus::sem::ss_function_declaration::labels [private]

Labels used inside function body. Used for goto statement.

srp< ::lestes::std::list< srp< ss_decl_seq > > > lestes::lang::cplus::sem::ss_function_declaration::historical_parameters [private]

Historical parameters.

Whenever a function declaration is encountered a new declseq is created, holding the parameters. The old value is of the field ss_function_declaration::parameters is put at the end of that list, so that the old names of the parameters can be retrieved later.

ptr< object::reflection_list > lestes::lang::cplus::sem::ss_function_declaration::reflection = reflection [static, private]

Reimplemented from lestes::lang::cplus::sem::ss_befriendable_declaration.

Reimplemented in lestes::lang::cplus::sem::ss_method_declaration, and lestes::lang::cplus::sem::ss_builtin_operator_declaration.


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:47:22 2007 for lestes by doxygen 1.5.1-20070107