14 #ifndef hifi_PropertyGroup_h
15 #define hifi_PropertyGroup_h
17 #include <OctreeElement.h>
19 #include "EntityPropertyFlags.h"
23 class EncodeBitstreamParams;
25 class EntityTreeElementExtraEncodeData;
26 class ReadBitstreamToTreeParams;
29 using EntityTreeElementExtraEncodeDataPointer = std::shared_ptr<EntityTreeElementExtraEncodeData>;
34 virtual ~PropertyGroup() =
default;
37 virtual void copyToScriptValue(
const EntityPropertyFlags& desiredProperties,
ScriptValue& properties,
ScriptEngine* engine,
bool skipDefaults,
38 EntityItemProperties& defaultEntityProperties,
bool returnNothingOnEmptyPropertyFlags,
bool isMyOwnAvatarEntity)
const = 0;
39 virtual void copyFromScriptValue(
const ScriptValue&
object,
const QSet<QString> &namesSet,
bool& _defaultSettings) = 0;
40 virtual void debugDump()
const { }
41 virtual void listChangedProperties(QList<QString>& out) { }
44 EntityPropertyFlags& requestedProperties,
45 EntityPropertyFlags& propertyFlags,
46 EntityPropertyFlags& propertiesDidntFit,
48 OctreeElement::AppendState& appendState)
const = 0;
50 virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags,
const unsigned char*& dataAt ,
int& processedBytes) = 0;
51 virtual void markAllChanged() = 0;
52 virtual EntityPropertyFlags getChangedProperties()
const = 0;
61 virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params)
const = 0;
63 virtual void appendSubclassData(
OctreePacketData* packetData, EncodeBitstreamParams& params,
64 EntityTreeElementExtraEncodeDataPointer entityTreeElementExtraEncodeData,
65 EntityPropertyFlags& requestedProperties,
66 EntityPropertyFlags& propertyFlags,
67 EntityPropertyFlags& propertiesDidntFit,
69 OctreeElement::AppendState& appendState)
const = 0;
71 virtual int readEntitySubclassDataFromBuffer(
const unsigned char* data,
int bytesLeftToRead,
72 ReadBitstreamToTreeParams& args,
73 EntityPropertyFlags& propertyFlags,
bool overwriteLocalData,
74 bool& somethingChanged) = 0;
Definition: EntityItemProperties.h:106
Handles packing of the data portion of PacketType_OCTREE_DATA messages.
Definition: OctreePacketData.h:93
Provides an engine-independent interface for a scripting engine.
Definition: ScriptEngine.h:93
[ScriptInterface] Provides an engine-independent interface for QScriptValue
Definition: ScriptValue.h:40