kick
/Users/morten/Programmering/cpp/kick/src/kick/core/event_listener.inl
00001 namespace kick{
00002     template <typename E>
00003     inline EventListener<E>::EventListener(){
00004     };
00005 
00006     template <typename E>
00007     inline EventListener<E>::EventListener(Event<E> *e, int listenerId)
00008     :AbstractEventListener(e, listenerId)
00009     {
00010     }
00011 
00012     template <typename E>
00013     inline EventListener<E>::EventListener(EventListener&& other){
00014         listenerId = other.listenerId;
00015         ae = other.ae;
00016         other.ae = nullptr;
00017     }
00018     template <typename E>
00019     inline EventListener<E>& EventListener<E>::operator=( EventListener<E>&& rhs ) {
00020         if (this != &rhs){
00021             destroyListener();
00022             listenerId = rhs.listenerId;
00023             ae = rhs.ae;
00024             rhs.ae = nullptr;
00025         }
00026         return *this;
00027     };
00028 
00029     template <typename E>
00030     inline SyncValue<E>::SyncValue(){
00031     }
00032 
00033     template <typename E>
00034     inline E& SyncValue<E>::getValue(){
00035         return value;
00036     }
00037 
00038     template <typename E>
00039     inline void SyncValue<E>::setValue(const E& e){
00040         value = e;
00041     }
00042 
00043     template <typename E>
00044     inline SyncValue<E>::SyncValue(SyncValue&& other){
00045         listenerId = other.listenerId;
00046         ae = other.ae;
00047         value = std::move(other.value);
00048         other.ae = nullptr;
00049     }
00050 
00051     template <typename E>
00052     inline SyncValue<E>& SyncValue<E>::operator=( SyncValue<E>&& rhs ) {
00053         if (this != &rhs){
00054             destroyListener();
00055             listenerId = rhs.listenerId;
00056             ae = rhs.ae;
00057             value = std::move(rhs.value);
00058             rhs.ae = nullptr;
00059         }
00060         return *this;
00061     };
00062 
00063 }
 All Classes Functions Variables