#ifndef TITAN_PCBCAM_ODBCOMPONENTPARSER_H
#define TITAN_PCBCAM_ODBCOMPONENTPARSER_H
#include "../titanpcbcamglobal.h"
#include "odbfeatureparser.h"


class PcbCamOdbComponentParserPrivate;
class TITAN_PCBCAM_EXPORT PcbCamOdbComponentParser
{
public:
    PcbCamOdbComponentParser(const QByteArray &iData);
    ~PcbCamOdbComponentParser();

    void parse();
    QList<PcbCamOdbFeatureInfo> features();
    QStringList errors();

private:
    void parseAttrName(const QString &iLine);
    void parseAttrText(const QString &iLine);
    void parseComponent(const QString &iLine);
    void parseAttributes(const QString &iLine, QStringList *oParams, QVariantMap *oAttrMap) const;

protected:
    const QScopedPointer<PcbCamOdbComponentParserPrivate> d_ptr;

private:
    Q_DECLARE_PRIVATE(PcbCamOdbComponentParser)
    Q_DISABLE_COPY(PcbCamOdbComponentParser)

};


#endif // TITAN_PCBCAM_ODBCOMPONENTPARSER_H
