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


C++ CField类代码示例

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


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

示例1: OnDblclkListFields

void CBibitemView::OnDblclkListFields(NMHDR* pNMHDR, LRESULT* pResult) 
{
	if (m_SelField != -1) {
		// Open URL
		CField *fi = (CField*)m_ListFields.GetItemData(m_SelField);
		if (fi) {
			if (!fi->GetValue().IsEmpty() && 
				(fi->GetName().CompareNoCase(STR_LOCALURL) == 0 || 
				fi->GetName().CompareNoCase(STR_URL) == 0)) {
				CString val = fi->GetValue();
				CStringList lst;
				SplitSepString(val, &lst);
				POSITION p = lst.GetHeadPosition();
				while (p) {
					if (ShellExec(lst.GetNext(p))) {
						if (p)
							// Wait some time if there are other files to show
							Sleep(500);
					} else
						MessageBeep(MB_ICONEXCLAMATION);
				}
			} else
				// Or show edit dialog
				OnFieldlistPopupEdit();
		}
	}
	
	*pResult = 0;
}
开发者ID:stievie,项目名称:bibedt,代码行数:29,代码来源:BibitemView.cpp

示例2: OnEndlabeleditListFields

void CBibitemView::OnEndlabeleditListFields(NMHDR* pNMHDR, LRESULT* pResult) 
{
	if (!m_Updating) {
		LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;
		if (pDispInfo->item.pszText != NULL) {
			int i = pDispInfo->item.iItem;
			CField* f = (CField*)m_ListFields.GetItemData(i);
			if (pDispInfo->item.iSubItem == 0) {
				// It's the field name
				f->SetName(pDispInfo->item.pszText);
				m_ListFields.SetItem(i, pDispInfo->item.iSubItem, LVIF_IMAGE, NULL, 
					m_BibDef->GetRequired(m_BibItem->GetType(), pDispInfo->item.pszText), 0, 0, 0);
			} else if (pDispInfo->item.iSubItem == 1) {
				// It's the field value
				f->SetValue(pDispInfo->item.pszText);
			}
			m_ListFields.SetItemText(i, pDispInfo->item.iSubItem, pDispInfo->item.pszText);
			UpdateMissing();
			*pResult = 1;
			SetModified(m_Modified || f->GetModified());
		} else
			*pResult = 0;
	} else
		*pResult = 0;
}
开发者ID:stievie,项目名称:bibedt,代码行数:25,代码来源:BibitemView.cpp

示例3: while

/************************************************************************************
函数名称:
int CFields::QuerySaveLength()
功能说明:得到保存一条记录到Buffer所需要的字节数.

详细解释:1.内部对每一个字段调用CField::QuerySaveLength().
          2.如果函数执行失败,则返回-1.
    
出入参数:
[in]: 无.
     
[out]:无.

返回类型:int.

制作:YTLI   2002/07/15

修改: 
***********************************************************************************/
int CFields::QueryLength()
{
	int iRetValue = 0; 
	for (int i= 0;i<m_FieldArray.GetSize();i++)
	{
		CField* pField = (CField*)m_FieldArray.GetAt(i);
		if(!pField)
			return -1;

		iRetValue += pField->QuerySaveLength();
	}
	/*
	POSITION pos  = m_FieldList.GetHeadPosition();

	while(pos)
	{
		CField* pField = m_FieldList.GetNext(pos);
		
		if(!pField)
			return -1;

		iRetValue += pField->QuerySaveLength();
	}
	*/
	return iRetValue;
}
开发者ID:adoggie,项目名称:algorithm_package,代码行数:45,代码来源:cfields.cpp

示例4: DetachRecord

uint32 CRdbPrefixIndex::DetachRecord(CRecord* pRecord)
{
	CField* pField;
	uint32 nFieldNo = m_pIdxDef->m_pFields[0];

	char* sStr = NULL;
	uint32 nStrLen = 0;

	pField = pRecord->GetField(nFieldNo);
	sStr = pField->GetString(&nStrLen);

	uint64 nRowId = pRecord->m_nRowId;

	if(m_oTree.RemoveNode((const uint8*)sStr, nStrLen, FOCP_NAME::IsEqualRowId, &nRowId))
	{
		uint64 nTreeThis = m_oTree.GetThis();
		if(!nTreeThis)
		{
			uint64 pAddr[2] = {nTreeThis, m_oAllocator.GetThis()};
			vcommit(m_nThis, (char*)pAddr, 16);
		}
		return RDB_SUCCESS;
	}
	return RDB_RECORD_NOT_EXIST;
}
开发者ID:nightstyles,项目名称:focp,代码行数:25,代码来源:RdbIdx.cpp

示例5: AttachRecord

uint32 CRdbPrefixIndex::AttachRecord(CRecord* pRecord)
{
	CField* pField;
	uint32 nFieldNo = m_pIdxDef->m_pFields[0];
	char* sStr = NULL;
	uint32 nStrLen = 0;
	pField = pRecord->GetField(nFieldNo);
	sStr = pField->GetString(&nStrLen);

	bool bConflict;
	int32 bMemory = 1;
	if(m_pTabDef->m_pBaseAttr->nStorage == RDB_FILE_TABLE)
		bMemory = 0;

	uint64 nNode;
	uint64 nRowId = pRecord->m_nRowId;
	uint64 nTreeThis = m_oTree.GetThis();
	TNTreeNode* pNode = m_oTree.InsertNode((const uint8*)sStr, nStrLen, nRowId, bMemory, nNode, bConflict);
	if(!pNode)
	{
		if(bConflict)
			return RDB_UNIQUE_INDEX_CONFLICT;
		return RDB_LACK_STORAGE;
	}
	m_oTree.ReleaseNode(nNode, pNode);
	uint64 nTreeThis2 = m_oTree.GetThis();
	if(nTreeThis != nTreeThis2)
	{
		uint64 pAddr[2] = {nTreeThis2, m_oAllocator.GetThis()};
		vcommit(m_nThis, (char*)pAddr, 16);
	}
	return RDB_SUCCESS;
}
开发者ID:nightstyles,项目名称:focp,代码行数:33,代码来源:RdbIdx.cpp

示例6: GetBooleanValue

BOOL CTableBase::GetBooleanValue(LPCTSTR _szLabel)
{
	CField *pField;
	if(m_mapFields.Lookup(_szLabel, pField))
		return pField->GetBooleanValue();

	ASSERT(FALSE); // NAo encontrou o campo !
	return FALSE;
}
开发者ID:MFDonadeli,项目名称:PMA,代码行数:9,代码来源:TableBase.cpp

示例7: GetDateValue

BOOL CTableBase::GetDateValue(LPCTSTR _szLabel, COleDateTime *pOdt)
{
	CField *pField;
	if(m_mapFields.Lookup(_szLabel, pField))
		return pField->GetDateValue(pOdt);

	ASSERT(FALSE); // Nao encontrou o campo !
	return FALSE;
}
开发者ID:MFDonadeli,项目名称:PMA,代码行数:9,代码来源:TableBase.cpp

示例8: GetDoubleValue

double CTableBase::GetDoubleValue(LPCTSTR _szLabel)
{
	CField *pField;
	if(m_mapFields.Lookup(_szLabel, pField))
		return pField->GetDoubleValue();

	ASSERT(FALSE); // NAo encontrou o campo !
	return 0.0;
}
开发者ID:MFDonadeli,项目名称:PMA,代码行数:9,代码来源:TableBase.cpp

示例9: AddInternalHighResolutionFieldCalculation

//----------------------------------------
void CProductErs::AddInternalHighResolutionFieldCalculation()
{
  string internalFieldName;
  CField* fieldTest = NULL;

//  internalFieldName = MakeInternalFieldName(m_latitudeFieldName);
//  m_listInternalFieldName.InsertUnique( internalFieldName );
//  m_fieldNameEquivalence.Insert(m_latitudeFieldName, internalFieldName, false);
  
  fieldTest = FindFieldByName(m_latitudeFieldName, false, NULL, false);
  if (fieldTest != NULL)
  {
    internalFieldName = MakeInternalNameByAddingRoot(fieldTest->GetFullNameWithRecord());
    m_listInternalFieldName.InsertUnique( internalFieldName );
    m_fieldNameEquivalence.Insert(m_latitudeFieldName, internalFieldName, false);
  }

//  internalFieldName = MakeInternalFieldName(m_longitudeFieldName);
//  m_listInternalFieldName.InsertUnique( internalFieldName );
//  m_fieldNameEquivalence.Insert(m_longitudeFieldName, internalFieldName, false);

  fieldTest = FindFieldByName(m_longitudeFieldName, false, NULL, false);
  if (fieldTest != NULL)
  {
    internalFieldName = MakeInternalNameByAddingRoot(fieldTest->GetFullNameWithRecord());
    m_listInternalFieldName.InsertUnique( internalFieldName );
    m_fieldNameEquivalence.Insert(m_longitudeFieldName, internalFieldName, false);
  }

//  internalFieldName = MakeInternalFieldName(m_timeStampSecondFieldName);
//  m_listInternalFieldName.InsertUnique( internalFieldName );
//  m_fieldNameEquivalence.Insert(m_timeStampSecondFieldName, internalFieldName, false);

  fieldTest = FindFieldByName(m_timeStampSecondFieldName, false, NULL, false);
  if (fieldTest != NULL)
  {
    internalFieldName = MakeInternalNameByAddingRoot(fieldTest->GetFullNameWithRecord());
    m_listInternalFieldName.InsertUnique( internalFieldName );
    m_fieldNameEquivalence.Insert(m_timeStampSecondFieldName, internalFieldName, false);
  }


//  internalFieldName = MakeInternalFieldName(m_timeStampMicrosecondFieldName);
//  m_listInternalFieldName.InsertUnique( internalFieldName );
//  m_fieldNameEquivalence.Insert(m_timeStampMicrosecondFieldName, internalFieldName, false);
  
  fieldTest = FindFieldByName(m_timeStampMicrosecondFieldName, false, NULL, false);
  if (fieldTest != NULL)
  {
    internalFieldName = MakeInternalNameByAddingRoot(fieldTest->GetFullNameWithRecord());
    m_listInternalFieldName.InsertUnique( internalFieldName );
    m_fieldNameEquivalence.Insert(m_timeStampMicrosecondFieldName, internalFieldName, false);
  }


}
开发者ID:adakite,项目名称:main,代码行数:57,代码来源:ProductErs.cpp

示例10: GetFilter

/**
 * Add a filter item
 */
CField * CBibList::AddFilter(CString name, CString cond)
{
	CBibItem *filter = GetFilter();
	if (!filter)
		filter = New();
	CField *flt = filter->New();
	flt->SetName(name);
	flt->SetValue(cond);
	return flt;
}
开发者ID:stievie,项目名称:bibedt,代码行数:13,代码来源:BibList.cpp

示例11: assert

CField* CField::load(CXSDNodeBase* pParentNode, const IPropertyTree *pSchemaRoot, const char* xpath)
{
    assert(pSchemaRoot != NULL);
    assert(pParentNode != NULL);
    assert(pParentNode->getNodeType() == XSD_FIELD_ARRAY);

    if (pSchemaRoot == NULL || pParentNode == NULL)
    {
        // TODO: Throw Exception
        return NULL;
    }

    CField *pField = NULL;

    if (xpath != NULL && *xpath != 0)
    {
        IPropertyTree* pTree = pSchemaRoot->queryPropTree(xpath);

        if (pTree == NULL)
        {
            return NULL;
        }

        const char* pXPath = pSchemaRoot->getPropTree(xpath)->queryProp(XML_ATTR_XPATH);

        assert(pXPath != NULL && *pXPath != 0);

        if (pXPath == NULL || *pXPath == 0)
        {
            assert(!"Throw Exception");
            // TODO: throw exception
        }

        if (pXPath != NULL)
        {
            pField = new CField(pParentNode);
            pField->setXSDXPath(xpath);
            pField->setXPath(pXPath);
        }
        else
        {
            assert(!"xpath can not be be empty!");
            // TODO: throw MakeExceptionFromMap(EX_STR_MISSING_XPATH_IN_FIELD);
        }

        const char *pID = pSchemaRoot->getPropTree(xpath)->queryProp(XML_ATTR_ID);

        if (pID != NULL)
        {
            pField->setID(pID);
        }
   }

    return pField;
}
开发者ID:Jarwain,项目名称:HPCC-Configurator,代码行数:55,代码来源:SchemaField.cpp

示例12: SetValue

/**
 * Metodo para setar um valor tipo data no label _szLabel
 */ 
BOOL CTableBase::SetValue(LPCTSTR _szLabel, COleDateTime o)
{
	CField *pField;
	if(m_mapFields.Lookup(_szLabel, pField))
	{
		pField->SetValue(o);
		return TRUE;
	}

	return FALSE;
}
开发者ID:MFDonadeli,项目名称:PMA,代码行数:14,代码来源:TableBase.cpp

示例13: OnFieldlistPopupEdit

void CBibitemView::OnFieldlistPopupEdit() 
{
	CSourceDialog dlg;
 	CField* fi = (CField*)m_ListFields.GetItemData(m_SelField);
	dlg.SetSource(fi->GetValue());
	if (dlg.DoModal() == IDOK) {
		fi->SetValue(dlg.GetSource());
		SetModified(m_Modified || fi->GetModified());
		m_ListFields.SetItemText(m_SelField, 1, dlg.GetSource());
	}
}
开发者ID:stievie,项目名称:bibedt,代码行数:11,代码来源:BibitemView.cpp

示例14: Modify

/************************************************************************************
函数名称:
	CFieldList::Modify
功能说明:
	修改一个字段
详细解释:

出入参数:
	[in,out]nIndex:旧字段的位置
	[in,out]pField :新的字段
返回类型:

制作:
	Eric 2002-9-4
修改:

************************************************************************************/
bool CFieldList::Modify(int nIndex,CFieldType NewFieldType)
{
	CField *pField = this->FieldByIndex(nIndex);
	if (pField ==NULL)
		return false;
	if (pField->GetFieldType() == NewFieldType)
		return true;
	CField* pNewField=CreateField(NewFieldType);
	pNewField->CopyCommonProperty(pField);
	Modify(IndexOf(pField),pNewField);
	return true;
}
开发者ID:adoggie,项目名称:algorithm_package,代码行数:29,代码来源:fieldlist.cpp

示例15: active

 /*!
   \brief Sending all active (enabled) fields from client to server.
 Each field is identified uniquely by its string identity. Not only should we
 send the id to server but also we need to send ids of reference domain and reference axis.
 With these two id, it's easier to make reference to grid where all data should be written.
 Remark: This function must be called AFTER all active (enabled) files have been created on the server side
 */
 void CFile::sendEnabledFields()
 {
   size_t size = this->enabledFields.size();
   for (size_t i = 0; i < size; ++i)
   {
     CField* field = this->enabledFields[i];
     this->sendAddField(field->getId());
     field->checkAttributes();
     field->sendAllAttributesToServer();
     field->sendAddAllVariables();
   }
 }
开发者ID:RemiLacroix-IDRIS,项目名称:XIOS,代码行数:19,代码来源:file.cpp


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