2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.
Main Page | Class Hierarchy | Class List | Class Members

SecurePlayLibrary::SPAbstractTransactionClass Class Reference

#include <SPAbstractTransactionClass.h>

Inheritance diagram for SecurePlayLibrary::SPAbstractTransactionClass:

SecurePlayLibrary::SPRootTransactionClass SecurePlayLibrary::SPAbstractTransactionInterface SecurePlayLibrary::SPTBlastClass SecurePlayLibrary::SPTBurstClass SecurePlayLibrary::SPTMultiPartSecretClass SecurePlayLibrary::SPTMultiPartSimultaneousClass SecurePlayLibrary::SPTMultistepTurnClass SecurePlayLibrary::SPTRandomClass SecurePlayLibrary::SPTSecretClass SecurePlayLibrary::SPTShipClass SecurePlayLibrary::SPTSimultaneousClass SecurePlayLibrary::SPTStrobeClass List of all members.

Public Member Functions

 SPAbstractTransactionClass ()
 SPAbstractTransactionClass (SPGameInterface *gameobj, string master, vector< string > playerIDList, bool privateflag, string transactionID, string AGE, vector< string > configarr)
bool APIcompleteTransaction (string pid)
void onincomingTransaction (SPMessageClass *incoming)
bool APIisTransError ()
bool APIisPlayerInternal (string pid)
void logError ()
bool APIgetPrivacyFlag ()
void APIsetTransactionID (string tid)
string APIgetAGE ()
vector< string > APIgetConfiguration ()
SPGameInterfaceAPIgetGameinstance ()
string APIgetTransactionstatus ()
string APIgetTransactionType ()
SPAbstractTransactionInterfaceAPIcreateTransaction (SPGameInterface *gameapiobj, SPMessageClass *message)
string APIgetMaster ()
string APIgetTransactionID ()
string APIgetGameID ()
vector< string > APIgetPlayerIDList ()
void SPnotify (string eventdescription, vector< string > args, string sourceMethod, string sourceClass, string errorType)
void sendMessage (string sender, vector< string > receivers, bool encryptflag, bool privateflag, string messagetype, vector< string > messagebody, vector< string > altmessage)

Static Public Member Functions

string gettranstype ()

Protected Member Functions

void prinit (SPGameInterface *gameobj, string masterID, vector< string > plrIDList, bool prvtflag, string transID)
void pruniqueinit ()
bool pronincomingTransaction (SPMessageClass *incoming)
bool setAGE (string sourceID, string newgameblock)

Protected Attributes

SPGameInterfacegameinstance
bool privateflag
string transactionstatus
vector< string > configuration
string AGE
string transtype
const string releaseversion

Static Protected Attributes

const string mt_completeTransaction = "complete_s"
const string mt_error = "error_s"
const string status_ready = "ready"
const string status_error = "error"

Detailed Description

This is the common abstract transaction class for all transactions in the SecurePlay library
Author:
IT GlobalSecure Inc.
See also:
SecurePlay License Information


Constructor & Destructor Documentation

SPAbstractTransactionClass::SPAbstractTransactionClass  ) 
 

Default Constructor.

SPAbstractTransactionClass::SPAbstractTransactionClass SPGameInterface gameobj,
string  master,
vector< string >  playerIDList,
bool  privateflag,
string  transactionID,
string  AGE,
vector< string >  configarr
 

Constructor.

Parameters:
gameobj SPGameInterface - game associated with this transaction.
master String - master of this transaction.
playerIDList String[] - player id list associated with this transaction.
privateflag boolean - privacy flag.
transactionID String - ID associated with this transaction.


Member Function Documentation

bool SPAbstractTransactionClass::APIcompleteTransaction string  pid  )  [virtual]
 

This method allows the Transaction Master ONLY to complete the transaction. Transactions that are in an error state cannot be cleared by completion.

Parameters:
pid String - id of the player who is completing the transaction, must be the master and internal.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not.

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

Reimplemented in SecurePlayLibrary::SPTRandomClass.

SPAbstractTransactionInterface * SPAbstractTransactionClass::APIcreateTransaction SPGameInterface gameapiobj,
SPMessageClass message
[virtual]
 

Creates a new instance of an Abstract Transaction class.

Parameters:
gameapiobj SPGameInterface - game associated with this transaction.
message SPMessageClass - message that contains all the configure info
Returns:
SPAbstractTransactionInterface

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

Reimplemented in SecurePlayLibrary::SPTActClass, SecurePlayLibrary::SPTBeginGame, SecurePlayLibrary::SPTBlastClass, SecurePlayLibrary::SPTBurstClass, SecurePlayLibrary::SPTEndGame, SecurePlayLibrary::SPTMultiPartSecretClass, SecurePlayLibrary::SPTMultiPartSimultaneousClass, SecurePlayLibrary::SPTMultistepTurnClass, SecurePlayLibrary::SPTnewAGEClass, SecurePlayLibrary::SPTnewGameClass, SecurePlayLibrary::SPTPlayerJoinClass, SecurePlayLibrary::SPTRandomClass, SecurePlayLibrary::SPTSecretClass, SecurePlayLibrary::SPTShipClass, SecurePlayLibrary::SPTSimultaneousClass, and SecurePlayLibrary::SPTStrobeClass.

string SPAbstractTransactionClass::APIgetAGE  )  [virtual]
 

Gets the Abstract Game Engine (AGE) of this transaction.

Returns:
gameblock - String

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

vector< string > SPAbstractTransactionClass::APIgetConfiguration  )  [virtual]
 

Getter function that returns the property: configuration

Returns:
configuration - String[]

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

string SPAbstractTransactionClass::APIgetGameID  )  [virtual]
 

Gets the game id associated with the transaction.

Returns:
gid - String - game id

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

SPGameInterface * SPAbstractTransactionClass::APIgetGameinstance  ) 
 

Getter function that returns the property: gameinstance

Returns:
gameinstance - SPGameInterface

string SPAbstractTransactionClass::APIgetMaster  )  [virtual]
 

Gets the id of the master of the transaction.

Returns:
master - String - master of the transaction.

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

vector< string > SPAbstractTransactionClass::APIgetPlayerIDList  )  [virtual]
 

Gets the player ids associated with the transaction.

Returns:
players - String[] - players associated with the transaction in a String array.

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

bool SPAbstractTransactionClass::APIgetPrivacyFlag  )  [virtual]
 

Gets the privacy flag of this class.

Returns:
privateflag - boolean

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

string SPAbstractTransactionClass::APIgetTransactionID  )  [virtual]
 

Gets the transaction id.

Returns:
tid - String - the transaction id

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

string SPAbstractTransactionClass::APIgetTransactionstatus  )  [virtual]
 

Getter function that returns the property: transactionstatus

Returns:
transactionstatus - String

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

string SPAbstractTransactionClass::APIgetTransactionType  )  [virtual]
 

This method returns a String of the transactiontype.

Returns:
this.transtype - String - name of transaction type

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

Reimplemented in SecurePlayLibrary::SPTActClass, SecurePlayLibrary::SPTBeginGame, SecurePlayLibrary::SPTBlastClass, SecurePlayLibrary::SPTBurstClass, SecurePlayLibrary::SPTEndGame, SecurePlayLibrary::SPTMultiPartSecretClass, SecurePlayLibrary::SPTMultiPartSimultaneousClass, SecurePlayLibrary::SPTMultistepTurnClass, SecurePlayLibrary::SPTnewAGEClass, SecurePlayLibrary::SPTnewGameClass, SecurePlayLibrary::SPTPlayerJoinClass, SecurePlayLibrary::SPTSecretClass, SecurePlayLibrary::SPTShipClass, SecurePlayLibrary::SPTSimultaneousClass, SecurePlayLibrary::SPTStrobeClass, and SecurePlayLibrary::SPTSynchronizedRandomClass.

bool SPAbstractTransactionClass::APIisPlayerInternal string  pid  ) 
 

Checks to see if the playr is internal

Parameters:
pid String - id of the player to be checked.
Returns:
result - Boolean: TRUE if player is internal, FALSE if not

bool SPAbstractTransactionClass::APIisTransError  ) 
 

This method returns a flag for whether the status of the transaction is in error or not.

Returns:
result - Boolean: TRUE if transaction in error state, FALSE, if not.

void SPAbstractTransactionClass::APIsetTransactionID string  tid  )  [virtual]
 

Sets the transaction id to a specified id.

Parameters:
tid String - the id of the transaction.

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

string SPAbstractTransactionClass::gettranstype  )  [static]
 

This method gets the transaction type.

Returns:
String

Reimplemented in SecurePlayLibrary::SPTActClass, SecurePlayLibrary::SPTBeginGame, SecurePlayLibrary::SPTBlastClass, SecurePlayLibrary::SPTBurstClass, SecurePlayLibrary::SPTEndGame, SecurePlayLibrary::SPTMultiPartSecretClass, SecurePlayLibrary::SPTMultiPartSimultaneousClass, SecurePlayLibrary::SPTMultistepTurnClass, SecurePlayLibrary::SPTnewAGEClass, SecurePlayLibrary::SPTnewGameClass, SecurePlayLibrary::SPTPlayerJoinClass, SecurePlayLibrary::SPTRandomClass, SecurePlayLibrary::SPTSecretClass, SecurePlayLibrary::SPTShipClass, SecurePlayLibrary::SPTSimultaneousClass, SecurePlayLibrary::SPTStrobeClass, and SecurePlayLibrary::SPTSynchronizedRandomClass.

void SPAbstractTransactionClass::logError  ) 
 

This is a shell method for future use.

void SPAbstractTransactionClass::onincomingTransaction SPMessageClass incoming  )  [virtual]
 

This method handles the various incoming messages and passes them to the appropriate message type handler.

Parameters:
incoming SPMessageClass - incomng message
Returns:
void

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

Reimplemented in SecurePlayLibrary::SPTBlastClass.

void SPAbstractTransactionClass::prinit SPGameInterface gameobj,
string  masterID,
vector< string >  plrIDList,
bool  prvtflag,
string  transID
[protected]
 

Initializes the transaction.

Parameters:
gameobj 
masterID 
plrIDList 
prvtflag 
transID 

bool SPAbstractTransactionClass::pronincomingTransaction SPMessageClass incoming  )  [protected]
 

this is a shell for unique incoming transactions

Parameters:
incoming SPMessageClass - incoming message
Returns:
Boolean - TRUE if successful, FALSE, if unsuccessful

Reimplemented in SecurePlayLibrary::SPTMultiPartSecretClass, SecurePlayLibrary::SPTMultiPartSimultaneousClass, SecurePlayLibrary::SPTMultistepTurnClass, SecurePlayLibrary::SPTRandomClass, SecurePlayLibrary::SPTSecretClass, SecurePlayLibrary::SPTShipClass, SecurePlayLibrary::SPTSimultaneousClass, and SecurePlayLibrary::SPTStrobeClass.

void SPAbstractTransactionClass::pruniqueinit  )  [protected]
 

shell to allow unique initialization of transactions

Reimplemented in SecurePlayLibrary::SPTMultiPartSimultaneousClass, SecurePlayLibrary::SPTRandomClass, SecurePlayLibrary::SPTSimultaneousClass, and SecurePlayLibrary::SPTStrobeClass.

void SPAbstractTransactionClass::sendMessage string  sender,
vector< string >  receivers,
bool  encryptflag,
bool  privateflag,
string  messagetype,
vector< string >  messagebody,
vector< string >  altmessage
[virtual]
 

This method sends a message. It hands the configured message off to the appropriate comms service. Also, for private messages, it sends an alternate message to the parties not recieving the main message.

Parameters:
sender String - player id of the sender.
receivers String[] - player ids of recievers.
encryptflag boolean - enrypted flag
privateflag boolean - private flag
messagetype String - message type
messagebody String[] - the message body as a string
altmessage String[] - alternative message.
Returns:
void

Implements SecurePlayLibrary::SPAbstractTransactionInterface.

bool SPAbstractTransactionClass::setAGE string  sourceID,
string  newgameblock
[protected]
 

This method safely sets the abstract game engine of a transaction. NOTE: This can only be done by the Transaction master.

Parameters:
sourceID String - id of the source.
newgameblock String - candidate game block
Returns:
result - Boolean: TRUE, if successful, FALSE, if not.

void SPAbstractTransactionClass::SPnotify string  eventdescription,
vector< string >  args,
string  sourceMethod,
string  sourceClass,
string  errorType
 

This method notifies the Listeners of events

Parameters:
eventdescription 
args - String[] - arguments

Reimplemented from SecurePlayLibrary::SPRootTransactionClass.


Member Data Documentation

string SecurePlayLibrary::SPAbstractTransactionClass::AGE [protected]
 

Abstract Game Engine or code associated with this transaction

vector<string> SecurePlayLibrary::SPAbstractTransactionClass::configuration [protected]
 

This property holds the configuration of the Transaction Instance.

SPGameInterface* SecurePlayLibrary::SPAbstractTransactionClass::gameinstance [protected]
 

This is the object handler for the Game Instance Object with which the transaction is associated.

const string SPAbstractTransactionClass::mt_completeTransaction = "complete_s" [static, protected]
 

Static message types that this transaction supports.

const string SPAbstractTransactionClass::mt_error = "error_s" [static, protected]
 

Static message types that this transaction supports.

bool SecurePlayLibrary::SPAbstractTransactionClass::privateflag [protected]
 

This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.

const string SecurePlayLibrary::SPAbstractTransactionClass::releaseversion [protected]
 

IT GlobalSecure release version.

Reimplemented from SecurePlayLibrary::SPRootTransactionClass.

const string SPAbstractTransactionClass::status_error = "error" [static, protected]
 

transaction status error variable

const string SPAbstractTransactionClass::status_ready = "ready" [static, protected]
 

transaction status ready variable

string SecurePlayLibrary::SPAbstractTransactionClass::transactionstatus [protected]
 

This is a string that describes the current state of the transaction. The common states are "new" - a newly created transaction, "configured" - a custom configured transaction, "ready" - a transaction ready to be begun, "complete" - a successfully completed transaction, and "error" - a transaction that has failed for some reason.

string SecurePlayLibrary::SPAbstractTransactionClass::transtype [protected]
 

Type of Transaction


The documentation for this class was generated from the following files: 2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.