summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2014-06-02 09:06:59 +0000
committerrandomdan <randomdan@localhost>2014-06-02 09:06:59 +0000
commit7d7493db3a7c5ff257d6f835cc5889d6859f187d (patch)
tree135633aea43ba03b7a9ad97099becca85bc60727
parentFirst hash of slicer, works well for the golden path, beyond that is uncharte... (diff)
downloadslicer-7d7493db3a7c5ff257d6f835cc5889d6859f187d.tar.bz2
slicer-7d7493db3a7c5ff257d6f835cc5889d6859f187d.tar.xz
slicer-7d7493db3a7c5ff257d6f835cc5889d6859f187d.zip
Adds missing constructors to support all things being part of a dictionary
-rw-r--r--slicer/slicer/modelParts.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/slicer/slicer/modelParts.h b/slicer/slicer/modelParts.h
index 6dc450e..bdbe40f 100644
--- a/slicer/slicer/modelParts.h
+++ b/slicer/slicer/modelParts.h
@@ -132,6 +132,11 @@ namespace Slicer {
{
}
+ ModelPartForClass(IceInternal::Handle<T> * h) :
+ ModelObject(*h)
+ {
+ }
+
virtual void Create() override
{
ModelObject = new T();
@@ -154,6 +159,11 @@ namespace Slicer {
{
}
+ ModelPartForStruct(T * o) :
+ ModelObject(*o)
+ {
+ }
+
T & GetModel() override
{
return ModelObject;
@@ -208,6 +218,12 @@ namespace Slicer {
sequence(s)
{
}
+
+ ModelPartForSequence(T * s) :
+ sequence(*s)
+ {
+ }
+
virtual void OnEachChild(const ChildHandler & ch) override
{
BOOST_FOREACH(auto & element, sequence) {
@@ -267,6 +283,12 @@ namespace Slicer {
dictionary(d)
{
}
+
+ ModelPartForDictionary(T * d) :
+ dictionary(*d)
+ {
+ }
+
virtual void OnEachChild(const ChildHandler & ch) override
{
BOOST_FOREACH(auto & pair, dictionary) {