MagicSmoke  $VERSION$
MOTicketSaleInfo Class Reference

This class represents only the info from a ticket that is required for calculating seating information. More...

#include <srcMOTicketSaleInfo.h>

Inheritance diagram for MOTicketSaleInfo:

Public Types

enum  TicketState {
  Reserved =785, Ordered =786, Used =771, Cancelled =4,
  Refund =4, MaskBlock =256, MaskPay =512, MaskUsable =768,
  MaskReturnable =16, MaskChangeable =16
}
 

Public Member Functions

 MOTicketSaleInfo ()
 default constructor: constructs an invalid instance of MOTicketSaleInfo More...
 
 MOTicketSaleInfo (const MOTicketSaleInfo &)
 copy constructor: creates a (deep) copy of the object More...
 
 MOTicketSaleInfo (const QDomElement &)
 special constructor: create from the XML representation, deserializing the object More...
 
virtual ~MOTicketSaleInfo ()
 destructor: deletes this copy of the object More...
 
virtual Nullable< qint64 > eventid () const
 
MOTicketSaleInfooperator= (const MOTicketSaleInfo &)
 copy assignment: creates a (deep) copy of the object More...
 
virtual Nullable< qint64 > price () const
 
virtual Nullable< qint64 > pricecategoryid () const
 
 Q_ENUMS (TicketState)
 
virtual Nullable< QString > seat () const
 
virtual void seteventid (Nullable< qint64 > s)
 
virtual void setprice (Nullable< qint64 > s)
 
virtual void setpricecategoryid (Nullable< qint64 > s)
 
virtual void setseat (Nullable< QString > s)
 
virtual void setstatus (Nullable< TicketState > s)
 
virtual void settags (Nullable< QString > s)
 
virtual Nullable< TicketStatestatus () const
 
virtual Nullable< QString > tags () const
 
QString toString ()
 Serializes the object to XML and returns the string representation of that XML. More...
 
QDomElement toXml (QDomDocument &doc, QString name="TicketSaleInfo")
 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...
 

Static Public Member Functions

static MOTicketSaleInfo fromString (const QString &)
 create MOTicketSaleInfo from XML formatted string (inverse of toString) More...
 
static MOTicketSaleInfo fromXml (const QDomElement &)
 create MOTicketSaleInfo from XML (inverse of toXml) More...
 
static TicketState locstr2TicketState (QString, bool *ok=0)
 Converts a localized string into the corresponding enum TicketState value. More...
 
static TicketState str2TicketState (QString, bool *ok=0)
 Converts string into the corresponding enum TicketState value. More...
 
static QString TicketState2locstr (TicketState)
 Converts enum TicketState value into the corresponding localized string. More...
 
static QString TicketState2str (TicketState)
 Converts enum TicketState value into the corresponding string. More...
 

Protected Attributes

Nullable< qint64 > mp_eventid
 
Nullable< qint64 > mp_price
 
Nullable< qint64 > mp_pricecategoryid
 
Nullable< QString > mp_seat
 
Nullable< TicketStatemp_status
 
Nullable< QString > mp_tags
 

Properties

Nullable< qint64 > eventid
 
Nullable< qint64 > price
 
Nullable< qint64 > pricecategoryid
 
Nullable< QString > seat
 
Nullable< TicketStatestatus
 
Nullable< QString > tags
 

Detailed Description

This class represents only the info from a ticket that is required for calculating seating information.

Member Enumeration Documentation

Enumerator
Reserved 

The ticket is reserved for a customer, it blocks the seat, but is not to be paid yet.

Ordered 

The ticket is ordered/sold and possibly paid for (payment is stored in its order).

Used 

The ticket has been used.

Cancelled 

The ticket has been given back for some reason and needs to be re-imbursed (if paid already).

Refund 

Alias for Cancelled.

MaskBlock 

Masking value: if this bit is set the ticket blocks a seat.

MaskPay 

Masking value: if this bit is set the ticket must be paid by the customer.

MaskUsable 

Masking value: combines Block+Pay - the ticket can be used to watch a show or is already being used.

MaskReturnable 

Masking value: if this bit is set the ticket can still be cancelled.

MaskChangeable 

Masking value: if this bit is set the ticket can still be changed (price, event, etc.). Currently an alias for MaskReturnable.

Constructor & Destructor Documentation

MOTicketSaleInfo::MOTicketSaleInfo ( )
inline

default constructor: constructs an invalid instance of MOTicketSaleInfo

Referenced by fromString(), and fromXml().

MOTicketSaleInfo::MOTicketSaleInfo ( const MOTicketSaleInfo o)

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

References mp_eventid, mp_price, mp_pricecategoryid, mp_seat, mp_status, and mp_tags.

MOTicketSaleInfo::MOTicketSaleInfo ( const QDomElement &  root)
explicit

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

References seteventid(), setprice(), setpricecategoryid(), setseat(), setstatus(), settags(), and str2TicketState().

virtual MOTicketSaleInfo::~MOTicketSaleInfo ( )
inlinevirtual

destructor: deletes this copy of the object

Member Function Documentation

virtual Nullable<qint64> MOTicketSaleInfo::eventid ( ) const
inlinevirtual
MOTicketSaleInfo MOTicketSaleInfo::fromString ( const QString &  txt)
static

create MOTicketSaleInfo from XML formatted string (inverse of toString)

References MOTicketSaleInfo().

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

create MOTicketSaleInfo from XML (inverse of toXml)

References MOTicketSaleInfo().

MOTicketSaleInfo::TicketState MOTicketSaleInfo::locstr2TicketState ( QString  s,
bool *  ok = 0 
)
static

Converts a localized string into the corresponding enum TicketState value.

References Cancelled, MaskBlock, MaskChangeable, MaskPay, MaskReturnable, MaskUsable, Ordered, Refund, Reserved, and Used.

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

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

References mp_eventid, mp_price, mp_pricecategoryid, mp_seat, mp_status, and mp_tags.

virtual Nullable<qint64> MOTicketSaleInfo::price ( ) const
inlinevirtual
virtual Nullable<qint64> MOTicketSaleInfo::pricecategoryid ( ) const
inlinevirtual
MOTicketSaleInfo::Q_ENUMS ( TicketState  )
virtual Nullable<QString> MOTicketSaleInfo::seat ( ) const
inlinevirtual
virtual void MOTicketSaleInfo::seteventid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOTicketSaleInfo().

virtual void MOTicketSaleInfo::setprice ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOTicketSaleInfo().

virtual void MOTicketSaleInfo::setpricecategoryid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOTicketSaleInfo().

virtual void MOTicketSaleInfo::setseat ( Nullable< QString >  s)
inlinevirtual

Referenced by MOTicketSaleInfo().

virtual void MOTicketSaleInfo::setstatus ( Nullable< TicketState s)
inlinevirtual

Referenced by MOTicketSaleInfo().

virtual void MOTicketSaleInfo::settags ( Nullable< QString >  s)
inlinevirtual

Referenced by MOTicketSaleInfo().

virtual Nullable<TicketState> MOTicketSaleInfo::status ( ) const
inlinevirtual
MOTicketSaleInfo::TicketState MOTicketSaleInfo::str2TicketState ( QString  s,
bool *  ok = 0 
)
static

Converts string into the corresponding enum TicketState value.

References Cancelled, MaskBlock, MaskChangeable, MaskPay, MaskReturnable, MaskUsable, Ordered, Refund, Reserved, and Used.

Referenced by MOTicketSaleInfo().

virtual Nullable<QString> MOTicketSaleInfo::tags ( ) const
inlinevirtual
QString MOTicketSaleInfo::TicketState2locstr ( TicketState  e)
static

Converts enum TicketState value into the corresponding localized string.

References Cancelled, MaskBlock, MaskChangeable, MaskPay, MaskReturnable, MaskUsable, Ordered, Refund, Reserved, and Used.

QString MOTicketSaleInfo::TicketState2str ( TicketState  e)
static

Converts enum TicketState value into the corresponding string.

References Cancelled, MaskBlock, MaskChangeable, MaskPay, MaskReturnable, MaskUsable, Ordered, Refund, Reserved, and Used.

QString MOTicketSaleInfo::toString ( )

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

References toXml().

QDomElement MOTicketSaleInfo::toXml ( QDomDocument &  doc,
QString  name = "TicketSaleInfo" 
)

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

Referenced by toString().

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

Serializes the object into the given element.

References mp_eventid, mp_price, mp_pricecategoryid, mp_seat, mp_status, and mp_tags.

Member Data Documentation

Nullable<qint64> MOTicketSaleInfo::mp_eventid
protected

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

Nullable<qint64> MOTicketSaleInfo::mp_price
protected

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

Nullable<qint64> MOTicketSaleInfo::mp_pricecategoryid
protected

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

Nullable<QString> MOTicketSaleInfo::mp_seat
protected

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

Nullable<TicketState> MOTicketSaleInfo::mp_status
protected

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

Nullable<QString> MOTicketSaleInfo::mp_tags
protected

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

Property Documentation

Nullable<qint64> MOTicketSaleInfo::eventid
readwrite
Nullable<qint64> MOTicketSaleInfo::price
readwrite
Nullable<qint64> MOTicketSaleInfo::pricecategoryid
readwrite
Nullable<QString> MOTicketSaleInfo::seat
readwrite
Nullable<TicketState> MOTicketSaleInfo::status
readwrite
Nullable<QString> MOTicketSaleInfo::tags
readwrite

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