00001 // ---------------------------------------------------------------------------- 00002 // CERTI - HLA RunTime Infrastructure 00003 // Copyright (C) 2004 ONERA 00004 // 00005 // This file is part of CERTI-libCERTI 00006 // 00007 // CERTI-libCERTI is free software ; you can redistribute it and/or 00008 // modify it under the terms of the GNU Lesser General Public License 00009 // as published by the Free Software Foundation ; either version 2 of 00010 // the License, or (at your option) any later version. 00011 // 00012 // CERTI-libCERTI is distributed in the hope that it will be useful, but 00013 // WITHOUT ANY WARRANTY ; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this program ; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00020 // USA 00021 // 00022 // $Id: Handled.hh,v 3.2 2007/09/03 13:26:05 erk Exp $ 00023 // ---------------------------------------------------------------------------- 00024 00025 #ifndef LIBCERTI_HANDLED_HH 00026 #define LIBCERTI_HANDLED_HH 00027 00028 namespace certi { 00029 00038 template<typename T> 00039 class Handled 00040 { 00041 public: 00045 typedef T handle_type ; 00046 00051 Handled(); 00052 00057 Handled(handle_type hValue); 00058 00063 void setHandle(handle_type hValue); 00064 00069 handle_type getHandle() const ; 00070 00071 protected: 00072 handle_type handle ; 00073 }; 00074 00075 template<typename T> 00076 Handled<T>::Handled() 00077 : handle(0) { } 00078 00079 template<typename T> 00080 Handled<T>::Handled(T hValue) 00081 : handle(hValue) { } 00082 00083 template<typename T> 00084 void 00085 Handled<T>::setHandle(T hValue) 00086 { 00087 handle = hValue ; 00088 } 00089 00090 template<class T> 00091 T 00092 Handled<T>::getHandle() const 00093 { 00094 return handle ; 00095 } 00096 00097 } // certi 00098 00099 #endif // LIBCERTI_HANDLED_HH 00100 00101 // $Id: Handled.hh,v 3.2 2007/09/03 13:26:05 erk Exp $