diff --git a/SConstruct b/SConstruct index 1d5246385..77a1b6c7f 100644 --- a/SConstruct +++ b/SConstruct @@ -546,7 +546,6 @@ common.add_inst_headers ([ 'chunk.h', 'tags.h', 'packet.h', - 'count-ptr-holder.tcc', 'ui-variable-tracer.h', 'si-variable-tracer.h', 'f-variable-tracer.h', diff --git a/src/common/count-ptr-holder.tcc b/src/common/count-ptr-holder.tcc deleted file mode 100644 index c67aeb4a1..000000000 --- a/src/common/count-ptr-holder.tcc +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ -/* - * Copyright (c) 2006 INRIA - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Mathieu Lacage - */ - -#ifndef COUNT_PTR_HOLDER_TCC -#define COUNT_PTR_HOLDER_TCC - -namespace ns3 { - -template -class CountPtrHolder { -public: - typedef T *real_type; - - CountPtrHolder (T *env) - : m_env (env) { - m_env->ref (); - } - ~CountPtrHolder () { - if (m_env != 0) { - m_env->unref (); - } - } - CountPtrHolder (CountPtrHolder const&o) { - m_env = o.m_env; - m_env->ref (); - } - T *remove (void) { - T *env = m_env; - m_env = 0; - return env; - } -private: - CountPtrHolder (); - CountPtrHolder &operator = (CountPtrHolder const& o); - T *m_env; -}; - -template -CountPtrHolder -make_count_ptr_holder (T *t) { - return CountPtrHolder (t); -} - -template -CountPtrHolder -make_const_count_ptr_holder (T *t) { - return CountPtrHolder (t); -} - -}; // namespace ns3 - -#endif /* REF_HOLDER_TCC */