Gnash  0.8.10
Relay.h
Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
00003 //   Free Software Foundation, Inc
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #ifndef GNASH_RELAY_H
00020 #define GNASH_RELAY_H
00021 
00022 #include <boost/noncopyable.hpp>
00023 
00024 namespace gnash {
00025     class as_object;
00026 }
00027 
00028 namespace gnash {
00029 
00031 //
00035 //
00038 //
00043 //
00046 //
00049 class Relay : boost::noncopyable
00050 {
00051 public:
00052     virtual ~Relay() = 0;
00053 
00055     virtual void setReachable() {}
00056 
00058     //
00061     virtual void clean() {}
00062 };
00063 
00064 inline Relay::~Relay()
00065 {
00066 }
00067 
00069 //
00072 //
00076 //
00079 class ActiveRelay : public Relay
00080 {
00081 public:
00082 
00083     explicit ActiveRelay(as_object* owner)
00084         :
00085         _owner(owner)
00086     {}
00087 
00089     virtual ~ActiveRelay();
00090 
00092     virtual void update() = 0;
00093 
00095     //
00097     virtual void setReachable();
00098 
00100     //
00102     virtual void clean();
00103 
00105     as_object& owner() const {
00106         return *_owner;
00107     }
00108 
00109 protected:
00110 
00112     //
00115     virtual void markReachableResources() const {}
00116 
00117 private:
00118 
00120     //
00123     as_object* _owner;
00124 
00125 };
00126 
00127 } // namespace gnash
00128 
00129 #endif