Changeset 530 for XIOS/branchs/xios-1.0
- Timestamp:
- 12/09/14 13:02:34 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/branchs/xios-1.0/src/node/variable.hpp
r501 r530 98 98 }; // class CVar 99 99 100 template<>101 inline bool CVariable::getData(void) const102 {103 if (content.compare("true")==0 || content.compare(".true.")==0 || content.compare(".TRUE.")==0) return true ;104 else if (content.compare("false")==0 || content.compare(".false.")==0 || content.compare(".FALSE.")==0) return false ;105 else ERROR("CVariable::getdata()",106 << "Cannot convert string <" << content << "> into type required" );107 return false ;108 }109 110 100 template <typename T> 111 101 inline T CVariable::getData(void) const … … 119 109 return retval ; 120 110 } 111 112 template<> 113 inline bool CVariable::getData(void) const 114 { 115 if (content.compare("true")==0 || content.compare(".true.")==0 || content.compare(".TRUE.")==0) return true ; 116 else if (content.compare("false")==0 || content.compare(".false.")==0 || content.compare(".FALSE.")==0) return false ; 117 else ERROR("CVariable::getdata()", 118 << "Cannot convert string <" << content << "> into type required" ); 119 return false ; 120 } 121 122 template<> 123 inline std::string CVariable::getData(void) const 124 { return content; } 121 125 122 126 template<>
Note: See TracChangeset
for help on using the changeset viewer.