summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/slicer/modelPartsTypes.h14
-rw-r--r--slicer/tool/parser.cpp14
2 files changed, 12 insertions, 16 deletions
diff --git a/slicer/slicer/modelPartsTypes.h b/slicer/slicer/modelPartsTypes.h
index d53be93..ca381af 100644
--- a/slicer/slicer/modelPartsTypes.h
+++ b/slicer/slicer/modelPartsTypes.h
@@ -112,10 +112,10 @@ namespace Slicer {
};
typedef IceUtil::Handle<HookBase> HookPtr;
- template <typename MT, typename CT, typename MP>
+ template <typename MT, typename MP>
class DLL_PRIVATE Hook : public HookBase {
public:
- Hook(MT CT::* m, const std::string & n) :
+ Hook(MT T::* m, const std::string & n) :
member(m),
name(n)
{
@@ -132,15 +132,15 @@ namespace Slicer {
}
private:
- const MT CT::* member;
+ const MT T::* member;
const std::string name;
};
- template <typename MT, typename CT, typename MP>
- class DLL_PRIVATE HookMetadata : public Hook<MT, CT, MP> {
+ template <typename MT, typename MP>
+ class DLL_PRIVATE HookMetadata : public Hook<MT, MP> {
public:
- HookMetadata(MT CT::* member, const std::string & n, const Metadata & md) :
- Hook<MT, CT, MP>(member, n),
+ HookMetadata(MT T::* member, const std::string & n, const Metadata & md) :
+ Hook<MT, MP>(member, n),
metadata(md)
{
}
diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp
index 466f4dd..23a804b 100644
--- a/slicer/tool/parser.cpp
+++ b/slicer/tool/parser.cpp
@@ -280,10 +280,8 @@ namespace Slicer {
else {
fprintbf(cpp, "::Hook<");
}
- fprintbf(cpp, " %s",
+ fprintbf(cpp, " %s, ",
Slice::typeToString(type, dm->optional()));
- fprintbf(cpp, ", %s, ",
- boost::algorithm::trim_right_copy_if(dm->container()->thisScope(), ispunct));
if (dm->optional()) {
fprintbf(cpp, "ModelPartForOptional< ");
}
@@ -418,19 +416,17 @@ namespace Slicer {
auto vname = metaDataValue("slicer:value:", d->getMetaData());
fprintbf(cpp, "\t\t");
auto ktype = d->keyType();
- fprintbf(cpp, "new ModelPartForComplex< %s::value_type >::Hook< const %s, %s::value_type, ",
+ fprintbf(cpp, "new ModelPartForComplex< %s::value_type >::Hook< const %s, ",
d->scoped(),
- Slice::typeToString(ktype),
- d->scoped());
+ Slice::typeToString(ktype));
createNewModelPartPtrFor(ktype);
fprintbf(cpp, " >(&%s::value_type::first, \"%s\"),\n\t\t",
d->scoped(),
kname ? *kname : "key");
auto vtype = d->valueType();
- fprintbf(cpp, "new ModelPartForComplex< %s::value_type >::Hook< %s, %s::value_type, ",
+ fprintbf(cpp, "new ModelPartForComplex< %s::value_type >::Hook< %s, ",
d->scoped(),
- Slice::typeToString(vtype),
- d->scoped());
+ Slice::typeToString(vtype));
createNewModelPartPtrFor(vtype);
fprintbf(cpp, " >(&%s::value_type::second, \"%s\"),\n",
d->scoped(),