ss_type2info.g.cc

Go to the documentation of this file.
00001 // This file is automatically generated, do not edit.
00002 
00003 /*!
00004         \file
00005         \brief Type information for SS.
00006         Definition of visitor providing type information for certain ss_type classes.
00007 */
00008 
00009 #include <lestes/lang/cplus/sem/ss_type.g.hh>
00010 
00011 #include <lestes/std/list.hh>
00012 #include <lestes/std/pair.hh>
00013 #include <lestes/std/reflect.hh>
00014 
00015 #include <lestes/lang/cplus/sem/ss_type2info.g.hh>
00016 
00017 package(lestes);
00018 package(lang);
00019 package(cplus);
00020 package(sem);
00021 
00022 
00023 // ------------- Class ss_type2info follows. -------------
00024 
00025 /*!
00026    \returns The value of ss_type2info::info.
00027    \author lsg
00028  */
00029 ss_type2info::info_type ss_type2info::info_get() const
00030 {
00031         return info;
00032 }
00033 
00034 /*!
00035    \returns The value of ss_type2info::ss_const_object.
00036    \author lsg
00037  */
00038 ptr< ss_const > ss_type2info::ss_const_object_get() const
00039 {
00040         return ss_const_object;
00041 }
00042 
00043 /*!
00044    \returns The value of ss_type2info::ss_volatile_object.
00045    \author lsg
00046  */
00047 ptr< ss_volatile > ss_type2info::ss_volatile_object_get() const
00048 {
00049         return ss_volatile_object;
00050 }
00051 
00052 /*!
00053    This factory method for class ss_type2info takes values of all fields as arguments.
00054    \author lsg
00055  */
00056 ptr< ss_type2info > ss_type2info::create(info_type a__ss_type2info__info,
00057                 ptr< ss_const > a__ss_type2info__ss_const_object,
00058                 ptr< ss_volatile > a__ss_type2info__ss_volatile_object)
00059 {
00060         return ptr< ss_type2info > ( new ss_type2info(a__ss_type2info__info,
00061                 a__ss_type2info__ss_const_object,
00062                 a__ss_type2info__ss_volatile_object) );
00063 }
00064 
00065 /*!
00066    This factory method for class ss_type2info uses initializers.
00067    \author lsg
00068  */
00069 ptr< ss_type2info > ss_type2info::create()
00070 {
00071         return ptr< ss_type2info > ( new ss_type2info(UNKNOWN, NULL, NULL) );
00072 }
00073 
00074 /*!
00075    Generated constructor for class ss_type2info.
00076    \author lsg
00077  */
00078 ss_type2info::ss_type2info (info_type a__ss_type2info__info,
00079                 ptr< ss_const > a__ss_type2info__ss_const_object,
00080                 ptr< ss_volatile > a__ss_type2info__ss_volatile_object)
00081         : ss_type2info_base(), info(a__ss_type2info__info), ss_const_object(a__ss_type2info__ss_const_object), ss_volatile_object(a__ss_type2info__ss_volatile_object)
00082 {}
00083 
00084 ptr< object::reflection_list > ss_type2info::reflection_get() const
00085 {
00086         if (!reflection) {
00087                 typedef class_reflection::field_metadata md;
00088                 typedef class_reflection::field_metadata_list mdlist;
00089                 ptr<mdlist> mdl = mdlist::create();
00090                 mdl->push_back( md::create( "info", "info_type" ) );
00091                 mdl->push_back( md::create( "ss_const_object", "ss_const" ) );
00092                 mdl->push_back( md::create( "ss_volatile_object", "ss_volatile" ) );
00093                 reflection = reflection_list::create( ss_type2info_base::reflection_get() );
00094                 reflection->push_back( class_reflection::create( "ss_type2info", mdl ) );
00095         }
00096         return reflection;
00097 }
00098 
00099 ptr< object::field_list_list > ss_type2info::field_values_get() const
00100 {
00101         ptr < field_list_list > result = ss_type2info_base::field_values_get();
00102         result->push_back( value_list::create() );
00103         result->back()->push_back( objectize< info_type > ::create( this->info ) );
00104         result->push_back( value_list::create() );
00105         result->back()->push_back( this->ss_const_object );
00106         result->push_back( value_list::create() );
00107         result->back()->push_back( this->ss_volatile_object );
00108         return result;
00109 }
00110 
00111 ss_type2info::info_type ss_type2info::process( const ptr< ::lestes::lang::cplus::sem::ss_type > & o )
00112 {
00113         lassert2( o, "Cannot visit NULL object." );
00114         o->accept_ss_type_visitor( ptr< ss_type_visitor >(this) );
00115         return info_get();
00116 }
00117 
00118 
00119 /*!
00120    Marking routine is used for garbage collection.
00121    \author lsg
00122  */
00123 void ss_type2info::gc_mark()
00124 {
00125         ss_type2info_base::gc_mark();
00126 }
00127 
00128 // End of class ss_type2info.
00129 
00130 
00131 // static data members follow 
00132 ptr<object::reflection_list> ss_type2info::reflection = reflection;
00133 
00134 end_package(sem);
00135 end_package(cplus);
00136 end_package(lang);
00137 end_package(lestes);
00138 

Generated on Mon Feb 12 18:23:33 2007 for lestes by doxygen 1.5.1-20070107