MagicSmoke  $VERSION$
MOCoupon Class Reference

This class represents a coupon. More...

#include <srcMOCoupon.h>

Inheritance diagram for MOCoupon:

Public Member Functions

 MOCoupon ()
 default constructor: constructs an invalid instance of MOCoupon More...
 
 MOCoupon (const MOCoupon &)
 copy constructor: creates a (deep) copy of the object More...
 
 MOCoupon (const QDomElement &)
 special constructor: create from the XML representation, deserializing the object More...
 
virtual ~MOCoupon ()
 destructor: deletes this copy of the object More...
 
virtual void addrules (Nullable< MOCouponRule > a)
 
virtual Nullable< qint64 > amountuse () const
 
virtual void clearrules ()
 
virtual Nullable< QString > couponid () const
 
virtual Nullable< QString > description () const
 
virtual Nullable< QString > flags () const
 
MOCouponoperator= (const MOCoupon &)
 copy assignment: creates a (deep) copy of the object More...
 
virtual QList< MOCouponRulerules () const
 
virtual void setamountuse (Nullable< qint64 > s)
 
virtual void setcouponid (Nullable< QString > s)
 
virtual void setdescription (Nullable< QString > s)
 
virtual void setflags (Nullable< QString > s)
 
virtual void setrules (QList< MOCouponRule > s)
 
virtual void setticketsperorder (Nullable< qint64 > s)
 
virtual void setvalidfrom (Nullable< qint64 > s)
 
virtual void setvalidtill (Nullable< qint64 > s)
 
virtual Nullable< qint64 > ticketsperorder () const
 
QString toString ()
 Serializes the object to XML and returns the string representation of that XML. More...
 
QDomElement toXml (QDomDocument &doc, QString name="Coupon")
 Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself. More...
 
void toXml (QDomDocument &, QDomElement &)
 Serializes the object into the given element. More...
 
virtual Nullable< qint64 > validfrom () const
 
virtual Nullable< qint64 > validtill () const
 

Static Public Member Functions

static MOCoupon fromString (const QString &)
 create MOCoupon from XML formatted string (inverse of toString) More...
 
static MOCoupon fromXml (const QDomElement &)
 create MOCoupon from XML (inverse of toXml) More...
 

Protected Attributes

Nullable< qint64 > mp_amountuse
 
Nullable< QString > mp_couponid
 
Nullable< QString > mp_description
 
Nullable< QString > mp_flags
 
QList< MOCouponRulemp_rules
 
Nullable< qint64 > mp_ticketsperorder
 
Nullable< qint64 > mp_validfrom
 
Nullable< qint64 > mp_validtill
 

Detailed Description

This class represents a coupon.

Constructor & Destructor Documentation

MOCoupon::MOCoupon ( )
inline

default constructor: constructs an invalid instance of MOCoupon

Referenced by fromString(), and fromXml().

MOCoupon::MOCoupon ( const MOCoupon o)

copy constructor: creates a (deep) copy of the object

References mp_amountuse, mp_couponid, mp_description, mp_flags, mp_rules, mp_ticketsperorder, mp_validfrom, and mp_validtill.

MOCoupon::MOCoupon ( const QDomElement &  root)
explicit

special constructor: create from the XML representation, deserializing the object

References addrules(), setamountuse(), setcouponid(), setdescription(), setflags(), setticketsperorder(), setvalidfrom(), and setvalidtill().

virtual MOCoupon::~MOCoupon ( )
inlinevirtual

destructor: deletes this copy of the object

Member Function Documentation

virtual void MOCoupon::addrules ( Nullable< MOCouponRule a)
inlinevirtual

Referenced by MOCoupon().

virtual Nullable<qint64> MOCoupon::amountuse ( ) const
inlinevirtual
virtual void MOCoupon::clearrules ( )
inlinevirtual
virtual Nullable<QString> MOCoupon::couponid ( ) const
inlinevirtual
virtual Nullable<QString> MOCoupon::description ( ) const
inlinevirtual
virtual Nullable<QString> MOCoupon::flags ( ) const
inlinevirtual
MOCoupon MOCoupon::fromString ( const QString &  txt)
static

create MOCoupon from XML formatted string (inverse of toString)

References MOCoupon().

MOCoupon MOCoupon::fromXml ( const QDomElement &  root)
static

create MOCoupon from XML (inverse of toXml)

References MOCoupon().

MOCoupon & MOCoupon::operator= ( const MOCoupon o)

copy assignment: creates a (deep) copy of the object

References mp_amountuse, mp_couponid, mp_description, mp_flags, mp_rules, mp_ticketsperorder, mp_validfrom, and mp_validtill.

virtual QList<MOCouponRule> MOCoupon::rules ( ) const
inlinevirtual
virtual void MOCoupon::setamountuse ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOCoupon().

virtual void MOCoupon::setcouponid ( Nullable< QString >  s)
inlinevirtual

Referenced by MOCoupon().

virtual void MOCoupon::setdescription ( Nullable< QString >  s)
inlinevirtual

Referenced by MOCoupon().

virtual void MOCoupon::setflags ( Nullable< QString >  s)
inlinevirtual

Referenced by MOCoupon().

virtual void MOCoupon::setrules ( QList< MOCouponRule s)
inlinevirtual
virtual void MOCoupon::setticketsperorder ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOCoupon().

virtual void MOCoupon::setvalidfrom ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOCoupon().

virtual void MOCoupon::setvalidtill ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOCoupon().

virtual Nullable<qint64> MOCoupon::ticketsperorder ( ) const
inlinevirtual
QString MOCoupon::toString ( )

Serializes the object to XML and returns the string representation of that XML.

References toXml().

QDomElement MOCoupon::toXml ( QDomDocument &  doc,
QString  name = "Coupon" 
)

Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself.

Parameters
docthe DOM document node for which to generate the element
namethe name to give the generated element, per default "MOCoupon" is used

Referenced by toString(), and toXml().

void MOCoupon::toXml ( QDomDocument &  doc,
QDomElement &  r 
)

Serializes the object into the given element.

References mp_amountuse, mp_couponid, mp_description, mp_flags, mp_rules, mp_ticketsperorder, mp_validfrom, mp_validtill, and toXml().

virtual Nullable<qint64> MOCoupon::validfrom ( ) const
inlinevirtual
virtual Nullable<qint64> MOCoupon::validtill ( ) const
inlinevirtual

Member Data Documentation

Nullable<qint64> MOCoupon::mp_amountuse
protected

Referenced by MOCoupon(), operator=(), and toXml().

Nullable<QString> MOCoupon::mp_couponid
protected

Referenced by MOCoupon(), operator=(), and toXml().

Nullable<QString> MOCoupon::mp_description
protected

Referenced by MOCoupon(), operator=(), and toXml().

Nullable<QString> MOCoupon::mp_flags
protected

Referenced by MOCoupon(), operator=(), and toXml().

QList<MOCouponRule> MOCoupon::mp_rules
protected

Referenced by MOCoupon(), operator=(), and toXml().

Nullable<qint64> MOCoupon::mp_ticketsperorder
protected

Referenced by MOCoupon(), operator=(), and toXml().

Nullable<qint64> MOCoupon::mp_validfrom
protected

Referenced by MOCoupon(), operator=(), and toXml().

Nullable<qint64> MOCoupon::mp_validtill
protected

Referenced by MOCoupon(), operator=(), and toXml().


The documentation for this class was generated from the following files: