[Echempp-devel] Experiment/ExcitationFunction excitationFunction.hpp, 1.37, 1.38 segment.hpp, 1.35,
Status: Beta
Brought to you by:
berndspeiser
|
From: Bernd S. <ber...@us...> - 2007-05-15 14:10:49
|
Update of /cvsroot/echempp/Experiment/ExcitationFunction
In directory sc8-pr-cvs17:/tmp/cvs-serv26154/Experiment/ExcitationFunction
Modified Files:
excitationFunction.hpp segment.hpp
Log Message:
testing xml input failure
Index: excitationFunction.hpp
===================================================================
RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/excitationFunction.hpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** excitationFunction.hpp 14 May 2007 19:18:14 -0000 1.37
--- excitationFunction.hpp 15 May 2007 14:10:45 -0000 1.38
***************
*** 328,338 ****
this->clear();
TiXmlElement *element = node.Element();
std::cout << " Tag zum Vergleich: `" << ExcitationFunction::TAG << "'" << std::endl;
! std::cout << " in ef load, TAG: `" << element->ValueStr () << "'" << std::endl;
! if (element && (element->ValueStr() == ExcitationFunction::TAG))
{
TiXmlNode *child = 0;
--- 328,349 ----
this->clear();
+ int i = node.Node()->Type();
+ std::cout << " type: " << i << "element type = " << TiXmlNode::ELEMENT << std::endl;
TiXmlElement *element = node.Element();
+ std::cout << "attribute segmentNumber: " << element->Attribute ("segmentNumber") << std::endl;
+ FILE *out1 = fopen ("outfile1", "w");
+ element->Print (out1, 1);
+ fclose (out1);
std::cout << " Tag zum Vergleich: `" << ExcitationFunction::TAG << "'" << std::endl;
! //std::cout << " in ef load, TAG: `" << element->ValueStr () << "'" << std::endl;
! if (element )
! {
! /*
! if (element->ValueStr() == ExcitationFunction::TAG)
{
+ */
+ std::cout << "in element" << std::endl;
TiXmlNode *child = 0;
***************
*** 340,346 ****
--- 351,359 ----
(Segments::Segment::TAG, child)))
{
+ std::cout << "in child" << std::endl;
if ((child->ToElement ())->Attribute
(Segments::Segment::IDTAG))
{
+ std::cout << "in attribute" << std::endl;
Segments::DISegment<D, I> *new_segment
= Segments::DISegment<D, I>::Factory::Instance().
***************
*** 353,356 ****
--- 366,370 ----
}
}
+ // }
}
else
***************
*** 882,889 ****
this->clear();
TiXmlElement *element = node.Element();
std::cout << " Tag zum Vergleich: `" << ExcitationFunction::TAG << "'" << std::endl;
! std::cout << " in sd_ef load, TAG: `" << element->ValueStr () << "'" << std::endl;
if (element && (element->ValueStr() == ExcitationFunction::TAG))
{
--- 896,909 ----
this->clear();
+ int i = node.Node()->Type();
+ std::cout << " type: " << i << "element type = " << TiXmlNode::ELEMENT << std::endl;
TiXmlElement *element = node.Element();
+ std::cout << "attribute segmentNumber: " << element->Attribute ("segmentNumber") << std::endl;
+ FILE *out = fopen ("outfile", "w");
+ element->Print (out, 1);
+ fclose (out);
std::cout << " Tag zum Vergleich: `" << ExcitationFunction::TAG << "'" << std::endl;
! //std::cout << " in sd_ef load, TAG: `" << element->ValueStr () << "'" << std::endl;
if (element && (element->ValueStr() == ExcitationFunction::TAG))
{
Index: segment.hpp
===================================================================
RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/segment.hpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** segment.hpp 17 Feb 2007 16:03:21 -0000 1.35
--- segment.hpp 15 May 2007 14:10:45 -0000 1.36
***************
*** 461,470 ****
--- 461,479 ----
void load (const TiXmlHandle node)
{
+ int i = node.Node()->Type();
+ std::cout << " type: " << i << "element type = " << TiXmlNode::ELEMENT << std::endl;
+
TiXmlElement *element = node.Element();
+ std::cout << " Tag zum Vergleich: `" << Segment::TAG << "'" << std::endl;
+
+
+ // commented for testing
+ /*
if (element
&& (element->ValueStr () == Segment::TAG)
&& (element->Attribute(Segment::IDTAG) == ID))
{
+ */
if (element->Attribute(STARTINGVALUE) &&
element->Attribute(STARTINGUNIT))
***************
*** 493,500 ****
--- 502,512 ----
_derivative = (_endValue - _startingValue)/DISegment<D,I>::_Imax;
+ // commented for testing
+ /*
}
else
throw LoadError
("error loading linear segment: incorrect element");
+ */
}
***************
*** 716,723 ****
--- 728,738 ----
{
TiXmlElement *element = node.Element();
+ // commented for testing
+ /*
if (element
&& (element->ValueStr () == Segment::TAG)
&& (element->Attribute(Segment::IDTAG) == ID))
{
+ */
if (element->Attribute(CONSTANTVALUE) &&
element->Attribute(CONSTANTUNIT))
***************
*** 736,740 ****
DISegment<D,I>::_Imax = val;
}
!
}
--- 751,756 ----
DISegment<D,I>::_Imax = val;
}
! // commented for testing
! /*
}
***************
*** 742,745 ****
--- 758,762 ----
throw LoadError
("error loading constant segment: incorrect element");
+ */
}
|