Changeset 1766 for code/branches/core3/src/util/ArgReader.cc
- Timestamp:
- Sep 11, 2008, 12:25:11 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/util/ArgReader.cc
r1535 r1766 34 34 #include "ArgReader.h" 35 35 #include "SubString.h" 36 #include <ostream> 37 #include <iostream> 38 39 class FooBar 40 { 41 //friend class ArgReader; 42 public: 43 operator long long() const 44 { 45 return 0; 46 } 47 float float_; 48 static FooBar& createFooBar(); 49 private: 50 //FooBar(); 51 //FooBar(const FooBar& instance); 52 //~FooBar(); 53 }; 54 55 inline std::ostream& operator<<(std::ostream& outstream, const FooBar& fb) 56 { 57 return outstream << fb.float_; 58 } 59 inline std::istream& operator>>(std::istream& instream, const FooBar& fb); 60 //inline bool explicitConversion(const char** output, const FooBar input) 61 //{ 62 // return true; 63 //} 64 65 #include "Convert.h" 66 67 template<> 68 struct ConverterExplicit<const char*, FooBar> 69 { 70 static bool convert(const char** output, const FooBar input) 71 { 72 return true; 73 } 74 }; 75 76 #include "MultiType.h" 36 77 37 78 ArgReader::ArgReader(int argc, char **argv) … … 40 81 errorString_ = ""; 41 82 CmdLineArg arg; 83 84 int a = ImplicitConversion<FooBar, const char*>::exists; 85 int val1; 86 long long val2 = conversion_cast<long long>(val1); 87 //val2 = val1; 88 //convertValue(&val2, val1); 89 //explicitConversion(&FooBar(), val1); 90 91 //using namespace1::fooBar1; 92 //fooBar1(); 93 //int val1; 94 //char val2; 95 //explicitConversion(&val1, val2); 96 97 std::istringstream asdf; 98 //asdf >> val2; 42 99 43 100 int i = 1;
Note: See TracChangeset
for help on using the changeset viewer.