MagicSmoke
$VERSION$
|
Encapsulates vouchers as they are stored in the cart. Used by the client to tell the server about new orders. Used by the Web UI to actually store its cart. More...
#include <srcMOCartVoucher.h>
Public Types | |
enum | ValidationState { Ok =0, InvalidValue =1, InvalidPrice =2 } |
Public Member Functions | |
MOCartVoucher () | |
default constructor: constructs an invalid instance of MOCartVoucher More... | |
MOCartVoucher (const MOCartVoucher &) | |
copy constructor: creates a (deep) copy of the object More... | |
MOCartVoucher (const QDomElement &) | |
special constructor: create from the XML representation, deserializing the object More... | |
virtual | ~MOCartVoucher () |
destructor: deletes this copy of the object More... | |
virtual Nullable< qint64 > | amount () const |
virtual Nullable< QString > | cartid () const |
optional property that is used by the web user interface to identify the cart that is handled More... | |
virtual Nullable< qint64 > | cartlineid () const |
optional property that can be used by the calling process to distinguish lines in the cart, the server must preserve it unchanged More... | |
MOCartVoucher & | operator= (const MOCartVoucher &) |
copy assignment: creates a (deep) copy of the object More... | |
virtual Nullable< qint64 > | price () const |
Q_ENUMS (ValidationState) | |
virtual void | setamount (Nullable< qint64 > s) |
virtual void | setcartid (Nullable< QString > s) |
optional property that is used by the web user interface to identify the cart that is handled More... | |
virtual void | setcartlineid (Nullable< qint64 > s) |
optional property that can be used by the calling process to distinguish lines in the cart, the server must preserve it unchanged More... | |
virtual void | setprice (Nullable< qint64 > s) |
virtual void | setstatus (Nullable< ValidationState > s) |
virtual void | setvalue (Nullable< qint64 > s) |
virtual Nullable< ValidationState > | status () const |
QString | toString () |
Serializes the object to XML and returns the string representation of that XML. More... | |
QDomElement | toXml (QDomDocument &doc, QString name="CartVoucher") |
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 > | value () const |
Static Public Member Functions | |
static MOCartVoucher | fromString (const QString &) |
create MOCartVoucher from XML formatted string (inverse of toString) More... | |
static MOCartVoucher | fromXml (const QDomElement &) |
create MOCartVoucher from XML (inverse of toXml) More... | |
static ValidationState | locstr2ValidationState (QString, bool *ok=0) |
Converts a localized string into the corresponding enum ValidationState value. More... | |
static ValidationState | str2ValidationState (QString, bool *ok=0) |
Converts string into the corresponding enum ValidationState value. More... | |
static QString | ValidationState2locstr (ValidationState) |
Converts enum ValidationState value into the corresponding localized string. More... | |
static QString | ValidationState2str (ValidationState) |
Converts enum ValidationState value into the corresponding string. More... | |
Protected Attributes | |
Nullable< qint64 > | mp_amount |
Nullable< QString > | mp_cartid |
Nullable< qint64 > | mp_cartlineid |
Nullable< qint64 > | mp_price |
Nullable< ValidationState > | mp_status |
Nullable< qint64 > | mp_value |
Properties | |
Nullable< qint64 > | amount |
Nullable< QString > | cartid |
optional property that is used by the web user interface to identify the cart that is handled More... | |
Nullable< qint64 > | cartlineid |
optional property that can be used by the calling process to distinguish lines in the cart, the server must preserve it unchanged More... | |
Nullable< qint64 > | price |
Nullable< ValidationState > | status |
Nullable< qint64 > | value |
Encapsulates vouchers as they are stored in the cart. Used by the client to tell the server about new orders. Used by the Web UI to actually store its cart.
|
inline |
default constructor: constructs an invalid instance of MOCartVoucher
Referenced by fromString(), and fromXml().
MOCartVoucher::MOCartVoucher | ( | const MOCartVoucher & | o | ) |
|
explicit |
special constructor: create from the XML representation, deserializing the object
References setamount(), setcartid(), setcartlineid(), setprice(), setstatus(), setvalue(), and str2ValidationState().
|
inlinevirtual |
destructor: deletes this copy of the object
|
inlinevirtual |
|
inlinevirtual |
optional property that is used by the web user interface to identify the cart that is handled
|
inlinevirtual |
optional property that can be used by the calling process to distinguish lines in the cart, the server must preserve it unchanged
|
static |
create MOCartVoucher from XML formatted string (inverse of toString)
References MOCartVoucher().
|
static |
create MOCartVoucher from XML (inverse of toXml)
References MOCartVoucher().
|
static |
Converts a localized string into the corresponding enum ValidationState value.
References InvalidPrice, InvalidValue, and Ok.
MOCartVoucher & MOCartVoucher::operator= | ( | const MOCartVoucher & | o | ) |
|
inlinevirtual |
MOCartVoucher::Q_ENUMS | ( | ValidationState | ) |
|
inlinevirtual |
Referenced by MOCartVoucher().
|
inlinevirtual |
optional property that is used by the web user interface to identify the cart that is handled
Referenced by MOCartVoucher().
|
inlinevirtual |
optional property that can be used by the calling process to distinguish lines in the cart, the server must preserve it unchanged
Referenced by MOCartVoucher().
|
inlinevirtual |
Referenced by MOCartVoucher().
|
inlinevirtual |
Referenced by MOCartVoucher().
|
inlinevirtual |
Referenced by MOCartVoucher().
|
inlinevirtual |
|
static |
Converts string into the corresponding enum ValidationState value.
References InvalidPrice, InvalidValue, and Ok.
Referenced by MOCartVoucher().
QString MOCartVoucher::toString | ( | ) |
Serializes the object to XML and returns the string representation of that XML.
References toXml().
QDomElement MOCartVoucher::toXml | ( | QDomDocument & | doc, |
QString | name = "CartVoucher" |
||
) |
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 "MOCartVoucher" is used |
Referenced by toString().
void MOCartVoucher::toXml | ( | QDomDocument & | doc, |
QDomElement & | r | ||
) |
|
static |
Converts enum ValidationState value into the corresponding localized string.
References InvalidPrice, InvalidValue, and Ok.
|
static |
Converts enum ValidationState value into the corresponding string.
References InvalidPrice, InvalidValue, and Ok.
|
inlinevirtual |
|
protected |
Referenced by MOCartVoucher(), operator=(), and toXml().
|
protected |
Referenced by MOCartVoucher(), operator=(), and toXml().
|
protected |
Referenced by MOCartVoucher(), operator=(), and toXml().
|
protected |
Referenced by MOCartVoucher(), operator=(), and toXml().
|
protected |
Referenced by MOCartVoucher(), operator=(), and toXml().
|
protected |
Referenced by MOCartVoucher(), operator=(), and toXml().
|
readwrite |
|
readwrite |
optional property that is used by the web user interface to identify the cart that is handled
|
readwrite |
optional property that can be used by the calling process to distinguish lines in the cart, the server must preserve it unchanged
|
readwrite |
|
readwrite |
|
readwrite |