00001 // vim:set et sts=4 ts=4 tw=75 sw=4 ai ci cin cino=g0,t0: 00002 /* 00003 * Copyright (C) 2007, Technical Computer Science Group, 00004 * University of Bonn 00005 * 00006 * This file is part of the ReChannel library. 00007 * 00008 * The ReChannel library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU General Public License as 00010 * published by the Free Software Foundation; either version 2 of the 00011 * License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be 00014 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this library; see the file COPYING. If not, write to the 00020 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 00021 * Boston, MA 02110-1301, USA. 00022 * 00023 * Authors: Andreas Raabe and Armin Felke. Implementation by Armin Felke. 00024 * {raabe, felke}@cs.uni-bonn.de 00025 */ 00037 #include "rc_var.h" 00038 00039 namespace ReChannel { 00040 namespace internals { 00041 namespace resettable_var { 00042 00043 resettable_var_base::resettable_var_base() 00044 { 00045 /* scope brackets (=> delete tmp as soon as possible) */ { 00046 const std::auto_ptr<tmp_object> tmp(new tmp_object()); 00047 m_parent = tmp->get_parent_object(); 00048 } 00049 if (m_parent == NULL) { 00050 report_invalid_use_error(); 00051 return; 00052 } 00053 rc_register_resettable( 00054 *this, reinterpret_cast<sc_object*>(m_parent)); 00055 } 00056 00057 void resettable_var_base::report_invalid_use_error() 00058 { 00059 RC_REPORT_ERROR(RC_ID_INTERNAL_ERROR_, 00060 "invalid usage of rc_var object or broken module hierarchy"); 00061 } 00062 00063 } // namespace resettable_var 00064 } // namespace internals 00065 } // namespace ReChannel 00066 00067 // 00068 // $Id: rc_var.cpp,v 1.8 2007/12/06 11:42:43 felke Exp $ 00069 // $Source: /var/cvs/projekte/ReChannel-v2/src/ReChannel/components/rc_var.cpp,v $ 00070 // 00071