virtual bool deserialize(uint16_t propertyKey,
BinaryReader& reader) = 0;
- template <typename T> bool is() const { return isTypeOf(T::typeKey); }
- template <typename T> T* as()
+ template <typename T> inline bool is() const
+ {
+ return isTypeOf(T::typeKey);
+ }
+ template <typename T> inline T* as()
{
assert(is<T>());
return reinterpret_cast<T*>(this);
}
- template <typename T> const T* as() const
+ virtual Core* clone() const { return nullptr; }
+
+ template <typename T> inline const T* as() const
{
assert(is<T>());
return reinterpret_cast<const T*>(this);
/// to look up objects referenced by id, but not assume that they in
/// turn have resolved their references yet. Called during
/// load/instance.
- virtual StatusCode onAddedDirty(CoreContext* context) = 0;
+ virtual StatusCode onAddedDirty(CoreContext* context)
+ {
+ return StatusCode::Ok;
+ }
/// Called when all the objects in the context have had onAddedDirty
/// called. This is an opportunity to reference things referenced by
/// dependencies. (A path should be able to find a Shape somewhere in
/// its hierarchy, which may be multiple levels up).
- virtual StatusCode onAddedClean(CoreContext* context) = 0;
+ virtual StatusCode onAddedClean(CoreContext* context)
+ {
+ return StatusCode::Ok;
+ }
virtual StatusCode import(ImportStack& importStack)
{