197403Sobrien// -*- C++ -*- 297403Sobrien 3169691Skan// Copyright (C) 2005, 2006 Free Software Foundation, Inc. 4169691Skan// 597403Sobrien// This file is part of the GNU ISO C++ Library. This library is free 697403Sobrien// software; you can redistribute it and/or modify it under the terms 7132720Skan// of the GNU General Public License as published by the Free Software 897403Sobrien// Foundation; either version 2, or (at your option) any later 9132720Skan// version. 1097403Sobrien 1197403Sobrien// This library is distributed in the hope that it will be useful, but 1297403Sobrien// WITHOUT ANY WARRANTY; without even the implied warranty of 1397403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14132720Skan// General Public License for more details. 1597403Sobrien 1697403Sobrien// You should have received a copy of the GNU General Public License 1797403Sobrien// along with this library; see the file COPYING. If not, write to 1897403Sobrien// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, 1997403Sobrien// MA 02111-1307, USA. 20132720Skan 21169691Skan// As a special exception, you may use this file as part of a free 22169691Skan// software library without restriction. Specifically, if other files 2397403Sobrien// instantiate templates or use macros or inline functions from this 2497403Sobrien// file, or you compile this file and link it with other files to 2597403Sobrien// produce an executable, this file does not by itself cause the 2697403Sobrien// resulting executable to be covered by the GNU General Public 2797403Sobrien// License. This exception does not however invalidate any other 2897403Sobrien// reasons why the executable file might be covered by the GNU General 2997403Sobrien// Public License. 3097403Sobrien 3197403Sobrien// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. 3297403Sobrien 3397403Sobrien// Permission to use, copy, modify, sell, and distribute this software 34169691Skan// is hereby granted without fee, provided that the above copyright 35169691Skan// notice appears in all copies, and that both that copyright notice 3697403Sobrien// and this permission notice appear in supporting documentation. None 3797403Sobrien// of the above authors, nor IBM Haifa Research Laboratories, make any 3897403Sobrien// representation about the suitability of this software for any 3997403Sobrien// purpose. It is provided "as is" without express or implied 4097403Sobrien// warranty. 41132720Skan 42132720Skan/** 4397403Sobrien * @file constructors_destructor_fn_imps.hpp 4497403Sobrien * Contains an implementation for rc_binomial_heap_. 4597403Sobrien */ 4697403Sobrien 47169691SkanPB_DS_CLASS_T_DEC 48169691SkanPB_DS_CLASS_C_DEC:: 4997403Sobrienrc_binomial_heap_() 5097403Sobrien{ 5197403Sobrien _GLIBCXX_DEBUG_ONLY(assert_valid();) 5297403Sobrien } 53117397Skan 54117397SkanPB_DS_CLASS_T_DEC 55117397SkanPB_DS_CLASS_C_DEC:: 56117397Skanrc_binomial_heap_(const Cmp_Fn& r_cmp_fn) : 5797403Sobrien PB_DS_BASE_C_DEC(r_cmp_fn) 5897403Sobrien{ 5997403Sobrien _GLIBCXX_DEBUG_ONLY(assert_valid();) 6097403Sobrien } 6197403Sobrien 62171827SkanPB_DS_CLASS_T_DEC 6397403SobrienPB_DS_CLASS_C_DEC:: 6497403Sobrienrc_binomial_heap_(const PB_DS_CLASS_C_DEC& other) : 6597403Sobrien PB_DS_BASE_C_DEC(other) 66171827Skan{ 67169691Skan make_binomial_heap(); 68169691Skan 6997403Sobrien base_type::find_max(); 7097403Sobrien 7197403Sobrien _GLIBCXX_DEBUG_ONLY(assert_valid();) 72171827Skan } 7397403Sobrien 74171827SkanPB_DS_CLASS_T_DEC 7597403SobrienPB_DS_CLASS_C_DEC:: 7697403Sobrien~rc_binomial_heap_() 7797403Sobrien{ } 78171827Skan 79171827SkanPB_DS_CLASS_T_DEC 80171827Skanvoid 81102782SkanPB_DS_CLASS_C_DEC:: 8297403Sobrienswap(PB_DS_CLASS_C_DEC& other) 8397403Sobrien{ 8497403Sobrien _GLIBCXX_DEBUG_ONLY(assert_valid();) 8597403Sobrien _GLIBCXX_DEBUG_ONLY(other.assert_valid();) 8697403Sobrien 8797403Sobrien base_type::swap(other); 8897403Sobrien 8997403Sobrien m_rc.swap(other.m_rc); 9097403Sobrien 9197403Sobrien _GLIBCXX_DEBUG_ONLY(assert_valid();) 9297403Sobrien _GLIBCXX_DEBUG_ONLY(other.assert_valid();) 9397403Sobrien } 9497403Sobrien 9597403Sobrien