@@ -26,6 +26,7 @@ CSPropExcitation::CSPropExcitation(CSPropExcitation* prop, bool copyPrim) : CSPr
2626 Init ();
2727 uiNumber=prop->uiNumber ;
2828 iExcitType=prop->iExcitType ;
29+ m_enabled=prop->m_enabled ;
2930 coordInputType=prop->coordInputType ;
3031 m_Frequency.Copy (&prop->m_Frequency );
3132 Delay.Copy (&prop->Delay );
@@ -140,6 +141,7 @@ void CSPropExcitation::Init()
140141{
141142 uiNumber=0 ;
142143 iExcitType=1 ;
144+ m_enabled=true ;
143145 coordInputType=UNDEFINED_CS;
144146 m_Frequency.SetValue (0.0 );
145147 Delay.SetValue (0.0 );
@@ -232,6 +234,7 @@ bool CSPropExcitation::Write2XML(TiXmlNode& root, bool parameterised, bool spars
232234 if (prop==NULL ) return false ;
233235
234236 prop->SetAttribute (" Number" ,(int )uiNumber);
237+ prop->SetAttribute (" Enabled" ,m_enabled);
235238 WriteTerm (m_Frequency,*prop," Frequency" ,parameterised);
236239 WriteTerm (Delay,*prop," Delay" ,parameterised);
237240
@@ -260,6 +263,8 @@ bool CSPropExcitation::ReadFromXML(TiXmlNode &root)
260263 if (prop->QueryIntAttribute (" Number" ,&iHelp)!=TIXML_SUCCESS) uiNumber=0 ;
261264 else uiNumber=(unsigned int )iHelp;
262265
266+ prop->QueryBoolAttribute (" Enabled" ,&m_enabled);
267+
263268 if (prop->QueryIntAttribute (" Type" ,&iExcitType)!=TIXML_SUCCESS) return false ;
264269
265270 if (ReadVectorTerm (Excitation,*prop," Excite" ,0.0 )==false ) return false ;
@@ -285,6 +290,7 @@ void CSPropExcitation::ShowPropertyStatus(std::ostream& stream)
285290 CSProperties::ShowPropertyStatus (stream);
286291 stream << " --- Excitation Properties --- " << std::endl;
287292 stream << " Type: " << iExcitType << std::endl;
293+ stream << " Enabled: " << m_enabled << std::endl;
288294 stream << " Active directions: " << ActiveDir[0 ] << " ," << ActiveDir[1 ] << " ," << ActiveDir[2 ] << std::endl;
289295 stream << " Excitation\t : " << Excitation[0 ].GetValueString () << " , " << Excitation[1 ].GetValueString () << " , " << Excitation[2 ].GetValueString () << std::endl;
290296 stream << " Weighting\t : " << WeightFct[0 ].GetValueString () << " , " << WeightFct[1 ].GetValueString () << " , " << WeightFct[2 ].GetValueString () << std::endl;
0 commit comments