S11nChar.cpp

Go to the documentation of this file.
00001 /*
00002 
00003 $Header$
00004 
00005 */
00006 
00007 #include "S11nChar.h"
00008 
00009 template<>
00010 int S11n<char>::toString(const char &value, String &str)
00011 {
00012   char v[2] = {value, 0};
00013   str = v;
00014   return OK;
00015 }
00016 
00017 template<>
00018 int S11n<char>::fromString(const String &str, char &value)
00019 {
00020   value = str.empty() ? 0 : str[0];
00021   return OK;
00022 }
00023 
00024 template<>
00025 int S11n<char>::toXml(const char &value, XmlElement *element)
00026 {
00027   int res;
00028 
00029   if (FAILED(res = toXmlAttrValue(value, element)))
00030     return ERROR_BACKTRACE(res);
00031   return OK;
00032 }
00033 
00034 template<>
00035 int S11n<char>::fromXml(const XmlElement *element, char &value)
00036 {
00037   int res;
00038 
00039   if (FAILED(res = fromXmlAttrValue(element, value)))
00040     return ERROR_BACKTRACE(res);
00041   return OK;
00042 }

Generated on Thu Sep 6 20:11:25 2007 for Pylon Application Platform by  doxygen 1.5.1