num_range.g.cc

Go to the documentation of this file.
00001 // This file is automatically generated, do not edit.
00002 
00003 /*!
00004         \file
00005         \brief Numeric type ranges.
00006         \author jaz
00007 */
00008 
00009 
00010 #include <lestes/std/list.hh>
00011 #include <lestes/std/pair.hh>
00012 #include <lestes/std/reflect.hh>
00013 
00014 #include <lestes/md/types/num_range.g.hh>
00015 
00016 package(lestes);
00017 package(md);
00018 package(types);
00019 
00020 
00021 // ------------- Class num_range follows. -------------
00022 
00023 /*!
00024    \returns The value of num_range::max.
00025    \author lsg
00026  */
00027 lstring num_range::max_get() const
00028 {
00029         return max;
00030 }
00031 
00032 /*!
00033    \param[in] x The new value to set num_range::max to.
00034    \author lsg
00035  */
00036 void num_range::max_set(lstring x)
00037 {
00038         num_range::max = x;
00039 }
00040 
00041 /*!
00042    \returns The value of num_range::is_signed.
00043    \author lsg
00044  */
00045 bool num_range::is_signed_get() const
00046 {
00047         return is_signed;
00048 }
00049 
00050 /*!
00051    \param[in] x The new value to set num_range::is_signed to.
00052    \author lsg
00053  */
00054 void num_range::is_signed_set(bool x)
00055 {
00056         num_range::is_signed = x;
00057 }
00058 
00059 /*!
00060    \returns The value of num_range::digits.
00061    \author lsg
00062  */
00063 ulint num_range::digits_get() const
00064 {
00065         return digits;
00066 }
00067 
00068 /*!
00069    \param[in] x The new value to set num_range::digits to.
00070    \author lsg
00071  */
00072 void num_range::digits_set(ulint x)
00073 {
00074         num_range::digits = x;
00075 }
00076 
00077 /*!
00078    \returns The value of num_range::bits.
00079    \author lsg
00080  */
00081 ulint num_range::bits_get() const
00082 {
00083         return bits;
00084 }
00085 
00086 /*!
00087    \param[in] x The new value to set num_range::bits to.
00088    \author lsg
00089  */
00090 void num_range::bits_set(ulint x)
00091 {
00092         num_range::bits = x;
00093 }
00094 
00095 /*!
00096    \returns The value of num_range::mantisa.
00097    \author lsg
00098  */
00099 ptr< num_range > num_range::mantisa_get() const
00100 {
00101         return mantisa;
00102 }
00103 
00104 /*!
00105    \param[in] x The new value to set num_range::mantisa to.
00106    \author lsg
00107  */
00108 void num_range::mantisa_set(const ptr< num_range > & x)
00109 {
00110         num_range::mantisa = x;
00111 }
00112 
00113 /*!
00114    \returns The value of num_range::exponent.
00115    \author lsg
00116  */
00117 ptr< num_range > num_range::exponent_get() const
00118 {
00119         return exponent;
00120 }
00121 
00122 /*!
00123    \param[in] x The new value to set num_range::exponent to.
00124    \author lsg
00125  */
00126 void num_range::exponent_set(const ptr< num_range > & x)
00127 {
00128         num_range::exponent = x;
00129 }
00130 
00131 /*!
00132    This factory method for class num_range takes values of all fields as arguments.
00133    \author lsg
00134  */
00135 ptr< num_range > num_range::create(lstring a__num_range__max,
00136                 bool a__num_range__is_signed,
00137                 ulint a__num_range__digits,
00138                 ulint a__num_range__bits,
00139                 ptr< num_range > a__num_range__mantisa,
00140                 ptr< num_range > a__num_range__exponent)
00141 {
00142         return ptr< num_range > ( new num_range(a__num_range__max,
00143                 a__num_range__is_signed,
00144                 a__num_range__digits,
00145                 a__num_range__bits,
00146                 a__num_range__mantisa,
00147                 a__num_range__exponent) );
00148 }
00149 
00150 /*!
00151    Generated constructor for class num_range.
00152    \author lsg
00153  */
00154 num_range::num_range (lstring a__num_range__max,
00155                 bool a__num_range__is_signed,
00156                 ulint a__num_range__digits,
00157                 ulint a__num_range__bits,
00158                 ptr< num_range > a__num_range__mantisa,
00159                 ptr< num_range > a__num_range__exponent)
00160         : ::lestes::std::object(), max(a__num_range__max), is_signed(a__num_range__is_signed), digits(a__num_range__digits), bits(a__num_range__bits), mantisa(a__num_range__mantisa), exponent(a__num_range__exponent)
00161 {}
00162 
00163 ptr< object::reflection_list > num_range::reflection_get() const
00164 {
00165         if (!reflection) {
00166                 typedef class_reflection::field_metadata md;
00167                 typedef class_reflection::field_metadata_list mdlist;
00168                 ptr<mdlist> mdl = mdlist::create();
00169                 mdl->push_back( md::create( "max", "lstring" ) );
00170                 mdl->push_back( md::create( "is_signed", "bool" ) );
00171                 mdl->push_back( md::create( "digits", "ulint" ) );
00172                 mdl->push_back( md::create( "bits", "ulint" ) );
00173                 mdl->push_back( md::create( "mantisa", "num_range" ) );
00174                 mdl->push_back( md::create( "exponent", "num_range" ) );
00175                 reflection = reflection_list::create( ::lestes::std::object::reflection_get() );
00176                 reflection->push_back( class_reflection::create( "num_range", mdl ) );
00177         }
00178         return reflection;
00179 }
00180 
00181 ptr< object::field_list_list > num_range::field_values_get() const
00182 {
00183         ptr < field_list_list > result = ::lestes::std::object::field_values_get();
00184         result->push_back( value_list::create() );
00185         result->back()->push_back( objectize< lstring > ::create( this->max ) );
00186         result->push_back( value_list::create() );
00187         result->back()->push_back( objectize< bool > ::create( this->is_signed ) );
00188         result->push_back( value_list::create() );
00189         result->back()->push_back( objectize< ulint > ::create( this->digits ) );
00190         result->push_back( value_list::create() );
00191         result->back()->push_back( objectize< ulint > ::create( this->bits ) );
00192         result->push_back( value_list::create() );
00193         result->back()->push_back( this->mantisa );
00194         result->push_back( value_list::create() );
00195         result->back()->push_back( this->exponent );
00196         return result;
00197 }
00198 
00199 
00200 /*!
00201    Marking routine is used for garbage collection.
00202    \author lsg
00203  */
00204 void num_range::gc_mark()
00205 {
00206 	::lestes::std::object::gc_mark();
00207 }
00208 
00209 // End of class num_range.
00210 
00211 
00212 // static data members follow 
00213 ptr<object::reflection_list> num_range::reflection = reflection;
00214 
00215 end_package(types);
00216 end_package(md);
00217 end_package(lestes);
00218 

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