Hiding translated PDDL sections if empty.
This commit is contained in:
parent
979d9509c1
commit
89bb54a3ec
@ -40,6 +40,8 @@ void TranslatorASP::translateDomain(std::ostream &ostream) const
|
|||||||
const auto &domain = m_description.domain();
|
const auto &domain = m_description.domain();
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
|
if (!domain.types().empty())
|
||||||
|
{
|
||||||
ostream << std::endl;
|
ostream << std::endl;
|
||||||
ostream << "% types";
|
ostream << "% types";
|
||||||
|
|
||||||
@ -60,8 +62,11 @@ void TranslatorASP::translateDomain(std::ostream &ostream) const
|
|||||||
ostream << "inherits(type(" << type->name() << "), type(" << parentType->name() << "))." << std::endl;
|
ostream << "inherits(type(" << type->name() << "), type(" << parentType->name() << "))." << std::endl;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
if (!domain.constants().empty())
|
||||||
|
{
|
||||||
ostream << std::endl;
|
ostream << std::endl;
|
||||||
ostream << "% constants";
|
ostream << "% constants";
|
||||||
|
|
||||||
@ -82,6 +87,7 @@ void TranslatorASP::translateDomain(std::ostream &ostream) const
|
|||||||
ostream << "hasType(constant(" << constant->name() << "), type(" << type->name() << "))." << std::endl;
|
ostream << "hasType(constant(" << constant->name() << "), type(" << type->name() << "))." << std::endl;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user