configurationparameters.h
292 static bool registerFileFormat(QString format, ParametersFileLoaderSaver *fileLoaderSaver, QString defaultExtension);
834 TypeToCreate* getObjectFromGroup(QString group, bool configure = true, bool forceObjectCreation = false);
875 TypeToCreate* getObjectFromParameter(QString param, bool alsoMatchParents = false, bool configure = true, bool forceObjectCreation = false)
1046 bool setObjectFromGroupStatusToCreatedAndConfigured(QString group, ParameterSettable *object = NULL);
1158 TypeToCreate* ConfigurationParameters::getObjectFromGroup(QString group, bool configure, bool forceObjectCreation)
1160 // This is a simple class to implement RAII for the m_getObjectFromGroupRecursionLevel variable
1161 // and the m_objectsToConfigure list so that they are properly finalized on getObjectFromGroup() exit.
1162 // Note that to configure objects you have to explicitly call "release", the destructor doesn't call
1167 RecursionLevelRAII(unsigned int *var, QList<ConfigurationParameters::ObjectAndRecursionLevel> *list, QList<SimpleResourcesUser> *resourcesUsers, ConfigurationParameters ¶ms, RealFactory& factory) :
1215 RecursionLevelRAII(const RecursionLevelRAII& other) : m_params(*((ConfigurationParameters *) NULL)), m_factory(*((RealFactory *) NULL)) {}
1232 // If the recursion level is 0 (this is the most external call to getObjectFromGroup), we always configure
1233 // the object. This check is needed because otherwise, if the most external call to this function has
1240 RecursionLevelRAII recursionLevelRAII(&m_getObjectFromGroupRecursionLevel, &m_objectsToConfigure, &m_resourcesUserPerRecursionLevel, *this, *m_factory);
1249 // This is set to true because we use it to decide whether to add the object to the list or not:
1250 // if true it is not added, if false it is added (an this is only modified when the object is created
1269 // Checking we haven't been requested a new object (we cannot do this because another object exists
1270 // but is not configured - this is the safest policy, even if perhaps we could do something more smart).
1287 ParameterSettableWithConfigureFunction *const o = dynamic_cast<ParameterSettableWithConfigureFunction *>(retObj);
1295 // Checking we haven't been requested a new object (we cannot do this because another object exists
1296 // and is being configured - this is the safest policy, even if perhaps we could do something more smart).
1312 // Object is in creation and configuration phase, cannot return it and cannot create another object
1321 // If we were requested a new object, creating it, otherwise we return the already existing one
1345 // Releasing resources (explicitly, so that unconfigured objects that can be configured at this recursion level
1349 // Now checking if we have to call postConfigureInitialization() for all configured objects. The check is here (as
1350 // well as inside RealFactory::create) because this function can call RealFactory::create and vice-versa, so we have to check
1352 // NOTE: now that the factory cannot be used directly this check should be useless (we always call postConfigureInitialization()
1357 // Safety check, just to be sure: when we get here, there should be no object in the list of objects yet to configure