当前位置: 首页>>代码示例>>C++>>正文


C++ StatusCode::GetCode方法代码示例

本文整理汇总了C++中StatusCode::GetCode方法的典型用法代码示例。如果您正苦于以下问题:C++ StatusCode::GetCode方法的具体用法?C++ StatusCode::GetCode怎么用?C++ StatusCode::GetCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StatusCode的用法示例。


在下文中一共展示了StatusCode::GetCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetChildCollections

StatusCode QueryOperatorImpl::GetChildCollections(QueryNodeImpl* target)
{
	return WINI_ERROR;
#if 0
	StatusCode status = srbGetDataDirInfo(m_conn, 0, m_qval, m_selval, &m_result, MAX_ROWS);

	if(0 != status)
	{
		if(-3005 == status)
			status = 0;

		return status;
	}

	filterDeleted(&m_result);

	INode* baby;

	CollectionOperatorImpl* cOp;

	char* original = getFromResultStruct(&m_result,dcs_tname[DATA_GRP_NAME], dcs_aname[DATA_GRP_NAME]);
	char* pathstring;

	for(int i = 0; i < m_result.row_count; i++)
	{
		pathstring = original + (i*MAX_DATA_SIZE);
		pathstring = pathstring + strlen(m_binding->GetPath());
		
		//highly inefficient but for right now it works...
blah:
		if(pathstring)
		{
			status = ((CollectionNodeImpl*)m_binding)->GetChild(pathstring, &baby);
				
			switch(status.GetCode())
			{
			case WINI_OK:
				target->AddChild(baby);
				break;
			case WINI_ERROR_NOT_FILLED:
				cOp = new CollectionOperatorImpl(m_session);
				cOp->GetChildren((CollectionNodeImpl*)baby);
				goto blah;
					break;
			default:
				return WINI_GENERAL_ERROR;
			}
		}else
		{
			target->AddChild(m_binding);
		}
	}

	//while(m_result.continuation_index >= 0)
	//{
		//add code for this later	
	//}

	return WINI_OK;
#endif
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:61,代码来源:winiQueryOperator.cpp

示例2: GetChildDatasets

StatusCode QueryOperatorImpl::GetChildDatasets(QueryNodeImpl* target)
{
	return WINI_ERROR;
#if 0
	StatusCode status = srbGetDataDirInfo(m_conn, 0, m_qval, m_selval, &m_result, MAX_ROWS);

	if(!status.isOk())
		return status;

	filterDeleted(&m_result);

	char* szCollection = getFromResultStruct(&m_result,dcs_tname[DATA_GRP_NAME], dcs_aname[DATA_GRP_NAME]);
	char* szDataset = getFromResultStruct(&m_result,dcs_tname[DATA_NAME], dcs_aname[DATA_NAME]);

	char *szCPtr, *szDPtr;

	const char* path = m_binding->GetPath();
	int path_len = strlen(path);


	INode* parent = m_binding;
	INode *child, *dataset;

	for(int i = 0; i < m_result.row_count; i++)
	{
		szCPtr = szCollection;
		szDPtr = szDataset;

		szCPtr += i * MAX_DATA_SIZE;
		szDPtr += i * MAX_DATA_SIZE;

		szCPtr += path_len;
		//dataset?

		if(NULL == *szCPtr)
		{
			status = parent->GetChild(szDPtr, &dataset);
			if(!status.isOk())
				return WINI_ERROR;
			target->AddChild(dataset);
			continue;
		}

start:	status = ((CollectionNodeImpl*)parent)->GetChild(szCPtr, &child);

		CollectionOperatorImpl* collection_op = (CollectionOperatorImpl*)m_session->GetOperator(WINI_COLLECTION);

		switch(status.GetCode())
		{
		case WINI_OK:
			//dataset is in a child collection of the binding
			//child collection has been found
			//now locate the dataset
startd:		status = child->GetChild(szDPtr, &dataset);
			switch(status.GetCode())
			{
			case WINI_OK:
				target->AddChild(dataset);
				break;
			case WINI_ERROR_NOT_FILLED:
				collection_op->GetChildren((CollectionNodeImpl*)child);
				goto startd;
				break;
			default:
				return WINI_ERROR;
				break;
			}
			break;
		case WINI_ERROR_NOT_FILLED:
			//child is not opened yet
			//open the child and begin again
			collection_op->GetChildren((CollectionNodeImpl*)parent);
			goto start;
			break;
		default:
			return WINI_ERROR;
			break;
		}

	}

	//while(m_result.continuation_index >= 0)
	//{
		//add code for this later	
	//}

	return WINI_OK;
#endif
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:89,代码来源:winiQueryOperator.cpp


注:本文中的StatusCode::GetCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。