Logo Search packages:      
Sourcecode: sailcut version File versions  Download package

void CSailDoc::get ( const QDomNode &  parent,
CSailDef d,
const QString &  name 
)

Reads a CSailDef sail definition from an XML document. NEW members are added at the end of the list See also CSailDoc::put( QDomNode &parent, const CSailDef &d, const QString &name )

Definition at line 227 of file saildoc.cpp.

References CSailDef::clothW, CSailDef::dihedralDeg, findElement(), CSailDef::footL, CSailDef::footR, CSailDef::footRP, CSailDef::foreI, CSailDef::foreJ, CSailDef::gaffDeg, CSailDef::gaffL, CSailDef::gaffR, CSailDef::gaffRP, CSailDef::hemsW, CSailDef::leechHemW, CSailDef::leechL, CSailDef::leechR, CSailDef::leechRP, CSailDef::LOA, CSailDef::luffL, CSailDef::luffR, CSailDef::luffRP, CSailDef::mould, CSailDef::nbGores, CSailDef::nbLuffGores, CSailDef::nbSections, CSailDef::rake, CSailDef::sailCut, CSailDef::sailID, CSailDef::sailType, CSailDef::seamW, CSailDef::sheetDeg, CSailDef::tackX, CSailDef::tackY, and CSailDef::twistDeg.

{
    QDomElement e = findElement( parent, "CSailDef", name);

    /* sail cut and type */
    get
        (e, d.sailCut,"sailCut");
    get
        (e, d.sailType,"sailType");

    /* boat data */
    get
        (e, d.LOA,"LOA");
    get
        (e, d.foreI,"foreI");
    get
        (e, d.foreJ,"foreJ");
    get
        (e, d.tackX,"tackX");
    get
        (e, d.tackY,"tackY");

    /* sides of the sail */
    get
        (e, d.luffL,"luffL");
    get
        (e, d.rake,"rake");
    get
        (e, d.gaffDeg,"gaffDeg");
    get
        (e, d.gaffL,"gaffL");
    get
        (e, d.footL,"footL");
    get
        (e, d.leechL,"leechL");

    /* shape of sides */
    get
        (e, d.luffR,"luffR");
    get
        (e, d.gaffR,"gaffR");
    get
        (e, d.leechR,"leechR");
    get
        (e, d.footR,"footR");

    get
        (e, d.luffRP,"luffRP");
    get
        (e, d.gaffRP,"gaffRP");
    get
        (e, d.leechRP,"leechRP");
    get
        (e, d.footRP,"footRP");

    /* cloth width, seam and hems width */
    get
        (e, d.clothW, "clothW");
    get
        (e, d.seamW, "seamW");
    get
        (e, d.leechHemW, "leechHemW");
    get
        (e, d.hemsW, "hemsW");

    /* twist */
    get
        (e, d.twistDeg, "twistDeg");

    /* mould */
    get
        (e, d.mould, "mould");

    /* sheeting */
    get
        (e, d.sheetDeg, "sheetDeg");

    /* NOTE : we maintain backward file format compatibility
     * by adding new members in the order they were introduced below
     */
    try
    {
        /* sail ID */
        get(e, d.sailID,"sailID" );

        /* radial cut parameters */
        int temp=1;

        get(e, temp, "nbSections");
        d.nbSections = temp;       // radial sections
        get(e, temp, "nbGores");
        d.nbGores= temp;           // radial gores
        get(e, temp, "nbLuffGores");
        d.nbLuffGores=temp;       // luff gores
        //
        get(e, temp, "dihedralDeg");
        d.dihedralDeg=temp;       // wing dihedral angle
        //
    }
    catch (CException e)
    {
    }
}


Generated by  Doxygen 1.6.0   Back to index