A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
data-collection-object.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Bucknell University
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Tiago G. Rodrigues (tgr002@bucknell.edu)
7 */
8
9#ifndef DATA_COLLECTION_OBJECT_H
10#define DATA_COLLECTION_OBJECT_H
11
12#include "ns3/object.h"
13
14#include <string>
15
16namespace ns3
17{
18
19/**
20 * @ingroup aggregator
21 *
22 * Base class for data collection framework objects.
23 *
24 * All data collection objects have 1) a string name, and 2) enabled
25 * or disabled status.
26 */
28{
29 public:
30 /**
31 * @brief Get the type ID.
32 * @return the object TypeId
33 */
34 static TypeId GetTypeId();
35
37 ~DataCollectionObject() override;
38
39 /// Set the status of an individual object.
40 void Enable();
41 /// Unset the status of an individual object.
42 void Disable();
43
44 /**
45 * Check the status of an individual object.
46 * @return true if the object is enabled
47 */
48 virtual bool IsEnabled() const;
49
50 /**
51 * Get the object's name.
52 * @return the object's name
53 */
54 std::string GetName() const;
55
56 /**
57 * Set the object's name.
58 * @param name the object's name
59 */
60 void SetName(std::string name);
61
62 protected:
63 /// Object's activation state.
65
66 /// Name of the object within the data collection framework
67 std::string m_name;
68};
69
70} // namespace ns3
71
72#endif // DATA_COLLECTION_OBJECT_H
std::string m_name
Name of the object within the data collection framework.
virtual bool IsEnabled() const
Check the status of an individual object.
std::string GetName() const
Get the object's name.
bool m_enabled
Object's activation state.
void Disable()
Unset the status of an individual object.
void SetName(std::string name)
Set the object's name.
void Enable()
Set the status of an individual object.
static TypeId GetTypeId()
Get the type ID.
Object()
Caller graph was not generated because of its size.
Definition object.cc:93
a unique identifier for an interface.
Definition type-id.h:49
Every class exported by the ns3 library is enclosed in the ns3 namespace.