00001 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 00002 /* 00003 * Copyright (c) 2007 University of Washington 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation; 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 */ 00018 00019 #include "ns3/log.h" 00020 #include "channel.h" 00021 #include "net-device.h" 00022 00023 NS_LOG_COMPONENT_DEFINE ("Channel"); 00024 00025 namespace ns3 { 00026 00027 NS_OBJECT_ENSURE_REGISTERED (Channel); 00028 00029 TypeId 00030 Channel::GetTypeId (void) 00031 { 00032 static TypeId tid = TypeId ("ns3::Channel") 00033 .SetParent<Object> (); 00034 return tid; 00035 } 00036 00037 Channel::Channel () 00038 : m_name("Channel") 00039 { 00040 NS_LOG_FUNCTION_NOARGS (); 00041 } 00042 00043 Channel::Channel (std::string name) 00044 : m_name(name) 00045 { 00046 NS_LOG_FUNCTION (this << name); 00047 } 00048 00049 Channel::~Channel () 00050 { 00051 NS_LOG_FUNCTION_NOARGS (); 00052 } 00053 00054 void 00055 Channel::SetName(std::string name) 00056 { 00057 NS_LOG_FUNCTION (this << name); 00058 m_name = name; 00059 } 00060 00061 std::string 00062 Channel::GetName(void) 00063 { 00064 NS_LOG_FUNCTION_NOARGS (); 00065 return m_name; 00066 } 00067 00068 } // namespace ns3