Changeset 8999 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 07/14/08 20:59:13 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r8958 r8999 32 32 #pragma link C++ class MIter+; 33 33 #pragma link C++ class MDirIter+; 34 #pragma link C++ class MRunIter+;34 //#pragma link C++ class MRunIter+; 35 35 #pragma link C++ class MThread+; 36 36 -
trunk/MagicSoft/Mars/mbase/MString.cc
r7887 r8999 18 18 ! Author(s): Thomas Bretz, 3/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 420 ! Copyright: MAGIC Software Development, 2000-2008 21 21 ! 22 22 ! … … 44 44 ///////////////////////////////////////////////////////////////////////////// 45 45 #include "MString.h" 46 47 #include <stdarg.h> 46 48 47 49 ClassImp(MString); … … 97 99 // string.Print(" MyString has %d bytes ", 128).Strip(TString::kBoth); 98 100 // 101 /* 99 102 MString &MString::Print(const char *fmt, ...) 100 103 { … … 104 107 return Print(fmt, ap); 105 108 } 109 */ 106 110 107 111 // -------------------------------------------------------------------------- … … 120 124 // M/TString. 121 125 // 122 MString MString::Format(const char *fmt, ...) 126 #if ROOT_VERSION_CODE<ROOT_VERSION(5,18,00) 127 TString MString::Format(const char *fmt, ...) 123 128 { 124 129 va_list ap; … … 129 134 return ret; 130 135 } 136 #endif 131 137 132 138 // -------------------------------------------------------------------------- … … 135 141 // TString::Form didn't exist. 136 142 // 143 /* 137 144 void MString::Form(const char *fmt, ...) 138 145 { … … 142 149 Print(fmt, ap); 143 150 } 151 */ -
trunk/MagicSoft/Mars/mbase/MString.h
r7889 r8999 6 6 #endif 7 7 8 #include <stdio.h>9 #include <stdarg.h>10 11 8 class MString : public TString 12 9 { 10 private: 11 MString &Print(const char *fmt, va_list &ap); 12 // MString &Print(const char *fmt, ...); 13 13 14 public: 14 15 MString(const char *txt=0) : TString(txt) { } 15 MString(const MString &txt) : TString(txt) { } 16 17 MString &Print(const char *fmt, va_list &ap); 18 MString &Print(const char *fmt, ...); 16 MString(const TString &txt) : TString(txt) { } 19 17 20 18 #ifndef __CINT__ 21 static MString Format(const char *fmt, ...); 19 #if ROOT_VERSION_CODE<ROOT_VERSION(5,18,00) 20 static TString Format(const char *fmt, ...); 21 #endif 22 22 #endif 23 23 24 void Form(const char *fmt, ...);24 //void Form(const char *fmt, ...); 25 25 26 ClassDef(MString, 1) // Tool to make Form() thread safe against other TStrings 26 ClassDef(MString, 1) // Tool to make Form() thread safe against other TStrings for root prior 5.18.00 27 27 }; 28 28 -
trunk/MagicSoft/Mars/mbase/MTime.cc
r8996 r8999 403 403 return kFALSE; 404 404 405 UInt_t y, mon, d, h, m, s; 406 const Int_t n = sscanf(str, "%04u-%02u-%02u %02u:%02u:%02u", 407 &y, &mon, &d, &h, &m, &s); 408 409 return n==6 ? Set(y, mon, d, h, m, s) : kFALSE; 405 UInt_t y, mon, d, h, m, s; 406 if (6==sscanf(str, "%04u-%02u-%02u %02u:%02u:%02u", &y, &mon, &d, &h, &m, &s)) 407 return Set(y, mon, d, h, m, s); 408 409 if (3==sscanf(str, "%04u-%02u-%02u", &y, &mon, &d)) 410 return Set(y, mon, d); 411 412 return kFALSE; 410 413 } 411 414 -
trunk/MagicSoft/Mars/mbase/Makefile
r8892 r8999 43 43 MIter.cc \ 44 44 MDirIter.cc \ 45 MRunIter.cc \46 45 MReadSocket.cc \ 47 46 MGGroupFrame.cc \
Note:
See TracChangeset
for help on using the changeset viewer.