LLSaleInfo Class Reference

#include <llsaleinfo.h>

Collaboration diagram for LLSaleInfo:

Collaboration graph
[legend]
List of all members.

Public Types

 FS_NOT = 0
 FS_ORIGINAL = 1
 FS_COPY = 2
 FS_CONTENTS = 3
 FS_COUNT
enum  EForSale {
  FS_NOT = 0, FS_ORIGINAL = 1, FS_COPY = 2, FS_CONTENTS = 3,
  FS_COUNT
}

Public Member Functions

 LLSaleInfo ()
 LLSaleInfo (EForSale sale_type, S32 sale_price)
BOOL isForSale () const
EForSale getSaleType () const
S32 getSalePrice () const
U32 getCRC32 () const
void setSaleType (EForSale type)
void setSalePrice (S32 price)
BOOL exportFile (FILE *fp) const
BOOL importFile (FILE *fp, BOOL &has_perm_mask, U32 &perm_mask)
BOOL exportLegacyStream (std::ostream &output_stream) const
LLSD asLLSD () const
 operator LLSD () const
bool fromLLSD (LLSD &sd, BOOL &has_perm_mask, U32 &perm_mask)
BOOL importLegacyStream (std::istream &input_stream, BOOL &has_perm_mask, U32 &perm_mask)
LLXMLNodeexportFileXML () const
BOOL importXML (LLXMLNode *node)
void packMessage (LLMessageSystem *msg) const
void unpackMessage (LLMessageSystem *msg, const char *block)
void unpackMultiMessage (LLMessageSystem *msg, const char *block, S32 block_num)
void accumulate (const LLSaleInfo &sale_info)
bool operator== (const LLSaleInfo &rhs) const
bool operator!= (const LLSaleInfo &rhs) const

Static Public Member Functions

static EForSale lookup (const char *name)
static const char * lookup (EForSale type)

Static Public Attributes

static const LLSaleInfo DEFAULT

Protected Attributes

EForSale mSaleType
S32 mSalePrice

Detailed Description

Definition at line 48 of file llsaleinfo.h.


Member Enumeration Documentation

enum LLSaleInfo::EForSale

Enumerator:
FS_NOT 
FS_ORIGINAL 
FS_COPY 
FS_CONTENTS 
FS_COUNT 

Definition at line 54 of file llsaleinfo.h.


Constructor & Destructor Documentation

LLSaleInfo::LLSaleInfo (  ) 

---------------------------------------------------------------------------- Class llsaleinfo ----------------------------------------------------------------------------

Definition at line 61 of file llsaleinfo.cpp.

LLSaleInfo::LLSaleInfo ( EForSale  sale_type,
S32  sale_price 
)

Definition at line 67 of file llsaleinfo.cpp.

References llclamp(), mSalePrice, and S32_MAX.


Member Function Documentation

void LLSaleInfo::accumulate ( const LLSaleInfo sale_info  ) 

Definition at line 340 of file llsaleinfo.cpp.

References FS_NOT, mSalePrice, and mSaleType.

Referenced by LLSelectMgr::selectGetSaleInfo().

LLSD LLSaleInfo::asLLSD (  )  const

Definition at line 105 of file llsaleinfo.cpp.

References lookup(), mSalePrice, mSaleType, and tut::sd().

Referenced by operator LLSD().

BOOL LLSaleInfo::exportFile ( FILE *  fp  )  const

Definition at line 87 of file llsaleinfo.cpp.

References lookup(), mSalePrice, mSaleType, and TRUE.

Referenced by LLWearable::exportFile(), and LLInventoryItem::exportFile().

LLXMLNode * LLSaleInfo::exportFileXML (  )  const

Definition at line 128 of file llsaleinfo.cpp.

References LLXMLNode::createChild(), FALSE, lookup(), mSalePrice, mSaleType, and TRUE.

Referenced by LLInventoryItem::exportFileXML().

BOOL LLSaleInfo::exportLegacyStream ( std::ostream &  output_stream  )  const

Definition at line 96 of file llsaleinfo.cpp.

References lookup(), mSalePrice, mSaleType, and TRUE.

Referenced by LLInventoryItem::exportLegacyStream().

bool LLSaleInfo::fromLLSD ( LLSD sd,
BOOL has_perm_mask,
U32 perm_mask 
)

Definition at line 113 of file llsaleinfo.cpp.

References ll_U32_from_sd(), llclamp(), lookup(), mSalePrice, mSaleType, S32_MAX, tut::sd(), and TRUE.

Referenced by LLInventoryItem::fromLLSD().

U32 LLSaleInfo::getCRC32 (  )  const

Definition at line 79 of file llsaleinfo.cpp.

References mSalePrice, and mSaleType.

Referenced by LLInventoryItem::getCRC32().

S32 LLSaleInfo::getSalePrice (  )  const [inline]

Definition at line 84 of file llsaleinfo.h.

References mSalePrice.

Referenced by LLTaskInvFVBridge::getPrice(), handle_buy_object(), ll_create_sd_from_sale_info(), LLInventoryItem::packBinaryBucket(), LLSelectMgr::packBuyObjectIDs(), LLFloaterProperties::refreshFromItem(), LLFloaterBuyContents::show(), LLFloaterBuy::show(), and LLHoverView::updateText().

EForSale LLSaleInfo::getSaleType (  )  const [inline]

Definition at line 83 of file llsaleinfo.h.

References mSaleType.

Referenced by enable_buy(), handle_buy(), ll_create_sd_from_sale_info(), LLInventoryItem::packBinaryBucket(), LLSelectMgr::packBuyObjectIDs(), LLPanelPermissions::refresh(), LLFloaterProperties::refreshFromItem(), LLFloaterBuy::show(), and LLHoverView::updateText().

BOOL LLSaleInfo::importFile ( FILE *  fp,
BOOL has_perm_mask,
U32 perm_mask 
)

Definition at line 161 of file llsaleinfo.cpp.

References FALSE, llclamp(), llendl, llwarns, lookup(), MAX_STRING, mSalePrice, mSaleType, NULL, S32_MAX, and TRUE.

Referenced by LLWearable::importFile(), and LLInventoryItem::importFile().

BOOL LLSaleInfo::importLegacyStream ( std::istream &  input_stream,
BOOL has_perm_mask,
U32 perm_mask 
)

Definition at line 221 of file llsaleinfo.cpp.

References FALSE, llclamp(), llendl, llwarns, lookup(), MAX_STRING, mSalePrice, mSaleType, S32_MAX, and TRUE.

Referenced by LLInventoryItem::importLegacyStream().

BOOL LLSaleInfo::importXML ( LLXMLNode node  ) 

Definition at line 137 of file llsaleinfo.cpp.

References FALSE, LLXMLNode::getChild(), LLXMLNode::getName(), lldebugs, llendl, lookup(), mSalePrice, mSaleType, and TRUE.

Referenced by LLInventoryItem::importXML().

BOOL LLSaleInfo::isForSale (  )  const

Definition at line 74 of file llsaleinfo.cpp.

References FS_NOT, and mSaleType.

Referenced by LLTaskSoundBridge::buildContextMenu(), LLTaskInvFVBridge::buildContextMenu(), LLTaskInvFVBridge::buyItem(), enable_buy(), handle_buy_object(), LLPanelPermissions::onCommitClickAction(), LLFloaterProperties::refreshFromItem(), and LLHoverView::updateText().

const char * LLSaleInfo::lookup ( EForSale  type  )  [static]

Definition at line 325 of file llsaleinfo.cpp.

References FOR_SALE_NAMES, FS_COUNT, NULL, and S32.

LLSaleInfo::EForSale LLSaleInfo::lookup ( const char *  name  )  [static]

Definition at line 312 of file llsaleinfo.cpp.

References FOR_SALE_NAMES, FS_COUNT, FS_NOT, i, and S32.

Referenced by asLLSD(), exportFile(), exportFileXML(), exportLegacyStream(), fromLLSD(), importFile(), importLegacyStream(), importXML(), ll_create_sd_from_sale_info(), and ll_sale_info_from_sd().

LLSaleInfo::operator LLSD (  )  const [inline]

Definition at line 99 of file llsaleinfo.h.

References asLLSD().

bool LLSaleInfo::operator!= ( const LLSaleInfo rhs  )  const

Definition at line 358 of file llsaleinfo.cpp.

References mSalePrice, and mSaleType.

bool LLSaleInfo::operator== ( const LLSaleInfo rhs  )  const

Definition at line 350 of file llsaleinfo.cpp.

References mSalePrice, and mSaleType.

void LLSaleInfo::packMessage ( LLMessageSystem msg  )  const

Definition at line 283 of file llsaleinfo.cpp.

References _PREHASH_SalePrice, _PREHASH_SaleType, LLMessageSystem::addS32Fast(), LLMessageSystem::addU8Fast(), mSalePrice, and mSaleType.

Referenced by LLViewerInventoryItem::packMessage(), LLInventoryItem::packMessage(), and LLSelectMgr::packObjectSaleInfo().

void LLSaleInfo::setSalePrice ( S32  price  ) 

Definition at line 277 of file llsaleinfo.cpp.

References llclamp(), mSalePrice, and S32_MAX.

Referenced by ll_sale_info_from_sd().

void LLSaleInfo::setSaleType ( EForSale  type  )  [inline]

Definition at line 88 of file llsaleinfo.h.

References mSaleType.

Referenced by ll_sale_info_from_sd().

void LLSaleInfo::unpackMessage ( LLMessageSystem msg,
const char *  block 
)

Definition at line 291 of file llsaleinfo.cpp.

References _PREHASH_SalePrice, _PREHASH_SaleType, LLMessageSystem::getS32Fast(), LLMessageSystem::getU8Fast(), llclamp(), mSalePrice, mSaleType, and S32_MAX.

Referenced by LLSelectMgr::processObjectPropertiesFamily().

void LLSaleInfo::unpackMultiMessage ( LLMessageSystem msg,
const char *  block,
S32  block_num 
)

Definition at line 301 of file llsaleinfo.cpp.

References _PREHASH_SalePrice, _PREHASH_SaleType, LLMessageSystem::getS32Fast(), LLMessageSystem::getU8Fast(), llclamp(), mSalePrice, mSaleType, and S32_MAX.

Referenced by LLSelectMgr::processObjectProperties(), and LLInventoryItem::unpackMessage().


Member Data Documentation

const LLSaleInfo LLSaleInfo::DEFAULT [static]

Definition at line 52 of file llsaleinfo.h.

Referenced by container_inventory_arrived(), handle_grab_texture(), LLLiveLSLEditor::loadAsset(), LLPanelContents::onClickNewScript(), SetNotForSale::operator()(), and LLNewAgentInventoryResponder::uploadComplete().

S32 LLSaleInfo::mSalePrice [protected]

Definition at line 74 of file llsaleinfo.h.

Referenced by accumulate(), asLLSD(), exportFile(), exportFileXML(), exportLegacyStream(), fromLLSD(), getCRC32(), getSalePrice(), importFile(), importLegacyStream(), importXML(), LLSaleInfo(), operator!=(), operator==(), packMessage(), setSalePrice(), unpackMessage(), and unpackMultiMessage().

EForSale LLSaleInfo::mSaleType [protected]

Definition at line 73 of file llsaleinfo.h.

Referenced by accumulate(), asLLSD(), exportFile(), exportFileXML(), exportLegacyStream(), fromLLSD(), getCRC32(), getSaleType(), importFile(), importLegacyStream(), importXML(), isForSale(), operator!=(), operator==(), packMessage(), setSaleType(), unpackMessage(), and unpackMultiMessage().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:42 2010 for Second Life Viewer by  doxygen 1.4.7