remove dead code.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue Aug 26 08:41:21 2008 -0700 (17 months ago)
changeset 35751c401259af61
parent 3573 065488d0420c
child 3576 acd6d5b9c40d
remove dead code.
src/core/uid-manager.cc
src/core/uid-manager.h
src/core/wscript
     1.1 --- a/src/core/uid-manager.cc	Mon Aug 25 15:21:01 2008 -0700
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,65 +0,0 @@
     1.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
     1.5 -/*
     1.6 - * Copyright (c) 2007 INRIA
     1.7 - *
     1.8 - * This program is free software; you can redistribute it and/or modify
     1.9 - * it under the terms of the GNU General Public License version 2 as
    1.10 - * published by the Free Software Foundation;
    1.11 - *
    1.12 - * This program is distributed in the hope that it will be useful,
    1.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.15 - * GNU General Public License for more details.
    1.16 - *
    1.17 - * You should have received a copy of the GNU General Public License
    1.18 - * along with this program; if not, write to the Free Software
    1.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.20 - *
    1.21 - * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
    1.22 - */
    1.23 -#include "uid-manager.h"
    1.24 -#include "fatal-error.h"
    1.25 -#include "assert.h"
    1.26 -
    1.27 -
    1.28 -namespace ns3 {
    1.29 -
    1.30 -
    1.31 -uint32_t 
    1.32 -UidManager::Allocate (std::string name)
    1.33 -{
    1.34 -  for (NameList::iterator i = m_nameList.begin (); i != m_nameList.end (); i++)
    1.35 -    {
    1.36 -      if ((*i) == name)
    1.37 -	{
    1.38 -	  NS_FATAL_ERROR ("Trying to allocate twice the same uid: " << name);
    1.39 -	}
    1.40 -    }
    1.41 -  m_nameList.push_back (name);
    1.42 -  return m_nameList.size ();
    1.43 -}
    1.44 -
    1.45 -uint32_t 
    1.46 -UidManager::LookupByName (std::string name)
    1.47 -{
    1.48 -  uint32_t j = 0;
    1.49 -  for (NameList::iterator i = m_nameList.begin (); i != m_nameList.end (); i++)
    1.50 -    {
    1.51 -      j++;
    1.52 -      if ((*i) == name)
    1.53 -        {
    1.54 -          return j;
    1.55 -        }
    1.56 -    }
    1.57 -  return 0;
    1.58 -}
    1.59 -
    1.60 -std::string 
    1.61 -UidManager::LookupByUid (uint32_t uid)
    1.62 -{
    1.63 -  NS_ASSERT (uid > 0);
    1.64 -  NS_ASSERT (m_nameList.size () >= uid);
    1.65 -  return m_nameList[uid-1];
    1.66 -}
    1.67 -
    1.68 -} // namespace ns3
     2.1 --- a/src/core/uid-manager.h	Mon Aug 25 15:21:01 2008 -0700
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,46 +0,0 @@
     2.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
     2.5 -/*
     2.6 - * Copyright (c) 2007 INRIA
     2.7 - *
     2.8 - * This program is free software; you can redistribute it and/or modify
     2.9 - * it under the terms of the GNU General Public License version 2 as
    2.10 - * published by the Free Software Foundation;
    2.11 - *
    2.12 - * This program is distributed in the hope that it will be useful,
    2.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.15 - * GNU General Public License for more details.
    2.16 - *
    2.17 - * You should have received a copy of the GNU General Public License
    2.18 - * along with this program; if not, write to the Free Software
    2.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2.20 - *
    2.21 - * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
    2.22 - */
    2.23 -#ifndef UID_MANAGER_H
    2.24 -#define UID_MANAGER_H
    2.25 -
    2.26 -#include <stdint.h>
    2.27 -#include <string>
    2.28 -#include <vector>
    2.29 -
    2.30 -namespace ns3 {
    2.31 -
    2.32 -/**
    2.33 - * zero is never a valid uid value.
    2.34 - */
    2.35 -class UidManager
    2.36 -{
    2.37 -public:
    2.38 -  uint32_t LookupByName (std::string name);
    2.39 -  std::string LookupByUid (uint32_t uid);
    2.40 -  uint32_t Allocate (std::string name);
    2.41 -private:
    2.42 -  typedef std::vector<std::string> NameList;
    2.43 -  NameList m_nameList;
    2.44 -};
    2.45 -
    2.46 -} // namespace ns3
    2.47 -
    2.48 -
    2.49 -#endif /* UID_MANAGER_H */
     3.1 --- a/src/core/wscript	Mon Aug 25 15:21:01 2008 -0700
     3.2 +++ b/src/core/wscript	Tue Aug 26 08:41:21 2008 -0700
     3.3 @@ -45,7 +45,6 @@
     3.4          'test.cc',
     3.5          'random-variable.cc',
     3.6          'rng-stream.cc',
     3.7 -        'uid-manager.cc',
     3.8          'command-line.cc',
     3.9          'type-name.cc',
    3.10          'type-traits-test.cc',