add vtk Properties
This commit is contained in:
@@ -64,6 +64,7 @@ public:
|
||||
Vector<Signal> sigv;
|
||||
Vector<Slot> slov;
|
||||
std::vector<PropertyBase*> m_Properties;
|
||||
std::vector<PropertyBase*> m_DynamicProperties;
|
||||
};
|
||||
|
||||
// Implementations of Property methods
|
||||
@@ -71,6 +72,13 @@ void Object::RegisterProperty(PropertyBase* prop) {
|
||||
if (prop) d->m_Properties.push_back(prop);
|
||||
}
|
||||
|
||||
void Object::RegisterDynamicProperty(PropertyBase* prop) {
|
||||
if (prop) {
|
||||
d->m_DynamicProperties.push_back(prop);
|
||||
d->m_Properties.push_back(prop);
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<PropertyBase*>& Object::GetProperties() const {
|
||||
return d->m_Properties;
|
||||
}
|
||||
@@ -109,7 +117,12 @@ Object::Object() : d(new ObjectPrivate) {}
|
||||
|
||||
Object::Object(const Object ©) : d(new ObjectPrivate(*copy.d)) {}
|
||||
|
||||
Object::~Object() { delete d; }
|
||||
Object::~Object() {
|
||||
for (auto* p : d->m_DynamicProperties) {
|
||||
delete p;
|
||||
}
|
||||
delete d;
|
||||
}
|
||||
|
||||
void Object::DeepCopy(const Object ©) {
|
||||
// should lock to be tread safe //
|
||||
|
||||
Reference in New Issue
Block a user