Subversion Repositories Scribus

Rev

Blame | Last modification | View Log | RSS feed

// Generated file, do not edit!
/*
 For general Scribus (>=1.3.2) copyright and licensing information please refer
 to the COPYING file provided with the program. Following this notice may exist
 a copyright and/or license notice that predates the release of Scribus 1.3.2
 for which a new license (GPL+exception) is in place.
 */


\#ifndef ${c.name.upper()}_H
\#define ${c.name.upper()}_H

\#include "scribusIO.h"

class ${c.name} : public ScribusIO
{
        // properties
#for $a in $c.properties
        ${a.datatype} _${a.name};
#end for

#for $a in $c.properties
#if $a.optional
        uint _have${a.name} : 1;
#endif
#end for

public:

        ${c.name}() { clear(); }
        
#for $a in $c.properties

        const ${a.datatype}& ${a.getter}() const {
                return _${a.name};
        }

#if $a.type == "coll"
        ${a.datatype}& ${a.getter}() {
                return _${a.name};
        }
        
#else if $a.optional
        void ${a.setter}(${a.datatype} val) {
                _${a.name} = val;
                _have${a.name} = 1;
        }
        
        bool ${a.tester}() const {
                return _have${a.name};
        }
        
        void ${a.resetter}() {
                ${a.name} = ${a.initial};
                _have${a.name} = 0;
        }
        
#else
        void ${a.setter}(${a.datatype} val) {
                _${a.name} = val;
        }
        
#end if
#end for

        virtual void xmlIn(ScXmlStreamReader& r, ScribusBuilder& builder);
        virtual void xmlOut(ScXmlStreamWriter& w, const QString& xmlName) const;
        void clear();
};

\#endif