Scene Fusion 2 API Reference
sfObject.h
1 /*************************************************************************
2  *
3  * KINEMATICOUP CONFIDENTIAL
4  * __________________
5  *
6  * Copyright (2016-2021) KinematicSoup Technologies Incorporated
7  * All Rights Reserved.
8  *
9  * NOTICE: All information contained herein is, and remains
10  * the property of KinematicSoup Technologies Incorporated and its
11  * suppliers, if any. The intellectual and technical concepts contained
12  * herein are proprietary to KinematicSoup Technologies Incorporated
13  * and its suppliers and may be covered by Canadian and Foreign Patents,
14  * patents in process, and are protected by trade secret or copyright law.
15  * Dissemination of this information or reproduction of this material
16  * is strictly forbidden unless prior written permission is obtained
17  * from KinematicSoup Technologies Incorporated.
18  */
19 #pragma once
20 #include <memory>
21 #include <string>
22 #include <sstream>
23 #include <Exports.h>
24 #include <ksHierarchyObject.h>
25 #include "sfUser.h"
26 #include "sfProperty.h"
27 #include "sfName.h"
28 
29 namespace KS {
30 namespace SceneFusion2 {
31  class sfSession;
32 
39  class EXTERNAL sfObject :
40  public ksHierarchyObject<sfObject>
41  {
42  public:
43  typedef std::shared_ptr<sfObject> SPtr;
44 
52  enum ObjectFlags : uint8_t
53  {
54  NoFlags = 0,
55  OptionalChildren = 1 << 1,
56  Transient = 1 << 2
57  };
58 
66  static SPtr Create(const sfName& type, sfProperty::SPtr propertyPtr = nullptr, ObjectFlags flags = NoFlags);
67 
71  virtual ~sfObject() {};
72 
78  virtual std::string ToString() = 0;
79 
85  virtual const uint32_t& Id() const = 0;
86 
92  virtual const sfName& Type() const = 0;
93 
99  virtual const ObjectFlags Flags() const = 0;
100 
106  virtual sfProperty::SPtr Property() = 0;
107 
113  virtual void SetProperty(sfProperty::SPtr propertyPtr) = 0;
114 
120  virtual std::shared_ptr<sfSession> Session() = 0;
121 
127  virtual bool IsSyncing() = 0;
128 
137  virtual bool IsCreated() = 0;
138 
144  virtual bool IsCreatePending() = 0;
145 
151  virtual bool IsUnsubscriptionPending() = 0;
152 
158  virtual bool IsDeletePending() = 0;
159 
167  virtual sfUser::SPtr LockOwner() = 0;
168 
176  virtual bool CanEdit() = 0;
177 
186  virtual bool CanEditChildren() = 0;
187 
193  virtual bool IsLocked() = 0;
194 
200  virtual bool IsLockPending() = 0;
201 
210  virtual bool IsFullyLocked() = 0;
211 
220  virtual bool IsPartiallyLocked() = 0;
221 
228  virtual bool IsLockedDirectly() = 0;
229 
235  virtual void RequestLock() = 0;
236 
240  virtual void ReleaseLock() = 0;
241 
251  virtual bool SetChildIndex(int index) = 0;
252  };
253 } // SceneFusion2
254 } // KS
Definition: sfName.h:33
Definition: sfObject.h:41
virtual sfProperty::SPtr Property()=0
ObjectFlags
Definition: sfObject.h:53
virtual void SetProperty(sfProperty::SPtr propertyPtr)=0
virtual bool CanEditChildren()=0
virtual const sfName & Type() const =0
virtual std::string ToString()=0
virtual bool IsUnsubscriptionPending()=0
static SPtr Create(const sfName &type, sfProperty::SPtr propertyPtr=nullptr, ObjectFlags flags=NoFlags)
virtual bool IsLockPending()=0
virtual bool IsDeletePending()=0
virtual bool IsLockedDirectly()=0
virtual ~sfObject()
Definition: sfObject.h:71
virtual void RequestLock()=0
virtual bool IsCreatePending()=0
virtual bool CanEdit()=0
virtual void ReleaseLock()=0
virtual bool IsCreated()=0
virtual bool IsSyncing()=0
virtual bool IsLocked()=0
virtual sfUser::SPtr LockOwner()=0
virtual bool IsFullyLocked()=0
virtual const uint32_t & Id() const =0
virtual bool IsPartiallyLocked()=0
virtual bool SetChildIndex(int index)=0
virtual std::shared_ptr< sfSession > Session()=0
virtual const ObjectFlags Flags() const =0
Definition: ksHierarchyObject.h:33
Definition: sfDictionaryProperty.h:24