literal_info.cc

Go to the documentation of this file.
00001 /*!
00002         \file
00003         \brief Informations about pi_literal value.
00004         \author jaz
00005 */
00006 #include <lestes/std/ucn_string.hh>
00007 #include <lestes/md/types/tm_data_type.g.hh>
00008 #include "literal_info.g.hh"
00009 
00010 package(lestes);
00011 package(md);
00012 package(literals);
00013 
00014 typedef list<srp<literal_info_base> > lit_list_type;
00015 
00016 /*!
00017         \brief Returns asm string representing value of the literal.
00018 */
00019 lstring li_compound::get_asm_definition_val() {
00020         ::std::ostringstream oss;
00021         
00022         lassert(items_get()->size()>0);
00023         
00024         lit_list_type::iterator it;
00025         it=items_get()->begin();
00026         
00027         oss << (*it)->get_asm_definition_val();
00028         it++;
00029         for(; it!=items_get()->end(); it++) {
00030                 oss <<  ',' << (*it)->get_asm_definition_val();
00031         }       
00032         
00033         return oss.str();
00034 }
00035 
00036 /*!
00037         \brief Returns string representing datatype of the literal.
00038 */
00039 lstring li_compound::get_asm_definition_type() {
00040         return (*items_get()->begin())->get_asm_definition_type();
00041 }
00042 
00043 
00044 /*!
00045         \brief Returns asm string representing value of the literal.
00046 */
00047 lstring li_simple::get_asm_definition_val() {
00048         ::std::ostringstream oss;
00049         oss << data_get();
00050         return oss.str();
00051 }
00052 
00053 /*!
00054         \brief Returnd asm string representing type of the literal.
00055 */
00056 lstring li_simple::get_asm_definition_type() {
00057         return type_get()->asm_decl_get();
00058 }
00059 
00060 
00061 end_package(literals);
00062 end_package(md);
00063 end_package(lestes);
00064 

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