--- a/src/common/output-stream-object.cc Mon Feb 08 23:16:24 2010 -0800
+++ b/src/common/output-stream-object.cc Mon Feb 08 23:32:23 2010 -0800
@@ -23,18 +23,6 @@
namespace ns3 {
-NS_OBJECT_ENSURE_REGISTERED (OutputStreamObject);
-
-TypeId
-OutputStreamObject::GetTypeId (void)
-{
- static TypeId tid = TypeId ("ns3::OutputStreamObject")
- .SetParent<Object> ()
- .AddConstructor<OutputStreamObject> ()
- ;
- return tid;
-}
-
OutputStreamObject::OutputStreamObject ()
: m_ostream (0)
{
--- a/src/common/output-stream-object.h Mon Feb 08 23:16:24 2010 -0800
+++ b/src/common/output-stream-object.h Mon Feb 08 23:32:23 2010 -0800
@@ -22,6 +22,7 @@
#include <ostream>
#include "ns3/object.h"
#include "ns3/ptr.h"
+#include "ns3/simple-ref-count.h"
namespace ns3 {
@@ -58,7 +59,7 @@
* Ptr<> wouldn't understand the operators and we would have to dereference it
* to access the underlying object methods. Since we would have to dereference
* the Ptr<>, we don't bother and just expect the user to Get a saved pointer
- * to an ostream and dereference it him- or herself. As in:
+ * to an ostream and dereference it him or herself. As in:
*
* \verbatim
* void
@@ -69,7 +70,7 @@
* }
* \endverbatim
*/
-class OutputStreamObject : public Object
+class OutputStreamObject : public SimpleRefCount<OutputStreamObject>
{
public:
static TypeId GetTypeId (void);
--- a/src/helper/trace-helper.cc Mon Feb 08 23:16:24 2010 -0800
+++ b/src/helper/trace-helper.cc Mon Feb 08 23:32:23 2010 -0800
@@ -205,7 +205,7 @@
NS_ABORT_MSG_UNLESS (ofstream->is_open (), "AsciiTraceHelper::CreateFileStream(): Unable to Open " <<
filename << " for mode " << filemode);
- Ptr<OutputStreamObject> streamObject = CreateObject<OutputStreamObject> ();
+ Ptr<OutputStreamObject> streamObject = Create<OutputStreamObject> ();
streamObject->SetStream (ofstream);
//
--- a/test.py Mon Feb 08 23:16:24 2010 -0800
+++ b/test.py Mon Feb 08 23:32:23 2010 -0800
@@ -135,6 +135,7 @@
("tutorial/third", "True", "True"),
("tutorial/fourth", "True", "True"),
("tutorial/fifth", "True", "True"),
+ ("tutorial/sixth", "True", "True"),
("udp/udp-echo", "True", "True"),