backend_data_builder.g.hh

Go to the documentation of this file.
00001 // This file is automatically generated, do not edit.
00002 
00003 /*!
00004         \file
00005         \brief Data builder.
00006         \author jaz
00007 */
00008 
00009 #ifndef lestes__backend_v2__interface__backend_data_builder_g_hh__included
00010 #define lestes__backend_v2__interface__backend_data_builder_g_hh__included
00011 
00012 #include <lestes/backend_v2/common.hh>
00013 #include <lestes/std/vector.hh>
00014 #include <lestes/backend_v2/intercode/pi.g.hh>
00015 #include <lestes/lang/cplus/sem/ss_misc.g.hh>
00016 #include <lestes/lang/cplus/sem/ss_declaration.g.hh>
00017 
00018 #include <lestes/std/objectize_macros.hh>
00019 package(lestes);
00020 package(std);
00021 class object;
00022 end_package(std);
00023 end_package(lestes);
00024 
00025 package(lestes);
00026 package(backend_v2);
00027 package(intercode);
00028 class pi_sp;
00029 end_package(intercode);
00030 end_package(backend_v2);
00031 end_package(lestes);
00032 
00033 package(lestes);
00034 package(backend_v2);
00035 package(intercode);
00036 class pi_pi;
00037 end_package(intercode);
00038 end_package(backend_v2);
00039 end_package(lestes);
00040 
00041 package(lestes);
00042 package(lang);
00043 package(cplus);
00044 package(sem);
00045 class ss_function_declaration;
00046 end_package(sem);
00047 end_package(cplus);
00048 end_package(lang);
00049 end_package(lestes);
00050 
00051 package(lestes);
00052 package(backend_v2);
00053 package(structs);
00054 class backend_data;
00055 end_package(structs);
00056 end_package(backend_v2);
00057 end_package(lestes);
00058 
00059 package(lestes);
00060 package(backend_v2);
00061 package(interface);
00062 
00063 
00064 class backend_data_builder;
00065 class builder_func_data;
00066 
00067 
00068 //! Interface for passing intercode structures representing translation unit to backend.
00069 class backend_data_builder : public ::lestes::std::object {
00070 public:
00071         //! The method singleton_instance_get returns the value of the field backend_data_builder::singleton_instance.
00072         static ptr< backend_data_builder > singleton_instance_get();
00073 
00074         //! The method singleton_instance_set sets the field backend_data_builder::singleton_instance to the given value.
00075         static void singleton_instance_set(const ptr< backend_data_builder > &);
00076 
00077         //! The method functions_get returns the value of the field backend_data_builder::functions.
00078         ptr< ::lestes::std::vector< srp< builder_func_data > > > functions_get() const;
00079 
00080         //! The method functions_set sets the field backend_data_builder::functions to the given value.
00081         void functions_set(const ptr< ::lestes::std::vector< srp< builder_func_data > > > & );
00082 
00083         //! The method current_function_body_get returns the value of the field backend_data_builder::current_function_body.
00084         ptr< builder_func_data > current_function_body_get() const;
00085 
00086         //! The method current_function_body_set sets the field backend_data_builder::current_function_body to the given value.
00087         void current_function_body_set(const ptr< builder_func_data > &);
00088 
00089         static ptr< backend_data_builder > instance();
00090 
00091         //! Returns builder's result.
00092         ptr< lestes::std::vector < srp < ::lestes::backend_v2::interface::builder_func_data > > > get_result();
00093 
00094         //! Adds a pseudoinstruction to the currently built function's body.
00095         void add_pi(ptr< ::lestes::backend_v2::intercode::pi_pi > pi);
00096 
00097         //! Adds a list of pseudoinstructions to the currently built function's body.
00098         void add_pis(ptr < lestes::std::list < srp < ::lestes::backend_v2::intercode::pi_pi > > > pis);
00099 
00100         //! Adds a sequencepoint to the currently built function's body.
00101         void add_sp(ptr< ::lestes::backend_v2::intercode::pi_sp > sp);
00102 
00103         //! Initiates processing of another function's body.
00104         void add_function_start(ptr< ::lestes::lang::cplus::sem::ss_function_declaration > function);
00105 
00106         //! Finishes processing of the current function's body.
00107         void add_function_end();
00108 
00109         //! Finishes processing of particular sematic structure(for debuging purposes).
00110         void add_rail();
00111 
00112         
00113         //! First generated factory method for class backend_data_builder.
00114         static ptr< backend_data_builder > create (
00115                 ptr< ::lestes::std::vector< srp< builder_func_data > > > a__backend_data_builder__functions,
00116                 ptr< builder_func_data > a__backend_data_builder__current_function_body);
00117 
00118         //! Second generated factory method for class backend_data_builder.
00119         static ptr< backend_data_builder > create (
00120                 );
00121 
00122         
00123 
00124         //! for purposes of dumping
00125         virtual ptr<reflection_list> reflection_get() const;
00126         //! for purposes of dumping
00127         virtual ptr<field_list_list> field_values_get() const;
00128         
00129 protected:
00130         //! Generated constructor for class backend_data_builder.
00131         backend_data_builder (
00132                 ptr< ::lestes::std::vector< srp< builder_func_data > > > a__backend_data_builder__functions,
00133                 ptr< builder_func_data > a__backend_data_builder__current_function_body);
00134 
00135         //! Marking routine for class backend_data_builder. 
00136         virtual void gc_mark();
00137 
00138 private:
00139         static ptr< backend_data_builder > singleton_instance;
00140         //! Bodies of the functions composing single translation unit.
00141         srp< ::lestes::std::vector< srp< builder_func_data > > >  functions;
00142         srp< builder_func_data > current_function_body;
00143         static ptr<reflection_list> reflection;
00144         
00145 }; // backend_data_builder
00146 
00147 
00148 //! Holds information about function body.
00149 class builder_func_data : public ::lestes::std::object {
00150 public:
00151         //! The method function_decl_get returns the value of the field builder_func_data::function_decl.
00152         ptr< ::lestes::lang::cplus::sem::ss_function_declaration > function_decl_get() const;
00153 
00154         //! The method function_decl_set sets the field builder_func_data::function_decl to the given value.
00155         void function_decl_set(const ptr< ::lestes::lang::cplus::sem::ss_function_declaration > &);
00156 
00157         //! The method pi_body_get returns the value of the field builder_func_data::pi_body.
00158         ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_pi > > > pi_body_get() const;
00159 
00160         //! The method pi_body_set sets the field builder_func_data::pi_body to the given value.
00161         void pi_body_set(const ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_pi > > > & );
00162 
00163         
00164         //! First generated factory method for class builder_func_data.
00165         static ptr< builder_func_data > create (
00166                 ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__builder_func_data__function_decl,
00167                 ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_pi > > > a__builder_func_data__pi_body);
00168 
00169         //! Second generated factory method for class builder_func_data.
00170         static ptr< builder_func_data > create (
00171                 ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__builder_func_data__function_decl);
00172 
00173         
00174 
00175         //! for purposes of dumping
00176         virtual ptr<reflection_list> reflection_get() const;
00177         //! for purposes of dumping
00178         virtual ptr<field_list_list> field_values_get() const;
00179         
00180 protected:
00181         //! Generated constructor for class builder_func_data.
00182         builder_func_data (
00183                 ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__builder_func_data__function_decl,
00184                 ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_pi > > > a__builder_func_data__pi_body);
00185 
00186         //! Marking routine for class builder_func_data. 
00187         virtual void gc_mark();
00188 
00189 private:
00190         //! Ss-declaration of the function.
00191         srp< ::lestes::lang::cplus::sem::ss_function_declaration > function_decl;
00192         //! A list of pseudoinstructions in the function's body.
00193         srp< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_pi > > >  pi_body;
00194         static ptr<reflection_list> reflection;
00195         
00196 }; // builder_func_data
00197 
00198 
00199 end_package(interface);
00200 end_package(backend_v2);
00201 end_package(lestes);
00202 
00203 #endif // lestes__backend_v2__interface__backend_data_builder_g_hh__included

Generated on Mon Feb 12 18:22:32 2007 for lestes by doxygen 1.5.1-20070107