LLAvatarListEntry Class Reference

This class is used to hold data about avatars. We cache data about avatars to avoid repeating requests in this class. Instances are kept in a map<LLAvatarListEntry>. We keep track of the frame where the avatar was last seen. Avatars that are old enough are not added to the visible list, but still kept around to cache the account info data (like the birth date and the payment data). More...

#include <llfloateravatarlist.h>

Collaboration diagram for LLAvatarListEntry:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLAvatarListEntry (const LLUUID &id=LLUUID::null, const LLString &name="", const LLVector3d &position=LLVector3d::zero, BOOL isLinden=FALSE)
 Initializes a list entry.
void setPosition (LLVector3d position)
LLVector3d getPosition ()
U32 getEntryAgeFrames ()
 Returns the age of this entry in frames.
F32 getEntryAgeSeconds ()
 Returns the age of this entry in seconds.
LLString getName ()
 Returns the name of the avatar.
void setName (LLString name)
LLUUID getID ()
void setID (LLUUID id)
BOOL getIsLinden ()
 Whether the avatar is a Linden.
void setAccountCustomTitle (LLString &title)
 Sets a custom title for the account.
LLString getAccountCustomTitle ()
 Gets the custom title for the account.
void setActivity (ACTIVITY_TYPE activity)
 Sets the activity type for this avatar.
ACTIVITY_TYPE getActivity ()
 Returns the activity type.
void setFocus (BOOL value)
 Sets the 'focus' status on this entry (camera focused on this avatar).
BOOL isFocused ()
BOOL isMarked ()
BOOL isDead ()
 Returns whether the item is dead and shouldn't appear in the list.
void toggleMark ()

Private Attributes

LLUUID mID
LLString mName
LLVector3d mPosition
BOOL mMarked
BOOL mFocused
BOOL mIsLinden
ACTIVITY_TYPE mActivityType
LLString mAccountTitle
LLAvatarListDatum< LLAvListTrustNetScoremTrustNetScore
LLAvatarListDatum< LLAvatarInfomAvatarInfo
LLAvatarListDatum< LLMiscDBInfomMiscInfo
LLTimer mUpdateTimer
 Timer to keep track of whether avatars are still there.
LLTimer mActivityTimer
 Timer for avatar activities.
U32 mFrame
 Last frame when this avatar was updated.

Friends

class LLFloaterAvatarList

Detailed Description

This class is used to hold data about avatars. We cache data about avatars to avoid repeating requests in this class. Instances are kept in a map<LLAvatarListEntry>. We keep track of the frame where the avatar was last seen. Avatars that are old enough are not added to the visible list, but still kept around to cache the account info data (like the birth date and the payment data).

Definition at line 353 of file llfloateravatarlist.h.


Constructor & Destructor Documentation

LLAvatarListEntry::LLAvatarListEntry ( const LLUUID id = LLUUID::null,
const LLString name = "",
const LLVector3d position = LLVector3d::zero,
BOOL  isLinden = FALSE 
) [inline]

Initializes a list entry.

Parameters:
id Avatar's key
name Avatar's name
position Avatar's current position
isLinden TRUE if the avatar is a Linden

Definition at line 364 of file llfloateravatarlist.h.

References f, gFrameCount, mFrame, mTrustNetScore, LLAvatarListDatum< T >::setMaxPending(), and LLAvatarListDatum< T >::setRequestDelay().


Member Function Documentation

LLString LLAvatarListEntry::getAccountCustomTitle (  ) 

Gets the custom title for the account.

Definition at line 189 of file llfloateravatarlist.cpp.

References mAccountTitle.

ACTIVITY_TYPE LLAvatarListEntry::getActivity (  ) 

Returns the activity type.

Definition at line 205 of file llfloateravatarlist.cpp.

References ACTIVITY_NONE, ACTIVITY_TIMEOUT, LLTimer::getElapsedTimeF32(), mActivityTimer, and mActivityType.

Referenced by LLFloaterAvatarList::refreshAvatarList().

U32 LLAvatarListEntry::getEntryAgeFrames (  ) 

Returns the age of this entry in frames.

This is only used for determining whether the avatar is still around.

See also:
getEntryAgeSeconds

Definition at line 138 of file llfloateravatarlist.cpp.

References gFrameCount, and mFrame.

F32 LLAvatarListEntry::getEntryAgeSeconds (  ) 

Returns the age of this entry in seconds.

Definition at line 143 of file llfloateravatarlist.cpp.

References LLTimer::getElapsedTimeF32(), and mUpdateTimer.

Referenced by isDead().

LLUUID LLAvatarListEntry::getID (  ) 

Definition at line 162 of file llfloateravatarlist.cpp.

References mID.

Referenced by LLFloaterAvatarList::focusOnNext(), LLFloaterAvatarList::focusOnPrev(), LLFloaterAvatarList::luskwoodCommand(), LLFloaterAvatarList::onClickTrustNetExplain(), and LLFloaterAvatarList::refreshAvatarList().

BOOL LLAvatarListEntry::getIsLinden (  ) 

Whether the avatar is a Linden.

Definition at line 176 of file llfloateravatarlist.cpp.

References LLAvatarInfo::Account, ACCOUNT_EMPLOYEE, LLAvatarListDatum< T >::getValue(), mAvatarInfo, and mIsLinden.

Referenced by LLFloaterAvatarList::refreshAvatarList().

LLString LLAvatarListEntry::getName (  ) 

Returns the name of the avatar.

Definition at line 157 of file llfloateravatarlist.cpp.

References mName.

Referenced by LLFloaterAvatarList::getSelectedNames(), LLFloaterAvatarList::luskwoodCommand(), LLFloaterAvatarList::onClickTeleport(), LLFloaterAvatarList::onClickTrustNetExplain(), and LLFloaterAvatarList::refreshAvatarList().

LLVector3d LLAvatarListEntry::getPosition (  ) 

Definition at line 133 of file llfloateravatarlist.cpp.

References mPosition.

Referenced by LLFloaterAvatarList::onClickTeleport(), and LLFloaterAvatarList::refreshAvatarList().

BOOL LLAvatarListEntry::isDead (  ) 

Returns whether the item is dead and shouldn't appear in the list.

Returns:
TRUE if dead

Definition at line 225 of file llfloateravatarlist.cpp.

References DEAD_KEEP_TIME, and getEntryAgeSeconds().

Referenced by LLFloaterAvatarList::focusOnNext(), LLFloaterAvatarList::focusOnPrev(), and LLFloaterAvatarList::refreshAvatarList().

BOOL LLAvatarListEntry::isFocused (  )  [inline]

Definition at line 439 of file llfloateravatarlist.h.

References mFocused.

Referenced by LLFloaterAvatarList::refreshAvatarList().

BOOL LLAvatarListEntry::isMarked (  ) 

Definition at line 220 of file llfloateravatarlist.cpp.

References mMarked.

Referenced by LLFloaterAvatarList::focusOnNext(), LLFloaterAvatarList::focusOnPrev(), and LLFloaterAvatarList::refreshAvatarList().

void LLAvatarListEntry::setAccountCustomTitle ( LLString title  ) 

Sets a custom title for the account.

Note:
Changes account type to ACCOUNT_CUSTOM

Definition at line 183 of file llfloateravatarlist.cpp.

References LLAvatarInfo::Account, ACCOUNT_CUSTOM, LLAvatarListDatum< T >::getValue(), mAccountTitle, and mAvatarInfo.

Referenced by LLFloaterAvatarList::processAvatarPropertiesReply().

void LLAvatarListEntry::setActivity ( ACTIVITY_TYPE  activity  ) 

Sets the activity type for this avatar.

Has no effect if the specified type is lower priority than the current one.

Definition at line 196 of file llfloateravatarlist.cpp.

References ACTIVITY_TIMEOUT, LLTimer::getElapsedTimeF32(), mActivityTimer, mActivityType, and LLTimer::start().

Referenced by addParticleSourcesToList(), LLPipeline::postSort(), setPosition(), and LLAgent::startTyping().

void LLAvatarListEntry::setFocus ( BOOL  value  )  [inline]

Sets the 'focus' status on this entry (camera focused on this avatar).

Definition at line 437 of file llfloateravatarlist.h.

References mFocused.

Referenced by LLFloaterAvatarList::focusOnNext(), and LLFloaterAvatarList::focusOnPrev().

void LLAvatarListEntry::setID ( LLUUID  id  ) 

Definition at line 167 of file llfloateravatarlist.cpp.

References llendl, llwarns, and mID.

void LLAvatarListEntry::setName ( LLString  name  ) 

Definition at line 148 of file llfloateravatarlist.cpp.

References llendl, llwarns, and mName.

void LLAvatarListEntry::setPosition ( LLVector3d  position  ) 

Update world position. Affects age.

Definition at line 121 of file llfloateravatarlist.cpp.

References ACTIVITY_MOVING, gFrameCount, mFrame, mPosition, mUpdateTimer, setActivity(), and LLTimer::start().

void LLAvatarListEntry::toggleMark (  ) 

Definition at line 215 of file llfloateravatarlist.cpp.

References mMarked.

Referenced by LLFloaterAvatarList::onClickMark().


Friends And Related Function Documentation

friend class LLFloaterAvatarList [friend]

Definition at line 452 of file llfloateravatarlist.h.


Member Data Documentation

LLString LLAvatarListEntry::mAccountTitle [private]

Definition at line 463 of file llfloateravatarlist.h.

Referenced by getAccountCustomTitle(), and setAccountCustomTitle().

LLTimer LLAvatarListEntry::mActivityTimer [private]

Timer for avatar activities.

Definition at line 477 of file llfloateravatarlist.h.

Referenced by getActivity(), and setActivity().

ACTIVITY_TYPE LLAvatarListEntry::mActivityType [private]

Definition at line 461 of file llfloateravatarlist.h.

Referenced by getActivity(), and setActivity().

LLAvatarListDatum<LLAvatarInfo> LLAvatarListEntry::mAvatarInfo [private]

Definition at line 466 of file llfloateravatarlist.h.

Referenced by LLFloaterAvatarList::getAvatarColor(), getIsLinden(), LLFloaterAvatarList::processAvatarPropertiesReply(), LLFloaterAvatarList::refreshAvatarList(), and setAccountCustomTitle().

BOOL LLAvatarListEntry::mFocused [private]

Definition at line 458 of file llfloateravatarlist.h.

Referenced by isFocused(), and setFocus().

U32 LLAvatarListEntry::mFrame [private]

Last frame when this avatar was updated.

Definition at line 482 of file llfloateravatarlist.h.

Referenced by getEntryAgeFrames(), LLAvatarListEntry(), and setPosition().

LLUUID LLAvatarListEntry::mID [private]

Definition at line 454 of file llfloateravatarlist.h.

Referenced by getID(), and setID().

BOOL LLAvatarListEntry::mIsLinden [private]

Definition at line 459 of file llfloateravatarlist.h.

Referenced by getIsLinden().

BOOL LLAvatarListEntry::mMarked [private]

Definition at line 457 of file llfloateravatarlist.h.

Referenced by isMarked(), and toggleMark().

LLAvatarListDatum<LLMiscDBInfo> LLAvatarListEntry::mMiscInfo [private]

Definition at line 467 of file llfloateravatarlist.h.

Referenced by LLFloaterAvatarList::refreshAvatarList().

LLString LLAvatarListEntry::mName [private]

Definition at line 455 of file llfloateravatarlist.h.

Referenced by getName(), and setName().

LLVector3d LLAvatarListEntry::mPosition [private]

Definition at line 456 of file llfloateravatarlist.h.

Referenced by getPosition(), and setPosition().

LLAvatarListDatum<LLAvListTrustNetScore> LLAvatarListEntry::mTrustNetScore [private]

Definition at line 465 of file llfloateravatarlist.h.

Referenced by LLFloaterAvatarList::getAvatarColor(), LLAvatarListEntry(), LLFloaterAvatarList::processTrustNetReply(), and LLFloaterAvatarList::refreshAvatarList().

LLTimer LLAvatarListEntry::mUpdateTimer [private]

Timer to keep track of whether avatars are still there.

Definition at line 472 of file llfloateravatarlist.h.

Referenced by getEntryAgeSeconds(), and setPosition().


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