S11nBool.cpp

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

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