LLTrustNetDatum Class Reference

Represents a piece of data retrieved from the TrustNet server. More...

#include <lltrustnet.h>

Inheritance diagram for LLTrustNetDatum:

Inheritance graph
[legend]
Collaboration diagram for LLTrustNetDatum:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLTrustNetDatum ()
void addCallback (trustnet_callback_t callback, void *user_data=NULL)
 Adds a callback to call when the object changes.
F32 getAge () const
 Returns the datum's age. Used for caching.
ETrustNetDatumState getState () const

Protected Member Functions

void setState (ETrustNetDatumState s)
void setParent (const LLTrustNetAvatarData *p)
 Initializes internal data. called by derived objects May be set to NULL if there's no parent.
void notify (ETrustNetResult result=TN_OK)
 Calls all the registered callbacks.
void updated (ETrustNetResult state=TN_OK)
 Called by derived objects when the data changes.

Protected Attributes

ETrustNetOperation mOperation

Private Attributes

std::queue< LLTrustNetCallbackEntrymCallbacks
LLTimer mTimer
ETrustNetDatumState mState
const LLTrustNetAvatarDatamParent
 Pointer to the parent LLTrustNetAvatarData object Used to retrieve data about the avatar the information is associated to.

Friends

class LLTrustNet

Detailed Description

Represents a piece of data retrieved from the TrustNet server.

Definition at line 178 of file lltrustnet.h.


Constructor & Destructor Documentation

LLTrustNetDatum::LLTrustNetDatum (  )  [inline]

Definition at line 182 of file lltrustnet.h.


Member Function Documentation

void LLTrustNetDatum::addCallback ( trustnet_callback_t  callback,
void user_data = NULL 
)

Adds a callback to call when the object changes.

Definition at line 73 of file lltrustnet.cpp.

References mCallbacks.

F32 LLTrustNetDatum::getAge (  )  const [inline]

Returns the datum's age. Used for caching.

Definition at line 193 of file lltrustnet.h.

References LLTimer::getElapsedTimeF32(), and mTimer.

ETrustNetDatumState LLTrustNetDatum::getState (  )  const [inline]

Definition at line 195 of file lltrustnet.h.

References mState.

Referenced by LLTrustNet::getScoreData(), and LLTrustNet::getScoreState().

void LLTrustNetDatum::notify ( ETrustNetResult  result = TN_OK  )  [protected]

Calls all the registered callbacks.

Parameters:
result Result of the operation

Definition at line 79 of file lltrustnet.cpp.

References LLTrustNetAvatarData::getAvatar(), mCallbacks, mOperation, mParent, and LLUUID::null.

Referenced by updated().

void LLTrustNetDatum::setParent ( const LLTrustNetAvatarData p  )  [inline, protected]

Initializes internal data. called by derived objects May be set to NULL if there's no parent.

Parameters:
p Pointer to the parent LLTrustNetAvatarData object

Definition at line 206 of file lltrustnet.h.

References mParent, and p.

void LLTrustNetDatum::setState ( ETrustNetDatumState  s  )  [inline, protected]

Definition at line 199 of file lltrustnet.h.

References mState.

Referenced by LLTrustNetScore::LLTrustNetScore(), and updated().

void LLTrustNetDatum::updated ( ETrustNetResult  state = TN_OK  )  [inline, protected]

Called by derived objects when the data changes.

Definition at line 218 of file lltrustnet.h.

References mTimer, notify(), setState(), LLTimer::start(), and TNS_RETRIEVED.

Referenced by LLTrustNetScore::set().


Friends And Related Function Documentation

friend class LLTrustNet [friend]

Definition at line 198 of file lltrustnet.h.


Member Data Documentation

std::queue<LLTrustNetCallbackEntry> LLTrustNetDatum::mCallbacks [private]

Definition at line 222 of file lltrustnet.h.

Referenced by addCallback(), and notify().

ETrustNetOperation LLTrustNetDatum::mOperation [protected]

Definition at line 220 of file lltrustnet.h.

Referenced by LLTrustNetScore::LLTrustNetScore(), and notify().

const LLTrustNetAvatarData* LLTrustNetDatum::mParent [private]

Pointer to the parent LLTrustNetAvatarData object Used to retrieve data about the avatar the information is associated to.

Definition at line 231 of file lltrustnet.h.

Referenced by notify(), and setParent().

ETrustNetDatumState LLTrustNetDatum::mState [private]

Definition at line 225 of file lltrustnet.h.

Referenced by getState(), and setState().

LLTimer LLTrustNetDatum::mTimer [private]

Definition at line 223 of file lltrustnet.h.

Referenced by getAge(), and updated().


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