From 5d91e8c2d2a7b6df8581cf11955515cb3e78ae1c Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Fri, 11 Apr 2008 11:27:09 -0700 Subject: [PATCH] implement operator << for ObjectFactory. --- src/core/object-factory.cc | 2 +- src/core/object-factory.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/object-factory.cc b/src/core/object-factory.cc index ebdf5e20c..95409d414 100644 --- a/src/core/object-factory.cc +++ b/src/core/object-factory.cc @@ -70,7 +70,7 @@ ObjectFactory::Create (void) const std::ostream & operator << (std::ostream &os, const ObjectFactory &factory) { - // XXX + os << factory.m_tid.GetName () << "[" << factory.m_parameters.SerializeToString () << "]"; return os; } std::istream & operator >> (std::istream &is, ObjectFactory &factory) diff --git a/src/core/object-factory.h b/src/core/object-factory.h index 5bb0fd40b..50cb6ee4e 100644 --- a/src/core/object-factory.h +++ b/src/core/object-factory.h @@ -76,6 +76,9 @@ public: ATTRIBUTE_HELPER_HEADER_1 (ObjectFactory); private: + friend std::ostream & operator << (std::ostream &os, const ObjectFactory &factory); + friend std::istream & operator >> (std::istream &is, ObjectFactory &factory); + TypeId m_tid; AttributeList m_parameters; };