Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

Avatar Class Reference

MetaObject implementing Avatar Object Type. More...

#include <avatar.hh>

Inheritance diagram for Avatar:

MetaObject Avatar3D LocalAvatar RemoteAvatar List of all members.

Public Member Functions

Access Subobjects

Static Public Member Functions

Static Public Attributes

Presence Codes
This is a simple schema, that mirrors the four presence codes in the Jabber IM system.

In the future there may be more. If you think something should be added, let us know.

Protected Attributes


Detailed Description

MetaObject implementing Avatar Object Type.

Indicates that this object represents a human or automated agent. This object is the manifestation and representative of the human user or automated agent in the virtual world. In a 3D environment, will usually be used with an 3dobject.* type (such as 3dobject.model).

Definition at line 43 of file avatar.hh.


Constructor & Destructor Documentation

Avatar::Avatar MetaObject superobject  ) 
 

Constructor.

Definition at line 30 of file avatar.cc.


Member Function Documentation

void Avatar::addInfoListener PropertyListener listener  ) 
 

Add PropertyListener to avatar:info property.

Definition at line 285 of file avatar.cc.

void Avatar::addNickListener PropertyListener listener  ) 
 

Add a PropertyListener to the avatar:nick property.

Definition at line 102 of file avatar.cc.

void Avatar::addPresenceListener PropertyListener listener  ) 
 

Add a PropertyListener to the avatar:presence_code property.

Definition at line 357 of file avatar.cc.

string Avatar::getFullname  ) 
 

Get the value of avatar:fullname property (A text string containing the full name of the user or agent.).

Definition at line 116 of file avatar.cc.

string Avatar::getFullnameDatatype  ) 
 

Get the datatype of avatar:fullname property.

Definition at line 130 of file avatar.cc.

Property * Avatar::getFullnameObj  ) 
 

Get the fullname Property object.

Definition at line 150 of file avatar.cc.

string Avatar::getInfo  ) 
 

Get the value of avatar:info property.

This is for More information about the user or agent, for example a FOAF document, a picture, a short biographical text, a URL to a web page or email address, or whatever. (Use the datatype of the property to distinguish; I recommend checking out FOAF)

Todo:
support multiple "info" properties.

Definition at line 218 of file avatar.cc.

string Avatar::getInfoDatatype  ) 
 

Get the datatype of avatar:info property.

Definition at line 232 of file avatar.cc.

Property * Avatar::getInfoObj  ) 
 

Get info Property object.

Definition at line 272 of file avatar.cc.

string Avatar::getNick  ) 
 

Get the value of avatar:nick property (A text string containing a short name that can be used to identify this avatar.

If this property is omitted, the object's contextual name may be used.).

Definition at line 69 of file avatar.cc.

Referenced by VOSChatGUI::PrivMsg::notifyChildInserted(), and VOSChatGUI::PrivMsg::notifyTalkMessage().

Property * Avatar::getNickObj  ) 
 

Get Property object for nick.

Definition at line 89 of file avatar.cc.

unsigned short Avatar::getPresence  ) 
 

Get a numeric code that represents the value of avatar:presence_code property (A text string indicating the presence/status/availability of the user or agent.) The returned value will match one of the constants Avatar::AVAILABLE Avatar::AWAY, Avatar::EXTENDEDAWAY, or Avatar::BUSY.

Definition at line 299 of file avatar.cc.

string Avatar::getPresenceDescription  ) 
 

Get the value of avatar:presence_description property (Text describing the presence/status/availability of the user or agent in a more free-form manner (e.g.

"Went to find more coffee. Back in a bit.")).

Definition at line 369 of file avatar.cc.

string Avatar::getPresenceDescriptionDatatype  ) 
 

Get the datatype of avatar:presence_description property.

Definition at line 381 of file avatar.cc.

Property * Avatar::getPresenceDescriptionObj  ) 
 

Get info Property object.

Definition at line 400 of file avatar.cc.

Property * Avatar::getPresenceObj  ) 
 

Get info Property object.

Definition at line 344 of file avatar.cc.

PropertyAccessControl * Avatar::getPropertyAccessControl  ) 
 

Get property access control policy.

Definition at line 455 of file avatar.cc.

Hypercard * Avatar::getSelectedHypercard  ) 
 

Get "selected" hypercard.

Definition at line 204 of file avatar.cc.

Referenced by getSelectedObj().

Vobject * Avatar::getSelectedObj  ) 
 

Get "selected" object.

Definition at line 214 of file avatar.cc.

const string Avatar::getType  ) 
 

Return type string ("avatar").

Reimplemented in Avatar3D.

Definition at line 48 of file avatar.cc.

string Avatar::getUserId  ) 
 

Get the user identifier (typically "user@host")

Exceptions:
sNoSuchObjectError No user-id property exitst
bad_cast user-id subobject is not a Property.

Definition at line 258 of file avatar.cc.

void Avatar::initialize  )  [virtual]
 

Initialize.

Definition at line 446 of file avatar.cc.

void Avatar::registerExtenders  )  [static]
 

Register Extenders.

Reimplemented in Avatar3D.

Definition at line 53 of file avatar.cc.

void Avatar::removeInfoListener PropertyListener listener  ) 
 

Remove a PropertyListener from avatar:info property.

Definition at line 292 of file avatar.cc.

void Avatar::removeNickListener PropertyListener listener  ) 
 

Remove a PropertyListener from the avatar:nick property.

Definition at line 109 of file avatar.cc.

void Avatar::removePresenceListener PropertyListener listener  ) 
 

Remove a PropertyListener from the avatar:presence_code property.

Definition at line 363 of file avatar.cc.

void Avatar::setFullname const string &  value,
const string &  datatype = "?",
PropertyAccessControl pac = 0
 

Set avatar:fullname property.

Parameters:
value The new value
datatype The new datatype: if omitted, then the existing datatype will be preserved.
pac Property access control to set o the property. The previously set default will be used if pac is omitted or 0.

Definition at line 144 of file avatar.cc.

void Avatar::setFullnameObj Property obj  ) 
 

Set the fullname object.

Definition at line 154 of file avatar.cc.

void Avatar::setInfo const string &  value,
const string &  datatype = "?",
PropertyAccessControl pac = 0
 

Set avatar:info property.

Parameters:
value The new value
datatype The new datatype: if omitted, then the existing datatype will be preserved.

Definition at line 246 of file avatar.cc.

void Avatar::setInfoObj Property obj  ) 
 

Set info Property object.

Definition at line 276 of file avatar.cc.

void Avatar::setNick const string &  value,
PropertyAccessControl pac = 0
 

Set avatar:nick property.

Parameters:
value The new value. Should be a short string of plain text.

Definition at line 83 of file avatar.cc.

void Avatar::setNickObj Property obj  ) 
 

Set Property object for nick.

Definition at line 93 of file avatar.cc.

void Avatar::setPresence unsigned short  code,
PropertyAccessControl pac = 0
 

Set avatar:presence_code property according to the parameter code.

Parameters:
code The new numeric code. See above for list of constants.

Definition at line 321 of file avatar.cc.

void Avatar::setPresenceDescription const string &  value,
const string &  datatype = "?",
PropertyAccessControl pac = 0
 

Set avatar:presence_description property.

Parameters:
value The new value
datatype The new datatype: if omitted, then the existing datatype will be preserved.

Definition at line 392 of file avatar.cc.

void Avatar::setPresenceDescriptionObj Property obj  ) 
 

Set info Property object.

Definition at line 404 of file avatar.cc.

void Avatar::setPresenceObj Property obj  ) 
 

Set info Property object.

Definition at line 348 of file avatar.cc.

void Avatar::setPropertyAccessControl PropertyAccessControl pac  ) 
 

Set access control policy for subobjects.

Definition at line 450 of file avatar.cc.

Referenced by initialize().

void Avatar::setSelectedHypercard Hypercard hc  ) 
 

Set "selected" hypercard.

Definition at line 194 of file avatar.cc.

void Avatar::setSelectedObj Vobject *  obj  ) 
 

Set "selected" object.

If 'obj' is 0, then any existing object is removed. Otherwise: If there is no "misc:selected-object" child, then a new Hypercard will be created linking to 'obj' and added. If such a child does exist and is a hypercard, then its link will be replaced with obj.

Definition at line 163 of file avatar.cc.

void Avatar::setUserId const string &  userid,
PropertyAccessControl pac = 0
 

Set the user identifier (typically "user@host").

Definition at line 252 of file avatar.cc.


Member Data Documentation

const unsigned short Avatar::AVAILABLE = 0 [static]
 

for "chat"

Definition at line 23 of file avatar.cc.

Referenced by getPresence(), and setPresence().

const unsigned short Avatar::AWAY = 1 [static]
 

for "away"

Definition at line 24 of file avatar.cc.

Referenced by getPresence(), and setPresence().

const unsigned short Avatar::BUSY = 3 [static]
 

for "dnd"

Definition at line 26 of file avatar.cc.

Referenced by getPresence(), and setPresence().

PropertyAccessControl* Avatar::defaultAccessControl [protected]
 

Definition at line 46 of file avatar.hh.

Referenced by Avatar(), getPropertyAccessControl(), setFullname(), setInfo(), setNick(), Avatar3D::setNullPointerPosition(), Avatar3D::setPointerPosition(), setPresence(), setPresenceDescription(), setPropertyAccessControl(), and setUserId().

const unsigned short Avatar::EXTENDEDAWAY = 2 [static]
 

for "xa"

Definition at line 25 of file avatar.cc.

Referenced by getPresence(), and setPresence().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:52 2003 for Interreality Project - VOS by doxygen 1.3.2