LEFT | RIGHT |
(no file at all) | |
| 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2012,2015 University of Zagreb |
| 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: Vedran Miletić <rivanvx@gmail.com> |
| 19 */ |
| 20 |
| 21 #include "stoppable-object.h" |
| 22 #include "log.h" |
| 23 |
| 24 NS_LOG_COMPONENT_DEFINE ("StoppableObject"); |
| 25 |
| 26 namespace ns3 { |
| 27 |
| 28 NS_OBJECT_ENSURE_REGISTERED (StoppableObject); |
| 29 |
| 30 TypeId |
| 31 StoppableObject::GetTypeId (void) |
| 32 { |
| 33 static TypeId tid = TypeId ("ns3::StoppableObject") |
| 34 .SetParent<Object> () |
| 35 .AddConstructor<StoppableObject> () |
| 36 .AddTraceSource ("RestartTrace", |
| 37 "Tracing change of object state to started", |
| 38 MakeTraceSourceAccessor (&StoppableObject::m_restartTrace), |
| 39 "void") |
| 40 .AddTraceSource ("StopTrace", |
| 41 "Tracing change of object state to stopped", |
| 42 MakeTraceSourceAccessor (&StoppableObject::m_stopTrace), |
| 43 "void") |
| 44 ; |
| 45 return tid; |
| 46 } |
| 47 |
| 48 StoppableObject::StoppableObject () |
| 49 { |
| 50 NS_LOG_FUNCTION (this); |
| 51 } |
| 52 |
| 53 StoppableObject::~StoppableObject () |
| 54 { |
| 55 NS_LOG_FUNCTION (this); |
| 56 } |
| 57 |
| 58 } // namespace ns3 |
LEFT | RIGHT |