improve whitespaces

This commit is contained in:
wmayer
2018-10-18 23:31:55 +02:00
parent 1e6818b6fb
commit 3a6afac8b2
4 changed files with 87 additions and 87 deletions

View File

@@ -56,7 +56,7 @@ void DynamicProperty::getPropertyList(std::vector<Property*> &List) const
static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyList(List);
else
this->pc->PropertyContainer::getPropertyList(List);
for (std::map<std::string,PropData>::const_iterator it = props.begin(); it != props.end(); ++it)
List.push_back(it->second.property);
}
@@ -68,7 +68,7 @@ void DynamicProperty::getPropertyMap(std::map<std::string,Property*> &Map) const
static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyMap(Map);
else
this->pc->PropertyContainer::getPropertyMap(Map);
for (std::map<std::string,PropData>::const_iterator it = props.begin(); it != props.end(); ++it)
Map[it->first] = it->second.property;
}
@@ -78,10 +78,10 @@ Property *DynamicProperty::getPropertyByName(const char* name) const
std::map<std::string,PropData>::const_iterator it = props.find(name);
if (it != props.end())
return it->second.property;
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
return static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyByName(name);
return this->pc->PropertyContainer::getPropertyByName(name);
}
@@ -126,10 +126,10 @@ const char* DynamicProperty::getPropertyName(const Property* prop) const
if (it->second.property == prop)
return it->first.c_str();
}
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
return static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyName(prop);
return this->pc->PropertyContainer::getPropertyName(prop);
}
@@ -156,10 +156,10 @@ short DynamicProperty::getPropertyType(const Property* prop) const
return attr;
}
}
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
return static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyType(prop);
return this->pc->PropertyContainer::getPropertyType(prop);
}
@@ -174,10 +174,10 @@ short DynamicProperty::getPropertyType(const char *name) const
attr |= Prop_ReadOnly;
return attr;
}
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
return static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyType(name);
return this->pc->PropertyContainer::getPropertyType(name);
}
@@ -187,10 +187,10 @@ const char* DynamicProperty::getPropertyGroup(const Property* prop) const
if (it->second.property == prop)
return it->second.group.c_str();
}
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
return static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyGroup(prop);
return this->pc->PropertyContainer::getPropertyGroup(prop);
}
@@ -199,10 +199,10 @@ const char* DynamicProperty::getPropertyGroup(const char *name) const
std::map<std::string,PropData>::const_iterator it = props.find(name);
if (it != props.end())
return it->second.group.c_str();
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
return static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyGroup(name);
return this->pc->PropertyContainer::getPropertyGroup(name);
}
@@ -212,10 +212,10 @@ const char* DynamicProperty::getPropertyDocumentation(const Property* prop) cons
if (it->second.property == prop)
return it->second.doc.c_str();
}
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
return static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyDocumentation(prop);
return this->pc->PropertyContainer::getPropertyDocumentation(prop);
}
@@ -224,10 +224,10 @@ const char* DynamicProperty::getPropertyDocumentation(const char *name) const
std::map<std::string,PropData>::const_iterator it = props.find(name);
if (it != props.end())
return it->second.doc.c_str();
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
return static_cast<App::ExtensionContainer*>(this->pc)->ExtensionContainer::getPropertyDocumentation(name);
return this->pc->PropertyContainer::getPropertyDocumentation(name);
}
@@ -308,9 +308,9 @@ void DynamicProperty::Save (Base::Writer &writer) const
{
//extensions must be saved first, as they need to be read and initialised before properties (as
//they have their own properties which they need to handle on restore)
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
static_cast<App::ExtensionContainer*>(this->pc)->saveExtensions(writer);
std::map<std::string,Property*> Map;
getPropertyMap(Map);
@@ -370,9 +370,9 @@ void DynamicProperty::Save (Base::Writer &writer) const
void DynamicProperty::Restore(Base::XMLReader &reader)
{
//first all extensions must be initialised so that they can handle their properties
if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
if (this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId()))
static_cast<App::ExtensionContainer*>(this->pc)->restoreExtensions(reader);
reader.readElement("Properties");
int Cnt = reader.getAttributeAsInteger("Count");