![]() |
Scene Fusion 2 API Reference
|
#include <sfSession.h>
Public Types | |
typedef std::shared_ptr< sfSession > | SPtr |
typedef std::function< void(sfObject::SPtr objPtr, int childIndex)> | CreateHandler |
typedef std::function< void(sfObject::SPtr objPtr)> | DeleteHandler |
typedef std::function< void(sfObject::SPtr objPtr)> | ConfirmDeleteHandler |
typedef std::function< void(sfObject::SPtr objPtr)> | LockHandler |
typedef std::function< void(sfObject::SPtr objPtr)> | UnlockHandler |
typedef std::function< void(sfObject::SPtr objPtr)> | LockOwnerChangeHandler |
typedef std::function< void(sfObject::SPtr objPtr)> | DirectLockChangeHandler |
typedef std::function< void(sfDictionaryProperty::SPtr dictPtr, const sfName &key)> | DictionaryRemoveHandler |
typedef std::function< void(sfObject::SPtr objPtr, int childIndex)> | ParentChangeHandler |
typedef std::function< void(sfProperty::SPtr propertyPtr)> | PropertyChangeHandler |
typedef std::function< void(sfListProperty::SPtr listPtr, int index, int count)> | ListAddHandler |
typedef std::function< void(sfListProperty::SPtr listPtr, int index, int count)> | ListRemoveHandler |
typedef std::function< void(sfUser::SPtr userPtr)> | UserJoinHandler |
typedef std::function< void(sfUser::SPtr userPtr)> | UserLeaveHandler |
typedef std::function< void(sfUser::SPtr userPtr)> | UserColorChangeHandler |
typedef std::function< void(bool, sfObject::SPtr objPtr)> | AcknowledgeSubscriptionHandler |
typedef ksEvent< sfObject::SPtr & >::SPtr | ObjectEventHandle |
typedef ksEvent< sfObject::SPtr &, int & >::SPtr | ObjectIndexEventHandle |
typedef ksEvent< sfUser::SPtr & >::SPtr | UserEventHandle |
typedef ksEvent< sfProperty::SPtr & >::SPtr | PropertyEventHandle |
typedef ksEvent< sfListProperty::SPtr &, int &, int & >::SPtr | ListPropertyEventHandle |
typedef ksEvent< sfDictionaryProperty::SPtr &, sfName & >::SPtr | DictionaryPropertyEventHandle |
typedef ksEvent< bool &, sfObject::SPtr & >::SPtr | AcknowledgeSubscriptionEventHandle |
Provides functions for accessing and manipulating synced objects and session data for a Scene Fusion session.
typedef ksEvent<bool&, sfObject::SPtr&>::SPtr KS::SceneFusion2::sfSession::AcknowledgeSubscriptionEventHandle |
Acknowledge subscription event.
bool& | isSubscription - if true, it was subscription. Otherwise, it was unsubscription. |
sfObject::SPtr& | - object |
typedef std::function<void(bool, sfObject::SPtr objPtr)> KS::SceneFusion2::sfSession::AcknowledgeSubscriptionHandler |
Acknowledge subscription event handler.
bool | isSubscription - if true, it was subscription. Otherwise, it was unsubscription. |
sfObject::SPtr | - parent of children that the user subscribed to |
typedef std::function<void(sfObject::SPtr objPtr)> KS::SceneFusion2::sfSession::ConfirmDeleteHandler |
Confirm delete event handler.
sfObject::SPtr | - object whose deletion was confirmed. |
typedef std::function<void(sfObject::SPtr objPtr, int childIndex)> KS::SceneFusion2::sfSession::CreateHandler |
Create event handler.
sfObject::SPtr | - object that was created. |
int | - child index the object was inserted at. -1 if this is a root object. |
typedef std::function<void(sfObject::SPtr objPtr)> KS::SceneFusion2::sfSession::DeleteHandler |
Delete event handler.
sfObject::SPtr | - object that was deleted. |
typedef ksEvent<sfDictionaryProperty::SPtr&, sfName&>::SPtr KS::SceneFusion2::sfSession::DictionaryPropertyEventHandle |
Dictionary property event.
sfDictionaryProperty::SPtr& | - property |
sfName& | - key of the modified property |
typedef std::function<void(sfDictionaryProperty::SPtr dictPtr, const sfName& key)> KS::SceneFusion2::sfSession::DictionaryRemoveHandler |
Remove handler for a dictionary property.
sfDictionaryProperty::SPtr | - dict the field was removed from. |
const | sfName& - key of removed field. |
typedef std::function<void(sfObject::SPtr objPtr)> KS::SceneFusion2::sfSession::DirectLockChangeHandler |
Direct lock change event handler.
sfObject::SPtr | - object whose direct lock owner changed. |
typedef std::function<void(sfListProperty::SPtr listPtr, int index, int count)> KS::SceneFusion2::sfSession::ListAddHandler |
List add event handler.
sfListProperty::SPtr | - list that elements were added to. |
int | - index elements were inserted at. |
int | - count - number of elements added. |
typedef ksEvent<sfListProperty::SPtr&, int&, int&>::SPtr KS::SceneFusion2::sfSession::ListPropertyEventHandle |
List property event.
sfListProperty::SPtr& | - property |
int& | - index of the first modified property |
int& | - number of modified properties |
typedef std::function<void(sfListProperty::SPtr listPtr, int index, int count)> KS::SceneFusion2::sfSession::ListRemoveHandler |
List remove event handler.
sfListProperty::SPtr | - list that elements were removed from. |
int | - index elements were removed from. |
int | - count - number of elements removed. |
typedef std::function<void(sfObject::SPtr objPtr)> KS::SceneFusion2::sfSession::LockHandler |
Lock event handler.
sfObject::SPtr | - object that became locked. |
typedef std::function<void(sfObject::SPtr objPtr)> KS::SceneFusion2::sfSession::LockOwnerChangeHandler |
Lock owner change event handler.
sfObject::SPtr | - object whose lock owner changed. |
typedef ksEvent<sfObject::SPtr&>::SPtr KS::SceneFusion2::sfSession::ObjectEventHandle |
Object event.
sfObject::SPtr& | - object |
typedef ksEvent<sfObject::SPtr&, int&>::SPtr KS::SceneFusion2::sfSession::ObjectIndexEventHandle |
Object event that affected index in parent.
sfObject::SPtr& | - object |
sfListProperty::SPtr& | - index of object in its parent |
typedef std::function<void(sfObject::SPtr objPtr, int childIndex)> KS::SceneFusion2::sfSession::ParentChangeHandler |
Parent change event handler.
sfObject::SPtr | - object whose parent changed. |
int | - childIndex of the object. -1 if the object has no parent. |
typedef std::function<void(sfProperty::SPtr propertyPtr)> KS::SceneFusion2::sfSession::PropertyChangeHandler |
Property change event handler.
sfProperty::SPtr | - property that changed. |
typedef ksEvent<sfProperty::SPtr&>::SPtr KS::SceneFusion2::sfSession::PropertyEventHandle |
Property event.
sfListProperty::SPtr& | - property |
typedef std::function<void(sfObject::SPtr objPtr)> KS::SceneFusion2::sfSession::UnlockHandler |
Unlock event handler.
sfObject::SPtr | - object that became unlocked. |
typedef std::function<void(sfUser::SPtr userPtr)> KS::SceneFusion2::sfSession::UserColorChangeHandler |
User color change event handler.
sfUser::SPtr | - user whose color changed. |
typedef ksEvent<sfUser::SPtr&>::SPtr KS::SceneFusion2::sfSession::UserEventHandle |
User event.
sfUser::SPtr& | - user |
typedef std::function<void(sfUser::SPtr userPtr)> KS::SceneFusion2::sfSession::UserJoinHandler |
User join event handler.
sfUser::SPtr | - user who joined the session. |
typedef std::function<void(sfUser::SPtr userPtr)> KS::SceneFusion2::sfSession::UserLeaveHandler |
User leave event handler.
sfUser::SPtr | - user who left the session. |
|
inlinevirtual |
Destructor
|
pure virtual |
Sends a create request for an object and its descendants, and puts them in the syncing state. Does nothing if the object is already synced or locked, or not a root object.
sfObject::SPtr | - object to create. |
|
pure virtual |
Sends a create request for an object and its descendants, puts them in the syncing state, and inserts the object as a child of a syncing parent. Does nothing if the object is already synced or locked, or not a root object.
sfObject::SPtr | - object to create. |
sfObject::SPtr | - parent to add obj to. Must be syncing. |
int | - child index to insert obj at. |
|
pure virtual |
Sends a create request for a list of objects and their descendants, and puts them in the syncing state. Does not create objects that are already synced or locked, or not root objects. Objects that are not created will be set to null pointers.
std::list<sfObject::SPtr>& | - objects to create. |
|
pure virtual |
Sends a create request for a list of objects and their descendants, puts them in the syncing state, and inserts them as children of a syncing parent. Does not create objects that are already synced or locked, or not root objects. Objects that are not created will be set to null pointers.
std::list<sfObject::SPtr>& | - objects to create. |
sfObject::SPtr | - parent to add obj to. Must be syncing. |
int | - child index to insert objects at. |
|
pure virtual |
Deletes an object and its descendants from the server and stops syncing it.
sfObject::SPtr | - object to delete. |
|
pure virtual |
If returns true, the local user cannot edit objects in this session. This is true while applying edits from other users.
|
pure virtual |
Gets an object by id.
uint32_t | - id of object to get. |
|
pure virtual |
Gets the number of objects of the given type, not including objects whose creation is pending.
const | sfName& type |
|
pure virtual |
Gets the maximum number of objects of the given type.
const | sfName& type. |
|
pure virtual |
Gets all reference properties that reference the given object.
sfObject::SPtr | objPtr to get references for. |
|
pure virtual |
Get a list of root objects. This list may not have the same order across clients.
|
pure virtual |
Gets a name string by id. The ids and names are shared across the session so any user can use the id to retrieve the same name. If the id is not in the table, logs an error and returns empty string.
uint32_t | id of name to get. |
|
pure virtual |
Gets the id for a name string. The ids and names are shared across the session so any user can use the id to retrieve the same name.
const | sfName& str |
|
pure virtual |
Gets a user by id.
uint32_t | - id of user to get. |
|
pure virtual |
Get a list of connected users.
|
pure virtual |
Are we connected to the session?
|
pure virtual |
The local user.
|
pure virtual |
The local user id.
|
pure virtual |
The number of objects in the session.
|
pure virtual |
Registers an on acknowledge subscription event handler that is invoked when the server acknowledges the children subscription.
AcknowledgeSubscriptionHandler |
|
pure virtual |
Registers an on confirm delete event handler that is invoked when an object deleted by the local user is confirmed as deleted by the server.
ConfirmDeleteHandler |
|
pure virtual |
Registers an on create event handler that is invoked when an object is created by another user, or when an object we attempted to delete could not be deleted. When an object with children is created, this is not invoked for the children.
CreateHandler |
|
pure virtual |
Registers an on delete event handler that is invoked when an object is deleted by another user, or when an object we attempted to create could not be created. When an object with children is deleted, this is not invoked for the children.
DeleteHandler |
|
pure virtual |
Registers an on remove field event handler that is invoked when a field of a dictionary property is removed by another user, or when we attempt to set a new field on an object that becomes locked. The event is called before the field is removed.
DictionaryRemoveHandler |
|
pure virtual |
Registers an on direct lock change event handler that is invoked when the direct lock owner changes.
DirectLockChangeHandler |
|
pure virtual |
Registers an on list add event handler that is invoked when one or more elements are added to a list property by another user, or when we attempt to remove elements on an object that becomes locked.
ListAddHandler |
|
pure virtual |
Registers an on list remove event handler that is invoked when one or more elements are removed from a list property by another user, or when we attempt to add elements on an object that becomes locked. The event is called before the elements are removed.
ListRemoveHandler |
|
pure virtual |
Registers an on lock event handler that is invoked when an object becomes locked by another user, directly or indirectly.
LockHandler |
|
pure virtual |
Registers an on lock owner change event handler that is invoked when the lock owner on a locked object changes. If the lock owner is null, the object is partially locked. Partially locked objects can have their children edited, but are still locked indirectly by one or more descendant locks.
LockOwnerChangeHandler |
|
pure virtual |
Registers an on parent change event handler that is invoked when an object's parent or child index is changed by another user, or when we attempt to change the parent or child index but could not because the child, old parent, or new parent became locked.
ParentChangeHandler |
|
pure virtual |
Registers an on property change event handler that is invoked when a property of an object is changed by another user, or when we attempted to change a property on an object that becomes locked.
PropertyChangeHandler |
|
pure virtual |
Registers an on unlock event handler that is invoked when an object locked by another user, directly or indirectly, becomes unlocked.
UnlockHandler |
|
pure virtual |
Registers an on user color change event handler that is invoked when a user's color changes.
UserColorChangeHandler | handler |
|
pure virtual |
Registers an on user join event handler that is invoked when a user joins the session. Invoked once for each user already in the session when the local user connects.
UserJoinHandler |
|
pure virtual |
Registers an on user leave event handler that is invoked when a user leaves the session. Invoked once for each user in the session when the local user disconnects.
UserLeaveHandler |
|
pure virtual |
Set a new color for the connected user.
float | - red value [0 to 1] |
float | - green value [0 to 1] |
float | - blue value [0 to 1] |
|
pure virtual |
Subscribe to an object's children on the server.
sfObject::SPtr | objPtr |
|
pure virtual |
|
pure virtual |
Unregisters an on acknowledge subscription event handler.
AcknowledgeSubscriptionEventHandle |
|
pure virtual |
Unregisters an on confirm delete event handler.
ObjectEventHandle |
|
pure virtual |
Unregisters an on create event handler.
ObjectIndexEventHandle |
|
pure virtual |
Unregisters an on delete event handler.
ObjectEventHandle |
|
pure virtual |
Unregisters an on remove field event handler.
DictionaryPropertyEventHandle |
|
pure virtual |
Unregisters an on direct lock change lock event handler.
ObjectEventHandle |
|
pure virtual |
Unregisters an on list add event handler.
ListPropertyEventHandle |
|
pure virtual |
Unregisters an on list remove event handler.
ListPropertyEventHandle | eventPtr to unregister. |
|
pure virtual |
Unregisters an on lock event handler.
ObjectEventHandle |
|
pure virtual |
Unregisters an on lock owner change event handler.
ObjectEventHandle |
|
pure virtual |
Unregisters an on parent change event handler.
ObjectIndexEventHandle |
|
pure virtual |
Unregisters an on property change event handler.
PropertyEventHandle |
|
pure virtual |
Unregisters an on unlock event handler.
ObjectEventHandle |
|
pure virtual |
Unregisters an on user color change event handler.
UserEventHandle | eventPtr to unregister. |
|
pure virtual |
Unregisters an on user join event handler.
UserEventHandle |
|
pure virtual |
Unregisters an on user leave event handler.
UserEventHandle |
|
pure virtual |
Unsubscribe from an object's children on the server.
sfObject::SPtr | objPtr |