App: Fix header uniformity, trailing whitespace, and doxygen headers
This commit is contained in:
@@ -34,9 +34,9 @@
|
||||
#include <Base/Console.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
#include <ExtensionPy.h>
|
||||
|
||||
|
||||
/* We do not use a standard property macro for type initiation. The reason is that we have the first
|
||||
* PropertyData in the extension chain, there is no parent property data.
|
||||
* PropertyData in the extension chain, there is no parent property data.
|
||||
*/
|
||||
EXTENSION_TYPESYSTEM_SOURCE_P(App::Extension)
|
||||
const App::PropertyData * App::Extension::extensionGetPropertyDataPtr(void){return &propertyData;}
|
||||
@@ -45,15 +45,15 @@ App::PropertyData App::Extension::propertyData;
|
||||
void App::Extension::init(void){
|
||||
|
||||
assert(Extension::classTypeId == Base::Type::badType() && "don't init() twice!");
|
||||
|
||||
/* Set up entry in the type system. */
|
||||
Extension::classTypeId = Base::Type::createType(Base::Type::badType(), "App::Extension",
|
||||
Extension::create);
|
||||
|
||||
/* Set up entry in the type system. */
|
||||
Extension::classTypeId = Base::Type::createType(Base::Type::badType(), "App::Extension",
|
||||
Extension::create);
|
||||
}
|
||||
|
||||
using namespace App;
|
||||
|
||||
Extension::Extension()
|
||||
Extension::Extension()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -82,14 +82,14 @@ void Extension::initExtension(ExtensionContainer* obj) {
|
||||
|
||||
if (m_extensionType.isBad())
|
||||
throw Base::RuntimeError("Extension: Extension type not set");
|
||||
|
||||
|
||||
//all properties are initialised without PropertyContainer father. Now that we know it we can
|
||||
//finally finish the property initialisation
|
||||
std::vector<Property*> list;
|
||||
extensionGetPropertyData().getPropertyList(this, list);
|
||||
for(Property* prop : list)
|
||||
prop->setContainer(obj);
|
||||
|
||||
|
||||
m_base = obj;
|
||||
m_base->registerExtension( m_extensionType, this );
|
||||
}
|
||||
@@ -106,10 +106,10 @@ PyObject* Extension::getExtensionPyObject(void) {
|
||||
}
|
||||
|
||||
std::string Extension::name() const {
|
||||
|
||||
|
||||
if (m_extensionType.isBad())
|
||||
throw Base::RuntimeError("Extension::name: Extension type not set");
|
||||
|
||||
|
||||
std::string temp(m_extensionType.getName());
|
||||
std::string::size_type pos = temp.find_last_of(':');
|
||||
|
||||
@@ -122,48 +122,48 @@ std::string Extension::name() const {
|
||||
|
||||
|
||||
Property* Extension::extensionGetPropertyByName(const char* name) const {
|
||||
|
||||
|
||||
return extensionGetPropertyData().getPropertyByName(this, name);
|
||||
}
|
||||
|
||||
short int Extension::extensionGetPropertyType(const Property* prop) const {
|
||||
|
||||
|
||||
return extensionGetPropertyData().getType(this, prop);
|
||||
}
|
||||
|
||||
short int Extension::extensionGetPropertyType(const char* name) const {
|
||||
|
||||
|
||||
return extensionGetPropertyData().getType(this, name);
|
||||
}
|
||||
|
||||
const char* Extension::extensionGetPropertyName(const Property* prop) const {
|
||||
|
||||
|
||||
return extensionGetPropertyData().getName(this,prop);
|
||||
}
|
||||
|
||||
const char* Extension::extensionGetPropertyGroup(const Property* prop) const {
|
||||
|
||||
|
||||
return extensionGetPropertyData().getGroup(this,prop);
|
||||
}
|
||||
|
||||
const char* Extension::extensionGetPropertyGroup(const char* name) const {
|
||||
|
||||
|
||||
return extensionGetPropertyData().getGroup(this,name);
|
||||
}
|
||||
|
||||
|
||||
const char* Extension::extensionGetPropertyDocumentation(const Property* prop) const {
|
||||
|
||||
|
||||
return extensionGetPropertyData().getDocumentation(this, prop);
|
||||
}
|
||||
|
||||
const char* Extension::extensionGetPropertyDocumentation(const char* name) const {
|
||||
|
||||
|
||||
return extensionGetPropertyData().getDocumentation(this, name);
|
||||
}
|
||||
|
||||
void Extension::extensionGetPropertyList(std::vector< Property* >& List) const {
|
||||
|
||||
|
||||
extensionGetPropertyData().getPropertyList(this, List);
|
||||
}
|
||||
|
||||
@@ -172,13 +172,13 @@ void Extension::extensionGetPropertyMap(std::map< std::string, Property* >& Map)
|
||||
extensionGetPropertyData().getPropertyMap(this, Map);
|
||||
}
|
||||
|
||||
void Extension::initExtensionSubclass(Base::Type& toInit, const char* ClassName, const char* ParentName,
|
||||
void Extension::initExtensionSubclass(Base::Type& toInit, const char* ClassName, const char* ParentName,
|
||||
Base::Type::instantiationMethod method) {
|
||||
|
||||
// don't init twice!
|
||||
assert(toInit == Base::Type::badType());
|
||||
// get the parent class
|
||||
Base::Type parentType(Base::Type::fromName(ParentName));
|
||||
Base::Type parentType(Base::Type::fromName(ParentName));
|
||||
// forgot init parent!
|
||||
assert(parentType != Base::Type::badType() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user