Commit 20d7d5e5 authored by hjk's avatar hjk

ProjectExplorer/Analyzer: Merge RunConfigurationAspects

The Analyzer implementation is now simple and still generic enough
to serve as general base.

Change-Id: I050a21919bf128929b77a64da1f46d157691d849
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 02105ddf
...@@ -11,7 +11,6 @@ SOURCES += \ ...@@ -11,7 +11,6 @@ SOURCES += \
analyzerplugin.cpp \ analyzerplugin.cpp \
analyzerruncontrol.cpp \ analyzerruncontrol.cpp \
analyzermanager.cpp \ analyzermanager.cpp \
analyzersettings.cpp \
analyzerrunconfigwidget.cpp \ analyzerrunconfigwidget.cpp \
analyzerutils.cpp \ analyzerutils.cpp \
startremotedialog.cpp startremotedialog.cpp
...@@ -23,7 +22,6 @@ HEADERS += \ ...@@ -23,7 +22,6 @@ HEADERS += \
analyzerplugin.h \ analyzerplugin.h \
analyzerruncontrol.h \ analyzerruncontrol.h \
analyzermanager.h \ analyzermanager.h \
analyzersettings.h \
analyzerstartparameters.h \ analyzerstartparameters.h \
analyzerrunconfigwidget.h \ analyzerrunconfigwidget.h \
analyzerutils.h \ analyzerutils.h \
......
...@@ -24,8 +24,6 @@ QtcPlugin { ...@@ -24,8 +24,6 @@ QtcPlugin {
"analyzerrunconfigwidget.h", "analyzerrunconfigwidget.h",
"analyzerruncontrol.cpp", "analyzerruncontrol.cpp",
"analyzerruncontrol.h", "analyzerruncontrol.h",
"analyzersettings.cpp",
"analyzersettings.h",
"analyzerstartparameters.h", "analyzerstartparameters.h",
"analyzerutils.cpp", "analyzerutils.cpp",
"analyzerutils.h", "analyzerutils.h",
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "analyzerplugin.h" #include "analyzerplugin.h"
#include "ianalyzertool.h" #include "ianalyzertool.h"
#include "analyzersettings.h"
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/findplaceholder.h> #include <coreplugin/findplaceholder.h>
......
...@@ -41,9 +41,8 @@ ...@@ -41,9 +41,8 @@
#include <QPushButton> #include <QPushButton>
namespace Analyzer { namespace Analyzer {
namespace Internal {
AnalyzerRunConfigWidget::AnalyzerRunConfigWidget(AnalyzerRunConfigurationAspect *aspect) AnalyzerRunConfigWidget::AnalyzerRunConfigWidget(ProjectExplorer::IRunConfigurationAspect *aspect)
{ {
m_aspect = aspect; m_aspect = aspect;
m_config = aspect->projectSettings(); m_config = aspect->projectSettings();
...@@ -106,8 +105,7 @@ void AnalyzerRunConfigWidget::chooseSettings(int setting) ...@@ -106,8 +105,7 @@ void AnalyzerRunConfigWidget::chooseSettings(int setting)
void AnalyzerRunConfigWidget::restoreGlobal() void AnalyzerRunConfigWidget::restoreGlobal()
{ {
QTC_ASSERT(m_aspect, return); QTC_ASSERT(m_aspect, return);
m_aspect->resetCustomToGlobalSettings(); m_aspect->resetProjectToGlobalSettings();
} }
} // namespace Internal
} // namespace Analyzer } // namespace Analyzer
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
** **
****************************************************************************/ ****************************************************************************/
#ifndef ANALYZER_INTERNAL_ANALYZERRUNCONFIGWIDGET_H #ifndef ANALYZERRUNCONFIGWIDGET_H
#define ANALYZER_INTERNAL_ANALYZERRUNCONFIGWIDGET_H #define ANALYZERRUNCONFIGWIDGET_H
#include "analyzersettings.h" #include "analyzerbase_global.h"
#include <projectexplorer/runconfiguration.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QComboBox; class QComboBox;
...@@ -41,14 +43,13 @@ QT_END_NAMESPACE ...@@ -41,14 +43,13 @@ QT_END_NAMESPACE
namespace Utils { class DetailsWidget; } namespace Utils { class DetailsWidget; }
namespace Analyzer { namespace Analyzer {
namespace Internal {
class AnalyzerRunConfigWidget : public ProjectExplorer::RunConfigWidget class ANALYZER_EXPORT AnalyzerRunConfigWidget : public ProjectExplorer::RunConfigWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
AnalyzerRunConfigWidget(AnalyzerRunConfigurationAspect *aspect); AnalyzerRunConfigWidget(ProjectExplorer::IRunConfigurationAspect *aspect);
QString displayName() const; QString displayName() const;
...@@ -58,14 +59,13 @@ private slots: ...@@ -58,14 +59,13 @@ private slots:
private: private:
QWidget *m_configWidget; QWidget *m_configWidget;
AnalyzerRunConfigurationAspect *m_aspect; ProjectExplorer::IRunConfigurationAspect *m_aspect;
ISettingsAspect *m_config; ProjectExplorer::ISettingsAspect *m_config;
QComboBox *m_settingsCombo; QComboBox *m_settingsCombo;
QPushButton *m_restoreButton; QPushButton *m_restoreButton;
Utils::DetailsWidget *m_details; Utils::DetailsWidget *m_details;
}; };
} // namespace Internal
} // namespace Analyzer } // namespace Analyzer
#endif // ANALYZER_INTERNAL_ANALYZERRUNCONFIGWIDGET_H #endif // ANALYZERRUNCONFIGWIDGET_H
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
** Author: Milian Wolff, KDAB (milian.wolff@kdab.com)
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "analyzersettings.h"
#include "analyzermanager.h"
#include "analyzerrunconfigwidget.h"
#include "ianalyzertool.h"
#include "analyzerplugin.h"
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
#include <QSettings>
using namespace Analyzer::Internal;
static const char useGlobalC[] = "Analyzer.Project.UseGlobal";
namespace Analyzer {
ISettingsAspect *ISettingsAspect::clone() const
{
ISettingsAspect *other = create();
QVariantMap data;
toMap(data);
other->fromMap(data);
return other;
}
AnalyzerRunConfigurationAspect::AnalyzerRunConfigurationAspect(ISettingsAspect *projectSettings,
ISettingsAspect *globalSettings)
{
m_useGlobalSettings = true;
m_projectSettings = projectSettings;
m_globalSettings = globalSettings;
}
ISettingsAspect *AnalyzerRunConfigurationAspect::currentSettings() const
{
return m_useGlobalSettings ? m_globalSettings : m_projectSettings;
}
AnalyzerRunConfigurationAspect::~AnalyzerRunConfigurationAspect()
{
delete m_projectSettings;
}
void AnalyzerRunConfigurationAspect::fromMap(const QVariantMap &map)
{
m_projectSettings->fromMap(map);
m_useGlobalSettings = map.value(QLatin1String(useGlobalC), true).toBool();
}
void AnalyzerRunConfigurationAspect::toMap(QVariantMap &map) const
{
m_projectSettings->toMap(map);
map.insert(QLatin1String(useGlobalC), m_useGlobalSettings);
}
AnalyzerRunConfigurationAspect *AnalyzerRunConfigurationAspect::clone(
ProjectExplorer::RunConfiguration *parent) const
{
Q_UNUSED(parent)
AnalyzerRunConfigurationAspect *other
= new AnalyzerRunConfigurationAspect(m_projectSettings->clone(), m_globalSettings);
other->m_useGlobalSettings = m_useGlobalSettings;
return other;
}
void AnalyzerRunConfigurationAspect::setUsingGlobalSettings(bool value)
{
m_useGlobalSettings = value;
}
void AnalyzerRunConfigurationAspect::resetCustomToGlobalSettings()
{
ISettingsAspect *global = globalSettings();
QTC_ASSERT(global, return);
QVariantMap map;
global->toMap(map);
m_projectSettings->fromMap(map);
}
ProjectExplorer::RunConfigWidget *AnalyzerRunConfigurationAspect::createConfigurationWidget()
{
return new AnalyzerRunConfigWidget(this);
}
} // namespace Analyzer
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
** Author: Milian Wolff, KDAB (milian.wolff@kdab.com)
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef ANALYZER_INTERNAL_ANALYZERSETTINGS_H
#define ANALYZER_INTERNAL_ANALYZERSETTINGS_H
#include <QObject>
#include "analyzerbase_global.h"
#include <projectexplorer/runconfiguration.h>
namespace Analyzer {
/**
* Subclass this to add configuration to your analyzer tool.
*
* If global and project-specific settings differ for your tool,
* create one subclass for each.
*/
class ANALYZER_EXPORT ISettingsAspect : public QObject
{
Q_OBJECT
public:
ISettingsAspect() {}
/// Converts current object into map for storage.
virtual void toMap(QVariantMap &map) const = 0;
/// Read object state from @p map.
virtual void fromMap(const QVariantMap &map) = 0;
/// Create a configuration widget for this settings aspect.
virtual QWidget *createConfigWidget(QWidget *parent) = 0;
/// "Virtual default constructor"
virtual ISettingsAspect *create() const = 0;
/// "Virtual copy constructor"
ISettingsAspect *clone() const;
};
/**
* Settings associated with a single project/run configuration
*
*/
class ANALYZER_EXPORT AnalyzerRunConfigurationAspect
: public ProjectExplorer::IRunConfigurationAspect
{
Q_OBJECT
public:
AnalyzerRunConfigurationAspect(ISettingsAspect *projectSettings,
ISettingsAspect *globalSettings);
~AnalyzerRunConfigurationAspect();
AnalyzerRunConfigurationAspect *clone(ProjectExplorer::RunConfiguration *parent) const;
bool isUsingGlobalSettings() const { return m_useGlobalSettings; }
void setUsingGlobalSettings(bool value);
void resetCustomToGlobalSettings();
ISettingsAspect *projectSettings() const { return m_projectSettings; }
ISettingsAspect *globalSettings() const { return m_globalSettings; }
ISettingsAspect *currentSettings() const;
ProjectExplorer::RunConfigWidget *createConfigurationWidget();
protected:
void fromMap(const QVariantMap &map);
void toMap(QVariantMap &map) const;
private:
bool m_useGlobalSettings;
ISettingsAspect *m_projectSettings;
ISettingsAspect *m_globalSettings;
};
} // namespace Analyzer
#endif // ANALYZER_INTERNAL_ANALYZERSETTINGS_H
...@@ -204,14 +204,14 @@ void DebuggerMainWindowPrivate::updateUiForRunConfiguration(RunConfiguration *rc ...@@ -204,14 +204,14 @@ void DebuggerMainWindowPrivate::updateUiForRunConfiguration(RunConfiguration *rc
{ {
if (m_previousRunConfiguration) if (m_previousRunConfiguration)
disconnect(m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(), disconnect(m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()), SIGNAL(requestRunActionsUpdate()),
this, SLOT(updateUiForCurrentRunConfiguration())); this, SLOT(updateUiForCurrentRunConfiguration()));
m_previousRunConfiguration = rc; m_previousRunConfiguration = rc;
updateUiForCurrentRunConfiguration(); updateUiForCurrentRunConfiguration();
if (!rc) if (!rc)
return; return;
connect(m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(), connect(m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()), SIGNAL(requestRunActionsUpdate()),
SLOT(updateUiForCurrentRunConfiguration())); SLOT(updateUiForCurrentRunConfiguration()));
} }
......
...@@ -194,48 +194,32 @@ void DebuggerRunConfigWidget::useMultiProcessToggled(bool on) ...@@ -194,48 +194,32 @@ void DebuggerRunConfigWidget::useMultiProcessToggled(bool on)
DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect( DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(
ProjectExplorer::RunConfiguration *rc) : ProjectExplorer::RunConfiguration *rc) :
m_runConfiguration(rc), IRunConfigurationAspect(rc),
m_useCppDebugger(AutoEnabledLanguage), m_useCppDebugger(AutoEnabledLanguage),
m_useQmlDebugger(AutoEnabledLanguage), m_useQmlDebugger(AutoEnabledLanguage),
m_qmlDebugServerPort(Constants::QML_DEFAULT_DEBUG_SERVER_PORT), m_qmlDebugServerPort(Constants::QML_DEFAULT_DEBUG_SERVER_PORT),
m_useMultiProcess(false) m_useMultiProcess(false)
{ {
ctor(); setId("DebuggerAspect");
} setDisplayName(tr("Debugger settings"));
DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(
ProjectExplorer::RunConfiguration *runConfiguration,
const DebuggerRunConfigurationAspect *other)
: m_runConfiguration(runConfiguration),
m_useCppDebugger(other->m_useCppDebugger),
m_useQmlDebugger(other->m_useQmlDebugger),
m_qmlDebugServerPort(other->m_qmlDebugServerPort),
m_useMultiProcess(other->m_useMultiProcess)
{
ctor();
}
ProjectExplorer::RunConfiguration *DebuggerRunConfigurationAspect::runConfiguration()
{
return m_runConfiguration;
} }
void DebuggerRunConfigurationAspect::setUseQmlDebugger(bool value) void DebuggerRunConfigurationAspect::setUseQmlDebugger(bool value)
{ {
m_useQmlDebugger = value ? EnabledLanguage : DisabledLanguage; m_useQmlDebugger = value ? EnabledLanguage : DisabledLanguage;
emit debuggersChanged(); emit requestRunActionsUpdate();
} }
void DebuggerRunConfigurationAspect::setUseCppDebugger(bool value) void DebuggerRunConfigurationAspect::setUseCppDebugger(bool value)
{ {
m_useCppDebugger = value ? EnabledLanguage : DisabledLanguage; m_useCppDebugger = value ? EnabledLanguage : DisabledLanguage;
emit debuggersChanged(); emit requestRunActionsUpdate();
} }
bool DebuggerRunConfigurationAspect::useCppDebugger() const bool DebuggerRunConfigurationAspect::useCppDebugger() const
{ {
if (m_useCppDebugger == DebuggerRunConfigurationAspect::AutoEnabledLanguage) if (m_useCppDebugger == DebuggerRunConfigurationAspect::AutoEnabledLanguage)
return m_runConfiguration->target()->project()->projectLanguages().contains( return runConfiguration()->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_CXX); ProjectExplorer::Constants::LANG_CXX);
return m_useCppDebugger == DebuggerRunConfigurationAspect::EnabledLanguage; return m_useCppDebugger == DebuggerRunConfigurationAspect::EnabledLanguage;
} }
...@@ -243,7 +227,7 @@ bool DebuggerRunConfigurationAspect::useCppDebugger() const ...@@ -243,7 +227,7 @@ bool DebuggerRunConfigurationAspect::useCppDebugger() const
bool DebuggerRunConfigurationAspect::useQmlDebugger() const bool DebuggerRunConfigurationAspect::useQmlDebugger() const
{ {
if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnabledLanguage) if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnabledLanguage)
return m_runConfiguration->target()->project()->projectLanguages().contains( return runConfiguration()->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_QMLJS); ProjectExplorer::Constants::LANG_QMLJS);
return m_useQmlDebugger == DebuggerRunConfigurationAspect::EnabledLanguage; return m_useQmlDebugger == DebuggerRunConfigurationAspect::EnabledLanguage;
} }
...@@ -270,7 +254,7 @@ void DebuggerRunConfigurationAspect::setUseMultiProcess(bool value) ...@@ -270,7 +254,7 @@ void DebuggerRunConfigurationAspect::setUseMultiProcess(bool value)
bool DebuggerRunConfigurationAspect::isQmlDebuggingSpinboxSuppressed() const bool DebuggerRunConfigurationAspect::isQmlDebuggingSpinboxSuppressed() const
{ {
ProjectExplorer::Kit *k = m_runConfiguration->target()->kit(); ProjectExplorer::Kit *k = runConfiguration()->target()->kit();
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(k); ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(k);
if (dev.isNull()) if (dev.isNull())
return false; return false;
...@@ -304,10 +288,10 @@ void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map) ...@@ -304,10 +288,10 @@ void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
m_useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool(); m_useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool();
} }
DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone( DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::create
ProjectExplorer::RunConfiguration *parent) const (ProjectExplorer::RunConfiguration *runConfiguration) const
{ {
return new DebuggerRunConfigurationAspect(parent, this); return new DebuggerRunConfigurationAspect(runConfiguration);
} }
ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigurationWidget() ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigurationWidget()
...@@ -315,15 +299,6 @@ ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigur ...@@ -315,15 +299,6 @@ ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigur
return new Internal::DebuggerRunConfigWidget(this); return new Internal::DebuggerRunConfigWidget(this);
} }
void DebuggerRunConfigurationAspect::ctor()
{
setId("DebuggerAspect");
setDisplayName(tr("Debugger settings"));
connect(this, SIGNAL(debuggersChanged()),
m_runConfiguration, SIGNAL(requestRunActionsUpdate()));
}
} // namespace Debugger } // namespace Debugger
......
...@@ -45,8 +45,7 @@ class DEBUGGER_EXPORT DebuggerRunConfigurationAspect ...@@ -45,8 +45,7 @@ class DEBUGGER_EXPORT DebuggerRunConfigurationAspect
public: public:
DebuggerRunConfigurationAspect(ProjectExplorer::RunConfiguration *runConfiguration); DebuggerRunConfigurationAspect(ProjectExplorer::RunConfiguration *runConfiguration);
DebuggerRunConfigurationAspect(ProjectExplorer::RunConfiguration *runConfiguration, DebuggerRunConfigurationAspect *create(ProjectExplorer::RunConfiguration *runConfiguration) const;
const DebuggerRunConfigurationAspect *other);
enum DebuggerLanguageStatus { enum DebuggerLanguageStatus {
DisabledLanguage = 0, DisabledLanguage = 0,
...@@ -57,7 +56,6 @@ public: ...@@ -57,7 +56,6 @@ public:
void fromMap(const QVariantMap &map); void fromMap(const QVariantMap &map);
void toMap(QVariantMap &map) const; void toMap(QVariantMap &map) const;
DebuggerRunConfigurationAspect *clone(ProjectExplorer::RunConfiguration *parent) const;
ProjectExplorer::RunConfigWidget *createConfigurationWidget(); ProjectExplorer::RunConfigWidget *createConfigurationWidget();
bool useCppDebugger() const; bool useCppDebugger() const;
...@@ -69,15 +67,8 @@ public: ...@@ -69,15 +67,8 @@ public:
bool useMultiProcess() const; bool useMultiProcess() const;
void setUseMultiProcess(bool on); void setUseMultiProcess(bool on);
bool isQmlDebuggingSpinboxSuppressed() const; bool isQmlDebuggingSpinboxSuppressed() const;
ProjectExplorer::RunConfiguration *runConfiguration();
signals:
void debuggersChanged();
private: private:
void ctor();
ProjectExplorer::RunConfiguration *m_runConfiguration;
DebuggerLanguageStatus m_useCppDebugger; DebuggerLanguageStatus m_useCppDebugger;
DebuggerLanguageStatus m_useQmlDebugger; DebuggerLanguageStatus m_useQmlDebugger;
uint m_qmlDebugServerPort; uint m_qmlDebugServerPort;
......
...@@ -43,21 +43,13 @@ namespace ProjectExplorer { ...@@ -43,21 +43,13 @@ namespace ProjectExplorer {
// EnvironmentAspect: // EnvironmentAspect:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
EnvironmentAspect::EnvironmentAspect(RunConfiguration *rc) : EnvironmentAspect::EnvironmentAspect(RunConfiguration *runConfig)
m_base(-1), : IRunConfigurationAspect(runConfig), m_base(-1)
m_runConfiguration(rc)
{ {
QTC_CHECK(m_runConfiguration);
setDisplayName(tr("Run Environment")); setDisplayName(tr("Run Environment"));
setId("EnvironmentAspect"); setId("EnvironmentAspect");
} }
EnvironmentAspect::EnvironmentAspect(const EnvironmentAspect *other, RunConfiguration *parent) :
m_base(other->m_base),
m_changes(other->m_changes),
m_runConfiguration(parent)
{ }