⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calculatorc.cpp

📁 testing sample application
💻 CPP
📖 第 1 页 / 共 5 页
字号:
	else
	{	cp->ptr = (void*)new struct Calculator__Div[n];
		if (!cp->ptr)
		{	soap->error = SOAP_EOM;
			return NULL;
		}
		if (size)
			*size = n * sizeof(struct Calculator__Div);
	}
		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
	return (struct Calculator__Div*)cp->ptr;
}
SOAP_FMAC3 void SOAP_FMAC4 soap_copy_Calculator__Div(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
{
	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct Calculator__Div %p -> %p\n", q, p));
	*(struct Calculator__Div*)p = *(struct Calculator__Div*)q;
}

SOAP_FMAC3 void SOAP_FMAC4 soap_default_Calculator__DivResponse(struct soap *soap, struct Calculator__DivResponse *a)
{
	(void)soap; (void)a; /* appease -Wall -Werror */
	soap_default_xsd__double(soap, &a->Result);
}

SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_Calculator__DivResponse(struct soap *soap, const struct Calculator__DivResponse *a)
{
	(void)soap; (void)a; /* appease -Wall -Werror */
}

SOAP_FMAC3 int SOAP_FMAC4 soap_put_Calculator__DivResponse(struct soap *soap, const struct Calculator__DivResponse *a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_Calculator__DivResponse);
	if (soap_out_Calculator__DivResponse(soap, tag, id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

SOAP_FMAC3 int SOAP_FMAC4 soap_out_Calculator__DivResponse(struct soap *soap, const char *tag, int id, const struct Calculator__DivResponse *a, const char *type)
{
	if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_Calculator__DivResponse), type))
		return soap->error;
	if (soap_out_xsd__double(soap, "Result", -1, &a->Result, ""))
		return soap->error;
	return soap_element_end_out(soap, tag);
}

SOAP_FMAC3 struct Calculator__DivResponse * SOAP_FMAC4 soap_get_Calculator__DivResponse(struct soap *soap, struct Calculator__DivResponse *p, const char *tag, const char *type)
{
	if ((p = soap_in_Calculator__DivResponse(soap, tag, p, type)))
		if (soap_getindependent(soap))
			return NULL;
	return p;
}

SOAP_FMAC3 struct Calculator__DivResponse * SOAP_FMAC4 soap_in_Calculator__DivResponse(struct soap *soap, const char *tag, struct Calculator__DivResponse *a, const char *type)
{
	short soap_flag_Result = 1;
	if (soap_element_begin_in(soap, tag, 0, type))
		return NULL;
	a = (struct Calculator__DivResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_Calculator__DivResponse, sizeof(struct Calculator__DivResponse), 0, NULL, NULL, NULL);
	if (!a)
		return NULL;
	soap_default_Calculator__DivResponse(soap, a);
	if (soap->body && !*soap->href)
	{
		for (;;)
		{	soap->error = SOAP_TAG_MISMATCH;
			if (soap_flag_Result && soap->error == SOAP_TAG_MISMATCH)
				if (soap_in_xsd__double(soap, "Result", &a->Result, "xsd:double"))
				{	soap_flag_Result--;
					continue;
				}
			if (soap->error == SOAP_TAG_MISMATCH)
				soap->error = soap_ignore_element(soap);
			if (soap->error == SOAP_NO_TAG)
				break;
			if (soap->error)
				return NULL;
		}
		if (soap_element_end_in(soap, tag))
			return NULL;
	}
	else
	{	a = (struct Calculator__DivResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_Calculator__DivResponse, 0, sizeof(struct Calculator__DivResponse), 0, NULL);
		if (soap->body && soap_element_end_in(soap, tag))
			return NULL;
	}
	if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_Result > 0))
	{	soap->error = SOAP_OCCURS;
		return NULL;
	}
	return a;
}

SOAP_FMAC5 struct Calculator__DivResponse * SOAP_FMAC6 soap_new_Calculator__DivResponse(struct soap *soap, int n)
{	return soap_instantiate_Calculator__DivResponse(soap, n, NULL, NULL, NULL);
}

SOAP_FMAC5 void SOAP_FMAC6 soap_delete_Calculator__DivResponse(struct soap *soap, struct Calculator__DivResponse *p)
{	soap_delete(soap, p);
}

SOAP_FMAC3 struct Calculator__DivResponse * SOAP_FMAC4 soap_instantiate_Calculator__DivResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
{
	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_Calculator__DivResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_Calculator__DivResponse, n, soap_fdelete);
	if (!cp)
		return NULL;
	if (n < 0)
	{	cp->ptr = (void*)new struct Calculator__DivResponse;
		if (size)
			*size = sizeof(struct Calculator__DivResponse);
	}
	else
	{	cp->ptr = (void*)new struct Calculator__DivResponse[n];
		if (!cp->ptr)
		{	soap->error = SOAP_EOM;
			return NULL;
		}
		if (size)
			*size = n * sizeof(struct Calculator__DivResponse);
	}
		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
	return (struct Calculator__DivResponse*)cp->ptr;
}
SOAP_FMAC3 void SOAP_FMAC4 soap_copy_Calculator__DivResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
{
	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct Calculator__DivResponse %p -> %p\n", q, p));
	*(struct Calculator__DivResponse*)p = *(struct Calculator__DivResponse*)q;
}

SOAP_FMAC3 void SOAP_FMAC4 soap_default_Calculator__Mul(struct soap *soap, struct Calculator__Mul *a)
{
	(void)soap; (void)a; /* appease -Wall -Werror */
	soap_default_xsd__double(soap, &a->a);
	soap_default_xsd__double(soap, &a->b);
}

SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_Calculator__Mul(struct soap *soap, const struct Calculator__Mul *a)
{
	(void)soap; (void)a; /* appease -Wall -Werror */
}

SOAP_FMAC3 int SOAP_FMAC4 soap_put_Calculator__Mul(struct soap *soap, const struct Calculator__Mul *a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_Calculator__Mul);
	if (soap_out_Calculator__Mul(soap, tag, id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

SOAP_FMAC3 int SOAP_FMAC4 soap_out_Calculator__Mul(struct soap *soap, const char *tag, int id, const struct Calculator__Mul *a, const char *type)
{
	if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_Calculator__Mul), type))
		return soap->error;
	if (soap_out_xsd__double(soap, "a", -1, &a->a, ""))
		return soap->error;
	if (soap_out_xsd__double(soap, "b", -1, &a->b, ""))
		return soap->error;
	return soap_element_end_out(soap, tag);
}

SOAP_FMAC3 struct Calculator__Mul * SOAP_FMAC4 soap_get_Calculator__Mul(struct soap *soap, struct Calculator__Mul *p, const char *tag, const char *type)
{
	if ((p = soap_in_Calculator__Mul(soap, tag, p, type)))
		if (soap_getindependent(soap))
			return NULL;
	return p;
}

SOAP_FMAC3 struct Calculator__Mul * SOAP_FMAC4 soap_in_Calculator__Mul(struct soap *soap, const char *tag, struct Calculator__Mul *a, const char *type)
{
	short soap_flag_a = 1, soap_flag_b = 1;
	if (soap_element_begin_in(soap, tag, 0, type))
		return NULL;
	a = (struct Calculator__Mul *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_Calculator__Mul, sizeof(struct Calculator__Mul), 0, NULL, NULL, NULL);
	if (!a)
		return NULL;
	soap_default_Calculator__Mul(soap, a);
	if (soap->body && !*soap->href)
	{
		for (;;)
		{	soap->error = SOAP_TAG_MISMATCH;
			if (soap_flag_a && soap->error == SOAP_TAG_MISMATCH)
				if (soap_in_xsd__double(soap, "a", &a->a, "xsd:double"))
				{	soap_flag_a--;
					continue;
				}
			if (soap_flag_b && soap->error == SOAP_TAG_MISMATCH)
				if (soap_in_xsd__double(soap, "b", &a->b, "xsd:double"))
				{	soap_flag_b--;
					continue;
				}
			if (soap->error == SOAP_TAG_MISMATCH)
				soap->error = soap_ignore_element(soap);
			if (soap->error == SOAP_NO_TAG)
				break;
			if (soap->error)
				return NULL;
		}
		if (soap_element_end_in(soap, tag))
			return NULL;
	}
	else
	{	a = (struct Calculator__Mul *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_Calculator__Mul, 0, sizeof(struct Calculator__Mul), 0, NULL);
		if (soap->body && soap_element_end_in(soap, tag))
			return NULL;
	}
	if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_a > 0 || soap_flag_b > 0))
	{	soap->error = SOAP_OCCURS;
		return NULL;
	}
	return a;
}

SOAP_FMAC5 struct Calculator__Mul * SOAP_FMAC6 soap_new_Calculator__Mul(struct soap *soap, int n)
{	return soap_instantiate_Calculator__Mul(soap, n, NULL, NULL, NULL);
}

SOAP_FMAC5 void SOAP_FMAC6 soap_delete_Calculator__Mul(struct soap *soap, struct Calculator__Mul *p)
{	soap_delete(soap, p);
}

SOAP_FMAC3 struct Calculator__Mul * SOAP_FMAC4 soap_instantiate_Calculator__Mul(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
{
	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_Calculator__Mul(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_Calculator__Mul, n, soap_fdelete);
	if (!cp)
		return NULL;
	if (n < 0)
	{	cp->ptr = (void*)new struct Calculator__Mul;
		if (size)
			*size = sizeof(struct Calculator__Mul);
	}
	else
	{	cp->ptr = (void*)new struct Calculator__Mul[n];
		if (!cp->ptr)
		{	soap->error = SOAP_EOM;
			return NULL;
		}
		if (size)
			*size = n * sizeof(struct Calculator__Mul);
	}
		DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr));
	return (struct Calculator__Mul*)cp->ptr;
}
SOAP_FMAC3 void SOAP_FMAC4 soap_copy_Calculator__Mul(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n)
{
	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct Calculator__Mul %p -> %p\n", q, p));
	*(struct Calculator__Mul*)p = *(struct Calculator__Mul*)q;
}

SOAP_FMAC3 void SOAP_FMAC4 soap_default_Calculator__MulResponse(struct soap *soap, struct Calculator__MulResponse *a)
{
	(void)soap; (void)a; /* appease -Wall -Werror */
	soap_default_xsd__double(soap, &a->Result);
}

SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_Calculator__MulResponse(struct soap *soap, const struct Calculator__MulResponse *a)
{
	(void)soap; (void)a; /* appease -Wall -Werror */
}

SOAP_FMAC3 int SOAP_FMAC4 soap_put_Calculator__MulResponse(struct soap *soap, const struct Calculator__MulResponse *a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_Calculator__MulResponse);
	if (soap_out_Calculator__MulResponse(soap, tag, id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

SOAP_FMAC3 int SOAP_FMAC4 soap_out_Calculator__MulResponse(struct soap *soap, const char *tag, int id, const struct Calculator__MulResponse *a, const char *type)
{
	if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_Calculator__MulResponse), type))
		return soap->error;
	if (soap_out_xsd__double(soap, "Result", -1, &a->Result, ""))
		return soap->error;
	return soap_element_end_out(soap, tag);
}

SOAP_FMAC3 struct Calculator__MulResponse * SOAP_FMAC4 soap_get_Calculator__MulResponse(struct soap *soap, struct Calculator__MulResponse *p, const char *tag, const char *type)
{
	if ((p = soap_in_Calculator__MulResponse(soap, tag, p, type)))
		if (soap_getindependent(soap))
			return NULL;
	return p;
}

SOAP_FMAC3 struct Calculator__MulResponse * SOAP_FMAC4 soap_in_Calculator__MulResponse(struct soap *soap, const char *tag, struct Calculator__MulResponse *a, const char *type)
{
	short soap_flag_Result = 1;
	if (soap_element_begin_in(soap, tag, 0, type))
		return NULL;
	a = (struct Calculator__MulResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_Calculator__MulResponse, sizeof(struct Calculator__MulResponse), 0, NULL, NULL, NULL);
	if (!a)
		return NULL;
	soap_default_Calculator__MulResponse(soap, a);
	if (soap->body && !*soap->href)
	{
		for (;;)
		{	soap->error = SOAP_TAG_MISMATCH;
			if (soap_flag_Result && soap->error == SOAP_TAG_MISMATCH)
				if (soap_in_xsd__double(soap, "Result", &a->Result, "xsd:double"))
				{	soap_flag_Result--;
					continue;
				}
			if (soap->error == SOAP_TAG_MISMATCH)
				soap->error = soap_ignore_element(soap);
			if (soap->error == SOAP_NO_TAG)
				break;
			if (soap->error)
				return NULL;
		}
		if (soap_element_end_in(soap, tag))
			return NULL;
	}
	else
	{	a = (struct Calculator__MulResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_Calculator__MulResponse, 0, sizeof(struct Calculator__MulResponse), 0, NULL);
		if (soap->body && soap_element_end_in(soap, tag))
			return NULL;
	}
	if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_Result > 0))
	{	soap->error = SOAP_OCCURS;
		return NULL;
	}
	return a;
}

SOAP_FMAC5 struct Calculator__MulResponse * SOAP_FMAC6 soap_new_Calculator__MulResponse(struct soap *soap, int n)
{	return soap_instantiate_Calculator__MulResponse(soap, n, NULL, NULL, NULL);
}

SOAP_FMAC5 void SOAP_FMAC6 soap_delete_Calculator__MulResponse(struct soap *soap, struct Calculator__MulResponse *p)
{	soap_delete(soap, p);
}

SOAP_FMAC3 struct Calculator__MulResponse * SOAP_FMAC4 soap_instantiate_Calculator__MulResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
{
	DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_Calculator__MulResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
	struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_Calculator__MulResponse, n, soap_fdelete);
	if (!cp)
		return NULL;
	if (n < 0)
	{	cp->ptr = (void*)new struct Calculator__MulResponse;
		if (size)
			*size = sizeof(struct Calculator__MulResponse);
	}
	else
	{	cp->ptr = (void*)new struct Calculator__MulResponse[n];
		if (!cp->ptr)
		{	soap->error = SOAP_EOM;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -