示例#1
0
uvar32_64 CMarkStyle::GetPos () {
	for (CHash<CMarkStyle*,CMarkStyle>* p = theApp.MarkStyles.m_pHashHead; p; p = p->GetNext ())
		if (p->m_hData == this)
			if (theApp.MarkStyles.m_nActive == p->GetPos ())
				return (p->GetPos ());
	return (uvar32_64(-1));
}
示例#2
0
uvar32_64 CVariable::GetPos () {
	m_pTesla->Variables.m_pHashHead = m_pTesla->Variables.m_pHashHead->GetHead ();
	for (CHash<CVariable*,CVariable>* p = m_pTesla->Variables.m_pHashHead; p; p = p->GetNext ())
		if (p->m_hData == this)
			return (p->GetPos ());
	return (-1);
}
示例#3
0
svar32_64 CImage::GetPos () {
	m_pDoc->Images.m_pHashHead = m_pDoc->Images.m_pHashHead->GetHead ();
	for (CHash<CImage*,CImage>* p = m_pDoc->Images.m_pHashHead; p; p = p->GetNext ())
		if (p->m_hData == this)
			return (p->GetPos ());
	return (-1);
}
示例#4
0
CDiasAPIChnlRange& CDiasAPIChannels::operator() (aImAPIRngType type) {
	m_rngInt.Reset ();
	CHash<CChannel*, CChannel>* p;
	switch (type) {
		case aimAll:
			for (p = m_pHashHead ; p ; p = p->GetNext ())
				m_rngInt.Include (p);
			break;
		case aimVisible:
			// #### TODO: Place code here
			break;
		default:
			throw (CaImAPIException (0));
	}
	return (m_rngInt);
}
示例#5
0
文件: Hash.hpp 项目: nightstyles/focp
	//拷贝oSrc中的元素进来。
	inline void Insert(const CHash<TKey, TData, TGetKey, TCompareKey, THashArithmetic> &oSrc)
	{
		if(this == &oSrc)
		{
			if(!m_bUnique)
			{
				uint32 i;
				CHash<TKey, TData, TGetKey, TCompareKey, THashArithmetic> o(oSrc);
				for(i=0; i<m_nBucketSize; ++i)
					m_pBuckets[i].Append(NULL, o.m_pBuckets[i]);
			}
		}
		else
		{
			CHashIterator oIt=oSrc.First(), oEnd=oSrc.End();
			for(; !oSrc.IteratorEqual(oIt, oEnd);  oIt=oSrc.GetNext(oIt))
				Insert(oSrc.GetItem(oIt));
		}
	}
示例#6
0
void CMarkStyle::Activate () {
	for (CHash<CMarkStyle*,CMarkStyle>* p = theApp.MarkStyles.m_pHashHead; p; p = p->GetNext ())
		if (p->m_hData == this)
			theApp.MarkStyles.m_nActive = p->GetPos ();
	theApp.Update (UPDHA_MARKSTYLE);
}
示例#7
0
void CGeomScale::Activate () {
	for (CHash<CGeomScale*,CGeomScale>* p = theApp.GeomScales.m_pHashHead; p; p = p->GetNext ())
		if (p->m_hData == this)
			theApp.GeomScales.m_nActive = p->GetPos ();
	theApp.Update (UPDHA_GEOMSCALE);
}
示例#8
0
void CDensScale::Activate () {
	for (CHash<CDensScale*,CDensScale>* p = theApp.DensScales.m_pHashHead; p; p = p->GetNext ())
		if (p->m_hData == this)
			theApp.DensScales.m_nActive = p->GetPos ();
	theApp.Update (UPDHA_DENSSCALE);
}