MagicSmoke  $VERSION$
MOTicketUse Class Reference

Objects of this class are sent back as response to UseTicket. More...

#include <srcMOTicketUse.h>

Inheritance diagram for MOTicketUse:

Public Types

enum  TicketUseStatus {
  Ok =1, NotFound =2, WrongEvent =3, AlreadyUsed =4,
  NotUsable =5, Unpaid =6, InvalidEvent =7
}
 

Public Member Functions

 MOTicketUse ()
 default constructor: constructs an invalid instance of MOTicketUse More...
 
 MOTicketUse (const MOTicketUse &)
 copy constructor: creates a (deep) copy of the object More...
 
 MOTicketUse (const QDomElement &)
 special constructor: create from the XML representation, deserializing the object More...
 
virtual ~MOTicketUse ()
 destructor: deletes this copy of the object More...
 
virtual Nullable< qint64 > amountopen () const
 The amount of tickets for the event that have not been used yet. More...
 
virtual Nullable< qint64 > amountreserved () const
 The amount of tickets for the event that could be used, but are only reserved until now. More...
 
virtual Nullable< qint64 > amounttickets () const
 The amount of usable/used tickets in this event. More...
 
virtual Nullable< qint64 > amountused () const
 The amount of used tickets in the event (after the operation) More...
 
MOTicketUseoperator= (const MOTicketUse &)
 copy assignment: creates a (deep) copy of the object More...
 
 Q_ENUMS (TicketUseStatus)
 
virtual void setamountopen (Nullable< qint64 > s)
 The amount of tickets for the event that have not been used yet. More...
 
virtual void setamountreserved (Nullable< qint64 > s)
 The amount of tickets for the event that could be used, but are only reserved until now. More...
 
virtual void setamounttickets (Nullable< qint64 > s)
 The amount of usable/used tickets in this event. More...
 
virtual void setamountused (Nullable< qint64 > s)
 The amount of used tickets in the event (after the operation) More...
 
virtual void setticket (Nullable< MOTicket > s)
 The ticket, if found. More...
 
virtual void setusestatus (Nullable< TicketUseStatus > s)
 The result of the UseTicket operation. More...
 
virtual Nullable< MOTicketticket () const
 The ticket, if found. More...
 
QString toString ()
 Serializes the object to XML and returns the string representation of that XML. More...
 
QDomElement toXml (QDomDocument &doc, QString name="TicketUse")
 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< TicketUseStatususestatus () const
 The result of the UseTicket operation. More...
 

Static Public Member Functions

static MOTicketUse fromString (const QString &)
 create MOTicketUse from XML formatted string (inverse of toString) More...
 
static MOTicketUse fromXml (const QDomElement &)
 create MOTicketUse from XML (inverse of toXml) More...
 
static TicketUseStatus locstr2TicketUseStatus (QString, bool *ok=0)
 Converts a localized string into the corresponding enum TicketUseStatus value. More...
 
static TicketUseStatus str2TicketUseStatus (QString, bool *ok=0)
 Converts string into the corresponding enum TicketUseStatus value. More...
 
static QString TicketUseStatus2locstr (TicketUseStatus)
 Converts enum TicketUseStatus value into the corresponding localized string. More...
 
static QString TicketUseStatus2str (TicketUseStatus)
 Converts enum TicketUseStatus value into the corresponding string. More...
 

Protected Attributes

Nullable< qint64 > mp_amountopen
 
Nullable< qint64 > mp_amountreserved
 
Nullable< qint64 > mp_amounttickets
 
Nullable< qint64 > mp_amountused
 
Nullable< MOTicketmp_ticket
 
Nullable< TicketUseStatusmp_usestatus
 

Properties

Nullable< qint64 > amountopen
 The amount of tickets for the event that have not been used yet. More...
 
Nullable< qint64 > amountreserved
 The amount of tickets for the event that could be used, but are only reserved until now. More...
 
Nullable< qint64 > amounttickets
 The amount of usable/used tickets in this event. More...
 
Nullable< qint64 > amountused
 The amount of used tickets in the event (after the operation) More...
 
Nullable< MOTicketticket
 The ticket, if found. More...
 
Nullable< TicketUseStatususestatus
 The result of the UseTicket operation. More...
 

Detailed Description

Objects of this class are sent back as response to UseTicket.

Member Enumeration Documentation

Enumerator
Ok 

The ticket was ok and has been marked as Used.

NotFound 

The ticket has not been found or the barcode belongs to a voucher.

WrongEvent 

The ticket belongs to the wrong event.

AlreadyUsed 

The ticket has already been used.

NotUsable 

The ticket is only reserved or has been given back, it cannot be used.

Unpaid 

The order of this ticket has not been paid for yet.

InvalidEvent 

The given event ID is invalid.

Constructor & Destructor Documentation

MOTicketUse::MOTicketUse ( )
inline

default constructor: constructs an invalid instance of MOTicketUse

Referenced by fromString(), and fromXml().

MOTicketUse::MOTicketUse ( const MOTicketUse o)

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

References mp_amountopen, mp_amountreserved, mp_amounttickets, mp_amountused, mp_ticket, and mp_usestatus.

MOTicketUse::MOTicketUse ( const QDomElement &  root)
explicit

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

References setamountopen(), setamountreserved(), setamounttickets(), setamountused(), setticket(), setusestatus(), and str2TicketUseStatus().

virtual MOTicketUse::~MOTicketUse ( )
inlinevirtual

destructor: deletes this copy of the object

Member Function Documentation

virtual Nullable<qint64> MOTicketUse::amountopen ( ) const
inlinevirtual

The amount of tickets for the event that have not been used yet.

virtual Nullable<qint64> MOTicketUse::amountreserved ( ) const
inlinevirtual

The amount of tickets for the event that could be used, but are only reserved until now.

virtual Nullable<qint64> MOTicketUse::amounttickets ( ) const
inlinevirtual

The amount of usable/used tickets in this event.

virtual Nullable<qint64> MOTicketUse::amountused ( ) const
inlinevirtual

The amount of used tickets in the event (after the operation)

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

create MOTicketUse from XML formatted string (inverse of toString)

References MOTicketUse().

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

create MOTicketUse from XML (inverse of toXml)

References MOTicketUse().

MOTicketUse::TicketUseStatus MOTicketUse::locstr2TicketUseStatus ( QString  s,
bool *  ok = 0 
)
static

Converts a localized string into the corresponding enum TicketUseStatus value.

References AlreadyUsed, InvalidEvent, NotFound, NotUsable, Ok, Unpaid, and WrongEvent.

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

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

References mp_amountopen, mp_amountreserved, mp_amounttickets, mp_amountused, mp_ticket, and mp_usestatus.

MOTicketUse::Q_ENUMS ( TicketUseStatus  )
virtual void MOTicketUse::setamountopen ( Nullable< qint64 >  s)
inlinevirtual

The amount of tickets for the event that have not been used yet.

Referenced by MOTicketUse().

virtual void MOTicketUse::setamountreserved ( Nullable< qint64 >  s)
inlinevirtual

The amount of tickets for the event that could be used, but are only reserved until now.

Referenced by MOTicketUse().

virtual void MOTicketUse::setamounttickets ( Nullable< qint64 >  s)
inlinevirtual

The amount of usable/used tickets in this event.

Referenced by MOTicketUse().

virtual void MOTicketUse::setamountused ( Nullable< qint64 >  s)
inlinevirtual

The amount of used tickets in the event (after the operation)

Referenced by MOTicketUse().

virtual void MOTicketUse::setticket ( Nullable< MOTicket s)
inlinevirtual

The ticket, if found.

Referenced by MOTicketUse().

virtual void MOTicketUse::setusestatus ( Nullable< TicketUseStatus s)
inlinevirtual

The result of the UseTicket operation.

Referenced by MOTicketUse().

MOTicketUse::TicketUseStatus MOTicketUse::str2TicketUseStatus ( QString  s,
bool *  ok = 0 
)
static

Converts string into the corresponding enum TicketUseStatus value.

References AlreadyUsed, InvalidEvent, NotFound, NotUsable, Ok, Unpaid, and WrongEvent.

Referenced by MOTicketUse().

virtual Nullable<MOTicket> MOTicketUse::ticket ( ) const
inlinevirtual

The ticket, if found.

QString MOTicketUse::TicketUseStatus2locstr ( TicketUseStatus  e)
static

Converts enum TicketUseStatus value into the corresponding localized string.

References AlreadyUsed, InvalidEvent, NotFound, NotUsable, Ok, Unpaid, and WrongEvent.

QString MOTicketUse::TicketUseStatus2str ( TicketUseStatus  e)
static

Converts enum TicketUseStatus value into the corresponding string.

References AlreadyUsed, InvalidEvent, NotFound, NotUsable, Ok, Unpaid, and WrongEvent.

QString MOTicketUse::toString ( )

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

References toXml().

QDomElement MOTicketUse::toXml ( QDomDocument &  doc,
QString  name = "TicketUse" 
)

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

Referenced by toString().

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

Serializes the object into the given element.

References mp_amountopen, mp_amountreserved, mp_amounttickets, mp_amountused, mp_ticket, and mp_usestatus.

virtual Nullable<TicketUseStatus> MOTicketUse::usestatus ( ) const
inlinevirtual

The result of the UseTicket operation.

Member Data Documentation

Nullable<qint64> MOTicketUse::mp_amountopen
protected

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

Nullable<qint64> MOTicketUse::mp_amountreserved
protected

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

Nullable<qint64> MOTicketUse::mp_amounttickets
protected

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

Nullable<qint64> MOTicketUse::mp_amountused
protected

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

Nullable<MOTicket> MOTicketUse::mp_ticket
protected

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

Nullable<TicketUseStatus> MOTicketUse::mp_usestatus
protected

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

Property Documentation

Nullable<qint64> MOTicketUse::amountopen
readwrite

The amount of tickets for the event that have not been used yet.

Nullable<qint64> MOTicketUse::amountreserved
readwrite

The amount of tickets for the event that could be used, but are only reserved until now.

Nullable<qint64> MOTicketUse::amounttickets
readwrite

The amount of usable/used tickets in this event.

Nullable<qint64> MOTicketUse::amountused
readwrite

The amount of used tickets in the event (after the operation)

Nullable<MOTicket> MOTicketUse::ticket
readwrite

The ticket, if found.

Nullable<TicketUseStatus> MOTicketUse::usestatus
readwrite

The result of the UseTicket operation.


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