label/Label.hpp

Go to the documentation of this file.
00001 //============================================================================
00002 // Author      : Alessandro Pinto <apinto@eecs.berkeley.edu>
00003 //               University of California, Berkeley
00004 //               545 Cory Hall, Berkeley, CA 94720
00005 // Copyright   : See COPYING file that comes with this distribution
00006 //============================================================================
00007 
00008 #ifndef LABEL_HPP_
00009 #define LABEL_HPP_
00010 
00011 #include <string>
00012 #include <sstream>
00013 #include <list>
00014 #include "Label.h"
00015 
00016 namespace cosi {
00017 
00018 template<class T1> class Label_1 : public Label, public T1 {
00019 
00020 public:
00021         Label_1() {
00022                 AddQuantityName(T1::sQuantityName) ;
00023         }
00024 
00025         std::string Print() {
00026                 std::stringstream s;
00027                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00028                                 << "Value = ";
00029                 if (T1::IsBot()) {
00030                         s << "No value"<< std::endl ;
00031                 } else if (T1::IsAny()) {
00032                         s << "Any value"<< std::endl;
00033                 } else {
00034                         s << T1::Get() << std::endl ;
00035                 }
00036                 return s.str() ;
00037         }
00038         ;
00039 };
00040 
00041 template<class T1, class T2> class Label_2 : public Label, public T1, public T2 {
00042 
00043 public:
00044         Label_2() {
00045                 AddQuantityName(T1::sQuantityName) ;
00046                 AddQuantityName(T2::sQuantityName) ;
00047         }
00048 
00049         std::string Print() {
00050                 std::stringstream s;
00051                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00052                                 << "Value = ";
00053                 if (T1::IsBot()) {
00054                         s << "No value"<< std::endl ;
00055                 } else if (T1::IsAny()) {
00056                         s << "Any value"<< std::endl;
00057                 } else {
00058                         s << T1::Get() << std::endl ;
00059                 }
00060                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00061                                 << "Value = ";
00062                 if (T2::IsBot()) {
00063                         s << "No value"<< std::endl ;
00064                 } else if (T2::IsAny()) {
00065                         s << "Any value"<< std::endl;
00066                 } else {
00067                         s << T2::Get() << std::endl ;
00068                 }
00069 
00070                 return s.str();
00071         }
00072         ;
00073 };
00074 
00075 template<class T1, class T2, class T3> class Label_3 : public Label, public T1,
00076         public T2, public T3 {
00077 
00078 public:
00079         Label_3() {
00080                 AddQuantityName(T1::sQuantityName) ;
00081                 AddQuantityName(T2::sQuantityName) ;
00082                 AddQuantityName(T3::sQuantityName) ;
00083         }
00084         ;
00085         ~Label_3() {
00086         }
00087         ;
00088         std::string Print() {
00089                 std::stringstream s;
00090                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00091                                 << "Value = ";
00092                 if (T1::IsBot()) {
00093                         s << "No value"<< std::endl ;
00094                 } else if (T1::IsAny()) {
00095                         s << "Any value"<< std::endl;
00096                 } else {
00097                         s << T1::Get() << std::endl ;
00098                 }
00099                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00100                                 << "Value = ";
00101                 if (T2::IsBot()) {
00102                         s << "No value"<< std::endl ;
00103                 } else if (T2::IsAny()) {
00104                         s << "Any value"<< std::endl;
00105                 } else {
00106                         s << T2::Get() << std::endl ;
00107                 }
00108                 s << T3::sQuantityName << " of type "<< T3::sQuantityType << std::endl
00109                                 << "Value = ";
00110                 if (T3::IsBot()) {
00111                         s << "No value"<< std::endl ;
00112                 } else if (T3::IsAny()) {
00113                         s << "Any value"<< std::endl;
00114                 } else {
00115                         s << T3::Get() << std::endl ;
00116                 }
00117 
00118                 return s.str();
00119         }
00120         ;
00121 
00122 };
00123 
00124 template<class T1, class T2, class T3, class T4> class Label_4 : public Label,
00125         public T1, public T2, public T3, public T4 {
00126 public:
00127         Label_4() {
00128                 AddQuantityName(T1::sQuantityName) ;
00129                 AddQuantityName(T2::sQuantityName) ;
00130                 AddQuantityName(T3::sQuantityName) ;
00131                 AddQuantityName(T4::sQuantityName) ;
00132         }
00133 
00134         std::string Print() {
00135                 std::stringstream s;
00136                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00137                                 << "Value = ";
00138                 if (T1::IsBot()) {
00139                         s << "No value"<< std::endl ;
00140                 } else if (T1::IsAny()) {
00141                         s << "Any value"<< std::endl;
00142                 } else {
00143                         s << T1::Get() << std::endl ;
00144                 }
00145                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00146                                 << "Value = ";
00147                 if (T2::IsBot()) {
00148                         s << "No value"<< std::endl ;
00149                 } else if (T2::IsAny()) {
00150                         s << "Any value"<< std::endl;
00151                 } else {
00152                         s << T2::Get() << std::endl ;
00153                 }
00154                 s << T3::sQuantityName << " of type "<< T3::sQuantityType << std::endl
00155                                 << "Value = ";
00156                 if (T3::IsBot()) {
00157                         s << "No value"<< std::endl ;
00158                 } else if (T3::IsAny()) {
00159                         s << "Any value"<< std::endl;
00160                 } else {
00161                         s << T3::Get() << std::endl ;
00162                 }
00163                 s << T4::sQuantityName << " of type "<< T4::sQuantityType << std::endl
00164                                 << "Value = ";
00165                 if (T4::IsBot()) {
00166                         s << "No value"<< std::endl ;
00167                 } else if (T4::IsAny()) {
00168                         s << "Any value"<< std::endl;
00169                 } else {
00170                         s << T4::Get() << std::endl ;
00171                 }
00172 
00173                 return s.str();
00174         }
00175         ;
00176 
00177 };
00178 
00179 template<class T1, class T2, class T3, class T4, class T5> class Label_5 :
00180         public Label, public T1, public T2, public T3, public T4, public T5 {
00181 public:
00182         Label_5() {
00183                 AddQuantityName(T1::sQuantityName) ;
00184                 AddQuantityName(T2::sQuantityName) ;
00185                 AddQuantityName(T3::sQuantityName) ;
00186                 AddQuantityName(T4::sQuantityName) ;
00187                 AddQuantityName(T5::sQuantityName) ;
00188         }
00189 
00190         std::string Print() {
00191                 std::stringstream s;
00192                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00193                                 << "Value = ";
00194                 if (T1::IsBot()) {
00195                         s << "No value"<< std::endl ;
00196                 } else if (T1::IsAny()) {
00197                         s << "Any value"<< std::endl;
00198                 } else {
00199                         s << T1::Get() << std::endl ;
00200                 }
00201                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00202                                 << "Value = ";
00203                 if (T2::IsBot()) {
00204                         s << "No value"<< std::endl ;
00205                 } else if (T2::IsAny()) {
00206                         s << "Any value"<< std::endl;
00207                 } else {
00208                         s << T2::Get() << std::endl ;
00209                 }
00210                 s << T3::sQuantityName << " of type "<< T3::sQuantityType << std::endl
00211                                 << "Value = ";
00212                 if (T3::IsBot()) {
00213                         s << "No value"<< std::endl ;
00214                 } else if (T3::IsAny()) {
00215                         s << "Any value"<< std::endl;
00216                 } else {
00217                         s << T3::Get() << std::endl ;
00218                 }
00219                 s << T4::sQuantityName << " of type "<< T4::sQuantityType << std::endl
00220                                 << "Value = ";
00221                 if (T4::IsBot()) {
00222                         s << "No value"<< std::endl ;
00223                 } else if (T4::IsAny()) {
00224                         s << "Any value"<< std::endl;
00225                 } else {
00226                         s << T4::Get() << std::endl ;
00227                 }
00228                 s << T5::sQuantityName << " of type "<< T5::sQuantityType << std::endl
00229                                 << "Value = ";
00230                 if (T5::IsBot()) {
00231                         s << "No value"<< std::endl ;
00232                 } else if (T5::IsAny()) {
00233                         s << "Any value"<< std::endl;
00234                 } else {
00235                         s << T5::Get() << std::endl ;
00236                 }
00237 
00238                 return s.str();
00239 
00240         }
00241         ;
00242 
00243 };
00244 
00245 template<class T1, class T2, class T3, class T4, class T5, class T6> class Label_6 :
00246         public Label, public T1, public T2, public T3, public T4, public T5,
00247         public T6 {
00248 public:
00249         Label_6() {
00250                 AddQuantityName(T1::sQuantityName) ;
00251                 AddQuantityName(T2::sQuantityName) ;
00252                 AddQuantityName(T3::sQuantityName) ;
00253                 AddQuantityName(T4::sQuantityName) ;
00254                 AddQuantityName(T5::sQuantityName) ;
00255                 AddQuantityName(T6::sQuantityName) ;
00256         }
00257 
00258         std::string Print() {
00259                 std::stringstream s;
00260                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00261                                 << "Value = ";
00262                 if (T1::IsBot()) {
00263                         s << "No value"<< std::endl ;
00264                 } else if (T1::IsAny()) {
00265                         s << "Any value"<< std::endl;
00266                 } else {
00267                         s << T1::Get() << std::endl ;
00268                 }
00269                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00270                                 << "Value = ";
00271                 if (T2::IsBot()) {
00272                         s << "No value"<< std::endl ;
00273                 } else if (T2::IsAny()) {
00274                         s << "Any value"<< std::endl;
00275                 } else {
00276                         s << T2::Get() << std::endl ;
00277                 }
00278                 s << T3::sQuantityName << " of type "<< T3::sQuantityType << std::endl
00279                                 << "Value = ";
00280                 if (T3::IsBot()) {
00281                         s << "No value"<< std::endl ;
00282                 } else if (T3::IsAny()) {
00283                         s << "Any value"<< std::endl;
00284                 } else {
00285                         s << T3::Get() << std::endl ;
00286                 }
00287                 s << T4::sQuantityName << " of type "<< T4::sQuantityType << std::endl
00288                                 << "Value = ";
00289                 if (T4::IsBot()) {
00290                         s << "No value"<< std::endl ;
00291                 } else if (T4::IsAny()) {
00292                         s << "Any value"<< std::endl;
00293                 } else {
00294                         s << T4::Get() << std::endl ;
00295                 }
00296                 s << T5::sQuantityName << " of type "<< T5::sQuantityType << std::endl
00297                                 << "Value = ";
00298                 if (T5::IsBot()) {
00299                         s << "No value"<< std::endl ;
00300                 } else if (T5::IsAny()) {
00301                         s << "Any value"<< std::endl;
00302                 } else {
00303                         s << T5::Get() << std::endl ;
00304                 }
00305                 s << T6::sQuantityName << " of type "<< T6::sQuantityType << std::endl
00306                                 << "Value = ";
00307                 if (T6::IsBot()) {
00308                         s << "No value"<< std::endl ;
00309                 } else if (T6::IsAny()) {
00310                         s << "Any value"<< std::endl;
00311                 } else {
00312                         s << T6::Get() << std::endl ;
00313                 }
00314                 return s.str();
00315 
00316         }
00317         ;
00318 
00319 };
00320 
00321 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7> class Label_7 :
00322         public Label, public T1, public T2, public T3, public T4, public T5,
00323         public T6, public T7 {
00324 public:
00325         Label_7() {
00326                 AddQuantityName(T1::sQuantityName) ;
00327                 AddQuantityName(T2::sQuantityName) ;
00328                 AddQuantityName(T3::sQuantityName) ;
00329                 AddQuantityName(T4::sQuantityName) ;
00330                 AddQuantityName(T5::sQuantityName) ;
00331                 AddQuantityName(T6::sQuantityName) ;
00332                 AddQuantityName(T7::sQuantityName) ;
00333         }
00334 
00335         std::string Print() {
00336                 std::stringstream s;
00337                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00338                                 << "Value = ";
00339                 if (T1::IsBot()) {
00340                         s << "No value"<< std::endl ;
00341                 } else if (T1::IsAny()) {
00342                         s << "Any value"<< std::endl;
00343                 } else {
00344                         s << T1::Get() << std::endl ;
00345                 }
00346                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00347                                 << "Value = ";
00348                 if (T2::IsBot()) {
00349                         s << "No value"<< std::endl ;
00350                 } else if (T2::IsAny()) {
00351                         s << "Any value"<< std::endl;
00352                 } else {
00353                         s << T2::Get() << std::endl ;
00354                 }
00355                 s << T3::sQuantityName << " of type "<< T3::sQuantityType << std::endl
00356                                 << "Value = ";
00357                 if (T3::IsBot()) {
00358                         s << "No value"<< std::endl ;
00359                 } else if (T3::IsAny()) {
00360                         s << "Any value"<< std::endl;
00361                 } else {
00362                         s << T3::Get() << std::endl ;
00363                 }
00364                 s << T4::sQuantityName << " of type "<< T4::sQuantityType << std::endl
00365                                 << "Value = ";
00366                 if (T4::IsBot()) {
00367                         s << "No value"<< std::endl ;
00368                 } else if (T4::IsAny()) {
00369                         s << "Any value"<< std::endl;
00370                 } else {
00371                         s << T4::Get() << std::endl ;
00372                 }
00373                 s << T5::sQuantityName << " of type "<< T5::sQuantityType << std::endl
00374                                 << "Value = ";
00375                 if (T5::IsBot()) {
00376                         s << "No value"<< std::endl ;
00377                 } else if (T5::IsAny()) {
00378                         s << "Any value"<< std::endl;
00379                 } else {
00380                         s << T5::Get() << std::endl ;
00381                 }
00382                 s << T6::sQuantityName << " of type "<< T6::sQuantityType << std::endl
00383                                 << "Value = ";
00384                 if (T6::IsBot()) {
00385                         s << "No value"<< std::endl ;
00386                 } else if (T6::IsAny()) {
00387                         s << "Any value"<< std::endl;
00388                 } else {
00389                         s << T6::Get() << std::endl ;
00390                 }
00391                 s << T7::sQuantityName << " of type "<< T7::sQuantityType << std::endl
00392                                 << "Value = ";
00393                 if (T7::IsBot()) {
00394                         s << "No value"<< std::endl ;
00395                 } else if (T7::IsAny()) {
00396                         s << "Any value"<< std::endl;
00397                 } else {
00398                         s << T7::Get() << std::endl ;
00399                 }
00400                 return s.str();
00401 
00402         }
00403         ;
00404 
00405 };
00406 
00407 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
00408                 class T8> class Label_8 : public Label, public T1, public T2,
00409         public T3, public T4, public T5, public T6, public T7, public T8 {
00410 public:
00411         Label_8() {
00412                 AddQuantityName(T1::sQuantityName) ;
00413                 AddQuantityName(T2::sQuantityName) ;
00414                 AddQuantityName(T3::sQuantityName) ;
00415                 AddQuantityName(T4::sQuantityName) ;
00416                 AddQuantityName(T5::sQuantityName) ;
00417                 AddQuantityName(T6::sQuantityName) ;
00418                 AddQuantityName(T7::sQuantityName) ;
00419                 AddQuantityName(T8::sQuantityName) ;
00420         }
00421 
00422         std::string Print() {
00423                 std::stringstream s;
00424                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00425                                 << "Value = ";
00426                 if (T1::IsBot()) {
00427                         s << "No value"<< std::endl ;
00428                 } else if (T1::IsAny()) {
00429                         s << "Any value"<< std::endl;
00430                 } else {
00431                         s << T1::Get() << std::endl ;
00432                 }
00433                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00434                                 << "Value = ";
00435                 if (T2::IsBot()) {
00436                         s << "No value"<< std::endl ;
00437                 } else if (T2::IsAny()) {
00438                         s << "Any value"<< std::endl;
00439                 } else {
00440                         s << T2::Get() << std::endl ;
00441                 }
00442                 s << T3::sQuantityName << " of type "<< T3::sQuantityType << std::endl
00443                                 << "Value = ";
00444                 if (T3::IsBot()) {
00445                         s << "No value"<< std::endl ;
00446                 } else if (T3::IsAny()) {
00447                         s << "Any value"<< std::endl;
00448                 } else {
00449                         s << T3::Get() << std::endl ;
00450                 }
00451                 s << T4::sQuantityName << " of type "<< T4::sQuantityType << std::endl
00452                                 << "Value = ";
00453                 if (T4::IsBot()) {
00454                         s << "No value"<< std::endl ;
00455                 } else if (T4::IsAny()) {
00456                         s << "Any value"<< std::endl;
00457                 } else {
00458                         s << T4::Get() << std::endl ;
00459                 }
00460                 s << T5::sQuantityName << " of type "<< T5::sQuantityType << std::endl
00461                                 << "Value = ";
00462                 if (T5::IsBot()) {
00463                         s << "No value"<< std::endl ;
00464                 } else if (T5::IsAny()) {
00465                         s << "Any value"<< std::endl;
00466                 } else {
00467                         s << T5::Get() << std::endl ;
00468                 }
00469                 s << T6::sQuantityName << " of type "<< T6::sQuantityType << std::endl
00470                                 << "Value = ";
00471                 if (T6::IsBot()) {
00472                         s << "No value"<< std::endl ;
00473                 } else if (T6::IsAny()) {
00474                         s << "Any value"<< std::endl;
00475                 } else {
00476                         s << T6::Get() << std::endl ;
00477                 }
00478                 s << T7::sQuantityName << " of type "<< T7::sQuantityType << std::endl
00479                                 << "Value = ";
00480                 if (T7::IsBot()) {
00481                         s << "No value"<< std::endl ;
00482                 } else if (T7::IsAny()) {
00483                         s << "Any value"<< std::endl;
00484                 } else {
00485                         s << T7::Get() << std::endl ;
00486                 }
00487                 s << T8::sQuantityName << " of type "<< T8::sQuantityType << std::endl
00488                                 << "Value = ";
00489                 if (T8::IsBot()) {
00490                         s << "No value"<< std::endl ;
00491                 } else if (T8::IsAny()) {
00492                         s << "Any value"<< std::endl;
00493                 } else {
00494                         s << T8::Get() << std::endl ;
00495                 }
00496                 return s.str();
00497 
00498         }
00499         ;
00500 
00501 };
00502 
00503 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
00504                 class T8, class T9> class Label_9 : public Label, public T1, public T2,
00505         public T3, public T4, public T5, public T6, public T7, public T8, public T9 {
00506 public:
00507         Label_9() {
00508                 AddQuantityName(T1::sQuantityName) ;
00509                 AddQuantityName(T2::sQuantityName) ;
00510                 AddQuantityName(T3::sQuantityName) ;
00511                 AddQuantityName(T4::sQuantityName) ;
00512                 AddQuantityName(T5::sQuantityName) ;
00513                 AddQuantityName(T6::sQuantityName) ;
00514                 AddQuantityName(T7::sQuantityName) ;
00515                 AddQuantityName(T8::sQuantityName) ;
00516                 AddQuantityName(T9::sQuantityName) ;
00517         }
00518 
00519         std::string Print() {
00520                 std::stringstream s;
00521                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00522                                 << "Value = ";
00523                 if (T1::IsBot()) {
00524                         s << "No value"<< std::endl ;
00525                 } else if (T1::IsAny()) {
00526                         s << "Any value"<< std::endl;
00527                 } else {
00528                         s << T1::Get() << std::endl ;
00529                 }
00530                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00531                                 << "Value = ";
00532                 if (T2::IsBot()) {
00533                         s << "No value"<< std::endl ;
00534                 } else if (T2::IsAny()) {
00535                         s << "Any value"<< std::endl;
00536                 } else {
00537                         s << T2::Get() << std::endl ;
00538                 }
00539                 s << T3::sQuantityName << " of type "<< T3::sQuantityType << std::endl
00540                                 << "Value = ";
00541                 if (T3::IsBot()) {
00542                         s << "No value"<< std::endl ;
00543                 } else if (T3::IsAny()) {
00544                         s << "Any value"<< std::endl;
00545                 } else {
00546                         s << T3::Get() << std::endl ;
00547                 }
00548                 s << T4::sQuantityName << " of type "<< T4::sQuantityType << std::endl
00549                                 << "Value = ";
00550                 if (T4::IsBot()) {
00551                         s << "No value"<< std::endl ;
00552                 } else if (T4::IsAny()) {
00553                         s << "Any value"<< std::endl;
00554                 } else {
00555                         s << T4::Get() << std::endl ;
00556                 }
00557                 s << T5::sQuantityName << " of type "<< T5::sQuantityType << std::endl
00558                                 << "Value = ";
00559                 if (T5::IsBot()) {
00560                         s << "No value"<< std::endl ;
00561                 } else if (T5::IsAny()) {
00562                         s << "Any value"<< std::endl;
00563                 } else {
00564                         s << T5::Get() << std::endl ;
00565                 }
00566                 s << T6::sQuantityName << " of type "<< T6::sQuantityType << std::endl
00567                                 << "Value = ";
00568                 if (T6::IsBot()) {
00569                         s << "No value"<< std::endl ;
00570                 } else if (T6::IsAny()) {
00571                         s << "Any value"<< std::endl;
00572                 } else {
00573                         s << T6::Get() << std::endl ;
00574                 }
00575                 s << T7::sQuantityName << " of type "<< T7::sQuantityType << std::endl
00576                                 << "Value = ";
00577                 if (T7::IsBot()) {
00578                         s << "No value"<< std::endl ;
00579                 } else if (T7::IsAny()) {
00580                         s << "Any value"<< std::endl;
00581                 } else {
00582                         s << T7::Get() << std::endl ;
00583                 }
00584                 s << T8::sQuantityName << " of type "<< T8::sQuantityType << std::endl
00585                                 << "Value = ";
00586                 if (T8::IsBot()) {
00587                         s << "No value"<< std::endl ;
00588                 } else if (T8::IsAny()) {
00589                         s << "Any value"<< std::endl;
00590                 } else {
00591                         s << T8::Get() << std::endl ;
00592                 }
00593                 s << T9::sQuantityName << " of type "<< T9::sQuantityType << std::endl
00594                                 << "Value = ";
00595                 if (T9::IsBot()) {
00596                         s << "No value"<< std::endl ;
00597                 } else if (T9::IsAny()) {
00598                         s << "Any value"<< std::endl;
00599                 } else {
00600                         s << T9::Get() << std::endl ;
00601                 }
00602                 return s.str();
00603 
00604         }
00605         ;
00606 
00607 };
00608 
00609 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
00610                 class T8, class T9, class T10> class Label_10 : public Label,
00611         public T1, public T2, public T3, public T4, public T5, public T6,
00612         public T7, public T8, public T9, public T10 {
00613 public:
00614         Label_10() {
00615                 AddQuantityName(T1::sQuantityName) ;
00616                 AddQuantityName(T2::sQuantityName) ;
00617                 AddQuantityName(T3::sQuantityName) ;
00618                 AddQuantityName(T4::sQuantityName) ;
00619                 AddQuantityName(T5::sQuantityName) ;
00620                 AddQuantityName(T6::sQuantityName) ;
00621                 AddQuantityName(T7::sQuantityName) ;
00622                 AddQuantityName(T8::sQuantityName) ;
00623                 AddQuantityName(T9::sQuantityName) ;
00624                 AddQuantityName(T10::sQuantityName) ;
00625         }
00626 
00627         std::string Print() {
00628                 std::stringstream s;
00629                 s << T1::sQuantityName << " of type "<< T1::sQuantityType << std::endl
00630                                 << "Value = ";
00631                 if (T1::IsBot()) {
00632                         s << "No value"<< std::endl ;
00633                 } else if (T1::IsAny()) {
00634                         s << "Any value"<< std::endl;
00635                 } else {
00636                         s << T1::Get() << std::endl ;
00637                 }
00638                 s << T2::sQuantityName << " of type "<< T2::sQuantityType << std::endl
00639                                 << "Value = ";
00640                 if (T2::IsBot()) {
00641                         s << "No value"<< std::endl ;
00642                 } else if (T2::IsAny()) {
00643                         s << "Any value"<< std::endl;
00644                 } else {
00645                         s << T2::Get() << std::endl ;
00646                 }
00647                 s << T3::sQuantityName << " of type "<< T3::sQuantityType << std::endl
00648                                 << "Value = ";
00649                 if (T3::IsBot()) {
00650                         s << "No value"<< std::endl ;
00651                 } else if (T3::IsAny()) {
00652                         s << "Any value"<< std::endl;
00653                 } else {
00654                         s << T3::Get() << std::endl ;
00655                 }
00656                 s << T4::sQuantityName << " of type "<< T4::sQuantityType << std::endl
00657                                 << "Value = ";
00658                 if (T4::IsBot()) {
00659                         s << "No value"<< std::endl ;
00660                 } else if (T4::IsAny()) {
00661                         s << "Any value"<< std::endl;
00662                 } else {
00663                         s << T4::Get() << std::endl ;
00664                 }
00665                 s << T5::sQuantityName << " of type "<< T5::sQuantityType << std::endl
00666                                 << "Value = ";
00667                 if (T5::IsBot()) {
00668                         s << "No value"<< std::endl ;
00669                 } else if (T5::IsAny()) {
00670                         s << "Any value"<< std::endl;
00671                 } else {
00672                         s << T5::Get() << std::endl ;
00673                 }
00674                 s << T6::sQuantityName << " of type "<< T6::sQuantityType << std::endl
00675                                 << "Value = ";
00676                 if (T6::IsBot()) {
00677                         s << "No value"<< std::endl ;
00678                 } else if (T6::IsAny()) {
00679                         s << "Any value"<< std::endl;
00680                 } else {
00681                         s << T6::Get() << std::endl ;
00682                 }
00683                 s << T7::sQuantityName << " of type "<< T7::sQuantityType << std::endl
00684                                 << "Value = ";
00685                 if (T7::IsBot()) {
00686                         s << "No value"<< std::endl ;
00687                 } else if (T7::IsAny()) {
00688                         s << "Any value"<< std::endl;
00689                 } else {
00690                         s << T7::Get() << std::endl ;
00691                 }
00692                 s << T8::sQuantityName << " of type "<< T8::sQuantityType << std::endl
00693                                 << "Value = ";
00694                 if (T8::IsBot()) {
00695                         s << "No value"<< std::endl ;
00696                 } else if (T8::IsAny()) {
00697                         s << "Any value"<< std::endl;
00698                 } else {
00699                         s << T8::Get() << std::endl ;
00700                 }
00701                 s << T9::sQuantityName << " of type "<< T9::sQuantityType << std::endl
00702                                 << "Value = ";
00703                 if (T9::IsBot()) {
00704                         s << "No value"<< std::endl ;
00705                 } else if (T9::IsAny()) {
00706                         s << "Any value"<< std::endl;
00707                 } else {
00708                         s << T9::Get() << std::endl ;
00709                 }
00710                 s << T10::sQuantityName << " of type "<< T10::sQuantityType << std::endl
00711                                 << "Value = ";
00712                 if (T10::IsBot()) {
00713                         s << "No value"<< std::endl ;
00714                 } else if (T10::IsAny()) {
00715                         s << "Any value"<< std::endl;
00716                 } else {
00717                         s << T10::Get() << std::endl ;
00718                 }
00719                 return s.str();
00720         }
00721         ;
00722 
00723 };
00724 
00725 }
00726 
00727 #endif /*LABEL_HPP_*/

Generated on Sun Sep 7 18:37:42 2008 for COSI by  doxygen 1.5.4
Contact 
©2002-2018 U.C. Regents