MagicSmoke
$VERSION$
|
Objects of this class are sent back as response to UseTicket. More...
#include <srcMOTicketUse.h>
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... | |
MOTicketUse & | operator= (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< MOTicket > | ticket () 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< TicketUseStatus > | usestatus () 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< MOTicket > | mp_ticket |
Nullable< TicketUseStatus > | mp_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< MOTicket > | ticket |
The ticket, if found. More... | |
Nullable< TicketUseStatus > | usestatus |
The result of the UseTicket operation. More... | |
Objects of this class are sent back as response to UseTicket.
|
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.
|
explicit |
special constructor: create from the XML representation, deserializing the object
References setamountopen(), setamountreserved(), setamounttickets(), setamountused(), setticket(), setusestatus(), and str2TicketUseStatus().
|
inlinevirtual |
destructor: deletes this copy of the object
|
inlinevirtual |
The amount of tickets for the event that have not been used yet.
|
inlinevirtual |
The amount of tickets for the event that could be used, but are only reserved until now.
|
inlinevirtual |
The amount of usable/used tickets in this event.
|
inlinevirtual |
The amount of used tickets in the event (after the operation)
|
static |
create MOTicketUse from XML formatted string (inverse of toString)
References MOTicketUse().
|
static |
create MOTicketUse from XML (inverse of toXml)
References MOTicketUse().
|
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 | ) |
|
inlinevirtual |
The amount of tickets for the event that have not been used yet.
Referenced by MOTicketUse().
|
inlinevirtual |
The amount of tickets for the event that could be used, but are only reserved until now.
Referenced by MOTicketUse().
|
inlinevirtual |
The amount of usable/used tickets in this event.
Referenced by MOTicketUse().
|
inlinevirtual |
The amount of used tickets in the event (after the operation)
Referenced by MOTicketUse().
|
inlinevirtual |
The ticket, if found.
Referenced by MOTicketUse().
|
inlinevirtual |
The result of the UseTicket operation.
Referenced by MOTicketUse().
|
static |
Converts string into the corresponding enum TicketUseStatus value.
References AlreadyUsed, InvalidEvent, NotFound, NotUsable, Ok, Unpaid, and WrongEvent.
Referenced by MOTicketUse().
|
inlinevirtual |
The ticket, if found.
|
static |
Converts enum TicketUseStatus value into the corresponding localized string.
References AlreadyUsed, InvalidEvent, NotFound, NotUsable, Ok, Unpaid, and WrongEvent.
|
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.
doc | the DOM document node for which to generate the element |
name | the 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.
|
inlinevirtual |
The result of the UseTicket operation.
|
protected |
Referenced by MOTicketUse(), operator=(), and toXml().
|
protected |
Referenced by MOTicketUse(), operator=(), and toXml().
|
protected |
Referenced by MOTicketUse(), operator=(), and toXml().
|
protected |
Referenced by MOTicketUse(), operator=(), and toXml().
|
protected |
Referenced by MOTicketUse(), operator=(), and toXml().
|
protected |
Referenced by MOTicketUse(), operator=(), and toXml().
|
readwrite |
The amount of tickets for the event that have not been used yet.
|
readwrite |
The amount of tickets for the event that could be used, but are only reserved until now.
|
readwrite |
The amount of usable/used tickets in this event.
|
readwrite |
The amount of used tickets in the event (after the operation)
|
readwrite |
The ticket, if found.
|
readwrite |
The result of the UseTicket operation.