summaryrefslogtreecommitdiffstats
path: root/src/Config.cpp
diff options
context:
space:
mode:
authorWim van Aarle <wimvanaarle@gmail.com>2015-02-25 16:46:09 +0100
committerWim van Aarle <wimvanaarle@gmail.com>2015-02-25 16:46:09 +0100
commit065d9c6a18f2b8eececc608ce850a9a308ca6356 (patch)
tree38ced94765ba77e2b710cd66fb4826f55f52250c /src/Config.cpp
parent9adc99793653c92d369bb2710b51c3c1a554b362 (diff)
downloadastra-065d9c6a18f2b8eececc608ce850a9a308ca6356.tar.gz
astra-065d9c6a18f2b8eececc608ce850a9a308ca6356.tar.bz2
astra-065d9c6a18f2b8eececc608ce850a9a308ca6356.tar.xz
astra-065d9c6a18f2b8eececc608ce850a9a308ca6356.zip
get_geometry now uses XML config object (for volumes)
Diffstat (limited to 'src/Config.cpp')
-rw-r--r--src/Config.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Config.cpp b/src/Config.cpp
index 3a3cb53..653935e 100644
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -54,12 +54,24 @@ Config::Config(XMLNode* _self)
self = _self;
}
+//-----------------------------------------------------------------------------
Config::~Config()
{
delete self;
self = 0;
}
+//-----------------------------------------------------------------------------
+void Config::initialize(std::string rootname)
+{
+ if (self == 0) {
+ XMLDocument* doc = XMLDocument::createDocument(rootname);
+ self = doc->getRootNode();
+ }
+}
+
+
+//-----------------------------------------------------------------------------
template <class T>
ConfigStackCheck<T>::ConfigStackCheck(const char *_name, T* _obj, const Config& _cfg)
: object(_obj), cfg(&_cfg), name(_name)