A Discrete-Event Network Simulator
API
data-output-interface.cc
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2008 Drexel University
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Joe Kopena (tjkopena@cs.drexel.edu)
19 */
20
21#include "ns3/log.h"
22
24
25using namespace ns3;
26
27NS_LOG_COMPONENT_DEFINE ("DataOutputInterface");
28
29//--------------------------------------------------------------
30//----------------------------------------------
31DataOutputInterface::DataOutputInterface()
32{
33 NS_LOG_FUNCTION (this);
34}
36{
37 NS_LOG_FUNCTION (this);
38}
39/* static */
42{
43 static TypeId tid = TypeId ("ns3::DataOutputInterface")
44 .SetParent<Object> ()
45 .SetGroupName ("Stats")
46 // No AddConstructor because this is an abstract class.
47 ;
48 return tid;
49}
50
51void
53{
54 NS_LOG_FUNCTION (this);
55
57 // end DataOutputInterface::DoDispose
58}
59
60void
61DataOutputInterface::SetFilePrefix (const std::string prefix)
62{
63 NS_LOG_FUNCTION (this << prefix);
64
65 m_filePrefix = prefix;
66}
67
68std::string
70{
71 NS_LOG_FUNCTION (this);
72
73 return m_filePrefix;
74}
std::string GetFilePrefix() const
Gets the file prefix of the DataOutputInterface.
static TypeId GetTypeId(void)
Register this type.
std::string m_filePrefix
File prefix for the DataOutputInterface.
void SetFilePrefix(const std::string prefix)
Sets the DataOutputInterface prefix to the provided prefix.
virtual void DoDispose()
Destructor implementation.
A base class which provides memory management and object aggregation.
Definition: object.h:88
virtual void DoDispose(void)
Destructor implementation.
Definition: object.cc:346
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:922
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.