예제 #1
0
파일: Scheme.cpp 프로젝트: laduga/pradis
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;	
}