A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
data-output-interface.h
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 #ifndef DATA_OUTPUT_INTERFACE_H
22 #define DATA_OUTPUT_INTERFACE_H
23 
24 #include "ns3/object.h"
25 #include "ns3/nstime.h"
26 #include "ns3/data-calculator.h"
27 
28 namespace ns3 {
29 
30 class DataCollector;
31 
32 //------------------------------------------------------------
33 //--------------------------------------------
38 class DataOutputInterface : public Object {
39 public:
41  virtual ~DataOutputInterface();
42 
43  virtual void Output (DataCollector &dc) = 0;
44 
45  void SetFilePrefix (const std::string prefix);
46  std::string GetFilePrefix () const;
47 
48 protected:
49  virtual void DoDispose ();
50 
51  std::string m_filePrefix;
52 
53  // end class DataOutputInterface
54 };
55 
61 public:
62  virtual ~DataOutputCallback() {}
63 
64  virtual void OutputStatistic (std::string key,
65  std::string variable,
66  const StatisticalSummary *statSum) = 0;
67 
68  virtual void OutputSingleton (std::string key,
69  std::string variable,
70  int val) = 0;
71 
72  virtual void OutputSingleton (std::string key,
73  std::string variable,
74  uint32_t val) = 0;
75 
76  virtual void OutputSingleton (std::string key,
77  std::string variable,
78  double val) = 0;
79 
80  virtual void OutputSingleton (std::string key,
81  std::string variable,
82  std::string val) = 0;
83 
84  virtual void OutputSingleton (std::string key,
85  std::string variable,
86  Time val) = 0;
87  // end class DataOutputCallback
88 };
89 
90 // end namespace ns3
91 };
92 
93 
94 #endif /* DATA_OUTPUT_INTERFACE_H */
keep track of time unit.
Definition: nstime.h:149
a base class which provides memory management and object aggregation
Definition: object.h:63