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


C++ TIterator::Value方法代码示例

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


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

示例1: FindDOF

int Scheme::FindDOF(QString name, bool& isBase, bool &isExt)
{
	if(Root.IsNull())
	{
		throw NoLabelInicialisationException("Scheme: label do not inicialised.");
	}

//	printf ("Scheme:10\n");

	GetEqvList();
	TIterator eqv = EqvList.GetIterator();
//	printf ("Scheme:11\n");

	int num = 1;
	while (eqv.More())
	{
		bool isOK;
//			printf ("Scheme:------12\n");

		TElement el (eqv.Value());
		TList B (el.GetField ("doflist", isOK));
		TInteger isb (el.GetField ("isBase", isOK));
		TInteger ise (el.GetField ("isExt", isOK));
		
//		if (isOK)		printf ("Scheme:13 OK OK OK\n");


		TIterator dofit = B.GetIterator();

//			printf ("Scheme:14\n");

		while (dofit.More())
		{
			TString dof (dofit.Value());
			if (name == dof.GetValue())
			{
				isBase = (isb.GetValue()!=0);
				isExt = (ise.GetValue()!=0);
				
				return num;
			}
			dofit.Next();
		}
		
		eqv.Next();
		num++;
	}
	
	return -1;	
}
开发者ID:laduga,项目名称:pradis,代码行数:50,代码来源:Scheme.cpp

示例2: GetModelOfValue

af::Model OutValue::GetModelOfValue()
{
	if(Root.IsNull())
	{
		throw NoLabelInicialisationException("OutValue: label do not inicialised.");
	}

	TIterator TITER;

	Model vallr;
	TITER.Init(Root, false);
	while (TITER.More())
	{
		Model val = (Model)TITER.Value();
		QString name = val.GetName();

		if(name == "Model")
		{
			return val;
		}
		TITER.Next();
	}

	TElement e(Root);
	throw NoExistException("OutValue: Model Of Value do not exists.", e);

	return vallr;
}
开发者ID:laduga,项目名称:pradis,代码行数:28,代码来源:OutValue.cpp

示例3: GetIncludeList

af::TList Scheme::GetIncludeList()
{
	if(Root.IsNull())
	{
		throw NoLabelInicialisationException("Scheme: label do not inicialised.");
	}
	
	
//	return IncludeList;
	
	
	TIterator TITER;

	TList valls;
	TITER.Init(Root, false);
	while (TITER.More())
	{
		TList val = (TList)TITER.Value();
		QString name = val.GetName();

		if(name == "IncludeList")
		{
			return val;
		}
		TITER.Next();
	}

	TElement e(Root);
	throw NoExistException("Scheme: Include List do not exists.", e);

	return valls;
}
开发者ID:laduga,项目名称:pradis,代码行数:32,代码来源:Scheme.cpp

示例4: GetFile

QString Include::GetFile()
{
	if(Root.IsNull())
	{
		throw NoLabelInicialisationException("Include: label do not inicialised.");
	}

	if(Root.IsNull())
	{
		throw NoLabelInicialisationException("Include: label do not inicialised.");
	}

	TIterator TITER;

	TITER.Init(Root, false);
	while (TITER.More())
	{
		TElement val = TITER.Value();
		QString name = val.GetName();
		if(name == "File name")
		{
			TString valint = (TString)val;
			return valint.GetValue();
		}
		TITER.Next();
	}

	return "";
}
开发者ID:laduga,项目名称:pradis,代码行数:29,代码来源:Include.cpp

示例5: GetDescription

QString TData::GetDescription()
{
	if(Root.IsNull())
	{
		throw NoLabelInicialisationException("TData: label do not inicialised.");
	}

	TIterator TITER;

	TITER.Init(Root, false);
	while (TITER.More())
	{
		TElement val = TITER.Value();
		QString name = val.GetName();
		if(name == "Description")
		{
			TString valstr = (TString)val;
			return valstr.GetValue();
		}
		TITER.Next();
	}

	return "";
}
开发者ID:laduga,项目名称:pradis,代码行数:24,代码来源:TData.cpp

示例6: NoLabelInicialisationException

double DOF1::GetValue()
{
	if(Root.IsNull())
	{
		throw NoLabelInicialisationException("DOF1: label do not inicialised.");
	}

	TIterator TITER;

	TITER.Init(Root, false);
	while (TITER.More())
	{
		TElement val = TITER.Value();
		QString name = val.GetName();
		if(name == "Value")
		{
			TReal valreal = (TReal)val;
			return valreal.GetValue();
		}
		TITER.Next();
	}

	return 0.;
}
开发者ID:laduga,项目名称:pradis,代码行数:24,代码来源:DOF1.cpp

示例7: AddEquivalence

void Scheme::AddEquivalence (DOF1 nnode1, DOF1 nnode2)
{
	int num1, num2;
	bool isb1, isb2, ise1, ise2;
	QString node1, node2;
	bool isbn1, isbn2, isen1, isen2;
	bool isBase, isExt;
	bool isOK;
	
	GetEqvList();

	node1 = nnode1.GetObjectName();
	node2 = nnode2.GetObjectName();
	
	// printf ("Scheme:1 %s, %s\n", node1.toAscii().data(), node2.toAscii().data());

	isbn1 = nnode1.GetBase();
	isbn2 = nnode2.GetBase();

	isen1 = nnode1.GetExternal();
	isen2 = nnode2.GetExternal();
	
	// printf ("Scheme:1.1 isen1=%d isen2=%d\n", isen1, isen2);

	isb1=ise1=isb2=ise2 = false;

	num1 = FindDOF (node1, isb1, ise1);
	// printf ("Scheme:1.2. num1=%d\n",num1);

	num2 = FindDOF (node2, isb2, ise2);
	// printf ("Scheme:1.3. num2=%d\n",num2);
	
	isBase = isb1 || isb2 || isbn1 || isbn2;
	isExt = ise1 || ise2 || isen1 || isen2;

	// printf ("Scheme:2\n");
	

	if (num1==-1 && num2 == -1)
	{

		TElement var (EqvList.Add());
		
		// printf ("Scheme:3\n");
		
		TList doflist;
		var.AddElement(doflist);
		doflist.SetName ("doflist");

		// printf ("Scheme:4\n");
		
		
		TString n1 (doflist.Add());
		TString n2 (doflist.Add());
		n1.SetValue (node1);
		n2.SetValue (node2);

		// printf ("Scheme:5\n");


		TInteger base;
		var.AddElement(base);
		base.SetName ("isBase");
		base.SetValue (isBase);

		TInteger ext;
		var.AddElement(ext);
		ext.SetName ("isExt");
		ext.SetValue (isExt);


	}else
	if (num1==-1)
	{
		TElement el (EqvList.GetAt(num2));
		TList doflist (el.GetField ("doflist", isOK));
		TInteger isb (el.GetField ("isBase", isOK));
		TInteger ise (el.GetField ("isExt", isOK));

		isb.SetValue (isBase);
		ise.SetValue (isExt);
		
		TString n1 (doflist.Add());
		n1.SetValue (node1);

	}else
	if (num2==-1)
	{
		TElement el (EqvList.GetAt(num1));
		TList doflist (el.GetField ("doflist", isOK));
		TInteger isb (el.GetField ("isBase", isOK));
		TInteger ise (el.GetField ("isExt", isOK));

		isb.SetValue (isBase);
		ise.SetValue (isExt);

		TString n2 (doflist.Add());
		n2.SetValue (node2);
	}else
	if (num1 != num2)
//.........这里部分代码省略.........
开发者ID:laduga,项目名称:pradis,代码行数:101,代码来源:Scheme.cpp


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