MagicSmoke  $VERSION$
MOWebCart Class Reference

The cart as used by the web user interface, this maps into the cart tables. This class is never used by the remote client. More...

#include <srcMOWebCart.h>

Inheritance diagram for MOWebCart:

Public Member Functions

 MOWebCart ()
 default constructor: constructs an invalid instance of MOWebCart More...
 
 MOWebCart (const MOWebCart &)
 copy constructor: creates a (deep) copy of the object More...
 
 MOWebCart (const QDomElement &)
 special constructor: create from the XML representation, deserializing the object More...
 
virtual ~MOWebCart ()
 destructor: deletes this copy of the object More...
 
virtual void additems (Nullable< MOCartItem > a)
 
virtual void addtickets (Nullable< MOCartTicket > a)
 
virtual void addvouchers (Nullable< MOCartVoucher > a)
 
virtual Nullable< QString > cartid () const
 The cart ID of this session. More...
 
virtual void clearitems ()
 
virtual void cleartickets ()
 
virtual void clearvouchers ()
 
virtual Nullable< QString > comment () const
 optional comments from the customer More...
 
virtual Nullable< MOCouponcoupon () const
 
virtual Nullable< QString > couponid () const
 An optional coupon code to be used in this order. More...
 
virtual Nullable< MOCustomercustomer () const
 The customer of this cart. More...
 
virtual Nullable< qint64 > customerid () const
 The customer of this cart. More...
 
virtual Nullable< MOAddressdeliveryaddress () const
 The address to deliver to (mandatory) More...
 
virtual Nullable< qint64 > deliveryaddressid () const
 The address to deliver to (mandatory) More...
 
virtual Nullable< MOAddressinvoiceaddress () const
 The address to send the invoice to if different from the delivery address (optional) More...
 
virtual Nullable< qint64 > invoiceaddressid () const
 The address to send the invoice to if different from the delivery address (optional) More...
 
virtual QList< MOCartItemitems () const
 shop items inside this cart as seen in the DB More...
 
MOWebCartoperator= (const MOWebCart &)
 copy assignment: creates a (deep) copy of the object More...
 
virtual void setcartid (Nullable< QString > s)
 The cart ID of this session. More...
 
virtual void setcomment (Nullable< QString > s)
 optional comments from the customer More...
 
virtual void setcoupon (Nullable< MOCoupon > s)
 
virtual void setcouponid (Nullable< QString > s)
 An optional coupon code to be used in this order. More...
 
virtual void setcustomer (Nullable< MOCustomer > s)
 The customer of this cart. More...
 
virtual void setcustomerid (Nullable< qint64 > s)
 The customer of this cart. More...
 
virtual void setdeliveryaddress (Nullable< MOAddress > s)
 The address to deliver to (mandatory) More...
 
virtual void setdeliveryaddressid (Nullable< qint64 > s)
 The address to deliver to (mandatory) More...
 
virtual void setinvoiceaddress (Nullable< MOAddress > s)
 The address to send the invoice to if different from the delivery address (optional) More...
 
virtual void setinvoiceaddressid (Nullable< qint64 > s)
 The address to send the invoice to if different from the delivery address (optional) More...
 
virtual void setitems (QList< MOCartItem > s)
 shop items inside this cart as seen in the DB More...
 
virtual void setshipping (Nullable< MOShipping > s)
 if shipping is set: the shipping type More...
 
virtual void setshippingid (Nullable< qint64 > s)
 optional shipping ID More...
 
virtual void settickets (QList< MOCartTicket > s)
 tickets inside this cart as seen in the DB More...
 
virtual void settimeout (Nullable< qint64 > s)
 When the cart will be automatically deleted. More...
 
virtual void setvouchers (QList< MOCartVoucher > s)
 vouchers inside this cart as seen in the DB More...
 
virtual Nullable< MOShippingshipping () const
 if shipping is set: the shipping type More...
 
virtual Nullable< qint64 > shippingid () const
 optional shipping ID More...
 
virtual QList< MOCartTickettickets () const
 tickets inside this cart as seen in the DB More...
 
virtual Nullable< qint64 > timeout () const
 When the cart will be automatically deleted. More...
 
QString toString ()
 Serializes the object to XML and returns the string representation of that XML. More...
 
QDomElement toXml (QDomDocument &doc, QString name="WebCart")
 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 QList< MOCartVouchervouchers () const
 vouchers inside this cart as seen in the DB More...
 

Static Public Member Functions

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

Protected Attributes

Nullable< QString > mp_cartid
 
Nullable< QString > mp_comment
 
Nullable< MOCouponmp_coupon
 
Nullable< QString > mp_couponid
 
Nullable< MOCustomermp_customer
 
Nullable< qint64 > mp_customerid
 
Nullable< MOAddressmp_deliveryaddress
 
Nullable< qint64 > mp_deliveryaddressid
 
Nullable< MOAddressmp_invoiceaddress
 
Nullable< qint64 > mp_invoiceaddressid
 
QList< MOCartItemmp_items
 
Nullable< MOShippingmp_shipping
 
Nullable< qint64 > mp_shippingid
 
QList< MOCartTicketmp_tickets
 
Nullable< qint64 > mp_timeout
 
QList< MOCartVouchermp_vouchers
 

Detailed Description

The cart as used by the web user interface, this maps into the cart tables. This class is never used by the remote client.

Constructor & Destructor Documentation

MOWebCart::MOWebCart ( )
inline

default constructor: constructs an invalid instance of MOWebCart

Referenced by fromString(), and fromXml().

MOWebCart::MOWebCart ( const QDomElement &  root)
explicit
virtual MOWebCart::~MOWebCart ( )
inlinevirtual

destructor: deletes this copy of the object

Member Function Documentation

virtual void MOWebCart::additems ( Nullable< MOCartItem a)
inlinevirtual

Referenced by MOWebCart().

virtual void MOWebCart::addtickets ( Nullable< MOCartTicket a)
inlinevirtual

Referenced by MOWebCart().

virtual void MOWebCart::addvouchers ( Nullable< MOCartVoucher a)
inlinevirtual

Referenced by MOWebCart().

virtual Nullable<QString> MOWebCart::cartid ( ) const
inlinevirtual

The cart ID of this session.

virtual void MOWebCart::clearitems ( )
inlinevirtual
virtual void MOWebCart::cleartickets ( )
inlinevirtual
virtual void MOWebCart::clearvouchers ( )
inlinevirtual
virtual Nullable<QString> MOWebCart::comment ( ) const
inlinevirtual

optional comments from the customer

virtual Nullable<MOCoupon> MOWebCart::coupon ( ) const
inlinevirtual
virtual Nullable<QString> MOWebCart::couponid ( ) const
inlinevirtual

An optional coupon code to be used in this order.

virtual Nullable<MOCustomer> MOWebCart::customer ( ) const
inlinevirtual

The customer of this cart.

virtual Nullable<qint64> MOWebCart::customerid ( ) const
inlinevirtual

The customer of this cart.

virtual Nullable<MOAddress> MOWebCart::deliveryaddress ( ) const
inlinevirtual

The address to deliver to (mandatory)

virtual Nullable<qint64> MOWebCart::deliveryaddressid ( ) const
inlinevirtual

The address to deliver to (mandatory)

MOWebCart MOWebCart::fromString ( const QString &  txt)
static

create MOWebCart from XML formatted string (inverse of toString)

References MOWebCart().

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

create MOWebCart from XML (inverse of toXml)

References MOWebCart().

virtual Nullable<MOAddress> MOWebCart::invoiceaddress ( ) const
inlinevirtual

The address to send the invoice to if different from the delivery address (optional)

virtual Nullable<qint64> MOWebCart::invoiceaddressid ( ) const
inlinevirtual

The address to send the invoice to if different from the delivery address (optional)

virtual QList<MOCartItem> MOWebCart::items ( ) const
inlinevirtual

shop items inside this cart as seen in the DB

virtual void MOWebCart::setcartid ( Nullable< QString >  s)
inlinevirtual

The cart ID of this session.

Referenced by MOWebCart().

virtual void MOWebCart::setcomment ( Nullable< QString >  s)
inlinevirtual

optional comments from the customer

Referenced by MOWebCart().

virtual void MOWebCart::setcoupon ( Nullable< MOCoupon s)
inlinevirtual

Referenced by MOWebCart().

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

An optional coupon code to be used in this order.

Referenced by MOWebCart().

virtual void MOWebCart::setcustomer ( Nullable< MOCustomer s)
inlinevirtual

The customer of this cart.

Referenced by MOWebCart().

virtual void MOWebCart::setcustomerid ( Nullable< qint64 >  s)
inlinevirtual

The customer of this cart.

Referenced by MOWebCart().

virtual void MOWebCart::setdeliveryaddress ( Nullable< MOAddress s)
inlinevirtual

The address to deliver to (mandatory)

Referenced by MOWebCart().

virtual void MOWebCart::setdeliveryaddressid ( Nullable< qint64 >  s)
inlinevirtual

The address to deliver to (mandatory)

Referenced by MOWebCart().

virtual void MOWebCart::setinvoiceaddress ( Nullable< MOAddress s)
inlinevirtual

The address to send the invoice to if different from the delivery address (optional)

Referenced by MOWebCart().

virtual void MOWebCart::setinvoiceaddressid ( Nullable< qint64 >  s)
inlinevirtual

The address to send the invoice to if different from the delivery address (optional)

Referenced by MOWebCart().

virtual void MOWebCart::setitems ( QList< MOCartItem s)
inlinevirtual

shop items inside this cart as seen in the DB

virtual void MOWebCart::setshipping ( Nullable< MOShipping s)
inlinevirtual

if shipping is set: the shipping type

Referenced by MOWebCart().

virtual void MOWebCart::setshippingid ( Nullable< qint64 >  s)
inlinevirtual

optional shipping ID

Referenced by MOWebCart().

virtual void MOWebCart::settickets ( QList< MOCartTicket s)
inlinevirtual

tickets inside this cart as seen in the DB

virtual void MOWebCart::settimeout ( Nullable< qint64 >  s)
inlinevirtual

When the cart will be automatically deleted.

Referenced by MOWebCart().

virtual void MOWebCart::setvouchers ( QList< MOCartVoucher s)
inlinevirtual

vouchers inside this cart as seen in the DB

virtual Nullable<MOShipping> MOWebCart::shipping ( ) const
inlinevirtual

if shipping is set: the shipping type

virtual Nullable<qint64> MOWebCart::shippingid ( ) const
inlinevirtual

optional shipping ID

virtual QList<MOCartTicket> MOWebCart::tickets ( ) const
inlinevirtual

tickets inside this cart as seen in the DB

virtual Nullable<qint64> MOWebCart::timeout ( ) const
inlinevirtual

When the cart will be automatically deleted.

QString MOWebCart::toString ( )

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

References toXml().

QDomElement MOWebCart::toXml ( QDomDocument &  doc,
QString  name = "WebCart" 
)

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 "MOWebCart" is used

Referenced by toString(), and toXml().

void MOWebCart::toXml ( QDomDocument &  doc,
QDomElement &  r 
)
virtual QList<MOCartVoucher> MOWebCart::vouchers ( ) const
inlinevirtual

vouchers inside this cart as seen in the DB

Member Data Documentation

Nullable<QString> MOWebCart::mp_cartid
protected

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

Nullable<QString> MOWebCart::mp_comment
protected

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

Nullable<MOCoupon> MOWebCart::mp_coupon
protected

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

Nullable<QString> MOWebCart::mp_couponid
protected

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

Nullable<MOCustomer> MOWebCart::mp_customer
protected

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

Nullable<qint64> MOWebCart::mp_customerid
protected

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

Nullable<MOAddress> MOWebCart::mp_deliveryaddress
protected

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

Nullable<qint64> MOWebCart::mp_deliveryaddressid
protected

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

Nullable<MOAddress> MOWebCart::mp_invoiceaddress
protected

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

Nullable<qint64> MOWebCart::mp_invoiceaddressid
protected

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

QList<MOCartItem> MOWebCart::mp_items
protected

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

Nullable<MOShipping> MOWebCart::mp_shipping
protected

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

Nullable<qint64> MOWebCart::mp_shippingid
protected

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

QList<MOCartTicket> MOWebCart::mp_tickets
protected

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

Nullable<qint64> MOWebCart::mp_timeout
protected

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

QList<MOCartVoucher> MOWebCart::mp_vouchers
protected

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


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