00001 /* Copyright (c) 2006, Gennady Bystritsky <bystr@mac.com> 00002 * 00003 * Distributed under the MIT Licence. 00004 * This is free software. See 'LICENSE' for details. 00005 * You must read and accept the license prior to use. 00006 */ 00007 00008 #ifndef _SK_UTIL_SLOT_HXX_ 00009 #define _SK_UTIL_SLOT_HXX_ 00010 00011 #include <sk/util/Object.h> 00012 00013 namespace sk { 00014 namespace util { 00015 template<class T> 00016 class Slot 00017 : public virtual sk::util::Object 00018 { 00019 public: 00020 virtual bool isOwner() const = 0; 00021 virtual T& get() const = 0; 00022 virtual T* deprive() = 0; 00023 virtual T* replace(T* object) = 0; 00024 }; 00025 } 00026 } 00027 00028 #endif /* _SK_UTIL_SLOT_HXX_ */