+inline std::ostream& operator << (std::ostream& stream,
+ const Script::Slot& slot)
+{
+ if (slot.isString())
+ {
+ std::string str;
+ slot.get(str);
+ stream << str;
+ }
+ else if (slot.isBoolean())
+ {
+ if (slot) stream << "true";
+ else stream << "false";
+ }
+ else if (slot.isNil())
+ {
+ stream << "nil";
+ }
+ else
+ {
+ stream << slot.getTypeName()
+ << " (" << slot.getIdentifier() << ")" << std::endl;
+ }
+
+ return stream;
+}
+
+