add cylinder
This commit is contained in:
@@ -75,7 +75,8 @@ void Object::RegisterProperty(PropertyBase* prop) {
|
||||
void Object::RegisterDynamicProperty(PropertyBase* prop) {
|
||||
if (prop) {
|
||||
d->m_DynamicProperties.push_back(prop);
|
||||
d->m_Properties.push_back(prop);
|
||||
// Note: prop already added itself to m_Properties
|
||||
// during its own constructor call to owner->RegisterProperty()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,8 +115,9 @@ template void Object::serialize(Archive::log_archive &, const unsigned int);
|
||||
// OBJECT IMPLEMENTATION
|
||||
|
||||
Object::Object() : d(new ObjectPrivate) {}
|
||||
|
||||
Object::Object(const Object ©) : d(new ObjectPrivate(*copy.d)) {}
|
||||
Object::Object(const Object ©) : d(new ObjectPrivate) {
|
||||
if (copy.d) d->m_InstanceName = copy.d->m_InstanceName;
|
||||
}
|
||||
|
||||
Object::~Object() {
|
||||
for (auto* p : d->m_DynamicProperties) {
|
||||
@@ -125,9 +127,11 @@ Object::~Object() {
|
||||
}
|
||||
|
||||
void Object::DeepCopy(const Object ©) {
|
||||
// should lock to be tread safe //
|
||||
memcpy(d, copy.d, sizeof(ObjectPrivate));
|
||||
// ERROR! does not copy parameters ... <<<< FIXXXXX
|
||||
if (this == ©) return;
|
||||
if (copy.d) d->m_InstanceName = copy.d->m_InstanceName;
|
||||
// Note: signals, slots and properties are intentionally not copied
|
||||
// to maintain instance uniquely and avoid duplicate registrations.
|
||||
this->Updated();
|
||||
}
|
||||
|
||||
void Object::SaveXml(std::ostream &os, Object &ob) {
|
||||
|
||||
Reference in New Issue
Block a user