00001 /* vim: set sw=2: 00002 * Copyright (c) 2009, Gennady Bystritsky <bystr@mac.com> 00003 * 00004 * Distributed under the MIT Licence. 00005 * This is free software. See 'LICENSE' for details. 00006 * You must read and accept the license prior to use. 00007 * 00008 * Author: Gennady Bystritsky (gennady.bystritsky@quest.com) 00009 */ 00010 00011 #ifndef _SK_RT_SYNCHRONIZEDLIST_HXX_ 00012 #define _SK_RT_SYNCHRONIZEDLIST_HXX_ 00013 00014 #include <sk/rt/SynchronizedCollection.hxx> 00015 #include <sk/util/List.hxx> 00016 00017 namespace sk { 00018 namespace rt { 00019 template<typename T> 00020 class SynchronizedList 00021 : public sk::rt::SynchronizedCollection<T>, 00022 public virtual sk::util::List<T> 00023 { 00024 public: 00025 SynchronizedList(sk::util::List<T>& list); 00026 SynchronizedList(sk::util::List<T>* list); 00027 ~SynchronizedList(); 00028 00029 void process(T& object); 00030 00031 private: 00032 SynchronizedList(const SynchronizedList<T>& other); 00033 SynchronizedList<T>& operator = (const SynchronizedList<T>& other); 00034 00035 sk::util::List<T>& _list; 00036 }; 00037 } 00038 } 00039 00040 #endif /* _SK_RT_SYNCHRONIZEDLIST_HXX_ */