Exemplo n.º 1
0
bool
Reader::readBinaryGTO()
{
    readIndexTable();      // OK to continue if this fails
    readHeader();           if (m_error) return false; 
    readStringTable();      if (m_error) return false;
    readObjects();          if (m_error) return false;
    readComponents();       if (m_error) return false;
    readProperties();       if (m_error) return false;
    descriptionComplete();

    if (m_mode & HeaderOnly)
    {
        return true;
    }

    Properties::iterator p = m_properties.begin();

    for (Components::iterator i = m_components.begin();
         i != m_components.end();
         ++i)
    {
        ComponentInfo &comp = *i;
            
        if (comp.flags & Gto::Transposed)
        {
            cerr << "ERROR: Transposed data for '"
                 << stringFromId( comp.object->name ) << "."
                 << stringFromId( comp.name ) 
                 << "' is currently unsupported." << endl;
            abort();
        }
        else
        {
            for (Properties::iterator e = p + comp.numProperties; p != e; ++p)
            {
                if (!readProperty(*p))
                {
                    return false;
                }
            }
        }
    }

    return true;
}
Exemplo n.º 2
0
void Fidelity::Engine::SimulationXmlReader::readPlugins()
{
	while(!atEnd()) {
		readNext();

		// Stop here if plugins tag completed
		if(isEndElement() && name() == "plugins") {
			break;
		}

		// Evaluate child tags
		if (isStartElement()) {
			// We expect components tags only
			if (name() == "components") {
				readComponents();
			}
			else {
				unknownElement();
			}
		}
	}
}