Planeshift
Public Member Functions | Protected Attributes

psTradeTransformations Class Reference

This class holds the master list of all trade transformatations possible in the game. More...

#include <pstrade.h>

List of all members.

Public Member Functions

uint32 GetId () const
uint32 GetItemId () const
int GetItemQty () const
float GetItemQualityPenaltyPercent () const
uint32 GetPatternId () const
uint32 GetProcessId () const
uint32 GetResultId () const
int GetResultQty () const
int GetTransformationCacheFlag ()
 Cache flag is used for garbage collection.
int GetTransPoints () const
bool Load (iResultRow &row)
 psTradeTransformations ()
 psTradeTransformations (uint32 rId, int rQty, uint32 iId, int iQty, char *tPoints)
void SetItemId (uint32 newItemId)
void SetItemQty (int newItemQty)
 ~psTradeTransformations ()
iScriptableVar implementation

Functions that implement the iScriptableVar interface.

const char * ToString ()
 Returns the name of the current transform.
double CalcFunction (MathEnvironment *env, const char *functionName, const double *params)
 Does nothing right now just returns 0 for anything passed.
double GetProperty (MathEnvironment *env, const char *ptr)
 Returns the requested variable stored in this transform.

Protected Attributes

uint32 id
uint32 itemId
int itemQty
uint32 patternId
float penaltyPct
uint32 processId
uint32 resultId
int resultQty
MathExpressiontransPoints

Detailed Description

This class holds the master list of all trade transformatations possible in the game.

This class is read only since it is cached and shared by multiple users.

Definition at line 100 of file pstrade.h.


Constructor & Destructor Documentation

psTradeTransformations::psTradeTransformations ( )
psTradeTransformations::psTradeTransformations ( uint32  rId,
int  rQty,
uint32  iId,
int  iQty,
char *  tPoints 
)
psTradeTransformations::~psTradeTransformations ( )

Member Function Documentation

double psTradeTransformations::CalcFunction ( MathEnvironment env,
const char *  functionName,
const double *  params 
) [virtual]

Does nothing right now just returns 0 for anything passed.

Note:
Needed for iScriptableVar.

Implements iScriptableVar.

uint32 psTradeTransformations::GetId ( ) const [inline]

Definition at line 109 of file pstrade.h.

uint32 psTradeTransformations::GetItemId ( ) const [inline]

Definition at line 131 of file pstrade.h.

int psTradeTransformations::GetItemQty ( ) const [inline]

Definition at line 140 of file pstrade.h.

float psTradeTransformations::GetItemQualityPenaltyPercent ( ) const [inline]

Definition at line 149 of file pstrade.h.

uint32 psTradeTransformations::GetPatternId ( ) const [inline]

Definition at line 113 of file pstrade.h.

uint32 psTradeTransformations::GetProcessId ( ) const [inline]

Definition at line 117 of file pstrade.h.

double psTradeTransformations::GetProperty ( MathEnvironment env,
const char *  ptr 
) [virtual]

Returns the requested variable stored in this transform.

Note:
Needed for iScriptableVar.
Parameters:
envThe MathEnviroment.
ptrA pointer to a char array stating the requested variable.
Returns:
A double with the value of the requested variable.

Implements iScriptableVar.

uint32 psTradeTransformations::GetResultId ( ) const [inline]

Definition at line 121 of file pstrade.h.

int psTradeTransformations::GetResultQty ( ) const [inline]

Definition at line 126 of file pstrade.h.

int psTradeTransformations::GetTransformationCacheFlag ( ) [inline]

Cache flag is used for garbage collection.

If true transformation is cached and should not be deleted after use otherwise it needs to be cleaned up

Definition at line 166 of file pstrade.h.

int psTradeTransformations::GetTransPoints ( ) const [inline]

Definition at line 154 of file pstrade.h.

bool psTradeTransformations::Load ( iResultRow &  row)
void psTradeTransformations::SetItemId ( uint32  newItemId) [inline]

Definition at line 135 of file pstrade.h.

void psTradeTransformations::SetItemQty ( int  newItemQty) [inline]

Definition at line 144 of file pstrade.h.

const char* psTradeTransformations::ToString ( ) [virtual]

Returns the name of the current transform.

Note:
Needed for iScriptableVar.
Returns:
just "transform".

Implements iScriptableVar.


Member Data Documentation

uint32 psTradeTransformations::id [protected]

Definition at line 204 of file pstrade.h.

uint32 psTradeTransformations::itemId [protected]

Definition at line 209 of file pstrade.h.

Definition at line 210 of file pstrade.h.

Definition at line 205 of file pstrade.h.

Definition at line 211 of file pstrade.h.

Definition at line 206 of file pstrade.h.

Definition at line 207 of file pstrade.h.

Definition at line 208 of file pstrade.h.

Definition at line 212 of file pstrade.h.


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