/* Altered by Rick Mugridge to dispatch on the first Fixture, adapted for CeeFIT by Dave Woldrich 05/01/05 */ void ceefit_call_spec FIXTURE::DoTables(PTR<PARSE>& tables) { PTR<FIXTURE> fixture; ftime(&SummaryObj->RunDate); SummaryObj->RunElapsedTime = new FIXTURE::RUNTIME(); if(tables != null) { PTR<PARSE> fixtureName(FixtureName(tables)); if(fixtureName != null) { try { GetLinkedFixtureWithArgs(fixture, tables); fixture->InterpretTables(tables); EXCEPTION* exceptionThrown = null; fixture->DeleteFixture(exceptionThrown); if(exceptionThrown) { // rethrow any exception that was thrown ... throw exceptionThrown; } } catch (EXCEPTION* e) { Exception(fixtureName, e); InterpretFollowingTables(tables); } } } }
bool AvolitesD4Parser::fillFixtureDef(QLCFixtureDef* fixtureDef) { if (m_documentRoot.isNull()) { m_lastError = "no XML loaded to process"; return false; } fixtureDef->setManufacturer(fixtureCompany()); fixtureDef->setModel(fixtureName()); fixtureDef->setAuthor(copyright()); // Parse all channels if (!parseChannels(m_documentRoot.namedItem(KD4TagFixture).toElement().namedItem(KD4TagControl).toElement(), fixtureDef)) return false; // Parse all modes if (!parseModes(m_documentRoot.namedItem(KD4TagFixture).toElement(), fixtureDef)) return false; fixtureDef->setType(guessType(fixtureDef)); // TODO TODO TODO // Maybe also import preset palettes and macros ?!?!?!?! /** Can't be done for now, as qxf files don't have any information on preset palettes or macros for fixtures, they are automatically generated on the main application maybe in future... **/ return true; }
/* Added by Rick Mugridge, adapted for CeeFIT by Dave Woldrich 05/01/05 */ void ceefit_call_spec FIXTURE::InterpretFollowingTables(PTR<PARSE>& tables) { PTR<FIXTURE> fixture; PTR<PARSE> temp(tables); temp = temp->More; while(temp != null) { PTR<PARSE> fixtureName(FixtureName(temp)); if (fixtureName != null) { EXCEPTION* exceptionThrown = null; try { // Step 1: Make sure our PTR is null, just to ensure any old FIXTURE is released // and get next FIXTURE fixture = null; GetLinkedFixtureWithArgs(fixture, temp); // Step 2: Call DoTable if(exceptionThrown == null) { try { fixture->DoTable(temp); } catch(EXCEPTION* e) { exceptionThrown = e; } } // Step 3: delete the fixture fixture->DeleteFixture(exceptionThrown); if(exceptionThrown) { // rethrow any exception that was thrown ... throw exceptionThrown; } } catch (EXCEPTION* e) { Exception(fixtureName, e); } } temp = temp->More; } }