Planeshift
psTradeTransformations Class Reference

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

#include <pstrade.h>

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. More...
 
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. More...
 
double CalcFunction (MathEnvironment *env, const char *functionName, const double *params)
 Does nothing right now just returns 0 for anything passed. More...
 
double GetProperty (MathEnvironment *env, const char *ptr)
 Returns the requested variable stored in this transform. More...
 
- Public Member Functions inherited from iScriptableVar
virtual ~iScriptableVar ()
 

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 101 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 110 of file pstrade.h.

uint32 psTradeTransformations::GetItemId ( ) const
inline

Definition at line 132 of file pstrade.h.

int psTradeTransformations::GetItemQty ( ) const
inline

Definition at line 141 of file pstrade.h.

float psTradeTransformations::GetItemQualityPenaltyPercent ( ) const
inline

Definition at line 150 of file pstrade.h.

uint32 psTradeTransformations::GetPatternId ( ) const
inline

Definition at line 114 of file pstrade.h.

uint32 psTradeTransformations::GetProcessId ( ) const
inline

Definition at line 118 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 122 of file pstrade.h.

int psTradeTransformations::GetResultQty ( ) const
inline

Definition at line 127 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 167 of file pstrade.h.

int psTradeTransformations::GetTransPoints ( ) const
inline

Definition at line 155 of file pstrade.h.

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

Definition at line 136 of file pstrade.h.

void psTradeTransformations::SetItemQty ( int  newItemQty)
inline

Definition at line 145 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 205 of file pstrade.h.

uint32 psTradeTransformations::itemId
protected

Definition at line 210 of file pstrade.h.

int psTradeTransformations::itemQty
protected

Definition at line 211 of file pstrade.h.

uint32 psTradeTransformations::patternId
protected

Definition at line 206 of file pstrade.h.

float psTradeTransformations::penaltyPct
protected

Definition at line 212 of file pstrade.h.

uint32 psTradeTransformations::processId
protected

Definition at line 207 of file pstrade.h.

uint32 psTradeTransformations::resultId
protected

Definition at line 208 of file pstrade.h.

int psTradeTransformations::resultQty
protected

Definition at line 209 of file pstrade.h.

MathExpression* psTradeTransformations::transPoints
protected

Definition at line 213 of file pstrade.h.


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