NCBI C++ ToolKit
soap_fault.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: soap_fault.cpp 33810 2007-05-04 15:24:00Z gouriano $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: .......
27  *
28  * File Description:
29  * .......
30  *
31  * Remark:
32  * This code was originally generated by application DATATOOL
33  * using the following specifications:
34  * 'soap_11.xsd'.
35  */
36 
37 // standard includes
38 #include <ncbi_pch.hpp>
39 
40 // generated includes
42 
44 
45 static struct tag_FaultcodeEnum {
47  const char* value;
48 } s_FaultCodeEnum[] = {
49 
50  {CSoapFault::eVersionMismatch, "VersionMismatch"},
51  {CSoapFault::eMustUnderstand, "MustUnderstand"},
52  {CSoapFault::eClient, "Client"},
53  {CSoapFault::eServer, "Server"},
55 };
56 
57 // generated classes
58 
59 // destructor
61 {
62 }
63 
65 {
67 }
68 
70 {
72 }
73 
76 {
77  for (int i=0; s_FaultCodeEnum[i].code != e_not_set; ++i) {
78  if (s_FaultCodeEnum[i].code == code) {
79  return s_FaultCodeEnum[i].value;
80  }
81  }
82  return kEmptyStr;
83 }
84 
87 {
88  for (int i=0; s_FaultCodeEnum[i].code != e_not_set; ++i) {
89  if (NStr::CompareNocase(value.c_str(),s_FaultCodeEnum[i].value) == 0) {
90  return s_FaultCodeEnum[i].code;
91  }
92  }
93  return e_not_set;
94 }
95 
96 
std::string TFaultcode
TFaultcode & SetFaultcode(void)
const TFaultcode & GetFaultcode(void) const
ESoap_FaultcodeEnum GetFaultcodeEnum(void) const
Definition: soap_fault.cpp:64
static TFaultcode x_FaultcodeEnumToCode(ESoap_FaultcodeEnum code)
Definition: soap_fault.cpp:74
void SetFaultcodeEnum(ESoap_FaultcodeEnum value)
Definition: soap_fault.cpp:69
static ESoap_FaultcodeEnum x_CodeToFaultcodeEnum(const TFaultcode &value)
Definition: soap_fault.cpp:85
@ eVersionMismatch
Definition: soap_fault.hpp:61
~CSoapFault(void)
Definition: soap_fault.cpp:60
char value[7]
Definition: config.c:431
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define kEmptyStr
Definition: ncbistr.hpp:123
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
Definition: ncbistr.cpp:219
int i
static struct tag_FaultcodeEnum s_FaultCodeEnum[]
User-defined methods of the data storage class.
Definition: inftrees.h:24
CSoapFault::ESoap_FaultcodeEnum code
Definition: soap_fault.cpp:46
const char * value
Definition: soap_fault.cpp:47
Modified on Fri Dec 01 04:43:45 2023 by modify_doxy.py rev. 669887