VOS::Avatar Class Reference
[libmetaobject_misc]
#include <vos/metaobjects/misc/avatar.hh>
Inheritance diagram for VOS::Avatar:
Detailed Description
Indicates that this object represents a human or automated agent.It is the representative of the human user or automated agent. In a 3D environment, will usually be used with an A3DL::Object3D type (such as A3DL::Model) It will also often be used with a Talkative metaobject.
Definition at line 42 of file avatar.hh.
Public Member Functions
- Avatar (VobjectBase *superobject)
- const std::string getVOSType ()
- std::string getNick ()
- VUtil::vRef< Property > getNickObj ()
- Get Property object for nick.
- Get Property object for nick.
- void setNickObj (Property *obj)
- Set Property object for nick.
- Set Property object for nick.
- void setNick (const std::string &value)
- void addNickListener (PropertyListener *listener)
- Add a PropertyListener to the misc:nick property.
- Add a PropertyListener to the misc:nick property.
- void removeNickListener (PropertyListener *listener)
- Remove a PropertyListener from the misc:nick property.
- Remove a PropertyListener from the misc:nick property.
- std::string getFullname ()
- std::string getFullnameDatatype ()
- void setFullname (const std::string &value, const std::string &datatype="?")
- VUtil::vRef< Property > getFullnameObj ()
- Get the fullname Property object.
- Get the fullname Property object.
- void setFullnameObj (Property *obj)
- std::string getInfo ()
- std::string getInfoDatatype ()
- void setInfo (const std::string &value, const std::string &datatype="?")
- VUtil::vRef< Property > getInfoObj ()
- Get info Property object.
- Get info Property object.
- void setInfoObj (Property *obj)
- Set info Property object.
- Set info Property object.
- void addInfoListener (PropertyListener *listener)
- Add PropertyListener to misc:info property.
- Add PropertyListener to misc:info property.
- void removeInfoListener (PropertyListener *listener)
- Remove a PropertyListener from misc:info property.
- Remove a PropertyListener from misc:info property.
- void setUserId (const std::string &userid)
- std::string getUserId ()
- unsigned short getPresence ()
- void setPresence (unsigned short code)
- VUtil::vRef< Property > getPresenceObj ()
- Get info Property object.
- Get info Property object.
- void setPresenceObj (Property *obj)
- Set info Property object.
- Set info Property object.
- void addPresenceListener (PropertyListener *listener)
- Add a PropertyListener to the misc:presence_code property.
- Add a PropertyListener to the misc:presence_code property.
- void removePresenceListener (PropertyListener *listener)
- Remove a PropertyListener from the misc:presence_code property.
- Remove a PropertyListener from the misc:presence_code property.
- std::string getPresenceDescription ()
- std::string getPresenceDescriptionDatatype ()
- void setPresenceDescription (const std::string &value, const std::string &datatype="?")
- VUtil::vRef< Property > getPresenceDescriptionObj ()
- Get info Property object.
- Get info Property object.
- void setPresenceDescriptionObj (Property *obj)
- Set info Property object.
- Set info Property object.
- void setSelectedObj (Vobject *obj)
- VUtil::vRef< Vobject > getSelectedObj ()
- VUtil::vRef< Hypercard > getSelectedHypercard ()
- void setSelectedHypercard (Hypercard *hc)
- void setLocalTimezone (int tz)
- int getLocalTimezone ()
Static Public Member Functions
- static MetaObject * new_Avatar (VobjectBase *s, const std::string &t)
Static Public Attributes
- static const unsigned short AVAILABLE
- static const unsigned short AWAY
- static const unsigned short EXTENDEDAWAY
- static const unsigned short BUSY
Constructor & Destructor Documentation
| VOS::Avatar::Avatar | ( | VobjectBase * | superobject | ) |
For internal use only.
Member Function Documentation
| void VOS::Avatar::addInfoListener | ( | PropertyListener * | listener | ) |
Add PropertyListener to misc:info property.
| void VOS::Avatar::addNickListener | ( | PropertyListener * | listener | ) |
Add a PropertyListener to the misc:nick property.
| void VOS::Avatar::addPresenceListener | ( | PropertyListener * | listener | ) |
Add a PropertyListener to the misc:presence_code property.
| std::string VOS::Avatar::getFullname | ( | ) |
Get the value of misc:fullname property (A text string containing the full name of the user or agent.
).
| std::string VOS::Avatar::getFullnameDatatype | ( | ) |
Get the datatype of misc:fullname property.
| VUtil::vRef<Property> VOS::Avatar::getFullnameObj | ( | ) |
Get the fullname Property object.
| std::string VOS::Avatar::getInfo | ( | ) |
Get the value of misc: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.
| std::string VOS::Avatar::getInfoDatatype | ( | ) |
Get the datatype of misc:info property.
| VUtil::vRef<Property> VOS::Avatar::getInfoObj | ( | ) |
Get info Property object.
| int VOS::Avatar::getLocalTimezone | ( | ) |
| std::string VOS::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.).
| VUtil::vRef<Property> VOS::Avatar::getNickObj | ( | ) |
Get Property object for nick.
| unsigned short VOS::Avatar::getPresence | ( | ) |
Get a numeric code that represents the value of misc:presence_code property (A text std::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.
| std::string VOS::Avatar::getPresenceDescription | ( | ) |
Get the value of misc: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.")).
| std::string VOS::Avatar::getPresenceDescriptionDatatype | ( | ) |
Get the datatype of misc:presence_description property.
| VUtil::vRef<Property> VOS::Avatar::getPresenceDescriptionObj | ( | ) |
Get info Property object.
| VUtil::vRef<Property> VOS::Avatar::getPresenceObj | ( | ) |
Get info Property object.
| VUtil::vRef<Hypercard> VOS::Avatar::getSelectedHypercard | ( | ) |
| VUtil::vRef<Vobject> VOS::Avatar::getSelectedObj | ( | ) |
| std::string VOS::Avatar::getUserId | ( | ) |
Get the user identifier (typically "user@host") This can be used by specialized applications to work with other external programs in a Unix or Unix-like network.
Basically not generally useful for much and will rarely be used :)
- Exceptions:
-
NoSuchObjectError No user-id property exitst bad_cast user-id subobject is not a Property.
| const std::string VOS::Avatar::getVOSType | ( | ) | [virtual] |
| static MetaObject* VOS::Avatar::new_Avatar | ( | VobjectBase * | s, | |
| const std::string & | t | |||
| ) | [static] |
For internal use only.
| void VOS::Avatar::removeInfoListener | ( | PropertyListener * | listener | ) |
Remove a PropertyListener from misc:info property.
| void VOS::Avatar::removeNickListener | ( | PropertyListener * | listener | ) |
Remove a PropertyListener from the misc:nick property.
| void VOS::Avatar::removePresenceListener | ( | PropertyListener * | listener | ) |
Remove a PropertyListener from the misc:presence_code property.
| void VOS::Avatar::setFullname | ( | const std::string & | value, | |
| const std::string & | datatype = "?" | |||
| ) |
Set misc:fullname property.
- Parameters:
-
value The new value datatype The new datatype: if omitted, then the existing datatype will be preserved
| void VOS::Avatar::setFullnameObj | ( | Property * | obj | ) |
Set the fullname object.
| void VOS::Avatar::setInfo | ( | const std::string & | value, | |
| const std::string & | datatype = "?" | |||
| ) |
Set misc:info property.
- Parameters:
-
value The new value datatype The new datatype: if omitted, then the existing datatype will be preserved.
| void VOS::Avatar::setLocalTimezone | ( | int | tz | ) |
Set this user's local timezone's offset from GMT (UTC).
E.g. if you are in GMT use 0. If you are in US Eastern standard without daylight savings, use -5, etc.
| void VOS::Avatar::setNick | ( | const std::string & | value | ) |
Set misc:nick property.
- Parameters:
-
value The new value. Should be a short string of plain text.
| void VOS::Avatar::setPresence | ( | unsigned short | code | ) |
Set misc:presence_code property according to the parameter code.
- Parameters:
-
code The new numeric code. See above for list of constants.
| void VOS::Avatar::setPresenceDescription | ( | const std::string & | value, | |
| const std::string & | datatype = "?" | |||
| ) |
Set misc:presence_description property.
- Parameters:
-
value The new value datatype The new datatype: if omitted, then the existing datatype will be preserved.
| void VOS::Avatar::setSelectedHypercard | ( | Hypercard * | hc | ) |
| void VOS::Avatar::setSelectedObj | ( | Vobject * | obj | ) |
Set object currently "selected" by this avatar.
This can be used as a pointer or indicator to an object of interest, which can therefore be used by other users or applications.
- Parameters:
-
obj The selected object. If 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.
| void VOS::Avatar::setUserId | ( | const std::string & | userid | ) |
Set the user identifier (typically "user@host").
This can be used by specialized applications to work with other external programs in a Unix or Unix-like network. Basically not generally useful for much and will rarely be used.
Member Data Documentation
const unsigned short VOS::Avatar::AVAILABLE [static] |
const unsigned short VOS::Avatar::AWAY [static] |
const unsigned short VOS::Avatar::BUSY [static] |
const unsigned short VOS::Avatar::EXTENDEDAWAY [static] |
The documentation for this class was generated from the following file:
- /home/tetron/hack/vos/libs/vos/metaobjects/misc/avatar.hh