00001 // YosokumoDIF.cpp 00002 00003 #include <string.h> 00004 00005 #include "YosokumoDIF.h" 00006 00007 using namespace Yosokumo; 00008 00009 00010 YosokumoDIF::YosokumoDIF() 00011 { 00012 clearException(); 00013 } 00014 00015 YosokumoDIF::~YosokumoDIF() 00016 {} 00017 00018 bool YosokumoDIF::isException() 00019 { 00020 return isException(exception); 00021 } 00022 00023 bool YosokumoDIF::isException(const ServiceException &e) 00024 { 00025 return 00026 (!( 00027 (e.what() == NULL || strlen(e.what()) == 0) 00028 && e.getStatusCode() == 0 00029 && e.getFailedMethodName().empty() 00030 ) 00031 ); 00032 } 00033 00034 bool YosokumoDIF::getException(ServiceException &e) 00035 { 00036 if (isException()) 00037 { 00038 e = exception; 00039 return true; 00040 } 00041 00042 return false; 00043 } 00044 00045 void YosokumoDIF::clearException() 00046 { 00047 exception = ServiceException("", 0, ""); 00048 } 00049 00050 // end YosokumoDIF.cpp