00001 /************************************************************************/ 00002 /* This file is part of openMask(c) INRIA, CNRS, Universite de Rennes 1 */ 00003 /* 1993-2002, thereinafter the Software */ 00004 /* */ 00005 /* The Software has been developped within the Siames Project. */ 00006 /* INRIA, the University of Rennes 1 and CNRS jointly hold intellectual */ 00007 /* property rights */ 00008 /* */ 00009 /* The Software has been registered with the Agence pour la Protection */ 00010 /* des Programmes (APP) under registration number */ 00011 /* IDDN.FR.001.510008.00.S.P.2001.000.41200 */ 00012 /* */ 00013 /* This file may be distributed under the terms of the Q Public License */ 00014 /* version 1.0 as defined by Trolltech AS of Norway and appearing in */ 00015 /* the file LICENSE.QPL included in the packaging of this file. */ 00016 /* */ 00017 /* Licensees holding valid specific licenses issued by INRIA, CNRS or */ 00018 /* Universite Rennes 1 for the software may use this file in */ 00019 /* acordance with that specific license */ 00020 /************************************************************************/ 00021 00022 00023 #if !defined _ACCESSLEVEL_H_ 00024 #define _ACCESSLEVEL_H_ 00025 00026 #include "OMKControlTakeOverPrm.h" 00027 #include <list> 00028 #include <iostream> 00029 00030 namespace OMK 00031 { 00032 class OutgoingSynchronisationMessage ; 00033 class IncomingSynchronisationMessage ; 00034 class ConfigurationParameterDescriptor ; 00035 namespace Type 00036 { 00037 template< typename Type > 00038 class AccessLevelList ; 00039 } 00040 } 00043 template< typename ItemType > 00044 std::ostream& operator << ( std::ostream& out, const OMK::Type::AccessLevelList< ItemType >& a ) ; 00045 00048 template< typename ItemType > 00049 std::istream& operator >> ( std::istream& in, OMK::Type::AccessLevelList< ItemType >& a ) ; 00050 00053 template< typename ItemType > 00054 OMK::OutgoingSynchronisationMessage& operator << 00055 ( OMK::OutgoingSynchronisationMessage& out, const OMK::Type::AccessLevelList< ItemType >& a ) ; 00056 00059 template< typename ItemType > 00060 OMK::IncomingSynchronisationMessage& operator >> 00061 ( OMK::IncomingSynchronisationMessage& in, OMK::Type::AccessLevelList< ItemType >& a ) ; 00062 00063 namespace OMK 00064 { 00065 namespace Type 00066 { 00072 template< typename ItemType > 00073 class AccessLevelList : public AccessGroup 00074 { 00075 public: 00076 typedef std::list< ItemType > ItemsList ; 00078 00079 00080 AccessLevelList(); 00082 AccessLevelList( const AccessLevelList& ref ) ; 00084 AccessLevelList( OMK::Name group, AccessLevel accessLevel ) ; 00086 AccessLevelList( const AccessGroup& access ) ; 00088 AccessLevelList( OMK::Name group, AccessLevel accessLevel, const ItemsList& items ) ; 00090 virtual ~AccessLevelList() ; 00092 AccessLevelList& operator = ( const AccessLevelList& ref ) ; 00094 00095 public: 00097 void addItem( const ItemType& item ) { _items.push_back( item ) ; } 00098 00099 00100 protected: 00102 void _copy( const AccessLevelList& ref ) ; 00103 00104 public: 00106 00107 00108 ItemsList _items ; 00110 protected: 00112 void _copy( const ControlTakeOverPrm& q ) ; 00113 00115 friend class OMK::ParametersAccessor ; 00116 00118 00119 // stream operator for ostream. 00120 template< typename ItemType > 00121 friend std::ostream& ::operator << ( std::ostream& out, const AccessLevelList< ItemType >& c ) ; 00122 00123 // stream operator for istream. 00124 template< typename ItemType > 00125 friend std::istream& ::operator >> ( std::istream& in, AccessLevelList< ItemType >& c ) ; 00126 00127 // stream operator for OutgoingSynchronisationMessage. 00128 template< typename ItemType > 00129 friend OMK::OutgoingSynchronisationMessage& ::operator << 00130 ( OMK::OutgoingSynchronisationMessage& out, const AccessLevelList< ItemType >& c ) ; 00131 00132 // stream operator for IncomingSynchronisationMessage. 00133 template< typename ItemType > 00134 friend OMK::IncomingSynchronisationMessage& ::operator >> 00135 ( OMK::IncomingSynchronisationMessage& in, AccessLevelList< ItemType >& c ) ; 00137 } ; 00138 00139 }// namespace Type 00140 }// namespace OMK 00141 00142 00143 #endif // defined _ACCESSLEVEL_H_
Documentation generated on Mon Jun 9 11:45:55 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |