GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
BehaviorsSharedData.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2016 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 
7 #pragma once
8 
9 #include "GDCore/String.h"
10 #include "GDCore/Project/BehaviorConfigurationContainer.h"
11 #include "GDCore/Project/MemoryTrackedRegistry.h"
12 
13 namespace gd {
14 
25  public:
27  BehaviorsSharedData(const gd::String& name_, const gd::String& type_)
28  : BehaviorConfigurationContainer(name_, type_) {};
31  BehaviorsSharedData& operator=(const BehaviorsSharedData& other) {
32  if (this != &other) {
33  BehaviorConfigurationContainer::operator=(other);
34  }
35  return *this;
36  }
37  virtual ~BehaviorsSharedData();
38  virtual BehaviorsSharedData* Clone() const { return new BehaviorsSharedData(*this); }
39 
40  private:
41  gd::MemoryTracked _memoryTracked{this, "BehaviorsSharedData"};
42 };
43 
44 } // namespace gd
Base class for containers of behavior configuration. They can be attached to objects (Behavior) or la...
Definition: BehaviorConfigurationContainer.h:35
Base class for defining data shared by behaviors having the same type and name.
Definition: BehaviorsSharedData.h:24
A non-copyable, non-movable member object that registers/unregisters its owner with MemoryTrackedRegi...
Definition: MemoryTrackedRegistry.h:238
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24