00001 /*! 00002 \file 00003 \brief ss_type to tm_data_type conversion. 00004 \author jaz 00005 */ 00006 #include <lestes/md/types/tm_data_type_base.g.hh> 00007 #include <lestes/md/types/ss_type2tm_type.g.hh> 00008 #include <lestes/lang/cplus/sem/ss_type.g.hh> 00009 #include "ss_type2tm_type_convertor.g.hh" 00010 00011 package(lestes); 00012 package(md); 00013 package(types); 00014 00015 using ::lestes::md::types::tm_data_type_base; 00016 using ::lestes::lang::cplus::sem::ss_type; 00017 00018 /*! 00019 \brief Returns instance. 00020 \return The instance. 00021 */ 00022 ptr< ss_type2tm_type_convertor > ss_type2tm_type_convertor::instance() { 00023 if ( !singleton_instance_get() ) { 00024 singleton_instance_set(ss_type2tm_type_convertor::create()); 00025 } 00026 return singleton_instance_get(); 00027 } 00028 00029 /*! 00030 \brief Converts ss_type to tm_data type. 00031 \param type The ss_type instance. 00032 \return tm_data_type object. 00033 */ 00034 ptr<tm_data_type_base> ss_type2tm_type_convertor::convert(ptr<ss_type> type) { 00035 return type->accept_ss_type2tm_type_gen_base(convertor_get()); 00036 } 00037 00038 /*! 00039 \brief Returns tm_data_type of conditional pseudoregister. 00040 \return The datatype. 00041 */ 00042 ptr<tm_data_type_base> ss_type2tm_type_convertor::conditional_preg_type_get() { 00043 return convertor_get()->conditional_preg_type_get(); 00044 } 00045 00046 end_package(types); 00047 end_package(md); 00048 end_package(lestes); 00049
1.5.1-20070107