MagicSmoke  $VERSION$
MTCreateCoupon Class Reference

Creates a new coupon. More...

#include <srcMTCreateCoupon.h>

Inheritance diagram for MTCreateCoupon:
MTransaction

Public Member Functions

 MTCreateCoupon ()
 default constructor: generates an invalid transaction More...
 
 MTCreateCoupon (const MTCreateCoupon &)
 copy constructor: the two copies share their state More...
 
virtual ~MTCreateCoupon ()
 deletes this instance More...
 
Q_SLOT Nullable< MOCoupongetcoupon () const
 actually stored coupon: the ID may be slightly changed by the server More...
 
MTCreateCouponoperator= (const MTCreateCoupon &)
 copy assignment: the copy shares the state of the original object More...
 

Static Public Member Functions

static MTCreateCoupon asyncQuery (const MOCoupon &acoupon, QString iface="MagicSmoke")
 emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state More...
 
static MTCreateCoupon query (const MOCoupon &acoupon, QString iface="MagicSmoke")
 emits the query over the network and returns the finished transaction object More...
 
- Static Public Member Functions inherited from MTransaction
static void setStartStopActions (const MTStartStop &start, const MTStartStop &stop)
 set actions to be executed at start/stop More...
 

Protected Member Functions

 MTCreateCoupon (const MOCoupon &acoupon, QString iface)
 generates an instance from its properties More...
 
virtual void endQuery ()
 
- Protected Member Functions inherited from MTransaction
 MTransaction (QString iface=QString())
 internal: construct the transaction More...
 
 MTransaction (const WTransaction &)
 internal: copy the transaction More...
 
 MTransaction (const MTransaction &)
 internal: copy the transaction More...
 
QByteArray executeQuery (QString, QByteArray)
 internal: extend executeQuery to show a wait cursor More...
 

Friends

class MTCreateCoupon_Private
 

Detailed Description

Creates a new coupon.

Constructor & Destructor Documentation

MTCreateCoupon::MTCreateCoupon ( const MOCoupon acoupon,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
acouponInput data for the coupon, if the ID is empty or null a new one is created
ifaceID of the interface that the transaction will be sent on

References MTCreateCoupon_Private::in_coupon, and MTCreateCoupon_Private.

MTCreateCoupon::MTCreateCoupon ( )

default constructor: generates an invalid transaction

References MTCreateCoupon_Private.

MTCreateCoupon::MTCreateCoupon ( const MTCreateCoupon t)

copy constructor: the two copies share their state

References MTCreateCoupon_Private::attach().

MTCreateCoupon::~MTCreateCoupon ( )
virtual

deletes this instance

References MTCreateCoupon_Private::detach().

Member Function Documentation

MTCreateCoupon MTCreateCoupon::asyncQuery ( const MOCoupon acoupon,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state

Parameters
acouponInput data for the coupon, if the ID is empty or null a new one is created
ifaceID of the interface that the transaction will be sent on
void MTCreateCoupon::endQuery ( )
protectedvirtual
Nullable< MOCoupon > MTCreateCoupon::getcoupon ( ) const

actually stored coupon: the ID may be slightly changed by the server

References MTCreateCoupon_Private::out_coupon.

MTCreateCoupon & MTCreateCoupon::operator= ( const MTCreateCoupon t)

copy assignment: the copy shares the state of the original object

References MTCreateCoupon_Private::attach(), and MTCreateCoupon_Private::detach().

MTCreateCoupon MTCreateCoupon::query ( const MOCoupon acoupon,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the finished transaction object

Parameters
acouponInput data for the coupon, if the ID is empty or null a new one is created
ifaceID of the interface that the transaction will be sent on

Referenced by MInterface::queryCreateCoupon().

Friends And Related Function Documentation

friend class MTCreateCoupon_Private
friend

Referenced by MTCreateCoupon().


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